MPI-AMRVAC 3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
Radiation-Hydrodynamics physics module Module aims at solving the Hydrodynamic equations toghether with the zeroth moment of the radiative transfer equation. A closure is provided by the flux limited diffusion (FLD)-approximation in the mod_fld.t module. See [1]Moens, N., Sundqvist, J. O., El Mellah, I., Poniatowski, L., Teunissen, J., and Keppens, R., “Radiation-hydrodynamics with MPI-AMRVAC . Flux-limited diffusion”, Astronomy and Astrophysics, vol. 657, 2022. doi:10.1051/0004-6361/202141023. For more information. Another possible closure in the works is the anisotropic flux limited diffusion approximation (AFLD) described in mod_afld.t. More...
Functions/Subroutines | |
subroutine, public | rhd_phys_init () |
Initialize the module. | |
subroutine, public | rhd_check_params |
subroutine, public | rhd_set_mg_bounds |
Set the boundaries for the diffusion of E. | |
subroutine, public | rhd_check_w (primitive, ixil, ixol, w, flag) |
Returns logical argument flag where values are ok. | |
subroutine, public | rhd_to_conserved (ixil, ixol, w, x) |
Transform primitive variables into conservative ones. | |
subroutine, public | rhd_to_primitive (ixil, ixol, w, x) |
Transform conservative variables into primitive ones. | |
subroutine, public | rhd_get_csound2 (w, x, ixil, ixol, csound2) |
Calculate the square of the thermal sound speed csound2 within ixO^L. csound2=gamma*p/rho. | |
subroutine, public | rhd_get_pthermal (w, x, ixil, ixol, pth) |
Calculate thermal pressure=(gamma-1)*(e-0.5*m**2/rho) within ixO^L. | |
subroutine, public | rhd_get_pradiation (w, x, ixil, ixol, prad) |
Calculate radiation pressure within ixO^L. | |
subroutine, public | rhd_get_ptot (w, x, ixil, ixol, ptot) |
calculates the sum of the gas pressure and max Prad tensor element | |
subroutine, public | rhd_get_tgas (w, x, ixil, ixol, tgas) |
Calculates gas temperature. | |
subroutine, public | rhd_get_trad (w, x, ixil, ixol, trad) |
Calculates radiation temperature. | |
double precision function, dimension(ixo^s), public | rhd_kin_en (w, ixil, ixol, inv_rho) |
Variables | |
logical, public, protected | rhd_energy = .true. |
Whether an energy equation is used. | |
logical, public, protected | rhd_thermal_conduction = .false. |
Whether thermal conduction is added. | |
type(tc_fluid), allocatable, public | tc_fl |
type(te_fluid), allocatable, public | te_fl_rhd |
logical, public, protected | rhd_radiative_cooling = .false. |
Whether radiative cooling is added. | |
type(rc_fluid), allocatable, public | rc_fl |
logical, public, protected | rhd_dust = .false. |
Whether dust is added. | |
logical, public, protected | rhd_viscosity = .false. |
Whether viscosity is added. | |
logical, public, protected | rhd_gravity = .false. |
Whether gravity is added. | |
logical, public, protected | rhd_particles = .false. |
Whether particles module is added. | |
logical, public, protected | rhd_rotating_frame = .false. |
Whether rotating frame is activated. | |
integer, public, protected | rhd_n_tracer = 0 |
Number of tracer species. | |
integer, public, protected | rho_ |
Index of the density (in the w array) | |
integer, dimension(:), allocatable, public, protected | mom |
Indices of the momentum density. | |
integer, dimension(:), allocatable, public, protected | tracer |
Indices of the tracers. | |
integer, public, protected | e_ |
Index of the energy density (-1 if not present) | |
integer, public, protected | p_ |
Index of the gas pressure (-1 if not present) should equal e_. | |
integer, public, protected | r_e |
Index of the radiation energy. | |
integer, public, protected | te_ |
Indices of temperature. | |
integer, public, protected | tcoff_ |
Index of the cutoff temperature for the TRAC method. | |
double precision, public | rhd_gamma = 5.d0/3.0d0 |
The adiabatic index. | |
double precision, public | rhd_adiab = 1.0d0 |
The adiabatic constant. | |
double precision, public, protected | small_r_e = 0.d0 |
The smallest allowed radiation energy. | |
logical, public, protected | rhd_trac = .false. |
Whether TRAC method is used. | |
integer, public, protected | rhd_trac_type = 1 |
double precision, public, protected | he_abundance =0.1d0 |
Helium abundance over Hydrogen. | |
character(len=8), public | rhd_radiation_formalism = 'fld' |
Formalism to treat radiation. | |
character(len=8), public | rhd_pressure = 'Trad' |
In the case of no rhd_energy, how to compute pressure. | |
logical, public, protected | rhd_radiation_force = .true. |
Treat radiation fld_Rad_force. | |
logical, public, protected | rhd_energy_interact = .true. |
Treat radiation-gas energy interaction. | |
logical, public, protected | rhd_radiation_diffusion = .true. |
Treat radiation energy diffusion. | |
logical, public, protected | rhd_radiation_advection = .true. |
Treat radiation advection. | |
logical, public, protected | rhd_partial_ionization = .false. |
Whether plasma is partially ionized. | |
double precision, public | kbmpmua4 |
kb/(m_p mu)* 1/a_rad**4, | |
double precision, public, protected | h_ion_fr =1d0 |
Ionization fraction of H H_ion_fr = H+/(H+ + H) | |
double precision, public, protected | he_ion_fr =1d0 |
Ionization fraction of He He_ion_fr = (He2+ + He+)/(He2+ + He+ + He) | |
double precision, public, protected | he_ion_fr2 =1d0 |
Ratio of number He2+ / number He+ + He2+ He_ion_fr2 = He2+/(He2+ + He+) | |
double precision, public, protected | rr =1d0 |
logical, public, protected | eq_state_units = .true. |
Radiation-Hydrodynamics physics module Module aims at solving the Hydrodynamic equations toghether with the zeroth moment of the radiative transfer equation. A closure is provided by the flux limited diffusion (FLD)-approximation in the mod_fld.t module. See [1]Moens, N., Sundqvist, J. O., El Mellah, I., Poniatowski, L., Teunissen, J., and Keppens, R., “Radiation-hydrodynamics with MPI-AMRVAC . Flux-limited diffusion”, Astronomy and Astrophysics, vol. 657, 2022. doi:10.1051/0004-6361/202141023. For more information. Another possible closure in the works is the anisotropic flux limited diffusion approximation (AFLD) described in mod_afld.t.
subroutine, public mod_rhd_phys::rhd_check_params |
subroutine, public mod_rhd_phys::rhd_check_w | ( | logical, intent(in) | primitive, |
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s, nw), intent(in) | w, | ||
logical, dimension(ixi^s,1:nw), intent(inout) | flag | ||
) |
Returns logical argument flag where values are ok.
Definition at line 709 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_get_csound2 | ( | 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) | csound2 | ||
) |
Calculate the square of the thermal sound speed csound2 within ixO^L. csound2=gamma*p/rho.
Turner & Stone 2001
Definition at line 1110 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_get_pradiation | ( | double precision, dimension(ixi^s, 1: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(ixo^s, 1:ndim, 1:ndim), intent(out) | prad | ||
) |
Calculate radiation pressure within ixO^L.
Definition at line 1184 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_get_pthermal | ( | double precision, dimension(ixi^s, 1: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 | ||
) |
Calculate thermal pressure=(gamma-1)*(e-0.5*m**2/rho) within ixO^L.
Thermal conduction?!
Definition at line 1124 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_get_ptot | ( | double precision, dimension(ixi^s, 1: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) | ptot | ||
) |
calculates the sum of the gas pressure and max Prad tensor element
filter cmax
Definition at line 1205 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_get_tgas | ( | double precision, dimension(ixi^s, 1: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) | tgas | ||
) |
Calculates gas temperature.
Definition at line 1291 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_get_trad | ( | double precision, dimension(ixi^s, 1: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) | trad | ||
) |
Calculates radiation temperature.
Definition at line 1306 of file mod_rhd_phys.t.
double precision function, dimension(ixo^s), public mod_rhd_phys::rhd_kin_en | ( | double precision, dimension(ixi^s, nw), intent(in) | w, |
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixo^s), intent(in), optional | inv_rho | ||
) |
subroutine, public mod_rhd_phys::rhd_phys_init |
Initialize the module.
set radiation energy
Initiate radiation-closure module
Usefull constante
Definition at line 201 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_set_mg_bounds |
Set the boundaries for the diffusion of E.
Definition at line 618 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_to_conserved | ( | 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 | ||
) |
Transform primitive variables into conservative ones.
Definition at line 740 of file mod_rhd_phys.t.
subroutine, public mod_rhd_phys::rhd_to_primitive | ( | 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 | ||
) |
Transform conservative variables into primitive ones.
Definition at line 772 of file mod_rhd_phys.t.
integer, public, protected mod_rhd_phys::e_ |
Index of the energy density (-1 if not present)
Definition at line 60 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::eq_state_units = .true. |
Definition at line 140 of file mod_rhd_phys.t.
double precision, public, protected mod_rhd_phys::h_ion_fr =1d0 |
Ionization fraction of H H_ion_fr = H+/(H+ + H)
Definition at line 126 of file mod_rhd_phys.t.
double precision, public, protected mod_rhd_phys::he_abundance =0.1d0 |
Helium abundance over Hydrogen.
Definition at line 91 of file mod_rhd_phys.t.
double precision, public, protected mod_rhd_phys::he_ion_fr =1d0 |
Ionization fraction of He He_ion_fr = (He2+ + He+)/(He2+ + He+ + He)
Definition at line 129 of file mod_rhd_phys.t.
double precision, public, protected mod_rhd_phys::he_ion_fr2 =1d0 |
Ratio of number He2+ / number He+ + He2+ He_ion_fr2 = He2+/(He2+ + He+)
Definition at line 132 of file mod_rhd_phys.t.
double precision, public mod_rhd_phys::kbmpmua4 |
kb/(m_p mu)* 1/a_rad**4,
Definition at line 119 of file mod_rhd_phys.t.
integer, dimension(:), allocatable, public, protected mod_rhd_phys::mom |
Indices of the momentum density.
Definition at line 54 of file mod_rhd_phys.t.
integer, public, protected mod_rhd_phys::p_ |
Index of the gas pressure (-1 if not present) should equal e_.
Definition at line 63 of file mod_rhd_phys.t.
integer, public, protected mod_rhd_phys::r_e |
Index of the radiation energy.
Definition at line 66 of file mod_rhd_phys.t.
type(rc_fluid), allocatable, public mod_rhd_phys::rc_fl |
Definition at line 30 of file mod_rhd_phys.t.
double precision, public mod_rhd_phys::rhd_adiab = 1.0d0 |
The adiabatic constant.
Definition at line 78 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_dust = .false. |
Whether dust is added.
Definition at line 33 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_energy = .true. |
Whether an energy equation is used.
Definition at line 21 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_energy_interact = .true. |
Treat radiation-gas energy interaction.
Definition at line 103 of file mod_rhd_phys.t.
double precision, public mod_rhd_phys::rhd_gamma = 5.d0/3.0d0 |
The adiabatic index.
Definition at line 75 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_gravity = .false. |
Whether gravity is added.
Definition at line 39 of file mod_rhd_phys.t.
integer, public, protected mod_rhd_phys::rhd_n_tracer = 0 |
Number of tracer species.
Definition at line 48 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_partial_ionization = .false. |
Whether plasma is partially ionized.
Definition at line 112 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_particles = .false. |
Whether particles module is added.
Definition at line 42 of file mod_rhd_phys.t.
character(len=8), public mod_rhd_phys::rhd_pressure = 'Trad' |
In the case of no rhd_energy, how to compute pressure.
Definition at line 97 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_radiation_advection = .true. |
Treat radiation advection.
Definition at line 109 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_radiation_diffusion = .true. |
Treat radiation energy diffusion.
Definition at line 106 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_radiation_force = .true. |
Treat radiation fld_Rad_force.
Definition at line 100 of file mod_rhd_phys.t.
character(len=8), public mod_rhd_phys::rhd_radiation_formalism = 'fld' |
Formalism to treat radiation.
Definition at line 94 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_radiative_cooling = .false. |
Whether radiative cooling is added.
Definition at line 29 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_rotating_frame = .false. |
Whether rotating frame is activated.
Definition at line 45 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_thermal_conduction = .false. |
Whether thermal conduction is added.
Definition at line 24 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_trac = .false. |
Whether TRAC method is used.
Definition at line 87 of file mod_rhd_phys.t.
integer, public, protected mod_rhd_phys::rhd_trac_type = 1 |
Definition at line 88 of file mod_rhd_phys.t.
logical, public, protected mod_rhd_phys::rhd_viscosity = .false. |
Whether viscosity is added.
Definition at line 36 of file mod_rhd_phys.t.
integer, public, protected mod_rhd_phys::rho_ |
Index of the density (in the w array)
Definition at line 51 of file mod_rhd_phys.t.
double precision, public, protected mod_rhd_phys::rr =1d0 |
Definition at line 136 of file mod_rhd_phys.t.
double precision, public, protected mod_rhd_phys::small_r_e = 0.d0 |
The smallest allowed radiation energy.
Definition at line 84 of file mod_rhd_phys.t.
type(tc_fluid), allocatable, public mod_rhd_phys::tc_fl |
Definition at line 25 of file mod_rhd_phys.t.
integer, public, protected mod_rhd_phys::tcoff_ |
Index of the cutoff temperature for the TRAC method.
Definition at line 72 of file mod_rhd_phys.t.
integer, public, protected mod_rhd_phys::te_ |
Indices of temperature.
Definition at line 69 of file mod_rhd_phys.t.
type(te_fluid), allocatable, public mod_rhd_phys::te_fl_rhd |
Definition at line 26 of file mod_rhd_phys.t.
integer, dimension(:), allocatable, public, protected mod_rhd_phys::tracer |
Indices of the tracers.
Definition at line 57 of file mod_rhd_phys.t.