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

Shared EoS accessors (EoS-type-agnostic) for the eos% family. More...

Functions/Subroutines

subroutine, public get_rho (w, x, ixil, ixol, rho)
 Mass density (code units).
 
subroutine, public get_nh (w, x, ixil, ixol, nh)
 Hydrogen number density: nH = rho / nH2rhoFactor.
 
subroutine, public get_ne_nh (ixil, ixol, w, ne, nh)
 Return electron and hydrogen number densities in code units. For LTE (iw_ne allocated): ne from Saha EoS, nH from rho/nH2rhoFactor. For FI (iw_ne not allocated): ne = nH * neOnH_FI (full ionisation).
 
subroutine, public get_temperature_from_etot (w, x, ixil, ixol, res)
 Temperature from the TOTAL energy: strip kinetic (+magnetic) energy via phys_e_to_ei, then delegate to the type-specific eosget_temperature_from_eint.
 
double precision function, public eos_get_log_t_floor ()
 Lower log10(T) bound for the (rho,T) inverse table; FI (no tables) floors at log10(smalldouble). Used by the TC fluid-port log_T_floor.
 

Detailed Description

Shared EoS accessors (EoS-type-agnostic) for the eos% family.

Carved out of mod_eos.t (the per-type split). These operate on eos and the conserved/primitive state without committing to FI / LTE / PI, so they are the common dependency that mod_eos_FI / mod_eos_LTE / mod_eos_PI and the orchestrating mod_eos all draw on – keeping the type-specific modules free of any back-dependency on mod_eos (no circular use). mod_eos re-exports the public names so existing use mod_eos callers are unaffected.

Function/Subroutine Documentation

◆ eos_get_log_t_floor()

double precision function, public mod_eos_shared_functions::eos_get_log_t_floor

Lower log10(T) bound for the (rho,T) inverse table; FI (no tables) floors at log10(smalldouble). Used by the TC fluid-port log_T_floor.

Definition at line 82 of file mod_eos_shared_functions.t.

◆ get_ne_nh()

subroutine, public mod_eos_shared_functions::get_ne_nh ( integer, intent(in)  ixi,
integer, intent(in)  l,
integer, intent(in)  ixo,
  l,
double precision, dimension(ixi^s, 1:nw), intent(in)  w,
double precision, dimension(ixi^s), intent(out)  ne,
double precision, dimension(ixi^s), intent(out)  nh 
)

Return electron and hydrogen number densities in code units. For LTE (iw_ne allocated): ne from Saha EoS, nH from rho/nH2rhoFactor. For FI (iw_ne not allocated): ne = nH * neOnH_FI (full ionisation).

Definition at line 49 of file mod_eos_shared_functions.t.

◆ get_nh()

subroutine, public mod_eos_shared_functions::get_nh ( 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)  nh 
)

Hydrogen number density: nH = rho / nH2rhoFactor.

Definition at line 36 of file mod_eos_shared_functions.t.

◆ get_rho()

subroutine, public mod_eos_shared_functions::get_rho ( 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)  rho 
)

Mass density (code units).

Definition at line 25 of file mod_eos_shared_functions.t.

◆ get_temperature_from_etot()

subroutine, public mod_eos_shared_functions::get_temperature_from_etot ( 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)  res 
)

Temperature from the TOTAL energy: strip kinetic (+magnetic) energy via phys_e_to_ei, then delegate to the type-specific eosget_temperature_from_eint.

No timing here: get_temperature_from_eint is already timed. The array copy and e_to_ei subtraction are trivial.

Definition at line 64 of file mod_eos_shared_functions.t.