44 eos%get_Te => get_te_fi
45 eos%n_per_nH_FI = 2.0d0 + 3.0d0 *
eos%He_abundance
46 eos%neOnH_FI = 1.0d0 + 2.0d0 *
eos%He_abundance
51 integer,
intent(in) :: ixi^
l,ixo^
l
52 double precision,
intent(in) :: x(ixi^s,1:
ndim)
53 double precision,
intent(inout) :: w(ixi^s,1:nw)
58 integer,
intent(in) :: ixi^
l, ixo^
l
59 double precision,
intent(in) :: w(ixi^s, nw)
60 double precision,
intent(in) :: x(ixi^s, 1:
ndim)
61 double precision,
intent(out) :: gamma1(ixi^s)
63 gamma1(ixo^s) =
eos%gamma
68 subroutine get_te_fi(w,x,ixI^L,ixO^L,T)
69 integer,
intent(in) :: ixi^
l, ixo^
l
70 double precision,
intent(in) :: w(ixi^s,1:nw)
71 double precision,
intent(in) :: x(ixi^s,1:
ndim)
72 double precision,
intent(out) :: t(ixi^s)
73 double precision :: rfactor(ixi^s), pth(ixi^s), rho(ixi^s)
79 call eos%get_thermal_pressure(w, x, ixi^
l, ixo^
l, pth)
80 call eos%get_Rfactor(w,x,ixi^
l,ixo^
l,rfactor)
82 t(ixo^s) = pth(ixo^s) / (rho(ixo^s) * rfactor(ixo^s))
84 end subroutine get_te_fi
90 integer,
intent(in) :: ixi^
l,ixo^
l
91 double precision,
intent(in) :: x(ixi^s,1:
ndim)
92 double precision,
intent(in) :: w(ixi^s,1:nw)
93 double precision,
intent(out) :: res(ixi^s)
95 double precision :: rfactor(ixi^s), rho(ixi^s), pth(ixi^s)
99 call eos%get_Rfactor(w,x,ixi^
l,ixo^
l,rfactor)
103 pth(ixo^s) =
eos%gamma_minus_1 * w(ixo^s,iw_e)
104 if (iw_equi_p > 0) pth(ixo^s) = pth(ixo^s) &
105 +
block%equi_vars(ixo^s,iw_equi_p,
b0i)
106 res(ixo^s) = pth(ixo^s) / (rfactor(ixo^s) * rho(ixo^s))
116 integer,
intent(in) :: ixi^
l, ixo^
l
117 double precision,
intent(in) :: x(ixi^s,1:
ndim)
118 double precision,
intent(in) :: w(ixi^s,1:nw)
119 double precision,
intent(out) :: res(ixi^s)
121 double precision :: rfactor(ixi^s)
123 call eos%get_Rfactor(w, x, ixi^
l, ixo^
l, rfactor)
124 res(ixo^s) = w(ixo^s,iw_e) / (rfactor(ixo^s) * w(ixo^s,iw_rho))
EoS state container – the single thermodynamic authority for AMRVAC.
type(eos_container), allocatable, public eos
The single EoS state object, allocated in eos_init and shared (read-mostly) across all EoS sub-module...
FI (fully-ionised, constant-gamma) EoS kernels for the eos% family.
subroutine, public update_eos_fi(ixil, ixol, w, x)
FI update_eos: nothing to cache for an ideal gas. Called each RK substep.
subroutine, public get_gamma1_fi(w, x, ixil, ixol, gamma1)
Gamma_1 for the fully-ionised ideal gas: constant eosgamma.
subroutine, public eos_init_fi()
get_Te_FI is PRIVATE: bound to eosget_Te inside eos_finalise_FI only. The rest stay public: update_eo...
subroutine, public get_temperature_from_pressure_fi(w, x, ixil, ixol, res)
FI temperature from primitive pressure: T = p / (R * rho). w is PRIMITIVE here, so iw_e holds the the...
subroutine, public eos_finalise_fi()
FI arm of eos_finalise: wire the ideal-gas getter set and the fully-ionised particle counts (2 + 3*A_...
subroutine, public get_temperature_from_eint_fi(w, x, ixil, ixol, res)
Temperature from internal energy, fully-ionised ideal gas: T = pth/(rho*R).
Shared EoS accessors (EoS-type-agnostic) for the eos% family.
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...
type(state), pointer block
Block pointer for using one block and its previous state.
integer, parameter ndim
Number of spatial dimensions for grid variables.
integer b0i
background magnetic field location indicator
This module defines the procedures of a physics module. It contains function pointers for the various...
double precision timeeos0
double precision timeeos_tfromei