Skip to content

Commit

Permalink
Upgrade CEPTR thermo generation (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf authored Nov 3, 2023
1 parent 276ca0b commit 077dd3d
Show file tree
Hide file tree
Showing 45 changed files with 40,951 additions and 42,341 deletions.
1,360 changes: 555 additions & 805 deletions Support/Mechanism/Models/Aromatic_KrNara/mechanism.H

Large diffs are not rendered by default.

256 changes: 63 additions & 193 deletions Support/Mechanism/Models/BurkeDryer/mechanism.H

Large diffs are not rendered by default.

125 changes: 37 additions & 88 deletions Support/Mechanism/Models/C1-C2-NO/mechanism.H
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,9 @@ cv_R(amrex::Real* species, const amrex::Real T)
const amrex::Real T3 = T * T * T;
const amrex::Real T4 = T * T * T * T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
species[0] = +1.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4;
species[0] = +1.50000000e+00;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -554,8 +553,7 @@ cv_R(amrex::Real* species, const amrex::Real T)
species[36] = +1.81138000e-01 + 3.08533800e-02 * T + 5.08652470e-06 * T2 -
2.46548880e-08 * T3 + 1.11101930e-11 * T4;
// species 37: N
species[37] = +1.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4;
species[37] = +1.50000000e+00;
// species 38: NO
species[38] = +3.21847630e+00 - 4.63897600e-03 * T + 1.10410220e-05 * T2 -
9.33613540e-09 * T3 + 2.80357700e-12 * T4;
Expand Down Expand Up @@ -725,10 +723,9 @@ cp_R(amrex::Real* species, const amrex::Real T)
const amrex::Real T3 = T * T * T;
const amrex::Real T4 = T * T * T * T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
species[0] = +2.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4;
species[0] = +2.50000000e+00;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -841,8 +838,7 @@ cp_R(amrex::Real* species, const amrex::Real T)
species[36] = +1.18113800e+00 + 3.08533800e-02 * T + 5.08652470e-06 * T2 -
2.46548880e-08 * T3 + 1.11101930e-11 * T4;
// species 37: N
species[37] = +2.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4;
species[37] = +2.50000000e+00;
// species 38: NO
species[38] = +4.21847630e+00 - 4.63897600e-03 * T + 1.10410220e-05 * T2 -
9.33613540e-09 * T3 + 2.80357700e-12 * T4;
Expand Down Expand Up @@ -1014,12 +1010,10 @@ gibbs(amrex::Real* species, const amrex::Real T)
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
species[0] = -7.453750000000000e+02 * invT - 1.866000000000000e+00 -
2.500000000000000e+00 * logT - 0.000000000000000e+00 * T -
0.000000000000000e+00 * T2 - 0.000000000000000e+00 * T3 -
0.000000000000000e+00 * T4;
2.500000000000000e+00 * logT;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -1205,9 +1199,7 @@ gibbs(amrex::Real* species, const amrex::Real T)
5.555096499999999e-13 * T4;
// species 37: N
species[37] = +5.610463700000000e+04 * invT - 1.693908700000000e+00 -
2.500000000000000e+00 * logT - 0.000000000000000e+00 * T -
0.000000000000000e+00 * T2 - 0.000000000000000e+00 * T3 -
0.000000000000000e+00 * T4;
2.500000000000000e+00 * logT;
// species 38: NO
species[38] = +9.844623000000000e+03 * invT + 1.937629900000000e+00 -
4.218476300000000e+00 * logT + 2.319488000000000e-03 * T -
Expand Down Expand Up @@ -1477,11 +1469,9 @@ helmholtz(amrex::Real* species, const amrex::Real T)
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
species[0] = -7.45375000e+02 * invT - 2.86600000e+00 - 2.50000000e+00 * logT -
0.00000000e+00 * T - 0.00000000e+00 * T2 - 0.00000000e+00 * T3 -
0.00000000e+00 * T4;
species[0] = -7.45375000e+02 * invT - 2.86600000e+00 - 2.50000000e+00 * logT;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -1666,10 +1656,8 @@ helmholtz(amrex::Real* species, const amrex::Real T)
8.47754117e-07 * T2 + 2.05457400e-09 * T3 -
5.55509650e-13 * T4;
// species 37: N
species[37] = +5.61046370e+04 * invT - 2.69390870e+00 -
2.50000000e+00 * logT - 0.00000000e+00 * T -
0.00000000e+00 * T2 - 0.00000000e+00 * T3 -
0.00000000e+00 * T4;
species[37] =
+5.61046370e+04 * invT - 2.69390870e+00 - 2.50000000e+00 * logT;
// species 38: NO
species[38] = +9.84462300e+03 * invT + 9.37629900e-01 -
4.21847630e+00 * logT + 2.31948800e-03 * T -
Expand Down Expand Up @@ -1938,11 +1926,9 @@ speciesInternalEnergy(amrex::Real* species, const amrex::Real T)
const amrex::Real T4 = T * T * T * T;
const amrex::Real invT = 1.0 / T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
species[0] = +1.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4 -
7.45375000e+02 * invT;
species[0] = +1.50000000e+00 - 7.45375000e+02 * invT;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -2091,9 +2077,7 @@ speciesInternalEnergy(amrex::Real* species, const amrex::Real T)
6.16372200e-09 * T3 + 2.22203860e-12 * T4 -
1.79040040e+03 * invT;
// species 37: N
species[37] = +1.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4 +
5.61046370e+04 * invT;
species[37] = +1.50000000e+00 + 5.61046370e+04 * invT;
// species 38: NO
species[38] = +3.21847630e+00 - 2.31948800e-03 * T + 3.68034067e-06 * T2 -
2.33403385e-09 * T3 + 5.60715400e-13 * T4 +
Expand Down Expand Up @@ -2313,11 +2297,9 @@ speciesEnthalpy(amrex::Real* species, const amrex::Real T)
const amrex::Real T4 = T * T * T * T;
const amrex::Real invT = 1.0 / T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
species[0] = +2.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4 -
7.45375000e+02 * invT;
species[0] = +2.50000000e+00 - 7.45375000e+02 * invT;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -2466,9 +2448,7 @@ speciesEnthalpy(amrex::Real* species, const amrex::Real T)
6.16372200e-09 * T3 + 2.22203860e-12 * T4 -
1.79040040e+03 * invT;
// species 37: N
species[37] = +2.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4 +
5.61046370e+04 * invT;
species[37] = +2.50000000e+00 + 5.61046370e+04 * invT;
// species 38: NO
species[38] = +4.21847630e+00 - 2.31948800e-03 * T + 3.68034067e-06 * T2 -
2.33403385e-09 * T3 + 5.60715400e-13 * T4 +
Expand Down Expand Up @@ -2688,11 +2668,9 @@ speciesEntropy(amrex::Real* species, const amrex::Real T)
const amrex::Real T4 = T * T * T * T;
const amrex::Real logT = log(T);

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
species[0] = +2.50000000e+00 * logT + 0.00000000e+00 * T +
0.00000000e+00 * T2 + 0.00000000e+00 * T3 + 0.00000000e+00 * T4 +
4.36600000e+00;
species[0] = +2.50000000e+00 * logT + 4.36600000e+00;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -2841,9 +2819,7 @@ speciesEntropy(amrex::Real* species, const amrex::Real T)
2.54326235e-06 * T2 - 8.21829600e-09 * T3 +
2.77754825e-12 * T4 + 2.10624690e+01;
// species 37: N
species[37] = +2.50000000e+00 * logT + 0.00000000e+00 * T +
0.00000000e+00 * T2 + 0.00000000e+00 * T3 +
0.00000000e+00 * T4 + 4.19390870e+00;
species[37] = +2.50000000e+00 * logT + 4.19390870e+00;
// species 38: NO
species[38] = +4.21847630e+00 * logT - 4.63897600e-03 * T +
5.52051100e-06 * T2 - 3.11204513e-09 * T3 +
Expand Down Expand Up @@ -3060,12 +3036,10 @@ dcvpRdT(amrex::Real* species, const amrex::Real T)
{
const amrex::Real T2 = T * T;
const amrex::Real T3 = T * T * T;
const amrex::Real T4 = T * T * T * T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
species[0] = +0.00000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3;
species[0] = 0.0;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -3178,8 +3152,7 @@ dcvpRdT(amrex::Real* species, const amrex::Real T)
species[36] = +3.08533800e-02 + 1.01730494e-05 * T - 7.39646640e-08 * T2 +
4.44407720e-11 * T3;
// species 37: N
species[37] = +0.00000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3;
species[37] = 0.0;
// species 38: NO
species[38] = -4.63897600e-03 + 2.20820440e-05 * T - 2.80084062e-08 * T2 +
1.12143080e-11 * T3;
Expand Down Expand Up @@ -3368,12 +3341,9 @@ CKCPBS(const amrex::Real T, const amrex::Real y[], amrex::Real& cpbs)
const amrex::Real T3 = T * T * T;
const amrex::Real T4 = T * T * T * T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
result += y[0] *
(+2.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4) *
0.0250312891113892;
result += y[0] * (+2.50000000e+00) * 0.0250312891113892;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -3558,10 +3528,7 @@ CKCPBS(const amrex::Real T, const amrex::Real y[], amrex::Real& cpbs)
2.46548880e-08 * T3 + 1.11101930e-11 * T4) *
0.0178227703714265;
// species 37: N
result += y[37] *
(+2.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4) *
0.0713928749910759;
result += y[37] * (+2.50000000e+00) * 0.0713928749910759;
// species 38: NO
result += y[38] *
(+4.21847630e+00 - 4.63897600e-03 * T + 1.10410220e-05 * T2 -
Expand Down Expand Up @@ -3849,12 +3816,9 @@ CKCVBS(const amrex::Real T, const amrex::Real y[], amrex::Real& cvbs)
const amrex::Real T3 = T * T * T;
const amrex::Real T4 = T * T * T * T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
result += y[0] *
(+1.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4) *
0.0250312891113892;
result += y[0] * (+1.50000000e+00) * 0.0250312891113892;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -4039,10 +4003,7 @@ CKCVBS(const amrex::Real T, const amrex::Real y[], amrex::Real& cvbs)
2.46548880e-08 * T3 + 1.11101930e-11 * T4) *
0.0178227703714265;
// species 37: N
result += y[37] *
(+1.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4) *
0.0713928749910759;
result += y[37] * (+1.50000000e+00) * 0.0713928749910759;
// species 38: NO
result += y[38] *
(+3.21847630e+00 - 4.63897600e-03 * T + 1.10410220e-05 * T2 -
Expand Down Expand Up @@ -4331,13 +4292,10 @@ CKHBMS(const amrex::Real T, const amrex::Real y[], amrex::Real& hbms)
const amrex::Real T4 = T * T * T * T;
const amrex::Real invT = 1.0 / T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
result +=
y[0] *
(+2.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4 - 7.45375000e+02 * invT) *
0.0250312891113892;
y[0] * (+2.50000000e+00 - 7.45375000e+02 * invT) * 0.0250312891113892;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -4559,10 +4517,7 @@ CKHBMS(const amrex::Real T, const amrex::Real y[], amrex::Real& hbms)
0.0178227703714265;
// species 37: N
result +=
y[37] *
(+2.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4 + 5.61046370e+04 * invT) *
0.0713928749910759;
y[37] * (+2.50000000e+00 + 5.61046370e+04 * invT) * 0.0713928749910759;
// species 38: NO
result +=
y[38] *
Expand Down Expand Up @@ -4902,13 +4857,10 @@ CKUBMS(const amrex::Real T, const amrex::Real y[], amrex::Real& ubms)
const amrex::Real T4 = T * T * T * T;
const amrex::Real invT = 1.0 / T;

// species with no change at a midpoint T
// species with no change across T
// species 0: AR
result +=
y[0] *
(+1.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4 - 7.45375000e+02 * invT) *
0.0250312891113892;
y[0] * (+1.50000000e+00 - 7.45375000e+02 * invT) * 0.0250312891113892;

// species with midpoint at T=1000 kelvin
if (T < 1000) {
Expand Down Expand Up @@ -5130,10 +5082,7 @@ CKUBMS(const amrex::Real T, const amrex::Real y[], amrex::Real& ubms)
0.0178227703714265;
// species 37: N
result +=
y[37] *
(+1.50000000e+00 + 0.00000000e+00 * T + 0.00000000e+00 * T2 +
0.00000000e+00 * T3 + 0.00000000e+00 * T4 + 5.61046370e+04 * invT) *
0.0713928749910759;
y[37] * (+1.50000000e+00 + 5.61046370e+04 * invT) * 0.0713928749910759;
// species 38: NO
result +=
y[38] *
Expand Down
Loading

0 comments on commit 077dd3d

Please sign in to comment.