37 integer,
intent(in) :: ixI^L, ixO^L
38 double precision,
intent(inout) :: w(ixI^S, nw)
39 double precision,
intent(in) :: x(ixI^S, 1:ndim)
44 integer,
intent(in) :: ixI^L, ixO^L
45 double precision,
intent(inout) :: w(ixI^S, nw)
46 double precision,
intent(in) :: x(ixI^S, 1:ndim)
49 subroutine get_eos_variable(ixI^L, ixO^L, w, x, res)
51 integer,
intent(in) :: ixI^L, ixO^L
52 double precision,
intent(in) :: w(ixI^S, nw)
53 double precision,
intent(in) :: x(ixI^S, 1:ndim)
54 double precision,
intent(out) :: res(ixI^S)
55 end subroutine get_eos_variable
59 integer,
intent(in) :: ixI^L, ixO^L
60 double precision,
intent(in) :: w(ixI^S, nw)
61 double precision,
intent(in) :: x(ixI^S, 1:ndim)
62 double precision,
intent(out) :: res(ixI^S)
65 subroutine get_ne_nh_iface(ixI^L, ixO^L, w, x, ne, nH)
67 integer,
intent(in) :: ixI^L, ixO^L
68 double precision,
intent(in) :: w(ixI^S, nw)
69 double precision,
intent(in) :: x(ixI^S, 1:ndim)
70 double precision,
intent(out) :: ne(ixI^S), nH(ixI^S)
71 end subroutine get_ne_nh_iface
76 character(len=std_len) :: filename
77 double precision,
allocatable :: table(:,:)
79 double precision :: var1_min, var1_max, var2_min, var2_max
80 double precision :: step_inv_1, step_inv_2
93 logical :: is_uniform = .true.
94 double precision,
allocatable :: var1_nodes(:), var2_nodes(:)
108 integer :: guard_m_1 = 0, guard_m_2 = 0
109 double precision :: guard_scale_1 = 0.0d0, guard_scale_2 = 0.0d0
110 integer,
allocatable :: guard_1(:), guard_2(:)
116 character(len=std_len) :: eos_type
117 character(len=20) :: method =
'state'
120 character(len=20) :: gamma1_method =
'exact'
121 character(len=20) :: p2eint_method =
'table'
122 logical :: p2eint_bisect = .false.
123 character(len=20) :: pi_table =
'chromosphere'
125 character(len=std_len) :: table_location
126 double precision :: he_abundance
127 double precision :: gamma
128 double precision :: gamma_minus_1
129 double precision :: inv_gamma
130 double precision :: inv_gamma_minus_1
131 double precision :: inv_squared_c0
132 double precision :: inv_squared_c
133 double precision :: nh2rhofactor
136 double precision :: eion_per_nh
137 double precision :: eint_rho_fi_threshold
138 double precision :: eint_nh_min = 0.0d0
139 double precision :: p_rho_fi_threshold
140 double precision :: n_per_nh_fi
141 double precision :: neonh_fi
208 double precision,
allocatable :: table_eint_il(:,:,:)
222 procedure(get_ne_nh_iface),
pointer,
nopass :: get_ne_nh => null()
234 procedure,
private :: set_gamma => eos_set_gamma
248 subroutine eos_set_gamma(this, gamma_new)
250 double precision,
intent(in) :: gamma_new
252 this%gamma = gamma_new
253 this%gamma_minus_1 = this%gamma - 1.0d0
254 this%inv_gamma = 1.0d0 / this%gamma
255 if (abs(this%gamma_minus_1) > 1.0d-12)
then
256 this%inv_gamma_minus_1 = 1.0d0 / this%gamma_minus_1
258 this%inv_gamma_minus_1 = 0.0d0
260 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
slot interfaces, for routines that hold or wrap an EoS slot
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...