|
MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
Equation of state for AMRVAC, handled through a single eos_container object. More...
Functions/Subroutines | |
| subroutine, public | eos_init () |
| Phase 'create' (before units are known): allocate the EoS object, read its &eos_list parameters, and load the raw tables for the chosen method. The getters wired here must be live before (m)hd_link_eos runs. | |
| subroutine, public | eos_finalise () |
| Phase 'commit' (after units are known): finalise the dispatch for the loaded physics – wire the method's runtime pointers and finalise its tables. The cross-module wiring that follows (into the ghost-cell update and the physics source terms) is done by the caller in amrvac.t, so the EoS never reaches back into those modules. Finalise the EoS once units are set: dispatch on eos_type to the per-type finaliser (each owns its pointer wiring + backend table loading, living in mod_eos_FI / mod_eos_LTE / mod_eos_PI), then wire the shared total-energy temperature getter. Called from amrvac.t after phys init. | |
| subroutine, public | prepare_eos_w_fields () |
Equation of state for AMRVAC, handled through a single eos_container object.
Two gas models (eos_type): FI – fully ionised ideal gas (constant gamma, mu). LTE – local thermodynamic equilibrium with partial ionisation of H (+He), via one of three interchangeable methods (eos_method): state – per-quantity (T,p,ne/nH,eint/p) Saha-equilibrium tables, PCHIP/bilinear interpolated ('tables' accepted as legacy alias). entropy – bicubic-Hermite reconstruction (see mod_eos_LTE_entropy). analytic – on-the-fly H-only Saha solve (see saha_* routines). Tables are generated offline and read as binary; their axes are (log10 nH, log10 eint/nH) in code units after the unit shift applied in eos_finalise. ionE optionally folds ionisation energy into eint.
The code-unit normalisation is kept so an FI atmosphere recovers R = 1; update_eos_LTE relies on this. update_eos refreshes the cached EoS fields (Te, ne) once per RK substep, and for boundary cells via update_eos_4_bc; call eosupdate_eos manually before any extra output.
Jack Jenkins (27.01.2026); legacy EoS type 1: uniform tabulated (by Chris Osborne) H(+He) LTE EoS, in consultation with Damien Przybylski (MURaM). Routed through legacy usr_Rfactor approach. Jack Jenkins (05.05.2026); EoS type 2 finished, now separate module that each hd/mhd physics module from upstream/amrvac3.3 route through. Jack Jenkins (11.05.2026); Benchmarked curvature-density-hybrid-tabulated EoS tables. Jack Jenkins (25.05.2026); Single curvature-density-tabulated entropy potential EoS prototyped. Validated gamma(T) against Ballester et al. 2001 to ~ 1.1% . Jack Jenkins (16.06.2026); Folded in fld, ffhd, and new partial_ionisation modules to be EoS compliant and refactored for readability.
| subroutine, public mod_eos::eos_finalise |
Phase 'commit' (after units are known): finalise the dispatch for the loaded physics – wire the method's runtime pointers and finalise its tables. The cross-module wiring that follows (into the ghost-cell update and the physics source terms) is done by the caller in amrvac.t, so the EoS never reaches back into those modules. Finalise the EoS once units are set: dispatch on eos_type to the per-type finaliser (each owns its pointer wiring + backend table loading, living in mod_eos_FI / mod_eos_LTE / mod_eos_PI), then wire the shared total-energy temperature getter. Called from amrvac.t after phys init.
| subroutine, public mod_eos::eos_init |
Phase 'create' (before units are known): allocate the EoS object, read its &eos_list parameters, and load the raw tables for the chosen method. The getters wired here must be live before (m)hd_link_eos runs.
Type-agnostic getters: always live (eos% pointer targets).
Per-type create-phase init (each owns its raw table loads / pointer wiring that must be live before (m)hd_link_eos runs), in the matching mod_eos_<TYPE> module.