@@ -33,8 +33,12 @@ namespace singularity {
33
33
34
34
using namespace eos_base ;
35
35
36
- /* The details of this equation of state can be found here:
37
- * https://www.osti.gov/biblio/2479474 */
36
+ /* Most information regarding this equation of state can be found here:
37
+ * https://www.osti.gov/biblio/2479474
38
+ *
39
+ * Note that all equations are given as functions of the density ($\rho$) rather than functions
40
+ * of the specific volume ($v$). The reason for this is it simplifies the computational complexity.
41
+ */
38
42
class SimpleMACAW : public EosBase <SimpleMACAW> {
39
43
public:
40
44
SimpleMACAW () = default ;
@@ -55,10 +59,10 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
55
59
return robust::ratio ((Delta_e + std::sqrt (discriminant)), 2.0 * _Cvinf);
56
60
}
57
61
PORTABLE_INLINE_FUNCTION void CheckParams () const {
58
- PORTABLE_ALWAYS_REQUIRE (_A > 0 , " Parameter, 'A', must be positive " );
59
- PORTABLE_ALWAYS_REQUIRE (_B > 0 , " Parameter, 'B', must be positive " );
62
+ PORTABLE_ALWAYS_REQUIRE (_A >= 0 , " Parameter, 'A', must be non-negative " );
63
+ PORTABLE_ALWAYS_REQUIRE (_B >= 0 , " Parameter, 'B', must be non-negative " );
60
64
PORTABLE_ALWAYS_REQUIRE (_v0 > 0 , " Reference specific volume, 'v0', must be positive" );
61
- PORTABLE_ALWAYS_REQUIRE (_T0 > 0 , " Reference temperature, 'T0', must be positive " );
65
+ PORTABLE_ALWAYS_REQUIRE (_T0 >= 0 , " Reference temperature, 'T0', must be non-negative " );
62
66
PORTABLE_ALWAYS_REQUIRE (_Cvinf > 0 , " Specific heat capacity (at constant volume), `Cvinf`, must be positive" );
63
67
PORTABLE_ALWAYS_REQUIRE (_Gc > 0 && _Gc < 1 , " Gruneisen parameter, 'Gc', must be in the interval (0,1)" );
64
68
_AZbar.CheckParams ();
@@ -67,18 +71,21 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
67
71
PORTABLE_INLINE_FUNCTION Real InternalEnergyFromDensityTemperature (
68
72
const Real rho, const Real temperature,
69
73
Indexer_t &&lambda = static_cast <Real *>(nullptr )) const {
74
+ /* Equation (16) */
70
75
return rho * (SieColdCurve (rho) + SieThermalPortion (rho, temperature));
71
76
}
72
77
template <typename Indexer_t = Real *>
73
78
PORTABLE_INLINE_FUNCTION Real PressureFromDensityTemperature (
74
79
const Real rho, const Real temperature,
75
80
Indexer_t &&lambda = static_cast <Real *>(nullptr )) const {
81
+ /* Equation (15) */
76
82
return PressureColdCurve (rho) + PressureThermalPortion (rho, temperature);
77
83
}
78
84
template <typename Indexer_t = Real *>
79
85
PORTABLE_INLINE_FUNCTION Real PressureFromDensityInternalEnergy (
80
86
const Real rho, const Real sie,
81
87
Indexer_t &&lambda = static_cast <Real *>(nullptr )) const {
88
+ /* Equation (19) */
82
89
return PressureColdCurve (rho) + _Gc * rho * (sie - SieColdCurve (rho));
83
90
}
84
91
template <typename Indexer_t = Real *>
@@ -93,6 +100,7 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
93
100
PORTABLE_INLINE_FUNCTION Real
94
101
EntropyFromDensityTemperature (const Real rho, const Real temperature,
95
102
Indexer_t &&lambda = static_cast <Real *>(nullptr )) const {
103
+ /* Equation (8) */
96
104
const Real tau = robust::ratio (temperature, TemperatureScale (rho));
97
105
return _Cvinf * (robust::ratio (tau, 1.0 + tau) + std::log (1.0 + tau));
98
106
}
@@ -138,6 +146,7 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
138
146
template <typename Indexer_t = Real *>
139
147
PORTABLE_INLINE_FUNCTION Real TemperatureScale (
140
148
const Real rho, Indexer_t &&lambda = static_cast <Real *>(nullptr )) const {
149
+ /* Equation (13) */
141
150
return _T0 * std::pow (rho * _v0, _Gc);
142
151
}
143
152
@@ -146,6 +155,7 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
146
155
PORTABLE_INLINE_FUNCTION Real SpecificHeatFromDensityTemperature (
147
156
const Real rho, const Real temperature,
148
157
Indexer_t &&lambda = static_cast <Real *>(nullptr )) const {
158
+ /* Equation (6) */
149
159
const Real tau = robust::ratio (temperature, TemperatureScale (rho));
150
160
const Real numerator = math_utils::pow<2 >(tau) + 2.0 * tau;
151
161
const Real denominator = math_utils::pow<2 >(tau + 1.0 );
@@ -170,6 +180,7 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
170
180
PORTABLE_INLINE_FUNCTION Real BulkModulusFromDensityInternalEnergy (
171
181
const Real rho, const Real sie,
172
182
Indexer_t &&lambda = static_cast <Real *>(nullptr )) const {
183
+ /* Equation (21) (multiplied by $\rho$ to get bulk mod) */
173
184
const Real term1 = _A * _B * (_B + 1.0 ) * std::pow (rho * _v0, _B + 1.0 );
174
185
const Real term2 = _Gc * (_Gc + 1.0 ) * rho * (sie - SieColdCurve (rho));
175
186
return term1 + term2;
@@ -179,7 +190,8 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
179
190
PORTABLE_INLINE_FUNCTION Real IsothermalBulkModulusFromDensityTemperature (
180
191
const Real rho, const Real temperature,
181
192
Indexer_t &&lambda = static_cast <Real *>(nullptr )) const {
182
- /* As mentioned in the paper, from the constraints on the parameters,
193
+ /* Equation (22) (multiplied by $\rho$ to get bulk mod)
194
+ * As mentioned in the paper, from the constraints on the parameters,
183
195
* the isothermal bulk modulus is guaranteed to be positive. */
184
196
const Real term1 = _A * _B * (_B + 1.0 ) * std::pow (rho * _v0, _B + 1.0 );
185
197
const Real numerator = rho * _T0 * (1.0 - _Gc) * std::pow (rho * _v0, 2.0 * _Gc) + temperature;
0 commit comments