Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mechanisms/Aromatic_KrNara/mechanism.H
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
#define NUM_GAS_ELEMENTS 5 // Elements in the homogeneous phase
#define NUM_GAS_SPECIES 158 // Species in the homogeneous phase
#define NUM_GAS_REACTIONS 1049 // Reactions in the homogeneous phase
#define NUM_QSS_GAS_SPECIES 0 // QSS species in the homogeneous phase

#define SITE_DENSITY 0.000000E+00 // mol/cm^2

Expand Down
18 changes: 9 additions & 9 deletions Mechanisms/Aromatic_KrNara/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ CKINU(const int i, int& nspec, int ki[], int nu[])
}
}

// Returns the progress rates of each reactions
// Returns the progress rates of each reaction
// Given P, T, and mole fractions
void
CKKFKR(
Expand All @@ -887,20 +887,20 @@ CKKFKR(
amrex::Real q_f[],
amrex::Real q_r[])
{
amrex::Real c[158]; // temporary storage
amrex::Real c[NUM_SPECIES]; // temporary storage
amrex::Real PORT =
1e6 * P / (8.31446261815324e+07 * T); // 1e6 * P/RT so c goes to SI units
1e6 * P / (8.31446261815324e+07 * T); // convert to SI (mol/cm^3 to mol/m^3)

// Compute conversion, see Eq 10
for (int id = 0; id < 158; ++id) {
for (int id = 0; id < NUM_GAS_SPECIES; ++id) {
c[id] = x[id] * PORT;
}

// convert to chemkin units
progressRateFR(q_f, q_r, c, T);

// convert to chemkin units
for (int id = 0; id < 1049; ++id) {
for (int id = 0; id < NUM_GAS_REACTIONS; ++id) {
q_f[id] *= 1.0e-6;
q_r[id] *= 1.0e-6;
}
Expand All @@ -915,7 +915,7 @@ progressRateFR(
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[158];
amrex::Real g_RT[NUM_SPECIES];
gibbs(g_RT, T);

amrex::Real sc_qss[1];
Expand Down Expand Up @@ -947,7 +947,7 @@ CKNCF(int* ncf)
{
int kd = 5;
// Zero ncf
for (int id = 0; id < kd * 158; ++id) {
for (int id = 0; id < kd * NUM_GAS_SPECIES; ++id) {
ncf[id] = 0;
}

Expand Down Expand Up @@ -1627,7 +1627,7 @@ CKNCF(int* ncf)
void
CKSYME_STR(amrex::Vector<std::string>& ename)
{
ename.resize(5);
ename.resize(NUM_ELEMENTS);
ename[0] = "N";
ename[1] = "H";
ename[2] = "O";
Expand All @@ -1639,7 +1639,7 @@ CKSYME_STR(amrex::Vector<std::string>& ename)
void
CKSYMS_STR(amrex::Vector<std::string>& kname)
{
kname.resize(158);
kname.resize(NUM_SPECIES);
kname[0] = "H";
kname[1] = "O2";
kname[2] = "O";
Expand Down
7 changes: 4 additions & 3 deletions Mechanisms/BurkeDryer/mechanism.H
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
#define CO_ID 11
#define CO2_ID 12

#define NUM_GAS_ELEMENTS 6 // Elements in the homogeneous phase
#define NUM_GAS_SPECIES 13 // Species in the homogeneous phase
#define NUM_GAS_REACTIONS 27 // Reactions in the homogeneous phase
#define NUM_GAS_ELEMENTS 6 // Elements in the homogeneous phase
#define NUM_GAS_SPECIES 13 // Species in the homogeneous phase
#define NUM_GAS_REACTIONS 27 // Reactions in the homogeneous phase
#define NUM_QSS_GAS_SPECIES 0 // QSS species in the homogeneous phase

#define SITE_DENSITY 0.000000E+00 // mol/cm^2

Expand Down
18 changes: 9 additions & 9 deletions Mechanisms/BurkeDryer/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ CKINU(const int i, int& nspec, int ki[], int nu[])
}
}

// Returns the progress rates of each reactions
// Returns the progress rates of each reaction
// Given P, T, and mole fractions
void
CKKFKR(
Expand All @@ -58,20 +58,20 @@ CKKFKR(
amrex::Real q_f[],
amrex::Real q_r[])
{
amrex::Real c[13]; // temporary storage
amrex::Real c[NUM_SPECIES]; // temporary storage
amrex::Real PORT =
1e6 * P / (8.31446261815324e+07 * T); // 1e6 * P/RT so c goes to SI units
1e6 * P / (8.31446261815324e+07 * T); // convert to SI (mol/cm^3 to mol/m^3)

// Compute conversion, see Eq 10
for (int id = 0; id < 13; ++id) {
for (int id = 0; id < NUM_GAS_SPECIES; ++id) {
c[id] = x[id] * PORT;
}

// convert to chemkin units
progressRateFR(q_f, q_r, c, T);

// convert to chemkin units
for (int id = 0; id < 27; ++id) {
for (int id = 0; id < NUM_GAS_REACTIONS; ++id) {
q_f[id] *= 1.0e-6;
q_r[id] *= 1.0e-6;
}
Expand All @@ -86,7 +86,7 @@ progressRateFR(
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[13];
amrex::Real g_RT[NUM_SPECIES];
gibbs(g_RT, T);

amrex::Real sc_qss[1];
Expand Down Expand Up @@ -119,7 +119,7 @@ CKNCF(int* ncf)
{
int kd = 6;
// Zero ncf
for (int id = 0; id < kd * 13; ++id) {
for (int id = 0; id < kd * NUM_GAS_SPECIES; ++id) {
ncf[id] = 0;
}

Expand Down Expand Up @@ -173,7 +173,7 @@ CKNCF(int* ncf)
void
CKSYME_STR(amrex::Vector<std::string>& ename)
{
ename.resize(6);
ename.resize(NUM_ELEMENTS);
ename[0] = "H";
ename[1] = "O";
ename[2] = "N";
Expand All @@ -186,7 +186,7 @@ CKSYME_STR(amrex::Vector<std::string>& ename)
void
CKSYMS_STR(amrex::Vector<std::string>& kname)
{
kname.resize(13);
kname.resize(NUM_SPECIES);
kname[0] = "H";
kname[1] = "H2";
kname[2] = "O";
Expand Down
1 change: 1 addition & 0 deletions Mechanisms/C1-C2-NO/mechanism.H
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#define NUM_GAS_ELEMENTS 5 // Elements in the homogeneous phase
#define NUM_GAS_SPECIES 44 // Species in the homogeneous phase
#define NUM_GAS_REACTIONS 269 // Reactions in the homogeneous phase
#define NUM_QSS_GAS_SPECIES 0 // QSS species in the homogeneous phase

#define SITE_DENSITY 0.000000E+00 // mol/cm^2

Expand Down
18 changes: 9 additions & 9 deletions Mechanisms/C1-C2-NO/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ CKINU(const int i, int& nspec, int ki[], int nu[])
}
}

// Returns the progress rates of each reactions
// Returns the progress rates of each reaction
// Given P, T, and mole fractions
void
CKKFKR(
Expand All @@ -209,20 +209,20 @@ CKKFKR(
amrex::Real q_f[],
amrex::Real q_r[])
{
amrex::Real c[44]; // temporary storage
amrex::Real c[NUM_SPECIES]; // temporary storage
amrex::Real PORT =
1e6 * P / (8.31446261815324e+07 * T); // 1e6 * P/RT so c goes to SI units
1e6 * P / (8.31446261815324e+07 * T); // convert to SI (mol/cm^3 to mol/m^3)

// Compute conversion, see Eq 10
for (int id = 0; id < 44; ++id) {
for (int id = 0; id < NUM_GAS_SPECIES; ++id) {
c[id] = x[id] * PORT;
}

// convert to chemkin units
progressRateFR(q_f, q_r, c, T);

// convert to chemkin units
for (int id = 0; id < 269; ++id) {
for (int id = 0; id < NUM_GAS_REACTIONS; ++id) {
q_f[id] *= 1.0e-6;
q_r[id] *= 1.0e-6;
}
Expand All @@ -237,7 +237,7 @@ progressRateFR(
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[44];
amrex::Real g_RT[NUM_SPECIES];
gibbs(g_RT, T);

amrex::Real sc_qss[1];
Expand Down Expand Up @@ -269,7 +269,7 @@ CKNCF(int* ncf)
{
int kd = 5;
// Zero ncf
for (int id = 0; id < kd * 44; ++id) {
for (int id = 0; id < kd * NUM_GAS_SPECIES; ++id) {
ncf[id] = 0;
}

Expand Down Expand Up @@ -460,7 +460,7 @@ CKNCF(int* ncf)
void
CKSYME_STR(amrex::Vector<std::string>& ename)
{
ename.resize(5);
ename.resize(NUM_ELEMENTS);
ename[0] = "O";
ename[1] = "H";
ename[2] = "C";
Expand All @@ -472,7 +472,7 @@ CKSYME_STR(amrex::Vector<std::string>& ename)
void
CKSYMS_STR(amrex::Vector<std::string>& kname)
{
kname.resize(44);
kname.resize(NUM_SPECIES);
kname[0] = "AR";
kname[1] = "N2";
kname[2] = "H";
Expand Down
9 changes: 5 additions & 4 deletions Mechanisms/C1-C2-NO_qss/mechanism.H
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@
#define NCO_ID 37
#define CH3O2_ID 38

#define NUM_GAS_ELEMENTS 5 // Elements in the homogeneous phase
#define NUM_QSSA_GAS_SPECIES 39 // Species in the homogeneous phase
#define NUM_GAS_REACTIONS 269 // Reactions in the homogeneous phase
#define NUM_GAS_ELEMENTS 5 // Elements in the homogeneous phase
#define NUM_GAS_SPECIES 39 // Species in the homogeneous phase
#define NUM_GAS_REACTIONS 269 // Reactions in the homogeneous phase
#define NUM_QSS_GAS_SPECIES 5 // QSS species in the homogeneous phase

#define SITE_DENSITY 0.000000E+00 // mol/cm^2

Expand All @@ -64,7 +65,7 @@
#define NUM_SURFACE_REACTIONS 0 // Reactions in the heterogeneous phase

#define NUM_ELEMENTS (NUM_GAS_ELEMENTS + NUM_SURFACE_ELEMENTS)
#define NUM_SPECIES (NUM_QSSA_GAS_SPECIES + NUM_SURFACE_SPECIES)
#define NUM_SPECIES (NUM_GAS_SPECIES + NUM_SURFACE_SPECIES)
#define NUM_REACTIONS (NUM_GAS_REACTIONS + NUM_SURFACE_REACTIONS)

#define NUM_IONS 0
Expand Down
20 changes: 10 additions & 10 deletions Mechanisms/C1-C2-NO_qss/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ CKINU(const int i, int& nspec, int ki[], int nu[])
}
}

// Returns the progress rates of each reactions
// Returns the progress rates of each reaction
// Given P, T, and mole fractions
void
CKKFKR(
Expand All @@ -209,20 +209,20 @@ CKKFKR(
amrex::Real q_f[],
amrex::Real q_r[])
{
amrex::Real c[39]; // temporary storage
amrex::Real c[NUM_SPECIES]; // temporary storage
amrex::Real PORT =
1e6 * P / (8.31446261815324e+07 * T); // 1e6 * P/RT so c goes to SI units
1e6 * P / (8.31446261815324e+07 * T); // convert to SI (mol/cm^3 to mol/m^3)

// Compute conversion, see Eq 10
for (int id = 0; id < 39; ++id) {
for (int id = 0; id < NUM_GAS_SPECIES; ++id) {
c[id] = x[id] * PORT;
}

// convert to chemkin units
progressRateFR(q_f, q_r, c, T);

// convert to chemkin units
for (int id = 0; id < 269; ++id) {
for (int id = 0; id < NUM_GAS_REACTIONS; ++id) {
q_f[id] *= 1.0e-6;
q_r[id] *= 1.0e-6;
}
Expand All @@ -237,9 +237,9 @@ progressRateFR(
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[39];
amrex::Real g_RT[NUM_SPECIES];
gibbs(g_RT, T);
amrex::Real g_RT_qss[5];
amrex::Real g_RT_qss[NUM_GAS_SPECIES];
gibbs_qss(g_RT_qss, T);

amrex::Real sc_qss[5];
Expand Down Expand Up @@ -276,7 +276,7 @@ CKNCF(int* ncf)
{
int kd = 5;
// Zero ncf
for (int id = 0; id < kd * 39; ++id) {
for (int id = 0; id < kd * NUM_GAS_SPECIES; ++id) {
ncf[id] = 0;
}

Expand Down Expand Up @@ -448,7 +448,7 @@ CKNCF(int* ncf)
void
CKSYME_STR(amrex::Vector<std::string>& ename)
{
ename.resize(5);
ename.resize(NUM_ELEMENTS);
ename[0] = "Ar";
ename[1] = "N";
ename[2] = "H";
Expand All @@ -460,7 +460,7 @@ CKSYME_STR(amrex::Vector<std::string>& ename)
void
CKSYMS_STR(amrex::Vector<std::string>& kname)
{
kname.resize(39);
kname.resize(NUM_SPECIES);
kname[0] = "AR";
kname[1] = "N2";
kname[2] = "H";
Expand Down
7 changes: 4 additions & 3 deletions Mechanisms/CH4_lean/mechanism.H
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
#define CH2OH_ID 15
#define N2_ID 16

#define NUM_GAS_ELEMENTS 5 // Elements in the homogeneous phase
#define NUM_GAS_SPECIES 17 // Species in the homogeneous phase
#define NUM_GAS_REACTIONS 73 // Reactions in the homogeneous phase
#define NUM_GAS_ELEMENTS 5 // Elements in the homogeneous phase
#define NUM_GAS_SPECIES 17 // Species in the homogeneous phase
#define NUM_GAS_REACTIONS 73 // Reactions in the homogeneous phase
#define NUM_QSS_GAS_SPECIES 0 // QSS species in the homogeneous phase

#define SITE_DENSITY 0.000000E+00 // mol/cm^2

Expand Down
Loading