26 integer,
intent(in) :: ixi^
l, ixo^
l
27 double precision,
intent(in) :: w(ixi^s,1:nw)
28 double precision,
intent(in) :: x(ixi^s,1:
ndim)
29 double precision,
intent(out) :: rho(ixi^s)
31 rho(ixo^s) = w(ixo^s,iw_rho)
36 subroutine get_nh(w,x,ixI^L,ixO^L,nH)
37 integer,
intent(in) :: ixi^
l, ixo^
l
38 double precision,
intent(in) :: w(ixi^s,1:nw)
39 double precision,
intent(in) :: x(ixi^s,1:
ndim)
40 double precision,
intent(out) :: nh(ixi^s)
42 nh(ixo^s) = w(ixo^s,iw_rho) /
eos%nH2rhoFactor
50 integer,
intent(in) :: ixi^
l, ixo^
l
51 double precision,
intent(in) :: w(ixi^s, 1:nw)
52 double precision,
intent(out) :: ne(ixi^s), nh(ixi^s)
54 nh(ixo^s) = w(ixo^s, iw_rho) /
eos%nH2rhoFactor
56 ne(ixo^s) = w(ixo^s, iw_ne)
58 ne(ixo^s) = nh(ixo^s) *
eos%neOnH_FI
66 integer,
intent(in) :: ixi^
l,ixo^
l
67 double precision,
intent(in) :: x(ixi^s,1:
ndim)
68 double precision,
intent(in) :: w(ixi^s,1:nw)
69 double precision,
intent(out) :: res(ixi^s)
70 double precision :: wlocal(ixi^s,1:nw)
74 wlocal(ixi^s,1:nw)=w(ixi^s,1:nw)
76 call eos%get_temperature_from_eint(wlocal, x, ixi^
l, ixo^
l, res)
84 log_t_min =
eos%eintT%var2_min
85 else if (
allocated(
eos%eint_from_T%table))
then
86 log_t_min =
eos%eint_from_T%var2_min
88 log_t_min = dlog10(smalldouble)
EoS state container – the single thermodynamic authority for AMRVAC.
integer, parameter, public eos_entropy
type(eos_container), allocatable, public eos
The single EoS state object, allocated in eos_init and shared (read-mostly) across all EoS sub-module...
Shared EoS accessors (EoS-type-agnostic) for the eos% family.
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 ...
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)....
subroutine, public get_nh(w, x, ixil, ixol, nh)
Hydrogen number density: nH = rho / nH2rhoFactor.
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,...
subroutine, public get_rho(w, x, ixil, ixol, rho)
Mass density (code units).
This module contains definitions of global parameters and variables and some generic functions/subrou...
integer, parameter ndim
Number of spatial dimensions for grid variables.
This module defines the procedures of a physics module. It contains function pointers for the various...
procedure(sub_e_to_ei), pointer phys_e_to_ei