MPI-AMRVAC 3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
This module defines the procedures of a physics module. It contains function pointers for the various supported routines. An actual physics module has to set these pointers to its implementation of these routines. More...
Data Types | |
interface | sub_add_source |
interface | sub_add_source_geom |
interface | sub_boundary_adjust |
interface | sub_check_params |
interface | sub_check_w |
interface | sub_clean_divb |
clean initial divb More... | |
interface | sub_convert |
interface | sub_evaluate_implicit |
interface | sub_face_to_center |
interface | sub_get_a2max |
interface | sub_get_auxiliary |
interface | sub_get_auxiliary_prim |
interface | sub_get_cbounds |
interface | sub_get_cmax |
interface | sub_get_cs2max |
interface | sub_get_ct_velocity |
interface | sub_get_dt |
interface | sub_get_flux |
interface | sub_get_h_speed |
interface | sub_get_pthermal |
interface | sub_get_rho |
interface | sub_get_tcutoff |
interface | sub_get_tgas |
interface | sub_get_trad |
interface | sub_get_v |
interface | sub_get_var |
interface | sub_global_source |
Add global source terms on complete domain (potentially implicit) More... | |
interface | sub_implicit_update |
interface | sub_modify_wlr |
interface | sub_set_equi_vars |
set equilibrium variables other than b0 (e.g. p0 and rho0) More... | |
interface | sub_set_mg_bounds |
interface | sub_small_values |
interface | sub_special_advance |
Add special advance in each advect step. More... | |
interface | sub_trac_after_setdt |
interface | sub_update_faces |
interface | sub_update_temperature |
interface | sub_write_info |
Functions/Subroutines | |
subroutine | phys_check () |
subroutine | dummy_init_params |
subroutine | dummy_check_params |
subroutine | dummy_modify_wlr (ixil, ixol, qt, wlc, wrc, wlp, wrp, s, idir) |
subroutine | dummy_get_h_speed (wprim, x, ixil, ixol, idim, hspeed) |
subroutine | dummy_get_a2max (w, x, ixil, ixol, a2max) |
subroutine | dummy_get_cs2max (w, x, ixil, ixol, cs2max) |
subroutine | dummy_add_source_geom (qdt, dtfactor, ixil, ixol, wct, wprim, w, x) |
subroutine | dummy_add_source (qdt, dtfactor, ixil, ixol, wct, wctprim, w, x, qsourcesplit, active) |
subroutine | dummy_check_w (primitive, ixil, ixol, w, w_flag) |
subroutine | dummy_get_pthermal (w, x, ixil, ixol, pth) |
subroutine | dummy_get_auxiliary (ixil, ixol, w, x) |
subroutine | dummy_get_auxiliary_prim (ixil, ixol, w) |
subroutine | dummy_boundary_adjust (igrid, psb) |
subroutine | dummy_write_info (fh) |
subroutine | dummy_small_values (primitive, w, x, ixil, ixol, subname) |
subroutine | dummy_get_ct_velocity (vcts, wlp, wrp, ixil, ixol, idim, cmax, cmin) |
subroutine | dummy_update_faces (ixil, ixol, qt, qdt, wprim, fc, fe, sct, s, vcts) |
subroutine | dummy_face_to_center (ixol, s) |
subroutine | dummy_evaluate_implicit (qtc, psa) |
subroutine | dummy_implicit_update (dtfactor, qdt, qtc, psa, psb) |
Variables | |
double precision | phys_gamma =5.d0/3.d0 |
integer | phys_wider_stencil = 0 |
To use wider stencils in flux calculations. A value of 1 will extend it by one cell in both directions, in any dimension. | |
integer, dimension(:, :), allocatable | flux_type |
Array per direction per variable, which can be used to specify that certain fluxes have to be treated differently. | |
integer, parameter | flux_default = 0 |
Indicates a normal flux. | |
integer, parameter | flux_tvdlf = 1 |
Indicates the flux should be treated with tvdlf. | |
integer, parameter | flux_no_dissipation = 2 |
Indicates dissipation should be omitted. | |
integer, parameter | flux_special = 3 |
Indicates the flux should be specially treated. | |
integer, parameter | flux_hll = 4 |
Indicates the flux should be treated with hll. | |
logical | phys_energy =.false. |
Solve energy equation or not. | |
logical | phys_total_energy =.false. |
Solve total energy equation or not. | |
logical | phys_internal_e =.false. |
Solve internal energy instead of total energy. | |
logical | phys_partial_ionization =.false. |
Solve partially ionized one-fluid plasma. | |
logical | phys_equi_pe =.false. |
if equilibrium pressure is splitted | |
character(len=name_len) | physics_type = "" |
String describing the physics type of the simulation. | |
procedure(sub_check_params), pointer | phys_check_params => null() |
procedure(sub_set_mg_bounds), pointer | phys_set_mg_bounds => null() |
procedure(sub_convert), pointer | phys_to_conserved => null() |
procedure(sub_convert), pointer | phys_to_primitive => null() |
procedure(sub_modify_wlr), pointer | phys_modify_wlr => null() |
procedure(sub_get_cmax), pointer | phys_get_cmax => null() |
procedure(sub_get_a2max), pointer | phys_get_a2max => null() |
procedure(sub_get_cs2max), pointer | phys_get_cs2max => null() |
procedure(sub_get_tcutoff), pointer | phys_get_tcutoff => null() |
procedure(sub_trac_after_setdt), pointer | phys_trac_after_setdt => null() |
procedure(sub_get_h_speed), pointer | phys_get_h_speed => null() |
procedure(sub_get_cbounds), pointer | phys_get_cbounds => null() |
procedure(sub_get_flux), pointer | phys_get_flux => null() |
procedure(sub_get_v), pointer | phys_get_v => null() |
procedure(sub_get_rho), pointer | phys_get_rho => null() |
procedure(sub_get_dt), pointer | phys_get_dt => null() |
procedure(sub_add_source_geom), pointer | phys_add_source_geom => null() |
procedure(sub_add_source), pointer | phys_add_source => null() |
procedure(sub_global_source), pointer | phys_global_source_after => null() |
procedure(sub_special_advance), pointer | phys_special_advance => null() |
procedure(sub_check_w), pointer | phys_check_w => null() |
procedure(sub_get_pthermal), pointer | phys_get_pthermal => null() |
procedure(sub_get_tgas), pointer | phys_get_tgas => null() |
procedure(sub_get_trad), pointer | phys_get_trad => null() |
procedure(sub_boundary_adjust), pointer | phys_boundary_adjust => null() |
procedure(sub_write_info), pointer | phys_write_info => null() |
procedure(sub_small_values), pointer | phys_handle_small_values => null() |
procedure(sub_get_ct_velocity), pointer | phys_get_ct_velocity => null() |
procedure(sub_update_faces), pointer | phys_update_faces => null() |
procedure(sub_face_to_center), pointer | phys_face_to_center => null() |
procedure(sub_implicit_update), pointer | phys_implicit_update => null() |
procedure(sub_evaluate_implicit), pointer | phys_evaluate_implicit => null() |
procedure(sub_clean_divb), pointer | phys_clean_divb => null() |
procedure(sub_set_equi_vars), pointer | phys_set_equi_vars => null() |
procedure(sub_check_params), pointer | phys_te_images => null() |
procedure(sub_update_temperature), pointer | phys_update_temperature => null() |
procedure(sub_get_auxiliary), pointer | phys_get_auxiliary => null() |
procedure(sub_get_auxiliary_prim), pointer | phys_get_auxiliary_prim => null() |
This module defines the procedures of a physics module. It contains function pointers for the various supported routines. An actual physics module has to set these pointers to its implementation of these routines.
subroutine mod_physics::dummy_add_source | ( | double precision, intent(in) | qdt, |
double precision, intent(in) | dtfactor, | ||
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s, 1:nw), intent(in) | wct, | ||
double precision, dimension(ixi^s,1:nw), intent(in) | wctprim, | ||
double precision, dimension(ixi^s, 1:nw), intent(inout) | w, | ||
double precision, dimension(ixi^s, 1:ndim), intent(in) | x, | ||
logical, intent(in) | qsourcesplit, | ||
logical, intent(inout) | active | ||
) |
Definition at line 513 of file mod_physics.t.
subroutine mod_physics::dummy_add_source_geom | ( | double precision, intent(in) | qdt, |
double precision, intent(in) | dtfactor, | ||
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s, 1:nw), intent(inout) | wct, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wprim, | ||
double precision, dimension(ixi^s, 1:nw), intent(inout) | w, | ||
double precision, dimension(ixi^s, 1:^nd), intent(in) | x | ||
) |
Definition at line 506 of file mod_physics.t.
subroutine mod_physics::dummy_boundary_adjust | ( | integer, intent(in) | igrid, |
type(state), dimension(max_blocks), target | psb | ||
) |
Definition at line 568 of file mod_physics.t.
subroutine mod_physics::dummy_check_params |
Definition at line 468 of file mod_physics.t.
subroutine mod_physics::dummy_check_w | ( | logical, intent(in) | primitive, |
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s,1:nw), intent(in) | w, | ||
logical, dimension(ixi^s,1:nw), intent(inout) | w_flag | ||
) |
Definition at line 525 of file mod_physics.t.
subroutine mod_physics::dummy_evaluate_implicit | ( | double precision, intent(in) | qtc, |
type(state), dimension(max_blocks), target | psa | ||
) |
Definition at line 623 of file mod_physics.t.
subroutine mod_physics::dummy_face_to_center | ( | integer, intent(in) | ixo, |
integer, intent(in) | l, | ||
type(state) | s | ||
) |
Definition at line 617 of file mod_physics.t.
subroutine mod_physics::dummy_get_a2max | ( | double precision, dimension(ixi^s, nw), intent(in) | w, |
double precision, dimension(ixi^s, 1:^nd), intent(in) | x, | ||
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ndim), intent(inout) | a2max | ||
) |
subroutine mod_physics::dummy_get_auxiliary | ( | integer, intent(in) | ixi, |
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s, nw), intent(inout) | w, | ||
double precision, dimension(ixi^s, 1:ndim), intent(in) | x | ||
) |
subroutine mod_physics::dummy_get_auxiliary_prim | ( | integer, intent(in) | ixi, |
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s, nw), intent(inout) | w | ||
) |
subroutine mod_physics::dummy_get_cs2max | ( | double precision, dimension(ixi^s, nw), intent(in) | w, |
double precision, dimension(ixi^s, 1:^nd), intent(in) | x, | ||
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, intent(inout) | cs2max | ||
) |
subroutine mod_physics::dummy_get_ct_velocity | ( | type(ct_velocity), intent(inout) | vcts, |
double precision, dimension(ixi^s, nw), intent(in) | wlp, | ||
double precision, dimension(ixi^s, nw), intent(in) | wrp, | ||
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
integer, intent(in) | idim, | ||
double precision, dimension(ixi^s), intent(in) | cmax, | ||
double precision, dimension(ixi^s), intent(in), optional | cmin | ||
) |
Definition at line 595 of file mod_physics.t.
subroutine mod_physics::dummy_get_h_speed | ( | double precision, dimension(ixi^s, nw), intent(in) | wprim, |
double precision, dimension(ixi^s,1:ndim), intent(in) | x, | ||
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
integer, intent(in) | idim, | ||
double precision, dimension(ixi^s,1:number_species), intent(out) | hspeed | ||
) |
Definition at line 480 of file mod_physics.t.
subroutine mod_physics::dummy_get_pthermal | ( | double precision, dimension(ixi^s, nw), intent(in) | w, |
double precision, dimension(ixi^s, 1:ndim), intent(in) | x, | ||
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s), intent(out) | pth | ||
) |
subroutine mod_physics::dummy_implicit_update | ( | double precision, intent(in) | dtfactor, |
double precision, intent(in) | qdt, | ||
double precision, intent(in) | qtc, | ||
type(state), dimension(max_blocks), target | psa, | ||
type(state), dimension(max_blocks), target | psb | ||
) |
Definition at line 639 of file mod_physics.t.
subroutine mod_physics::dummy_init_params |
Definition at line 465 of file mod_physics.t.
subroutine mod_physics::dummy_modify_wlr | ( | integer, intent(in) | ixi, |
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, intent(in) | qt, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wlc, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wrc, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wlp, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wrp, | ||
type(state) | s, | ||
integer, intent(in) | idir | ||
) |
Definition at line 471 of file mod_physics.t.
subroutine mod_physics::dummy_small_values | ( | logical, intent(in) | primitive, |
double precision, dimension(ixi^s,1:nw), intent(inout) | w, | ||
double precision, dimension(ixi^s,1:ndim), intent(in) | x, | ||
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
character(len=*), intent(in) | subname | ||
) |
Definition at line 586 of file mod_physics.t.
subroutine mod_physics::dummy_update_faces | ( | integer, intent(in) | ixi, |
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, intent(in) | qt, | ||
double precision, intent(in) | qdt, | ||
double precision, dimension(ixi^s,1:nw), intent(in) | wprim, | ||
double precision, dimension(ixi^s,1:nwflux,1:ndim), intent(in) | fc, | ||
double precision, dimension(ixi^s,sdim:3), intent(inout) | fe, | ||
type(state) | sct, | ||
type(state) | s, | ||
type(ct_velocity) | vcts | ||
) |
Definition at line 605 of file mod_physics.t.
subroutine mod_physics::dummy_write_info | ( | integer, intent(in) | fh | ) |
[in] | fh | File handle |
Definition at line 574 of file mod_physics.t.
subroutine mod_physics::phys_check |
integer, parameter mod_physics::flux_default = 0 |
Indicates a normal flux.
Definition at line 24 of file mod_physics.t.
integer, parameter mod_physics::flux_hll = 4 |
Indicates the flux should be treated with hll.
Definition at line 32 of file mod_physics.t.
integer, parameter mod_physics::flux_no_dissipation = 2 |
Indicates dissipation should be omitted.
Definition at line 28 of file mod_physics.t.
integer, parameter mod_physics::flux_special = 3 |
Indicates the flux should be specially treated.
Definition at line 30 of file mod_physics.t.
integer, parameter mod_physics::flux_tvdlf = 1 |
Indicates the flux should be treated with tvdlf.
Definition at line 26 of file mod_physics.t.
integer, dimension(:, :), allocatable mod_physics::flux_type |
Array per direction per variable, which can be used to specify that certain fluxes have to be treated differently.
Definition at line 21 of file mod_physics.t.
procedure(sub_add_source), pointer mod_physics::phys_add_source => null() |
Definition at line 69 of file mod_physics.t.
procedure(sub_add_source_geom), pointer mod_physics::phys_add_source_geom => null() |
Definition at line 68 of file mod_physics.t.
procedure(sub_boundary_adjust), pointer mod_physics::phys_boundary_adjust => null() |
Definition at line 76 of file mod_physics.t.
procedure(sub_check_params), pointer mod_physics::phys_check_params => null() |
Definition at line 52 of file mod_physics.t.
procedure(sub_check_w), pointer mod_physics::phys_check_w => null() |
Definition at line 72 of file mod_physics.t.
procedure(sub_clean_divb), pointer mod_physics::phys_clean_divb => null() |
Definition at line 84 of file mod_physics.t.
logical mod_physics::phys_energy =.false. |
Solve energy equation or not.
Definition at line 35 of file mod_physics.t.
logical mod_physics::phys_equi_pe =.false. |
if equilibrium pressure is splitted
Definition at line 47 of file mod_physics.t.
procedure(sub_evaluate_implicit), pointer mod_physics::phys_evaluate_implicit => null() |
Definition at line 83 of file mod_physics.t.
procedure(sub_face_to_center), pointer mod_physics::phys_face_to_center => null() |
Definition at line 81 of file mod_physics.t.
double precision mod_physics::phys_gamma =5.d0/3.d0 |
Definition at line 13 of file mod_physics.t.
procedure(sub_get_a2max), pointer mod_physics::phys_get_a2max => null() |
Definition at line 58 of file mod_physics.t.
procedure(sub_get_auxiliary), pointer mod_physics::phys_get_auxiliary => null() |
Definition at line 91 of file mod_physics.t.
procedure(sub_get_auxiliary_prim), pointer mod_physics::phys_get_auxiliary_prim => null() |
Definition at line 92 of file mod_physics.t.
procedure(sub_get_cbounds), pointer mod_physics::phys_get_cbounds => null() |
Definition at line 63 of file mod_physics.t.
procedure(sub_get_cmax), pointer mod_physics::phys_get_cmax => null() |
Definition at line 57 of file mod_physics.t.
procedure(sub_get_cs2max), pointer mod_physics::phys_get_cs2max => null() |
Definition at line 59 of file mod_physics.t.
procedure(sub_get_ct_velocity), pointer mod_physics::phys_get_ct_velocity => null() |
Definition at line 79 of file mod_physics.t.
procedure(sub_get_dt), pointer mod_physics::phys_get_dt => null() |
Definition at line 67 of file mod_physics.t.
procedure(sub_get_flux), pointer mod_physics::phys_get_flux => null() |
Definition at line 64 of file mod_physics.t.
procedure(sub_get_h_speed), pointer mod_physics::phys_get_h_speed => null() |
Definition at line 62 of file mod_physics.t.
procedure(sub_get_pthermal), pointer mod_physics::phys_get_pthermal => null() |
Definition at line 73 of file mod_physics.t.
procedure(sub_get_rho), pointer mod_physics::phys_get_rho => null() |
Definition at line 66 of file mod_physics.t.
procedure(sub_get_tcutoff), pointer mod_physics::phys_get_tcutoff => null() |
Definition at line 60 of file mod_physics.t.
procedure(sub_get_tgas), pointer mod_physics::phys_get_tgas => null() |
Definition at line 74 of file mod_physics.t.
procedure(sub_get_trad), pointer mod_physics::phys_get_trad => null() |
Definition at line 75 of file mod_physics.t.
procedure(sub_get_v), pointer mod_physics::phys_get_v => null() |
Definition at line 65 of file mod_physics.t.
procedure(sub_global_source), pointer mod_physics::phys_global_source_after => null() |
Definition at line 70 of file mod_physics.t.
procedure(sub_small_values), pointer mod_physics::phys_handle_small_values => null() |
Definition at line 78 of file mod_physics.t.
procedure(sub_implicit_update), pointer mod_physics::phys_implicit_update => null() |
Definition at line 82 of file mod_physics.t.
logical mod_physics::phys_internal_e =.false. |
Solve internal energy instead of total energy.
Definition at line 41 of file mod_physics.t.
procedure(sub_modify_wlr), pointer mod_physics::phys_modify_wlr => null() |
Definition at line 56 of file mod_physics.t.
logical mod_physics::phys_partial_ionization =.false. |
Solve partially ionized one-fluid plasma.
Definition at line 44 of file mod_physics.t.
procedure(sub_set_equi_vars), pointer mod_physics::phys_set_equi_vars => null() |
Definition at line 86 of file mod_physics.t.
procedure(sub_set_mg_bounds), pointer mod_physics::phys_set_mg_bounds => null() |
Definition at line 53 of file mod_physics.t.
procedure(sub_special_advance), pointer mod_physics::phys_special_advance => null() |
Definition at line 71 of file mod_physics.t.
procedure(sub_check_params), pointer mod_physics::phys_te_images => null() |
Definition at line 88 of file mod_physics.t.
procedure(sub_convert), pointer mod_physics::phys_to_conserved => null() |
Definition at line 54 of file mod_physics.t.
procedure(sub_convert), pointer mod_physics::phys_to_primitive => null() |
Definition at line 55 of file mod_physics.t.
logical mod_physics::phys_total_energy =.false. |
Solve total energy equation or not.
Definition at line 38 of file mod_physics.t.
procedure(sub_trac_after_setdt), pointer mod_physics::phys_trac_after_setdt => null() |
Definition at line 61 of file mod_physics.t.
procedure(sub_update_faces), pointer mod_physics::phys_update_faces => null() |
Definition at line 80 of file mod_physics.t.
procedure(sub_update_temperature), pointer mod_physics::phys_update_temperature => null() |
Definition at line 90 of file mod_physics.t.
integer mod_physics::phys_wider_stencil = 0 |
To use wider stencils in flux calculations. A value of 1 will extend it by one cell in both directions, in any dimension.
Definition at line 17 of file mod_physics.t.
procedure(sub_write_info), pointer mod_physics::phys_write_info => null() |
Definition at line 77 of file mod_physics.t.
character(len=name_len) mod_physics::physics_type = "" |
String describing the physics type of the simulation.
Definition at line 50 of file mod_physics.t.