MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
mod_eos.t
Go to the documentation of this file.
1!> Equation of state for AMRVAC, handled through a single eos_container object.
2!>
3!> Two gas models (eos_type):
4!> FI -- fully ionised ideal gas (constant gamma, mu).
5!> LTE -- local thermodynamic equilibrium with partial ionisation of H (+He),
6!> via one of three interchangeable methods (eos_method):
7!> state -- per-quantity (T,p,ne/nH,eint/p) Saha-equilibrium tables,
8!> PCHIP/bilinear interpolated ('tables' accepted as legacy alias).
9!> entropy -- bicubic-Hermite reconstruction (see mod_eos_lte_entropy).
10!> analytic -- on-the-fly hydrogen Saha solve, helium neutral (saha_* routines).
11!> Tables are generated offline and read as binary; their axes are
12!> (log10 nH, log10 eint/nH) in code units after the unit shift applied
13!> in eos_finalise. ionE optionally folds ionisation energy into eint.
14!>
15!> The code-unit normalisation is kept so an FI atmosphere recovers R = 1;
16!> update_eos_LTE relies on this. update_eos refreshes the cached EoS fields
17!> (Te, ne) once per RK substep, and for boundary cells via update_eos_4_bc;
18!> call eos%update_eos manually before any extra output.
19!>
20!> Jack Jenkins (27.01.2026); legacy EoS type 1: uniform tabulated (by Chris Osborne) H(+He) LTE EoS, in
21!> consultation with Damien Przybylski (MURaM). Routed through legacy usr_Rfactor approach.
22!> Jack Jenkins (05.05.2026); EoS type 2 finished, now separate module that each hd/mhd physics module
23!> from upstream/amrvac3.3 route through.
24!> Jack Jenkins (11.05.2026); Benchmarked curvature-density-hybrid-tabulated EoS tables.
25!> Jack Jenkins (25.05.2026); Single curvature-density-tabulated entropy potential EoS prototyped. Validated
26!> gamma(T) against Ballester et al. 2001 to ~ 1.1% .
27!> Jack Jenkins (16.06.2026); Folded in fld, ffhd, and new partial_ionisation modules to be EoS compliant
28!> and refactored for readability.
29
30module mod_eos
37 use mod_eos_fi
38 use mod_eos_lte
42 use mod_comm_lib, only: mpistop
43
44 implicit none
45 private
46
47 character(len=std_len) :: AMRVAC_DIR
48
49 !> The EoS state object (eos) and the cached-log10(nH) wextra index
50 !> (iw_log_nH) now live in mod_eos_container so every EoS sub-module can
51 !> reach them; re-export here so existing `use mod_eos` callers still see them.
52 public :: eos, iw_log_nh
53
54 !> Lifecycle (called from amrvac.t)
56 !> Type-agnostic helpers, safe in any eos_type. The mode-specific scalar
57 !> kernels (LTE T/y/p/eint/gamma1, saha_*, the PI state/eint/csound2 backend
58 !> and fl-port shims) are deliberately NOT re-exported here: the hd/mhd/ffhd
59 !> seams reach them via their sub-modules (mod_eos_lte / mod_eos_lte_saha /
60 !> mod_eos_pi), and each kernel mpistops if called under the wrong
61 !> eos_type/method. So `use mod_eos` no longer exposes mode-specific routines.
63 !> Ideal-gas Gamma_1 (returns eos%gamma); bound to phys_get_gamma1 for FI and
64 !> no-energy PI, valid in any ideal-gas context, so kept on the facade.
65 public :: get_gamma1_fi
66 !> The EoS hooks of a conduction fluid, shared by the hd, mhd and ffhd bindings
67 public :: eos_bind_tc
68
69 !> Untimed targets of the timed eos% wrappers
70 procedure(convert_condition), pointer :: to_primitive_impl => null(), &
71 to_conserved_impl => null()
72 procedure(update_eos_spaces), pointer :: update_eos_impl => null()
73 procedure(get_eos_variable_alt), pointer :: pthermal_impl => null(), csound2_impl => null(), &
74 tfromei_impl => null()
75
76contains
77
78 !> Lifecycle: read and validate parameters, allocate, load and finalise
79 !> the chosen backend. Called from amrvac.t.
80 !> Read this module"s parameters from a file
81 subroutine eos_read_params(files)
82 character(len=*), intent(in) :: files(:)
83 integer :: n
84
85 !> Namelist mirror variables: the parfile uses these simple names
86 !> (e.g. eos_type='FI'); they are committed to eos% in one block after
87 !> the read. Derived eos% quantities (gamma_minus_1, method_id, ...) are
88 !> NOT mirrored here -- they are computed from these inputs below.
89 character(len=std_len) :: eos_type, table_location
90 character(len=20) :: eos_method, gamma1_method, p2eint_method, pi_table
91 double precision :: He_abundance, gamma
92 logical :: ionE
93
94 namelist /eos_list/ eos_type, table_location, ione, he_abundance, gamma, &
95 eos_method, gamma1_method, p2eint_method, pi_table
96
97 !> defaults
98 eos_type = 'FI'
99 eos_method = 'entropy'
100 pi_table = 'chromosphere'
101 gamma1_method = 'exact'
102 p2eint_method = 'table'
103 ione = .false.
104 he_abundance = 0.1d0
105 gamma = 5.0d0/3.0d0
106 !> empty until the parfiles are read, and then the shipped tables of the chosen method
107 table_location = ''
108
109 !> read parfile(s): each successive file overrides the previous
110 do n = 1, size(files)
111 open(unitpar, file=trim(files(n)), status="old")
112 read(unitpar, eos_list, end=111)
113 111 close(unitpar)
114 end do
115
116 !> without a table_location the shipped tables of the method are read, the entropy tables
117 !> for 'entropy' and the uniform value tables otherwise
118 if (len_trim(table_location) == 0) then
119 call get_environment_variable("AMRVAC_DIR", amrvac_dir)
120 if (trim(eos_method) == 'entropy') then
121 table_location = trim(amrvac_dir)//"/src/tables/eos_tables/entropy128/"
122 else
123 table_location = trim(amrvac_dir)//"/src/tables/eos_tables/uniform256/"
124 end if
125 end if
126
127 !> commit raw inputs to eos% (plain copies, no logic)
128 eos%eos_type = eos_type
129 eos%method = eos_method
130 eos%pi_table = pi_table
131 eos%gamma1_method = gamma1_method
132 eos%p2eint_method = p2eint_method
133 eos%table_location = table_location
134 eos%He_abundance = he_abundance
135 eos%gamma = gamma
136 eos%ionE = ione
137
138 !> derive secondary quantities from the raw inputs
139 eos%gamma_minus_1 = eos%gamma - 1.0d0
140 eos%inv_gamma = 1.0d0 / eos%gamma
141 if (abs(eos%gamma_minus_1) > 1.0d-12) then
142 eos%inv_gamma_minus_1 = 1.0d0 / eos%gamma_minus_1
143 else
144 eos%inv_gamma_minus_1 = 0.0d0
145 end if
146 eos%nH2rhoFactor = 1.0d0 !> FI default; (m)hd_physical_units may reset
147 select case (eos%method)
148 case ('analytic'); eos%method_id = eos_analytic
149 case ('entropy'); eos%method_id = eos_entropy
150 case default; eos%method_id = eos_state
151 end select
152 select case (eos%eos_type)
153 case ('LTE'); eos%type_id = eos_type_lte
154 case ('PI'); eos%type_id = eos_type_pi
155 case default; eos%type_id = eos_type_fi
156 end select
157
158 !> report
159 if (mype == 0) then
160 write(*,*) "EoS type: "//trim(eos%eos_type)
161 if (eos%eos_type == 'LTE') &
162 write(*,*) "EoS table location: "//trim(eos%table_location)
163 end if
164
165 !> validate / coerce (all consistency guards live in one place)
166 call eos_validate_params()
167
168 end subroutine eos_read_params
169
170 !> Validate and coerce the parsed eos_list against the chosen eos_type /
171 !> method. Grouped by concern so the rules are readable in one block (rather
172 !> than interleaved with the field copies in eos_read_params). May coerce
173 !> eos% fields (e.g. FI forces ionE=.false.) and mpistop on illegal combos.
174 subroutine eos_validate_params()
175
176 !> eos_type x ionE
177 if (eos%eos_type == 'FI' .and. eos%ionE) then
178 eos%ionE = .false.
179 if(mype==0) write(*,*) "WARNING: eos_type = 'FI' requires ionE = .false."
180 end if
181
182 !> PI ('partial approximations') table selector
183 if (eos%eos_type == 'PI') then
184 !> the PI closures are kept in the code but not yet consistent with every module that
185 !> reads the equation of state, so they cannot be selected for now
186 call mpistop("eos_type='PI' is not yet fully consistently implemented, "// &
187 "use eos_type='FI' or 'LTE'")
188 select case (trim(eos%pi_table))
189 case ('chromosphere','flare','prominence')
190 ! valid
191 case default
192 call mpistop("eos_type='PI': pi_table must be "// &
193 "'chromosphere', 'flare', or 'prominence'")
194 end select
195 !> ionisation-energy mode (ionE) is supported only for the T-only
196 !> tables; the prominence table is (T,p)-dependent -> no-energy only.
197 !> This also gates the only PI configuration that cannot model He
198 !> ionisation energy: the chromosphere/flare energy paths now fold
199 !> the He ionisation energy into eint (mod_eos_pi_tables,
200 !> ionization_eps_ion_of_degrees), consistent with the He electron
201 !> count already in the R-factor, so He>0 energy mode is allowed there.
202 if (eos%ionE .and. trim(eos%pi_table) == 'prominence') then
203 call mpistop("eos_type='PI' with ionE=T requires a T-only table "// &
204 "(chromosphere or flare); prominence is no-energy only")
205 end if
206 if(mype==0) write(*,*) "EoS PI table: "//trim(eos%pi_table)// &
207 ", ionE=", eos%ionE
208 end if
209
210 !> eos_method validity and eos_type x method ('tables' kept as a legacy
211 !> alias for 'state' -- both decode to EOS_STATE via the case default).
212 if (eos%method /= 'analytic' .and. eos%method /= 'state' &
213 .and. eos%method /= 'tables' .and. eos%method_id /= eos_entropy) then
214 call mpistop("Unknown eos_method: "//trim(eos%method)// &
215 " (expected 'state', 'analytic', or 'entropy')")
216 end if
217 if (eos%eos_type == 'FI' .and. eos%method_id == eos_analytic) then
218 call mpistop("eos_method='analytic' requires eos_type='LTE'")
219 end if
220
221 !> gamma1_method validity
222 if (eos%gamma1_method /= 'exact' .and. eos%gamma1_method /= 'effective' &
223 .and. eos%gamma1_method /= 'constant') then
224 call mpistop("Unknown gamma1_method: "//trim(eos%gamma1_method)// &
225 " (expected 'exact', 'effective', or 'constant')")
226 end if
227
228 !> analytic-method caveats (hydrogen Saha, helium neutral)
229 if (eos%method_id == eos_analytic) then
230 if (eos%He_abundance > 0.0d0 .and. mype == 0) write(*,*) &
231 "eos_method='analytic' keeps helium neutral, He_abundance=", eos%He_abundance
232 ! effective gamma1 needs T,neOnH tables -> not available analytically
233 if (eos%gamma1_method == 'effective') then
234 if (mype == 0) write(*,*) &
235 "WARNING: gamma1_method='effective' not applicable with analytic EoS."
236 if (mype == 0) write(*,*) &
237 " Falling back to gamma1_method='exact' (closed form)."
238 eos%gamma1_method = 'exact'
239 end if
240 if (.not. eos%ionE .and. mype == 0) then
241 write(*,*) "WARNING: eos_method='analytic' without ionE"
242 write(*,*) " reduces to ideal gas. Consider eos_type='FI'."
243 end if
244 end if
245
246 !> LTE+ionE effective-gamma1 note
247 if (eos%eos_type == 'LTE' .and. eos%ionE .and. &
248 eos%gamma1_method == 'effective') then
249 if (mype == 0) write(*,*) &
250 "NOTE: gamma1_method='effective' builds gamma_eff = 1+p/eint table."
251 end if
252
253 end subroutine eos_validate_params
254
255 !> Phase 'create' (before units are known): allocate the EoS object, read
256 !> its &eos_list parameters, and load the raw tables for the chosen method.
257 !> The getters wired here must be live before (m)hd_link_eos runs.
258 subroutine eos_init()
259 allocate(eos)
260 call eos_read_params(par_files)
261
262 !> Type-agnostic getters: always live (eos% pointer targets).
263 eos%get_rho => get_rho
264 eos%get_nH => get_nh
265 eos%get_ne_nH => get_ne_nh
266
267 !> Per-type create-phase init (each owns its raw table loads / pointer
268 !> wiring that must be live before (m)hd_link_eos runs), in the matching
269 !> mod_eos_<TYPE> module.
270 select case (eos%eos_type)
271 case ('FI'); call eos_init_fi()
272 case ('LTE'); call eos_init_lte()
273 case ('PI'); call eos_init_pi()
274 case default
275 call mpistop('eos_init: eos_type '//trim(eos%eos_type)//' not recognised')
276 end select
277 end subroutine eos_init
278
279 !> Phase 'commit' (after units are known): finalise the dispatch for the
280 !> loaded physics -- wire the method's runtime pointers and finalise its
281 !> tables. The cross-module wiring that follows (into the ghost-cell update
282 !> and the physics source terms) is done by the caller in amrvac.t, so the
283 !> EoS never reaches back into those modules.
284 !> Finalise the EoS once units are set: dispatch on eos_type to the per-type
285 !> finaliser (each owns its pointer wiring + backend table loading, living in
286 !> mod_eos_fi / mod_eos_lte / mod_eos_pi), then wire the shared total-energy
287 !> temperature getter. Called from amrvac.t after phys init.
288 subroutine eos_finalise()
289 if (.not. allocated(eos)) &
290 call mpistop('eos_finalise: eos not allocated')
291
292 ! Decoded here, not at read time: physics init may still override the
293 ! method (hd well-balanced forces 'bisect')
294 eos%p2eint_bisect = (eos%p2eint_method == 'bisect')
295
296 select case (eos%eos_type)
297 case ('LTE')
298 call eos_finalise_lte()
299 case ('FI')
300 call eos_finalise_fi()
301 case ('PI')
302 call eos_finalise_pi()
303 case default
304 call mpistop('eos_finalise: eos_type '//trim(eos%eos_type)//' not recognised')
305 end select
306
307 eos%get_temperature_from_etot => get_temperature_from_etot
308 ! The eint/nH floor of every LTE path: the forward-table edge, or 100 K of neutral gas
309 ! under analytic, which has no tables
310 if (eos%type_id == eos_type_lte) then
311 if (eos%method_id == eos_analytic) then
312 eos%eint_nH_min = eos%inv_gamma_minus_1 * 100.0d0 / unit_temperature
313 else
314 eos%eint_nH_min = 10.0d0**eos%T%var2_min
315 end if
316 end if
317 call eos_time_dispatch()
318 end subroutine eos_finalise
319
320 !> Put the EoS operations behind timed wrappers, on the eos% pointers and on the phys_
321 !> pointers bound to the same routines, so every caller is counted once. Runs before the
322 !> ghost-cell and source-term modules copy these pointers
323 subroutine eos_time_dispatch()
325
326 if (associated(eos%to_primitive)) then
327 to_primitive_impl => eos%to_primitive
328 eos%to_primitive => timed_to_primitive
329 if (associated(phys_to_primitive, to_primitive_impl)) &
330 phys_to_primitive => timed_to_primitive
331 end if
332 if (associated(eos%to_conserved)) then
333 to_conserved_impl => eos%to_conserved
334 eos%to_conserved => timed_to_conserved
335 if (associated(phys_to_conserved, to_conserved_impl)) &
336 phys_to_conserved => timed_to_conserved
337 end if
338 if (associated(eos%get_thermal_pressure)) then
339 pthermal_impl => eos%get_thermal_pressure
340 eos%get_thermal_pressure => timed_pthermal
341 if (associated(phys_get_pthermal, pthermal_impl)) phys_get_pthermal => timed_pthermal
342 end if
343 if (associated(eos%update_eos)) then
344 update_eos_impl => eos%update_eos
345 eos%update_eos => timed_update_eos
346 end if
347 if (associated(eos%get_csound2)) then
348 csound2_impl => eos%get_csound2
349 eos%get_csound2 => timed_csound2
350 end if
351 if (associated(eos%get_temperature_from_eint)) then
352 tfromei_impl => eos%get_temperature_from_eint
353 eos%get_temperature_from_eint => timed_tfromei
354 end if
355 end subroutine eos_time_dispatch
356
357 !> Each wrapper imports nw itself: taken from the host, it makes ifx 2026.2 crash on reading mod_eos.mod
358 subroutine timed_to_primitive(ixI^L, ixO^L, w, x)
359 use mod_variables, only: nw
360 integer, intent(in) :: ixi^l, ixo^l
361 double precision, intent(inout) :: w(ixi^s, nw)
362 double precision, intent(in) :: x(ixi^s, 1:ndim)
363 call eos_timer_start()
364 call to_primitive_impl(ixi^l, ixo^l, w, x)
365 call eos_timer_stop(timeeos_conv)
366 end subroutine timed_to_primitive
367
368 subroutine timed_to_conserved(ixI^L, ixO^L, w, x)
369 use mod_variables, only: nw
370 integer, intent(in) :: ixi^l, ixo^l
371 double precision, intent(inout) :: w(ixi^s, nw)
372 double precision, intent(in) :: x(ixi^s, 1:ndim)
373 call eos_timer_start()
374 call to_conserved_impl(ixi^l, ixo^l, w, x)
375 call eos_timer_stop(timeeos_conv)
376 end subroutine timed_to_conserved
377
378 subroutine timed_update_eos(ixI^L, ixO^L, w, x)
379 use mod_variables, only: nw
380 integer, intent(in) :: ixi^l, ixo^l
381 double precision, intent(inout) :: w(ixi^s, nw)
382 double precision, intent(in) :: x(ixi^s, 1:ndim)
383 call eos_timer_start()
384 call update_eos_impl(ixi^l, ixo^l, w, x)
385 call eos_timer_stop(timeeos_update)
386 end subroutine timed_update_eos
387
388 subroutine timed_pthermal(w, x, ixI^L, ixO^L, res)
389 use mod_variables, only: nw
390 integer, intent(in) :: ixi^l, ixo^l
391 double precision, intent(in) :: w(ixi^s, nw), x(ixi^s, 1:ndim)
392 double precision, intent(out) :: res(ixi^s)
393 call eos_timer_start()
394 call pthermal_impl(w, x, ixi^l, ixo^l, res)
395 call eos_timer_stop(timeeos_pthermal)
396 end subroutine timed_pthermal
397
398 subroutine timed_csound2(w, x, ixI^L, ixO^L, res)
399 use mod_variables, only: nw
400 integer, intent(in) :: ixi^l, ixo^l
401 double precision, intent(in) :: w(ixi^s, nw), x(ixi^s, 1:ndim)
402 double precision, intent(out) :: res(ixi^s)
403 call eos_timer_start()
404 call csound2_impl(w, x, ixi^l, ixo^l, res)
405 call eos_timer_stop(timeeos_csound)
406 end subroutine timed_csound2
407
408 subroutine timed_tfromei(w, x, ixI^L, ixO^L, res)
409 use mod_variables, only: nw
410 integer, intent(in) :: ixi^l, ixo^l
411 double precision, intent(in) :: w(ixi^s, nw), x(ixi^s, 1:ndim)
412 double precision, intent(out) :: res(ixi^s)
413 call eos_timer_start()
414 call tfromei_impl(w, x, ixi^l, ixo^l, res)
415 call eos_timer_stop(timeeos_tfromei)
416 end subroutine timed_tfromei
417
418 subroutine prepare_eos_w_fields(psx)
419 ! The array is assumed shape: the bound max_blocks also crashes ifx 2026.2 on reading mod_eos.mod
420 type(state), intent(inout) :: psx(:)
421 integer :: iigrid, igrid
422
423 ! fill eos space of all grids, including ghost cells (boundaries)
424 !$OMP PARALLEL DO PRIVATE(igrid)
425 do iigrid=1,igridstail_active; igrid=igrids_active(iigrid);
426 call eos%update_eos(ixg^ll,ixg^ll,psx(igrid)%w,psx(igrid)%x)
427 end do
428 !$OMP END PARALLEL DO
429
430 end subroutine prepare_eos_w_fields
431
432 !> The EoS hooks of the conduction fluid fl
433 subroutine eos_bind_tc(fl)
435 type(tc_fluid), intent(inout) :: fl
436 fl%get_temperature_from_conserved => eos%get_temperature_from_etot
437 if (eos%eos_type == 'LTE' .and. eos%ionE) then
438 ! the fast bilinear T lookup of the STS substeps
439 fl%get_temperature_from_eint => get_temperature_from_eint_fast_lte
440 else
441 fl%get_temperature_from_eint => eos%get_temperature_from_eint
442 fl%frozen_ion = .false.
443 end if
444 ! LTE code T has R = p/(rho T) /= 1, the other closures absorb R in the units
445 if (eos%eos_type == 'LTE') then
446 fl%sat_fac = (eos%n_per_nH_FI/eos%nH2rhoFactor)**1.5d0
447 fl%sat_ne = .true.
448 fl%neOnH_FI = eos%neOnH_FI
449 end if
450 fl%get_rho => eos%get_rho
451 fl%get_ne_nH => eos%get_ne_nH
452 fl%get_var_Rfactor => eos%get_Rfactor
453 fl%inv_gamma_minus_1 = eos%inv_gamma_minus_1
454 fl%nH2rhoFactor = eos%nH2rhoFactor
455 fl%log_T_floor = eos_get_log_t_floor()
456 fl%eint_from_T => eint_nh_from_t
457 end subroutine eos_bind_tc
458
459end module mod_eos
460!> Needs a line after to pass the preprocesor
subroutine, public mpistop(message)
Exit MPI-AMRVAC with an error message.
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)....
FI (fully-ionised, constant-gamma) EoS kernels for the eos% family.
Definition mod_eos_fi.t:10
subroutine, public get_gamma1_fi(w, x, ixil, ixol, gamma1)
Gamma_1 for the fully-ionised ideal gas: constant eosgamma.
Definition mod_eos_fi.t:57
Interpolation kernels for the EoS tables (pure math; no EoS state).
Analytic hydrogen Saha EoS with neutral helium (eos_method == 'analytic').
Shared LTE lookup-table infrastructure (build/IO; not on the hot path).
LTE (Saha-table) EoS kernels and finalise for the eos% family.
Definition mod_eos_lte.t:12
PI (partial-ionisation, eos_type='PI') arm of the eos% family.
Definition mod_eos_pi.t:27
subroutine, public eos_finalise_pi()
PI arm of eos_finalise (after unit_* are set): ride FI's ideal-gas getter set and RR=1 normalisation ...
Definition mod_eos_pi.t:82
subroutine, public eos_init_pi()
Lifecycle (PI arms of the eos_init / eos_finalise dispatchers). The eos% block getters (update_eos_PI...
Definition mod_eos_pi.t:73
Shared EoS accessors (EoS-type-agnostic) for the eos% family.
subroutine, public get_ne_nh(ixil, ixol, w, x, 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)....
Equation of state for AMRVAC, handled through a single eos_container object.
Definition mod_eos.t:30
subroutine, public eos_init()
Phase 'create' (before units are known): allocate the EoS object, read its &eos_list parameters,...
Definition mod_eos.t:259
subroutine, public prepare_eos_w_fields(psx)
Definition mod_eos.t:419
subroutine, public eos_finalise()
Phase 'commit' (after units are known): finalise the dispatch for the loaded physics – wire the metho...
Definition mod_eos.t:289
subroutine, public eos_bind_tc(fl)
The EoS hooks of the conduction fluid fl.
Definition mod_eos.t:434
This module contains definitions of global parameters and variables and some generic functions/subrou...
integer, parameter unitpar
file handle for IO
integer mype
The rank of the current MPI task.
double precision, dimension(:), allocatable, parameter d
This module defines the procedures of a physics module. It contains function pointers for the various...
Definition mod_physics.t:4
procedure(sub_convert), pointer phys_to_primitive
Definition mod_physics.t:54
procedure(sub_get_pthermal), pointer phys_get_pthermal
Definition mod_physics.t:79
procedure(sub_convert), pointer phys_to_conserved
Definition mod_physics.t:53
Thermal conduction for HD and MHD or RHD and RMHD or twofl (plasma-neutral) module Adaptation of mod_...
subroutine eos_timer_start()
Open an EoS timing window; inside an OpenMP parallel region the EoS is not timed.
Definition mod_timing.t:45
double precision timeeos_update
Definition mod_timing.t:12
double precision timeeos_pthermal
Definition mod_timing.t:15
double precision timeeos_conv
Definition mod_timing.t:14
subroutine eos_timer_stop(acc)
Close an EoS timing window, adding its time to acc when it is the outermost.
Definition mod_timing.t:52
double precision timeeos_csound
Definition mod_timing.t:13
double precision timeeos_tfromei
Definition mod_timing.t:16
integer nw
Total number of variables.