Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
PhantomDumpEOSUtils.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
20
21// cf phantom
22// This module contains stuff to do with the equation of state
23// Current options:
24// 1 = isothermal eos
25// 2 = adiabatic/polytropic eos
26// 3 = eos for a locally isothermal disc as in Lodato & Pringle (2007)
27// 4 = GR isothermal
28// 6 = eos for a locally isothermal disc as in Lodato & Pringle (2007),
29// centered on a sink particle
30// 7 = z-dependent locally isothermal eos
31// 8 = Barotropic eos
32// 9 = Piecewise polytrope
33// 10 = MESA EoS
34// 11 = isothermal eos with zero pressure
35// 12 = ideal gas with radiation pressure
36// 13 = locally isothermal prescription from Farris et al. (2014) generalised for generic
37// hierarchical systems
38// 14 = locally isothermal prescription from Farris et al. (2014) for
39// binarysystem
40// 15 = Helmholtz free energy eos 16 = Shen eos 20 = Ideal gas + radiation + various
41// forms of recombination energy from HORMONE (Hirai et al., 2020)
42//
43
44namespace shammodels::sph::phdump {
45
47 bool is_maxvxyzu_at_least_4(const PhantomDump &dump);
48
55 void eos1_load(const PhantomDump &dump, f64 &cs);
56
63 void eos1_write(PhantomDump &dump, const f64 &cs);
64
71 void eos2_load(const PhantomDump &dump, f64 &gamma);
72
79 void eos2_write(PhantomDump &dump, const f64 &gamma);
80
89 void eos3_load(const PhantomDump &dump, f64 &cs0, f64 &q, f64 &r0);
90
99 void eos3_write(PhantomDump &dump, const f64 &cs0, const f64 &q, const f64 &r0);
100
109 void eos13_load(const PhantomDump &dump, f64 &cs0, f64 &q, f64 &r0);
110
119 void eos13_write(PhantomDump &dump, const f64 &cs0, const f64 &q, const f64 &r0);
120
129 void eos14_load(const PhantomDump &dump, f64 &cs0, f64 &q, f64 &r0);
130
139 void eos14_write(PhantomDump &dump, const f64 &cs0, const f64 &q, const f64 &r0);
140
141} // namespace shammodels::sph::phdump
void eos2_write(PhantomDump &dump, const f64 &gamma)
Write the EOS2 to the phantom dump.
void eos1_write(PhantomDump &dump, const f64 &cs)
Write the EOS1 to the phantom dump.
void eos2_load(const PhantomDump &dump, f64 &gamma)
Load the EOS2 from the phantom dump.
void eos13_write(PhantomDump &dump, const f64 &cs0, const f64 &q, const f64 &r0)
Write the EOS13 to the phantom dump.
void eos3_load(const PhantomDump &dump, f64 &cs0, f64 &q, f64 &r0)
Load the EOS3 from the phantom dump.
bool is_maxvxyzu_at_least_4(const PhantomDump &dump)
check if alphau is set in the header, which is the case for (maxvxyzu >= 4)
void eos13_load(const PhantomDump &dump, f64 &cs0, f64 &q, f64 &r0)
Load the EOS13 from the phantom dump.
void eos14_write(PhantomDump &dump, const f64 &cs0, const f64 &q, const f64 &r0)
Write the EOS14 to the phantom dump.
void eos14_load(const PhantomDump &dump, f64 &cs0, f64 &q, f64 &r0)
Load the EOS14 from the phantom dump.
void eos3_write(PhantomDump &dump, const f64 &cs0, const f64 &q, const f64 &r0)
Write the EOS3 to the phantom dump.
void eos1_load(const PhantomDump &dump, f64 &cs)
Load the EOS1 from the phantom dump.
double f64
Alias for double.