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, ne, nH)
65 integer,
intent(in) :: ixi^
l, ixo^
l
66 double precision,
intent(in) :: w(ixi^s, nw)
67 double precision,
intent(out) :: ne(ixi^s), nh(ixi^s)
68 end subroutine get_ne_nh_iface
73 character(len=std_len) :: filename
74 double precision,
allocatable :: table(:,:)
76 double precision :: var1_min, var1_max, var2_min, var2_max
77 double precision :: step_inv_1, step_inv_2
90 logical :: is_uniform = .true.
91 double precision,
allocatable :: var1_nodes(:), var2_nodes(:)
105 integer :: guard_m_1 = 0, guard_m_2 = 0
106 double precision :: guard_scale_1 = 0.0d0, guard_scale_2 = 0.0d0
107 integer,
allocatable :: guard_1(:), guard_2(:)
113 character(len=std_len) :: eos_type
114 character(len=20) :: method =
'state'
117 character(len=20) :: gamma1_method =
'exact'
118 character(len=20) :: p2eint_method =
'table'
119 character(len=20) :: pi_table =
'chromosphere'
121 character(len=std_len) :: table_location
122 double precision :: he_abundance
123 double precision :: gamma
124 double precision :: gamma_minus_1
125 double precision :: inv_gamma
126 double precision :: inv_gamma_minus_1
127 double precision :: inv_squared_c0
128 double precision :: inv_squared_c
129 double precision :: nh2rhofactor
132 double precision :: eion_per_nh
133 double precision :: eint_rho_fi_threshold
134 double precision :: p_rho_fi_threshold
135 double precision :: n_per_nh_fi
136 double precision :: neonh_fi
203 double precision,
allocatable :: table_eint_il(:,:,:)
206 procedure(convert_condition),
pointer,
nopass :: to_conserved => null()
207 procedure(convert_condition),
pointer,
nopass :: to_primitive => null()
208 procedure(convert_condition),
pointer,
nopass :: p_to_e => null()
209 procedure(update_eos_spaces),
pointer,
nopass :: update_eos => null()
210 procedure(get_eos_variable_alt),
pointer,
nopass :: get_thermal_pressure => null()
211 procedure(get_eos_variable_alt),
pointer,
nopass :: get_temperature_from_eint => null()
212 procedure(get_eos_variable_alt),
pointer,
nopass :: get_temperature_from_etot => null()
213 procedure(get_eos_variable_alt),
pointer,
nopass :: get_temperature_from_pressure => null()
214 procedure(get_eos_variable_alt),
pointer,
nopass :: get_rfactor => null()
215 procedure(get_eos_variable_alt),
pointer,
nopass :: get_rho => null()
216 procedure(get_eos_variable_alt),
pointer,
nopass :: get_nh => null()
217 procedure(get_ne_nh_iface),
pointer,
nopass :: get_ne_nh => null()
218 procedure(get_eos_variable_alt),
pointer,
nopass :: get_te => null()
219 procedure(get_eos_variable_alt),
pointer,
nopass :: get_csound2 => null()
229 procedure,
private :: set_gamma => eos_set_gamma
243 subroutine eos_set_gamma(this, gamma_new)
245 double precision,
intent(in) :: gamma_new
247 this%gamma = gamma_new
248 this%gamma_minus_1 = this%gamma - 1.0d0
249 this%inv_gamma = 1.0d0 / this%gamma
250 if (abs(this%gamma_minus_1) > 1.0d-12)
then
251 this%inv_gamma_minus_1 = 1.0d0 / this%gamma_minus_1
253 this%inv_gamma_minus_1 = 0.0d0
255 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.