33 subroutine convert_condition(ixI^L, ixO^L, w, x)
35 integer,
intent(in) :: ixi^
l, ixo^
l
36 double precision,
intent(inout) :: w(ixi^s, nw)
37 double precision,
intent(in) :: x(ixi^s, 1:
ndim)
38 end subroutine convert_condition
40 subroutine update_eos_spaces(ixI^L, ixO^L, w, x)
42 integer,
intent(in) :: ixi^
l, ixo^
l
43 double precision,
intent(inout) :: w(ixi^s, nw)
44 double precision,
intent(in) :: x(ixi^s, 1:
ndim)
45 end subroutine update_eos_spaces
47 subroutine get_eos_variable(ixI^L, ixO^L, w, x, res)
49 integer,
intent(in) :: ixi^
l, ixo^
l
50 double precision,
intent(in) :: w(ixi^s, nw)
51 double precision,
intent(in) :: x(ixi^s, 1:
ndim)
52 double precision,
intent(out) :: res(ixi^s)
53 end subroutine get_eos_variable
55 subroutine get_eos_variable_alt(w, x, ixI^L, ixO^L, res)
57 integer,
intent(in) :: ixi^
l, ixo^
l
58 double precision,
intent(in) :: w(ixi^s, nw)
59 double precision,
intent(in) :: x(ixi^s, 1:
ndim)
60 double precision,
intent(out) :: res(ixi^s)
61 end subroutine get_eos_variable_alt
63 subroutine get_ne_nh_iface(ixI^L, ixO^L, w, x, ne, nH)
65 integer,
intent(in) :: ixi^
l, ixo^
l
66 double precision,
intent(in) :: w(ixi^s, nw)
67 double precision,
intent(in) :: x(ixi^s, 1:
ndim)
68 double precision,
intent(out) :: ne(ixi^s), nh(ixi^s)
69 end subroutine get_ne_nh_iface
74 character(len=std_len) :: filename
75 double precision,
allocatable :: table(:,:)
77 double precision :: var1_min, var1_max, var2_min, var2_max
78 double precision :: step_inv_1, step_inv_2
91 logical :: is_uniform = .true.
92 double precision,
allocatable :: var1_nodes(:), var2_nodes(:)
106 integer :: guard_m_1 = 0, guard_m_2 = 0
107 double precision :: guard_scale_1 = 0.0d0, guard_scale_2 = 0.0d0
108 integer,
allocatable :: guard_1(:), guard_2(:)
114 character(len=std_len) :: eos_type
115 character(len=20) :: method =
'state'
118 character(len=20) :: gamma1_method =
'exact'
119 character(len=20) :: p2eint_method =
'table'
120 character(len=20) :: pi_table =
'chromosphere'
122 character(len=std_len) :: table_location
123 double precision :: he_abundance
124 double precision :: gamma
125 double precision :: gamma_minus_1
126 double precision :: inv_gamma
127 double precision :: inv_gamma_minus_1
128 double precision :: inv_squared_c0
129 double precision :: inv_squared_c
130 double precision :: nh2rhofactor
133 double precision :: eion_per_nh
134 double precision :: eint_rho_fi_threshold
135 double precision :: p_rho_fi_threshold
136 double precision :: n_per_nh_fi
137 double precision :: neonh_fi
204 double precision,
allocatable :: table_eint_il(:,:,:)
207 procedure(convert_condition),
pointer,
nopass :: to_conserved => null()
208 procedure(convert_condition),
pointer,
nopass :: to_primitive => null()
209 procedure(convert_condition),
pointer,
nopass :: p_to_e => null()
210 procedure(update_eos_spaces),
pointer,
nopass :: update_eos => null()
211 procedure(get_eos_variable_alt),
pointer,
nopass :: get_thermal_pressure => null()
212 procedure(get_eos_variable_alt),
pointer,
nopass :: get_temperature_from_eint => null()
213 procedure(get_eos_variable_alt),
pointer,
nopass :: get_temperature_from_etot => null()
214 procedure(get_eos_variable_alt),
pointer,
nopass :: get_temperature_from_pressure => null()
215 procedure(get_eos_variable_alt),
pointer,
nopass :: get_rfactor => null()
216 procedure(get_eos_variable_alt),
pointer,
nopass :: get_rho => null()
217 procedure(get_eos_variable_alt),
pointer,
nopass :: get_nh => null()
218 procedure(get_ne_nh_iface),
pointer,
nopass :: get_ne_nh => null()
219 procedure(get_eos_variable_alt),
pointer,
nopass :: get_te => null()
220 procedure(get_eos_variable_alt),
pointer,
nopass :: get_csound2 => null()
230 procedure,
private :: set_gamma => eos_set_gamma
244 subroutine eos_set_gamma(this, gamma_new)
246 double precision,
intent(in) :: gamma_new
248 this%gamma = gamma_new
249 this%gamma_minus_1 = this%gamma - 1.0d0
250 this%inv_gamma = 1.0d0 / this%gamma
251 if (abs(this%gamma_minus_1) > 1.0d-12)
then
252 this%inv_gamma_minus_1 = 1.0d0 / this%gamma_minus_1
254 this%inv_gamma_minus_1 = 0.0d0
256 end subroutine eos_set_gamma
EoS state container – the single thermodynamic authority for AMRVAC.
integer, parameter, public eos_analytic
integer, parameter, public eos_type_pi
integer, parameter, public eos_type_fi
EoS-type selector, decoded once from eoseos_type into eostype_id. Used by the mode-specific kernels t...
integer, parameter, public eos_state
LTE method selector, decoded once from eosmethod into eosmethod_id so the runtime kernels dispatch on...
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...
integer, parameter, public eos_type_lte
integer, public iw_log_nh
wextra index for the cached log10(nH) used during STS substeps (-1 = not allocated)....
This module contains definitions of global parameters and variables and some generic functions/subrou...
integer, parameter ndim
Number of spatial dimensions for grid variables.