@@ -338,6 +338,38 @@ Note: sometimes temperatures are measured in eV for which the conversion is
338
338
339
339
Sesame units are equivalent to the mm-mg-µs unit system.
340
340
341
+ The ``MeanAtomicProperties `` struct
342
+ ------------------------------------
343
+
344
+ Several analytic equations of state optionally accept mean atomic mass
345
+ and number as physics properties. These are the average number of
346
+ nucleons and protons in a constituent nucleus respectively. They are
347
+ not necessarily integers, as a given material may be made up of
348
+ multiple kinds of atom. For example, dry air contains both nitrogen
349
+ and oxygen.
350
+
351
+ The mean atomic mass and number are frequently carried in the
352
+ container struct
353
+
354
+ .. code-block :: cpp
355
+
356
+ struct MeanAtomicProperties {
357
+ Real Abar, Zbar;
358
+
359
+ // default is hydrogen
360
+ static constexpr Real DEFAULT_ABAR = 1.0;
361
+ static constexpr Real DEFAULT_ZBAR = 1.0;
362
+
363
+ PORTABLE_INLINE_FUNCTION
364
+ MeanAtomicProperties(Real Abar_, Real Zbar_) : Abar(Abar_), Zbar(Zbar_) {}
365
+ PORTABLE_INLINE_FUNCTION
366
+ MeanAtomicProperties() : Abar(DEFAULT_ABAR), Zbar(DEFAULT_ZBAR) {}
367
+ };
368
+
369
+ which owns the atomic mass ``Abar `` and atomic number ``Zbar ``. You
370
+ may set these by constructing the struct or by setting the fields in a
371
+ pre-constructed struct. The defaults are for hydrogen.
372
+
341
373
Implemented EOS models
342
374
----------------------
343
375
@@ -429,6 +461,14 @@ these values are not set, they will be the same as those returned by the
429
461
conditions are given, the return values of the :code: `ValuesAtReferenceState() `
430
462
function will not be the same.
431
463
464
+ Both constructors also optionally accept `MeanAtomicProperties ` for
465
+ the atomic mass and number as a final optional parameter, e.g.,
466
+
467
+ .. code-block :: cpp
468
+
469
+ IdealGas(Real gm1, Real Cv, MeanAtomicProperties(Abar, Zbar));
470
+ IdealGas(Real gm1, Real Cv, Real EntropyT0, Real EntropyRho0, MeanAtomicProperties(Abar, Zbar));
471
+
432
472
Stiffened Gas
433
473
`````````````
434
474
@@ -486,6 +526,15 @@ these values are not set, they will be the same as those returned by the
486
526
conditions are given, the return values of the :code: `ValuesAtReferenceState() `
487
527
function will not be the same.
488
528
529
+ Both constructors also optionally accept `MeanAtomicProperties ` for
530
+ the atomic mass and number as a final optional parameter, e.g.,
531
+
532
+ .. code-block :: cpp
533
+
534
+ StiffGas(Real gm1, Real Cv, Real Pinf, Real q, MeanAtomicProperties(Abar, Zbar));
535
+ StiffGas(Real gm1, Real Cv, Real Pinf, Real q, Real qp, Real T0, Real P0,
536
+ EntropyRho0, MeanAtomicProperties(Abar, Zbar));
537
+
489
538
Noble-Abel
490
539
``````````
491
540
@@ -544,6 +593,17 @@ these values are not set, they will be the same as those returned by the
544
593
conditions are given, the return values of the :code: `ValuesAtReferenceState() `
545
594
function will not be the same.
546
595
596
+ Both constructors also optionally accept `MeanAtomicProperties ` for
597
+ the atomic mass and number as a final optional parameter, e.g.,
598
+
599
+ .. code-block :: cpp
600
+
601
+ NobleAbel(Real gm1, Real Cv, Real b, Real q,
602
+ MeanAtomicProperties(Abar, Zbar));
603
+ NobleAbel(Real gm1, Real Cv, Real b, Real q, Real qp, Real T0, Real P0,
604
+ MeanAtomicProperties(Abar, Zbar));
605
+
606
+
547
607
Carnahan-Starling
548
608
`````````````````
549
609
@@ -630,6 +690,16 @@ these values are not set, they will be the same as those returned by the
630
690
conditions are given, the return values of the :code: `ValuesAtReferenceState() `
631
691
function will not be the same.
632
692
693
+ Both constructors also optionally accept `MeanAtomicProperties ` for
694
+ the atomic mass and number as a final optional parameter, e.g.,
695
+
696
+ .. code-block :: cpp
697
+
698
+ CarnahanStarling(Real gm1, Real Cv, Real b, Real q,
699
+ MeanAtomicProperties(Abar, Zbar))
700
+ CarnahanStarling(Real gm1, Real Cv, Real b, Real q, Real qp, Real T0, Real P0,
701
+ MeanAtomicProperties(Abar, Zbar))
702
+
633
703
Gruneisen EOS
634
704
`````````````
635
705
@@ -767,6 +837,9 @@ There is an overload of the ``Gruneisen`` class which computes
767
837
Gruneisen(const Real C0, const Real s1, const Real s2, const Real s3, const Real G0,
768
838
const Real b, const Real rho0, const Real T0, const Real P0, const Real Cv)
769
839
840
+ Both constructors also optionally accept `MeanAtomicProperties ` for
841
+ the atomic mass and number as a final optional parameter.
842
+
770
843
Extendended Vinet EOS
771
844
`````````````````````
772
845
@@ -849,6 +922,9 @@ is :math:`S_0`, and ``expconsts`` is a pointer to the constant array of length
849
922
:math: `d_2 ` to :math: `d_{40 }`. Expansion coefficients not used should be set to
850
923
0.0.
851
924
925
+ This constructor also optionally accepts `MeanAtomicProperties ` for
926
+ the atomic mass and number as a final optional parameter.
927
+
852
928
Mie-Gruneisen linear :math: `U_s`- :math: `u_p` EOS
853
929
`````````````````````````````````````````````````
854
930
@@ -995,6 +1071,9 @@ where
995
1071
``G0 `` is :math: `\Gamma (\rho _0 )`, ``Cv0 `` is :math: `C_V`,
996
1072
``E0 `` is :math: `E_0 `, and ``S0 `` is :math: `S_0 `.
997
1073
1074
+ This constructor also optionally accepts `MeanAtomicProperties ` for
1075
+ the atomic mass and number as a final optional parameter.
1076
+
998
1077
Mie-Gruneisen power expansion EOS
999
1078
`````````````````````````````````
1000
1079
As we noted above, the assumption of a linear :math: `U_s`- :math: `u_p` relation is simply not valid at large compressions. At
@@ -1075,6 +1154,8 @@ where
1075
1154
:math: `K_0 ` to :math: `K_{40 }`. Expansion coefficients not used should be set to
1076
1155
:math: `0.0 `.
1077
1156
1157
+ This constructor also optionally accepts `MeanAtomicProperties ` for
1158
+ the atomic mass and number as a final optional parameter.
1078
1159
1079
1160
1080
1161
JWL EOS
@@ -1127,6 +1208,9 @@ where ``A`` is :math:`A`, ``B`` is :math:`B`, ``R1`` is :math:`R_1`,
1127
1208
``R2 `` is :math: `R_2 `, ``w `` is :math: `w`, ``rho0 `` is :math: `\rho _0 `,
1128
1209
and ``Cv `` is :math: `C_V`.
1129
1210
1211
+ This constructor also optionally accepts `MeanAtomicProperties ` for
1212
+ the atomic mass and number as a final optional parameter.
1213
+
1130
1214
Davis EOS
1131
1215
```````````
1132
1216
@@ -1274,6 +1358,9 @@ where ``rho0`` is :math:`\rho_0`, ``e0`` is :math:`e_0`, ``P0`` is
1274
1358
:math: `Z`, ``alpha `` is :math: `\alpha `, and ``Cv0 `` is the specific
1275
1359
heat capacity at the reference state.
1276
1360
1361
+ This constructor also optionally accepts `MeanAtomicProperties ` for
1362
+ the atomic mass and number as a final optional parameter.
1363
+
1277
1364
Davis Products EOS
1278
1365
'''''''''''''''''''
1279
1366
@@ -1381,6 +1468,9 @@ where ``a`` is :math:`a`, ``b`` is :math:`b`, ``k`` is :math:`k`,
1381
1468
``n `` is :math: `n`, ``vc `` is :math: `V_\mathrm {C}`, ``pc `` is
1382
1469
:math: `P_\mathrm {C}`, ``Cv `` is :math: `C_{V,0 }`.
1383
1470
1471
+ This constructor also optionally accepts `MeanAtomicProperties ` for
1472
+ the atomic mass and number as a final optional parameter.
1473
+
1384
1474
Spiner EOS
1385
1475
````````````
1386
1476
@@ -1443,6 +1533,12 @@ of the material in the file, and ``reproducability_mode`` is a boolean
1443
1533
which slightly changes how initial guesses for root finds are
1444
1534
computed. The constructor for ``SpinerEOSDependsRhoSie `` is identical.
1445
1535
1536
+ .. note ::
1537
+
1538
+ Mean atomic mass and number are loaded from input tables. The
1539
+ ``SpinerEOS `` model does **not ** support the
1540
+ ``MeanAtomicProperties `` struct.
1541
+
1446
1542
``sp5 `` files and ``sesame2spiner ``
1447
1543
`````````````````````````````````````
1448
1544
@@ -1630,6 +1726,8 @@ values in expansion and compression.
1630
1726
1631
1727
and similar expressions for :math: `b_2 ^*`.
1632
1728
1729
+ The SAP polynomial EOS also optionally accepts a
1730
+ ``MeanAtomicProperties `` struct.
1633
1731
1634
1732
1635
1733
Stellar Collapse EOS
@@ -1711,6 +1809,17 @@ where ``filename`` is the file containing the tabulated model,
1711
1809
original `Stellar Collapse `_ format, and ``filter_bmod `` specifies
1712
1810
whether or not to apply the above-described median filter.
1713
1811
1812
+ .. note ::
1813
+
1814
+ The ``StellarCollapse `` EOS assumes nuclear statistical equilibrium
1815
+ and as such mean atomic mass and number are state variables. As such
1816
+ class does not accept the ``MeanAtomicProperties `` struct. The
1817
+ ``MeanAtomicMassFromDensityTemperature `` and
1818
+ ``MeanAtomicNumberFromDensityTemperature `` functions return the
1819
+ relevant quantities for some thermodynamic state. The
1820
+ ``MeanAtomicMass() `` and ``MeanAtomicNumber() `` functions raise an
1821
+ error.
1822
+
1714
1823
``StellarCollapse `` also provides
1715
1824
1716
1825
.. cpp :function :: void Save (const std::string &filename)
@@ -1796,6 +1905,14 @@ of the Helmholtz free energy (hence the name Helmholtz EOS). The free
1796
1905
energy is pre-computed via integrals over the Fermi sphere and
1797
1906
tabulated in a file provided from `Frank Timmes's website `_.
1798
1907
1908
+ .. note ::
1909
+
1910
+ Since mean atomic mass and number are required inputs, the
1911
+ ``MeanAtomicMassFromDensityTemperature `` and
1912
+ ``MeanAtomicNumberFromDensityAndTemperature `` functions simply
1913
+ return the input values. The ``MeanAtomicMass() `` and
1914
+ ``MeanAtomicNumber `` functions produce an error.
1915
+
1799
1916
The table is a simple small ascii file. To ensure thermodyanic
1800
1917
consistency, the table is interpolated using either biquintic or
1801
1918
bicubic Hermite polynomials, which are sufficiently high order that
@@ -1897,6 +2014,13 @@ and :math:`splitCowan` uses the cold curve plus Cowan-nuclear model
1897
2014
for ions and the final option ``linear_interp `` uses linear instead of
1898
2015
bilinear interpolation.
1899
2016
2017
+ .. note ::
2018
+
2019
+ Mean atomic mass and number are loaded from input tables. The
2020
+ ``EOSPAC `` model does **not ** support the ``MeanAtomicProperties ``
2021
+ struct.
2022
+
2023
+
1900
2024
Note for performance reasons this EOS uses a slightly different vector API.
1901
2025
See :ref: `EOSPAC Vector Functions <eospac_vector >` for more details.
1902
2026
0 commit comments