MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
Functions/Subroutines | Variables
mod_mhd_eos Module Reference

MHD <-> EoS seam: binds the eos% authority into magnetohydrodynamics. More...

Functions/Subroutines

subroutine, public mhd_link_eos ()
 Link the appropriate EOS conversion routines based on the selected EoS type.
 

Variables

procedure(sub_get_pthermal), pointer, public mhd_get_pthermal => null()
 Thermal pressure pointer: set by mhd_link_eos based on energy formulation. Internal to mod_mhd_eos — external callers use eosget_thermal_pressure.
 
procedure(sub_get_pthermal), pointer, public mhd_get_temperature => null()
 Temperature pointer: set by mhd_link_eos based on EoS type and energy formulation.
 
procedure(sub_convert), pointer, public mhd_to_primitive => null()
 use habitual name of converting to primitive
 
procedure(sub_convert), pointer, public mhd_to_conserved => null()
 use habitual name of converting to conserved
 

Detailed Description

MHD <-> EoS seam: binds the eos% authority into magnetohydrodynamics.

mhd_link_eos wires the eos%/phys_ procedure pointers (conversions, pthermal, csound2/gamma1, get_Rfactor, temperature, update_temperature) per eos_type (FI / LTE / PI, with PI energy- and prominence-mode overrides) and per energy formulation (origin / internal_e / hydrodynamic_e / semirelativistic). bind_eos_to_source wires the thermal-conduction / radiative-cooling / thermal- emission / FLD fluid-port callbacks from eos%.

Holds the MHD block routines that wrap the shared thermodynamics with MHD's mechanical-energy bookkeeping (kinetic + MAGNETIC energy): the FI/LTE/PI conversions, p_to_e, the pthermal variants, csound2/gamma1, and the PI energy

Function/Subroutine Documentation

◆ mhd_link_eos()

subroutine, public mod_mhd_eos::mhd_link_eos

Link the appropriate EOS conversion routines based on the selected EoS type.

Primitive <-> Conserved routing

p_to_e (pressure -> total energy for origin, or eint for inte)

Sound speed and Gamma1

Prolongation

Rfactor: only the FI case is physics-dependent (the usr_Rfactor user hook). The LTE and PI bindings are pure eos% routines, so they are set in eos_finalise_{LTE,PI} (which run after this and before bind_eos_to_source, so they win) – keeping those targets private.

Thermal pressure routing

Temperature routing

Internal energy extraction

PI energy-mode overrides (eos_type='PI', ionE=.true.)

eosget_csound2 => get_csound2_PI is physics-independent: set in eos_finalise_PI (ionE arm) so the target stays private.

Definition at line 51 of file mod_mhd_eos.t.

Here is the call graph for this function:

Variable Documentation

◆ mhd_get_pthermal

procedure(sub_get_pthermal), pointer, public mod_mhd_eos::mhd_get_pthermal => null()

Thermal pressure pointer: set by mhd_link_eos based on energy formulation. Internal to mod_mhd_eos — external callers use eosget_thermal_pressure.

Definition at line 38 of file mod_mhd_eos.t.

◆ mhd_get_temperature

procedure(sub_get_pthermal), pointer, public mod_mhd_eos::mhd_get_temperature => null()

Temperature pointer: set by mhd_link_eos based on EoS type and energy formulation.

Definition at line 41 of file mod_mhd_eos.t.

◆ mhd_to_conserved

procedure(sub_convert), pointer, public mod_mhd_eos::mhd_to_conserved => null()

use habitual name of converting to conserved

Definition at line 45 of file mod_mhd_eos.t.

◆ mhd_to_primitive

procedure(sub_convert), pointer, public mod_mhd_eos::mhd_to_primitive => null()

use habitual name of converting to primitive

Definition at line 43 of file mod_mhd_eos.t.