mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Merge bf3de6e526
into 0720efb02d
This commit is contained in:
commit
f65659de6f
@ -6295,3 +6295,14 @@ species:
|
||||
source: |-
|
||||
The acentric factor is calculated using the pure fluid saturation data from
|
||||
Lemmon et al. (2022).
|
||||
- name: H2
|
||||
descriptive-name: hydrogen
|
||||
molecular-weight: 2.016
|
||||
critical-parameters:
|
||||
critical-temperature: 32.98
|
||||
critical-pressure: 1.293e6
|
||||
critical-molar-volume: 0.0642
|
||||
critical-compressibility: 0.303
|
||||
acentric-factor: -0.217
|
||||
source: |-
|
||||
Properties of Gases and Liquids, 5th edition, Poling.
|
||||
|
@ -1726,7 +1726,7 @@ FORMULA_FONTSIZE = 10
|
||||
# to create new LaTeX commands to be used in formulas as building blocks. See
|
||||
# the section "Including formulas" for details.
|
||||
|
||||
FORMULA_MACROFILE =
|
||||
FORMULA_MACROFILE = doc/doxygen/macros.tex
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# https://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
|
@ -60,6 +60,26 @@
|
||||
year = {1968},
|
||||
doi = {10.1098/rspa.1968.0178},
|
||||
URL = {https://royalsocietypublishing.org/doi/abs/10.1098/rspa.1968.0178}}
|
||||
@article{ely-hanley1981,
|
||||
author = {Ely, James F. and Hanley, H. J. M.},
|
||||
title = {Prediction of transport properties. 1. Viscosity of fluids and mixtures},
|
||||
journal = {Industrial \& Engineering Chemistry Fundamentals},
|
||||
volume = {20},
|
||||
number = {4},
|
||||
pages = {323-332},
|
||||
year = {1981},
|
||||
doi = {10.1021/i100004a004},
|
||||
URL = {https://doi.org/10.1021/i100004a004}}
|
||||
@article{ely-hanley1983,
|
||||
author = {Ely, James F. and Hanley, H. J. M.},
|
||||
title = {Prediction of transport properties. 2. Thermal conductivity of pure fluids and mixtures},
|
||||
journal = {Industrial \& Engineering Chemistry Fundamentals},
|
||||
volume = {22},
|
||||
number = {1},
|
||||
pages = {90-97},
|
||||
year = {1983},
|
||||
doi = {10.1021/i100009a016},
|
||||
URL = {https://doi.org/10.1021/i100009a016}}
|
||||
@article{gilbert1983,
|
||||
author = {R.~G.~Gilbert and K.~Luther and J.~Troe},
|
||||
journal = {Berichte der Bunsengesellschaft für physikalische Chemie},
|
||||
|
3
doc/doxygen/macros.tex
Normal file
3
doc/doxygen/macros.tex
Normal file
@ -0,0 +1,3 @@
|
||||
% Macros defined here should also be defined in Sphinx conf.py
|
||||
\newcommand{\t}[1]{\mathrm{#1}}
|
||||
\newcommand{\pxpy}[2]{\frac{\partial #1}{\partial #2}}
|
@ -40,9 +40,9 @@ reaction path analysis
|
||||
reactor network
|
||||
saving output
|
||||
sensitivity analysis
|
||||
shock tube
|
||||
strained flame
|
||||
surface chemistry
|
||||
shock tube
|
||||
thermodynamic cycle
|
||||
thermodynamics
|
||||
transport
|
||||
|
@ -220,6 +220,7 @@ myst_enable_extensions = [
|
||||
"attrs_block",
|
||||
]
|
||||
|
||||
# For Doxygen pages, these macros are also defined in doc/doxygen/macros.tex
|
||||
mathjax3_config = {
|
||||
'tex': {
|
||||
'macros': {
|
||||
|
@ -45,11 +45,20 @@ Mixture-averaged
|
||||
to `mixture-averaged`. Implemented by class {ct}`MixTransport`.
|
||||
|
||||
High-pressure Gas
|
||||
: A model for high-pressure gas transport properties based on a method of corresponding
|
||||
states {cite:p}`takahashi1975,poling2001`. The high-pressure gas transport model can
|
||||
be specified in the YAML format by setting the [`transport`](sec-yaml-phase-transport)
|
||||
field of the phase entry to `high-pressure`. Implemented by
|
||||
class {ct}`HighPressureGasTransport`.
|
||||
: A model for high-pressure gas transport properties that uses the Lucas method of
|
||||
corresponding states {cite:p}`poling2001` for viscosity and thermal
|
||||
conductivity and the Takahashi method {cite:p}`takahashi1975,poling2001` for the
|
||||
diffusion coefficient. This high-pressure gas transport model can be specified in
|
||||
the YAML format by setting the [`transport`](sec-yaml-phase-transport) field of the
|
||||
phase entry to `high-pressure`. Implemented by class {ct}`HighPressureGasTransport`.
|
||||
|
||||
Chung high-pressure Gas
|
||||
: A model for high-pressure gas transport properties that uses the method of Chung
|
||||
{cite:p}`poling2001` for viscosity and thermal conductivity and the Takahashi method
|
||||
{cite:p}`takahashi1975,poling2001` for the diffusion coefficient. This high-pressure
|
||||
gas transport model can be specified in the YAML format by setting the
|
||||
[`transport`](sec-yaml-phase-transport) field of the phase entry to
|
||||
`high-pressure-Chung`. Implemented by class {ct}`ChungHighPressureGasTransport`.
|
||||
|
||||
Ionized Gas
|
||||
: A model implementing the Stockmayer-(n,6,4) model for transport of ions in a gas. The
|
||||
|
@ -142,6 +142,8 @@ are:
|
||||
- `none`
|
||||
- `high-pressure`: A model for high-pressure gas transport properties based on a
|
||||
method of corresponding states ({ct}`details <HighPressureGasTransport>`)
|
||||
- `high-pressure-Chung`: A model for high-pressure gas transport properties based on
|
||||
the method of Chung ({ct}`details <ChungHighPressureGasTransport>`)
|
||||
- `ionized-gas`: A model implementing the Stockmayer-(n,6,4) model for transport of
|
||||
ions in a gas ({ct}`details <IonGasTransport>`)
|
||||
- `mixture-averaged`: The mixture-averaged transport model for ideal gases
|
||||
|
@ -54,12 +54,20 @@ public:
|
||||
std::copy(m_visc.begin(), m_visc.end(), visc);
|
||||
}
|
||||
|
||||
//! Returns the matrix of binary diffusion coefficients.
|
||||
/*!
|
||||
* d[ld*j + i] = rp * m_bdiff(i,j);
|
||||
/**
|
||||
* Computes the matrix of binary diffusion coefficients. Units are m^2/s.
|
||||
*
|
||||
* @param ld offset of rows in the storage
|
||||
* @param d output vector of diffusion coefficients. Units of m**2 / s
|
||||
* The matrix is dimension m_nsp x m_nsp, where m_nsp is the number of
|
||||
* species. The matrix is stored in row-major order, so that d[ld*j + i]
|
||||
* contains the binary diffusion coefficient of species i with respect to
|
||||
* species j.
|
||||
*
|
||||
* d[ld*j + i] = m_bdiff(i,j) / p
|
||||
*
|
||||
* @param ld Inner stride for writing the two dimension diffusion
|
||||
* coefficients into a one dimensional vector
|
||||
* @param d Diffusion coefficient matrix (must be at least m_nsp * m_nsp
|
||||
* in length.
|
||||
*/
|
||||
void getBinaryDiffCoeffs(const size_t ld, double* const d) override;
|
||||
|
||||
@ -205,7 +213,7 @@ protected:
|
||||
* name of a file containing transport property parameters and a list of
|
||||
* species names.
|
||||
*/
|
||||
void getTransportData();
|
||||
virtual void getTransportData();
|
||||
|
||||
//! Corrections for polar-nonpolar binary diffusion coefficients
|
||||
/*!
|
||||
|
File diff suppressed because it is too large
Load Diff
116
samples/python/transport/high_pressure_transport.py
Normal file
116
samples/python/transport/high_pressure_transport.py
Normal file
@ -0,0 +1,116 @@
|
||||
"""
|
||||
High-Pressure transport using two models
|
||||
========================================
|
||||
|
||||
Two high-pressure gas transport models are available in Cantera: the 'high-pressure'
|
||||
and the 'high-pressure-Chung' models. These models utilize critical fluid properties
|
||||
and other fluid-specific parameters to calculate transport properties at high pressures.
|
||||
These models are useful for fluids that are supercritical where ideal gas assumptions
|
||||
do not yield accurate results.
|
||||
|
||||
Requires: cantera >= 3.1.0
|
||||
|
||||
.. tags:: Python, transport, non-ideal fluid
|
||||
"""
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import cantera as ct
|
||||
|
||||
|
||||
# Nist data for Methane at 350 K.
|
||||
nist_pressures = np.array([
|
||||
5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21.,
|
||||
22., 23., 24., 25., 26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38.,
|
||||
39., 40., 41., 42., 43., 44., 45., 46., 47., 48., 49., 50., 51., 52., 53., 54., 55.,
|
||||
56., 57., 58., 59., 60.])
|
||||
|
||||
nist_viscosities = np.array([
|
||||
1.3460e-05, 1.3660e-05, 1.3875e-05, 1.4106e-05, 1.4352e-05, 1.4613e-05, 1.4889e-05,
|
||||
1.5179e-05, 1.5482e-05, 1.5798e-05, 1.6125e-05, 1.6463e-05, 1.6811e-05, 1.7167e-05,
|
||||
1.7531e-05, 1.7901e-05, 1.8276e-05, 1.8656e-05, 1.9040e-05, 1.9426e-05, 1.9813e-05,
|
||||
2.0202e-05, 2.0591e-05, 2.0980e-05, 2.1368e-05, 2.1755e-05, 2.2140e-05, 2.2523e-05,
|
||||
2.2904e-05, 2.3283e-05, 2.3659e-05, 2.4032e-05, 2.4403e-05, 2.4771e-05, 2.5135e-05,
|
||||
2.5497e-05, 2.5855e-05, 2.6211e-05, 2.6563e-05, 2.6913e-05, 2.7259e-05, 2.7603e-05,
|
||||
2.7944e-05, 2.8281e-05, 2.8616e-05, 2.8949e-05, 2.9278e-05, 2.9605e-05, 2.9929e-05,
|
||||
3.0251e-05, 3.0571e-05, 3.0888e-05, 3.1202e-05, 3.1514e-05, 3.1824e-05, 3.2132e-05])
|
||||
|
||||
nist_thermal_conductivities = np.array([
|
||||
0.044665, 0.045419, 0.046217, 0.047063, 0.047954, 0.048891, 0.04987, 0.050891,
|
||||
0.051949, 0.05304, 0.05416, 0.055304, 0.056466, 0.057641, 0.058824, 0.06001,
|
||||
0.061194, 0.062374, 0.063546, 0.064707, 0.065855, 0.066988, 0.068106, 0.069208,
|
||||
0.070293, 0.071362, 0.072415, 0.073451, 0.074472, 0.075477, 0.076469, 0.077446,
|
||||
0.07841, 0.079361, 0.0803, 0.081227, 0.082143, 0.083048, 0.083944, 0.084829,
|
||||
0.085705, 0.086573, 0.087431, 0.088282, 0.089124, 0.089959, 0.090787, 0.091607,
|
||||
0.092421, 0.093228, 0.094029, 0.094824, 0.095612, 0.096395, 0.097172, 0.097944])
|
||||
|
||||
# %%
|
||||
# Create the gas object for the methane-CO2 system using reference state thermo from
|
||||
# the gri30 mechanism, species critical properties from `critical-properties.yaml`,
|
||||
# and the Peng-Robinson equation of state.
|
||||
phasedef = """
|
||||
phases:
|
||||
- name: methane_co2
|
||||
species:
|
||||
- gri30.yaml/species: [CH4, CO2]
|
||||
thermo: Peng-Robinson
|
||||
transport: mixture-averaged
|
||||
state: {T: 300, P: 1 atm}
|
||||
"""
|
||||
gas = ct.Solution(yaml=phasedef)
|
||||
|
||||
# Plot the difference between the high-pressure viscosity and thermal conductivity
|
||||
# models and the ideal gas model for Methane.
|
||||
|
||||
pressures = np.linspace(101325, 6e7, 100)
|
||||
# Collect ideal viscosities and thermal conductivities
|
||||
ideal_viscosities = []
|
||||
ideal_thermal_conductivities = []
|
||||
for pressure in pressures:
|
||||
gas.TPX = 350, pressure, 'CH4:1.0'
|
||||
ideal_viscosities.append(gas.viscosity)
|
||||
ideal_thermal_conductivities.append(gas.thermal_conductivity)
|
||||
|
||||
# Collect real viscosities using the high-pressure-Chung
|
||||
gas.transport_model = 'high-pressure-Chung'
|
||||
real_viscosities_1 = []
|
||||
real_thermal_conductivities_1 = []
|
||||
for pressure in pressures:
|
||||
gas.TPX = 350, pressure, 'CH4:1.0'
|
||||
real_viscosities_1.append(gas.viscosity)
|
||||
real_thermal_conductivities_1.append(gas.thermal_conductivity)
|
||||
|
||||
# Collect real viscosities using the high-pressure model
|
||||
gas.transport_model = 'high-pressure'
|
||||
real_viscosities_2 = []
|
||||
real_thermal_conductivities_2 = []
|
||||
for pressure in pressures:
|
||||
gas.TPX = 350, pressure, 'CH4:1.0'
|
||||
real_viscosities_2.append(gas.viscosity)
|
||||
real_thermal_conductivities_2.append(gas.thermal_conductivity)
|
||||
|
||||
# %%
|
||||
# Plot the data
|
||||
# -------------
|
||||
mpa_to_pa = 1e6 # conversion factor from MPa to Pa
|
||||
fig, ax = plt.subplots()
|
||||
ax.plot(pressures, ideal_viscosities, label='Ideal Viscosity')
|
||||
ax.plot(pressures, real_viscosities_1, label='High-Pressure Viscosity (Chung)')
|
||||
ax.plot(pressures, real_viscosities_2, label='High-Pressure Viscosity')
|
||||
ax.plot(nist_pressures*mpa_to_pa, nist_viscosities, 'o', label='NIST Data')
|
||||
ax.set(xlabel='Pressure (Pa)', ylabel ='Viscosity (Pa·s)',
|
||||
title='Methane Viscosity Model Comparison')
|
||||
ax.legend()
|
||||
ax.grid(True)
|
||||
plt.show()
|
||||
|
||||
# %%
|
||||
fig, ax = plt.subplots()
|
||||
ax.plot(pressures, ideal_thermal_conductivities, label='Ideal Thermal Conductivity')
|
||||
ax.plot(pressures, real_thermal_conductivities_1, label='High-Pressure Thermal Conductivity (Chung)')
|
||||
ax.plot(pressures, real_thermal_conductivities_2, label='High-Pressure Thermal Conductivity')
|
||||
ax.plot(nist_pressures*mpa_to_pa, nist_thermal_conductivities, 'o', label='NIST Data')
|
||||
ax.set(xlabel='Pressure (Pa)', ylabel ='Thermal Conductivity (W/m·K)',
|
||||
title='Methane Thermal Conductivity Model Comparison')
|
||||
ax.legend()
|
||||
ax.grid(True)
|
||||
plt.show()
|
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@ double MMCollisionInt::delta[8] = {0.0, 0.25, 0.50, 0.75, 1.0,
|
||||
1.5, 2.0, 2.5
|
||||
};
|
||||
|
||||
double quadInterp(double x0, double* x, double* y)
|
||||
double MMCollisionInt::quadInterp(double x0, double* x, double* y)
|
||||
{
|
||||
double dx21 = x[1] - x[0];
|
||||
double dx32 = x[2] - x[1];
|
||||
@ -213,16 +213,16 @@ double MMCollisionInt::cstar_table[39*8] = {
|
||||
0.94444, 0.94444,0.94444,0.94444,0.94444,0.94444,0.94444,0.94444
|
||||
};
|
||||
|
||||
void MMCollisionInt::init(double tsmin, double tsmax)
|
||||
void MMCollisionInt::init(double tstar_min, double tstar_max)
|
||||
{
|
||||
m_nmin = -1;
|
||||
m_nmax = -1;
|
||||
|
||||
for (int n = 0; n < 37; n++) {
|
||||
if (tsmin > tstar[n+1]) {
|
||||
if (tstar_min > tstar[n+1]) {
|
||||
m_nmin = n;
|
||||
}
|
||||
if (tsmax > tstar[n+1]) {
|
||||
if (tstar_max > tstar[n+1]) {
|
||||
m_nmax = n+1;
|
||||
}
|
||||
}
|
||||
@ -270,7 +270,7 @@ double MMCollisionInt::fitDelta(int table, int ntstar, int degree, double* c)
|
||||
default:
|
||||
return 0.0;
|
||||
}
|
||||
w[0] = -1.0;
|
||||
w[0] = -1.0; // to activate weight values of unity
|
||||
return polyfit(8, degree, delta, begin, w.data(), c);
|
||||
}
|
||||
|
||||
|
@ -15,9 +15,44 @@ namespace Cantera
|
||||
{
|
||||
|
||||
//! Calculation of Collision integrals
|
||||
/*!
|
||||
* This class provides functions that interpolate the tabulated collision
|
||||
* integrals in Monchick and Mason @cite monchick1961.
|
||||
/**
|
||||
* This class provides functions that interpolate the tabulated collision integrals in
|
||||
* Monchick and Mason @cite monchick1961.
|
||||
*
|
||||
* The collision integrals computed by Monchick and Mason use the Stockmayer potential,
|
||||
* which models a polar molecule as a spherical potential with a point dipole at the
|
||||
* center). Equation 16 of Monchick and Mason @cite monchick1961 gives the potential
|
||||
* as:
|
||||
*
|
||||
* @f[
|
||||
* \phi(r) = 4 \epsilon_0 \left[ \left(\frac{\sigma_0}{r}\right)^{12} - \left(\frac{\sigma_0}{r}\right)^6 + \delta \left(\frac{\sigma_0}{r}\right)^3 \right]
|
||||
* @f]
|
||||
*
|
||||
* Where @f$ \epsilon_0 @f$ is the depth of the potential well, @f$ \sigma_0 @f$ is the
|
||||
* distance at which the potential between the two molecules is zero, @f$ \delta @f$ is
|
||||
* defined as:
|
||||
*
|
||||
* @f[
|
||||
* \delta = \frac{1}{4} (\mu^*)^2 \zeta \left( \theta_1, \theta_2, \phi \right)
|
||||
* @f]
|
||||
*
|
||||
* @f$ \mu^* @f$ is the reduced dipole moment. @f$ \theta_1 @f$ , @f$ \theta_2 @f$ ,
|
||||
* and @f$ \phi @f$ are angles related to trajectories of colliding molecules. In the
|
||||
* work of Monchick and Mason, these details are not what is presented in the tables.
|
||||
* Instead, the tables are presented as being functions of the reduced temperature,
|
||||
* @f$ T^* @f$, and the @f$ \delta @f$ parameter. The reduced dipole moment,
|
||||
* @f$ \mu^* @f$ is defined as:
|
||||
*
|
||||
* @f[
|
||||
* \mu^* = \frac{\mu}{\sqrt{\epsilon_0 \sigma_0^3}}
|
||||
* @f]
|
||||
*
|
||||
* Where @f$ \mu @f$ is the dipole moment of the molecule and the other parameters
|
||||
* have been defined earlier. This work considers only the collisions of like
|
||||
* molecules, so only a single value is needed.
|
||||
*
|
||||
* The tabulated data comes from the averaged collision integrals in tables
|
||||
* V through VIII of Monchick and Mason @cite monchick1961.
|
||||
*
|
||||
* @ingroup tranprops
|
||||
*/
|
||||
@ -46,6 +81,7 @@ public:
|
||||
|
||||
private:
|
||||
double fitDelta(int table, int ntstar, int degree, double* c);
|
||||
double quadInterp(double x0, double* x, double* y);
|
||||
|
||||
vector<vector<double>> m_o22poly;
|
||||
vector<vector<double>> m_apoly;
|
||||
@ -55,25 +91,30 @@ private:
|
||||
static double delta[8];
|
||||
static double tstar22[37];
|
||||
|
||||
//! Table of omega22 values from MM
|
||||
//! Table of omega22 values
|
||||
static double omega22_table[37*8];
|
||||
|
||||
//! table of tstar values
|
||||
//! T* values (reduced temperature)
|
||||
static double tstar[39];
|
||||
|
||||
//! astar table from MM
|
||||
//! astar table
|
||||
static double astar_table[39*8];
|
||||
|
||||
//! bstar table from MM
|
||||
//! bstar table
|
||||
static double bstar_table[39*8];
|
||||
|
||||
//! cstar table from MM
|
||||
//! cstar table
|
||||
static double cstar_table[39*8];
|
||||
|
||||
//! Log temp
|
||||
vector<double> m_logTemp;
|
||||
|
||||
//! Index of the tstar array that encompasses the minimum temperature
|
||||
//! fitting range value of tsmin.
|
||||
int m_nmin;
|
||||
|
||||
//! Index of the tstar array that encompasses the maximum temperature
|
||||
//! fitting range value of tsmax.
|
||||
int m_nmax;
|
||||
};
|
||||
|
||||
|
@ -46,6 +46,7 @@ TransportFactory::TransportFactory()
|
||||
addDeprecatedAlias("water", "Water");
|
||||
reg("high-pressure", []() { return new HighPressureGasTransport(); });
|
||||
addDeprecatedAlias("high-pressure", "HighP");
|
||||
reg("high-pressure-Chung", []() { return new ChungHighPressureGasTransport(); });
|
||||
m_CK_mode["CK_Mix"] = m_CK_mode["mixture-averaged-CK"] = true;
|
||||
m_CK_mode["CK_Multi"] = m_CK_mode["multicomponent-CK"] = true;
|
||||
}
|
||||
|
100
test/data/HighPressureChungTest.csv
Normal file
100
test/data/HighPressureChungTest.csv
Normal file
@ -0,0 +1,100 @@
|
||||
1.013250e+05, 1.317510e-05, 3.304087e-02, 4.409307e-05, 1.607365e-05
|
||||
7.063621e+05, 1.320969e-05, 3.320920e-02, 6.324986e-06, 2.305705e-06
|
||||
1.311399e+06, 1.326275e-05, 3.344689e-02, 3.406843e-06, 1.241927e-06
|
||||
1.916436e+06, 1.333452e-05, 3.375287e-02, 2.331270e-06, 8.498390e-07
|
||||
2.521473e+06, 1.342518e-05, 3.412586e-02, 1.771873e-06, 6.459169e-07
|
||||
3.126511e+06, 1.353486e-05, 3.456439e-02, 1.428983e-06, 5.209202e-07
|
||||
3.731548e+06, 1.366365e-05, 3.506673e-02, 1.197286e-06, 4.364576e-07
|
||||
4.336585e+06, 1.381157e-05, 3.563097e-02, 1.030242e-06, 3.755634e-07
|
||||
4.941622e+06, 1.397858e-05, 3.625495e-02, 9.041021e-07, 3.295805e-07
|
||||
5.546659e+06, 1.416459e-05, 3.693632e-02, 8.054814e-07, 2.936294e-07
|
||||
6.151696e+06, 1.436943e-05, 3.767249e-02, 7.262600e-07, 2.647501e-07
|
||||
6.756733e+06, 1.459286e-05, 3.846072e-02, 6.612264e-07, 2.410429e-07
|
||||
7.361770e+06, 1.483458e-05, 3.929806e-02, 6.068826e-07, 2.212324e-07
|
||||
7.966808e+06, 1.509423e-05, 4.018141e-02, 5.607931e-07, 2.044310e-07
|
||||
8.571845e+06, 1.537138e-05, 4.110758e-02, 5.212100e-07, 1.900014e-07
|
||||
9.176882e+06, 1.566553e-05, 4.207325e-02, 4.868463e-07, 1.774745e-07
|
||||
9.781919e+06, 1.597614e-05, 4.307505e-02, 4.567336e-07, 1.664972e-07
|
||||
1.038696e+07, 1.630262e-05, 4.410959e-02, 4.301290e-07, 1.567988e-07
|
||||
1.099199e+07, 1.664433e-05, 4.517351e-02, 4.064532e-07, 1.481681e-07
|
||||
1.159703e+07, 1.700060e-05, 4.626348e-02, 3.852478e-07, 1.404379e-07
|
||||
1.220207e+07, 1.737074e-05, 4.737628e-02, 3.661454e-07, 1.334743e-07
|
||||
1.280710e+07, 1.775403e-05, 4.850881e-02, 3.488478e-07, 1.271687e-07
|
||||
1.341214e+07, 1.814977e-05, 4.965812e-02, 3.331109e-07, 1.214319e-07
|
||||
1.401718e+07, 1.855722e-05, 5.082147e-02, 3.187325e-07, 1.161905e-07
|
||||
1.462222e+07, 1.897568e-05, 5.199632e-02, 3.055440e-07, 1.113827e-07
|
||||
1.522725e+07, 1.940447e-05, 5.318034e-02, 2.934036e-07, 1.069571e-07
|
||||
1.583229e+07, 1.984292e-05, 5.437147e-02, 2.821911e-07, 1.028697e-07
|
||||
1.643733e+07, 2.029037e-05, 5.556785e-02, 2.718040e-07, 9.908317e-08
|
||||
1.704236e+07, 2.074624e-05, 5.676791e-02, 2.621544e-07, 9.556552e-08
|
||||
1.764740e+07, 2.120996e-05, 5.797029e-02, 2.531665e-07, 9.228908e-08
|
||||
1.825244e+07, 2.168098e-05, 5.917386e-02, 2.447745e-07, 8.922985e-08
|
||||
1.885748e+07, 2.215882e-05, 6.037773e-02, 2.369209e-07, 8.636694e-08
|
||||
1.946251e+07, 2.264304e-05, 6.158119e-02, 2.295557e-07, 8.368202e-08
|
||||
2.006755e+07, 2.313322e-05, 6.278372e-02, 2.226346e-07, 8.115901e-08
|
||||
2.067259e+07, 2.362899e-05, 6.398497e-02, 2.161186e-07, 7.878368e-08
|
||||
2.127762e+07, 2.413003e-05, 6.518474e-02, 2.099732e-07, 7.654343e-08
|
||||
2.188266e+07, 2.463604e-05, 6.638296e-02, 2.041676e-07, 7.442707e-08
|
||||
2.248770e+07, 2.514674e-05, 6.757967e-02, 1.986744e-07, 7.242459e-08
|
||||
2.309274e+07, 2.566192e-05, 6.877500e-02, 1.934691e-07, 7.052705e-08
|
||||
2.369777e+07, 2.618138e-05, 6.996916e-02, 1.885296e-07, 6.872639e-08
|
||||
2.430281e+07, 2.670493e-05, 7.116242e-02, 1.838360e-07, 6.701540e-08
|
||||
2.490785e+07, 2.723242e-05, 7.235510e-02, 1.793704e-07, 6.538752e-08
|
||||
2.551288e+07, 2.776373e-05, 7.354758e-02, 1.751166e-07, 6.383686e-08
|
||||
2.611792e+07, 2.829875e-05, 7.474022e-02, 1.710600e-07, 6.235804e-08
|
||||
2.672296e+07, 2.883738e-05, 7.593343e-02, 1.671870e-07, 6.094619e-08
|
||||
2.732800e+07, 2.937954e-05, 7.712762e-02, 1.634855e-07, 5.959685e-08
|
||||
2.793303e+07, 2.992518e-05, 7.832321e-02, 1.599444e-07, 5.830597e-08
|
||||
2.853807e+07, 3.047425e-05, 7.952061e-02, 1.565534e-07, 5.706982e-08
|
||||
2.914311e+07, 3.102669e-05, 8.072021e-02, 1.533032e-07, 5.588500e-08
|
||||
2.974814e+07, 3.158249e-05, 8.192241e-02, 1.501852e-07, 5.474837e-08
|
||||
3.035318e+07, 3.214162e-05, 8.312759e-02, 1.471915e-07, 5.365706e-08
|
||||
3.095822e+07, 3.270407e-05, 8.433610e-02, 1.443149e-07, 5.260840e-08
|
||||
3.156326e+07, 3.326983e-05, 8.554829e-02, 1.415485e-07, 5.159995e-08
|
||||
3.216829e+07, 3.383889e-05, 8.676447e-02, 1.388862e-07, 5.062943e-08
|
||||
3.277333e+07, 3.441127e-05, 8.798495e-02, 1.363222e-07, 4.969475e-08
|
||||
3.337837e+07, 3.498696e-05, 8.921002e-02, 1.338511e-07, 4.879395e-08
|
||||
3.398340e+07, 3.556599e-05, 9.043993e-02, 1.314680e-07, 4.792523e-08
|
||||
3.458844e+07, 3.614836e-05, 9.167492e-02, 1.291683e-07, 4.708690e-08
|
||||
3.519348e+07, 3.673410e-05, 9.291521e-02, 1.269477e-07, 4.627739e-08
|
||||
3.579852e+07, 3.732323e-05, 9.416101e-02, 1.248021e-07, 4.549525e-08
|
||||
3.640355e+07, 3.791577e-05, 9.541249e-02, 1.227279e-07, 4.473911e-08
|
||||
3.700859e+07, 3.851175e-05, 9.666983e-02, 1.207215e-07, 4.400769e-08
|
||||
3.761363e+07, 3.911120e-05, 9.793317e-02, 1.187796e-07, 4.329980e-08
|
||||
3.821866e+07, 3.971416e-05, 9.920263e-02, 1.168992e-07, 4.261432e-08
|
||||
3.882370e+07, 4.032065e-05, 1.004783e-01, 1.150774e-07, 4.195021e-08
|
||||
3.942874e+07, 4.093071e-05, 1.017604e-01, 1.133115e-07, 4.130648e-08
|
||||
4.003378e+07, 4.154439e-05, 1.030489e-01, 1.115990e-07, 4.068221e-08
|
||||
4.063881e+07, 4.216172e-05, 1.043439e-01, 1.099375e-07, 4.007653e-08
|
||||
4.124385e+07, 4.278274e-05, 1.056454e-01, 1.083248e-07, 3.948861e-08
|
||||
4.184889e+07, 4.340750e-05, 1.069536e-01, 1.067587e-07, 3.891770e-08
|
||||
4.245392e+07, 4.403604e-05, 1.082684e-01, 1.052372e-07, 3.836306e-08
|
||||
4.305896e+07, 4.466842e-05, 1.095900e-01, 1.037584e-07, 3.782401e-08
|
||||
4.366400e+07, 4.530467e-05, 1.109182e-01, 1.023207e-07, 3.729989e-08
|
||||
4.426903e+07, 4.594485e-05, 1.122531e-01, 1.009223e-07, 3.679010e-08
|
||||
4.487407e+07, 4.658902e-05, 1.135948e-01, 9.956152e-08, 3.629406e-08
|
||||
4.547911e+07, 4.723722e-05, 1.149431e-01, 9.823699e-08, 3.581122e-08
|
||||
4.608415e+07, 4.788951e-05, 1.162982e-01, 9.694724e-08, 3.534106e-08
|
||||
4.668918e+07, 4.854596e-05, 1.176599e-01, 9.569092e-08, 3.488308e-08
|
||||
4.729422e+07, 4.920661e-05, 1.190283e-01, 9.446674e-08, 3.443682e-08
|
||||
4.789926e+07, 4.987153e-05, 1.204034e-01, 9.327349e-08, 3.400183e-08
|
||||
4.850429e+07, 5.054078e-05, 1.217850e-01, 9.211000e-08, 3.357770e-08
|
||||
4.910933e+07, 5.121442e-05, 1.231732e-01, 9.097519e-08, 3.316401e-08
|
||||
4.971437e+07, 5.189252e-05, 1.245680e-01, 8.986800e-08, 3.276040e-08
|
||||
5.031941e+07, 5.257515e-05, 1.259692e-01, 8.878743e-08, 3.236649e-08
|
||||
5.092444e+07, 5.326237e-05, 1.273768e-01, 8.773254e-08, 3.198194e-08
|
||||
5.152948e+07, 5.395426e-05, 1.287908e-01, 8.670242e-08, 3.160642e-08
|
||||
5.213452e+07, 5.465088e-05, 1.302111e-01, 8.569621e-08, 3.123962e-08
|
||||
5.273955e+07, 5.535231e-05, 1.316377e-01, 8.471309e-08, 3.088123e-08
|
||||
5.334459e+07, 5.605863e-05, 1.330705e-01, 8.375227e-08, 3.053098e-08
|
||||
5.394963e+07, 5.676990e-05, 1.345095e-01, 8.281300e-08, 3.018858e-08
|
||||
5.455467e+07, 5.748621e-05, 1.359545e-01, 8.189457e-08, 2.985377e-08
|
||||
5.515970e+07, 5.820764e-05, 1.374056e-01, 8.099628e-08, 2.952631e-08
|
||||
5.576474e+07, 5.893426e-05, 1.388626e-01, 8.011749e-08, 2.920595e-08
|
||||
5.636978e+07, 5.966616e-05, 1.403255e-01, 7.925756e-08, 2.889248e-08
|
||||
5.697481e+07, 6.040342e-05, 1.417942e-01, 7.841589e-08, 2.858566e-08
|
||||
5.757985e+07, 6.114613e-05, 1.432686e-01, 7.759191e-08, 2.828528e-08
|
||||
5.818489e+07, 6.189438e-05, 1.447488e-01, 7.678507e-08, 2.799116e-08
|
||||
5.878993e+07, 6.264824e-05, 1.462346e-01, 7.599484e-08, 2.770309e-08
|
||||
5.939496e+07, 6.340781e-05, 1.477259e-01, 7.522070e-08, 2.742088e-08
|
||||
6.000000e+07, 6.417319e-05, 1.492226e-01, 7.446218e-08, 2.714437e-08
|
|
100
test/data/HighPressureTest.csv
Normal file
100
test/data/HighPressureTest.csv
Normal file
@ -0,0 +1,100 @@
|
||||
1.013250e+05, 1.442875e-05, 3.739638e-02, 4.409307e-05, 1.607365e-05
|
||||
7.063621e+05, 1.449119e-05, 3.838306e-02, 6.324986e-06, 2.305705e-06
|
||||
1.311399e+06, 1.457793e-05, 3.918746e-02, 3.406843e-06, 1.241927e-06
|
||||
1.916436e+06, 1.468156e-05, 3.994860e-02, 2.331270e-06, 8.498390e-07
|
||||
2.521473e+06, 1.479968e-05, 4.069512e-02, 1.771873e-06, 6.459169e-07
|
||||
3.126511e+06, 1.493108e-05, 4.143940e-02, 1.428983e-06, 5.209202e-07
|
||||
3.731548e+06, 1.507498e-05, 4.218841e-02, 1.197286e-06, 4.364576e-07
|
||||
4.336585e+06, 1.523085e-05, 4.294667e-02, 1.030242e-06, 3.755634e-07
|
||||
4.941622e+06, 1.539823e-05, 4.371740e-02, 9.041021e-07, 3.295805e-07
|
||||
5.546659e+06, 1.557676e-05, 4.450308e-02, 8.054814e-07, 2.936294e-07
|
||||
6.151696e+06, 1.576608e-05, 4.530568e-02, 7.262600e-07, 2.647501e-07
|
||||
6.756733e+06, 1.596587e-05, 4.612680e-02, 6.612264e-07, 2.410429e-07
|
||||
7.361770e+06, 1.617578e-05, 4.696780e-02, 6.068826e-07, 2.212324e-07
|
||||
7.966808e+06, 1.639550e-05, 4.782979e-02, 5.607931e-07, 2.044310e-07
|
||||
8.571845e+06, 1.662470e-05, 4.871374e-02, 5.212100e-07, 1.900014e-07
|
||||
9.176882e+06, 1.686305e-05, 4.962041e-02, 4.868463e-07, 1.774745e-07
|
||||
9.781919e+06, 1.711020e-05, 5.055043e-02, 4.567336e-07, 1.664972e-07
|
||||
1.038696e+07, 1.736582e-05, 5.152217e-02, 4.301290e-07, 1.567988e-07
|
||||
1.099199e+07, 1.762957e-05, 5.252126e-02, 4.064532e-07, 1.481681e-07
|
||||
1.159703e+07, 1.790111e-05, 5.354049e-02, 3.852478e-07, 1.404379e-07
|
||||
1.220207e+07, 1.818009e-05, 5.458024e-02, 3.661454e-07, 1.334743e-07
|
||||
1.280710e+07, 1.846616e-05, 5.564071e-02, 3.488478e-07, 1.271687e-07
|
||||
1.341214e+07, 1.875899e-05, 5.672195e-02, 3.331109e-07, 1.214319e-07
|
||||
1.401718e+07, 1.905823e-05, 5.782386e-02, 3.187325e-07, 1.161905e-07
|
||||
1.462222e+07, 1.936355e-05, 5.894626e-02, 3.055440e-07, 1.113827e-07
|
||||
1.522725e+07, 1.967461e-05, 6.008881e-02, 2.934036e-07, 1.069571e-07
|
||||
1.583229e+07, 1.999109e-05, 6.125110e-02, 2.821911e-07, 1.028697e-07
|
||||
1.643733e+07, 2.031265e-05, 6.243265e-02, 2.718040e-07, 9.908317e-08
|
||||
1.704236e+07, 2.063900e-05, 6.363289e-02, 2.621544e-07, 9.556552e-08
|
||||
1.764740e+07, 2.096981e-05, 6.485119e-02, 2.531665e-07, 9.228908e-08
|
||||
1.825244e+07, 2.130478e-05, 6.608689e-02, 2.447745e-07, 8.922985e-08
|
||||
1.885748e+07, 2.164362e-05, 6.733928e-02, 2.369209e-07, 8.636694e-08
|
||||
1.946251e+07, 2.198604e-05, 6.860764e-02, 2.295557e-07, 8.368202e-08
|
||||
2.006755e+07, 2.233177e-05, 6.989122e-02, 2.226346e-07, 8.115901e-08
|
||||
2.067259e+07, 2.268054e-05, 7.118927e-02, 2.161186e-07, 7.878368e-08
|
||||
2.127762e+07, 2.303209e-05, 7.250103e-02, 2.099732e-07, 7.654343e-08
|
||||
2.188266e+07, 2.338616e-05, 7.382577e-02, 2.041676e-07, 7.442707e-08
|
||||
2.248770e+07, 2.374252e-05, 7.516273e-02, 1.986744e-07, 7.242459e-08
|
||||
2.309274e+07, 2.410093e-05, 7.651121e-02, 1.934691e-07, 7.052705e-08
|
||||
2.369777e+07, 2.446117e-05, 7.787050e-02, 1.885296e-07, 6.872639e-08
|
||||
2.430281e+07, 2.482303e-05, 7.923991e-02, 1.838360e-07, 6.701540e-08
|
||||
2.490785e+07, 2.518630e-05, 8.061880e-02, 1.793704e-07, 6.538752e-08
|
||||
2.551288e+07, 2.555078e-05, 8.200652e-02, 1.751166e-07, 6.383686e-08
|
||||
2.611792e+07, 2.591630e-05, 8.340248e-02, 1.710600e-07, 6.235804e-08
|
||||
2.672296e+07, 2.628267e-05, 8.480609e-02, 1.671870e-07, 6.094619e-08
|
||||
2.732800e+07, 2.664971e-05, 8.621680e-02, 1.634855e-07, 5.959685e-08
|
||||
2.793303e+07, 2.701728e-05, 8.763408e-02, 1.599444e-07, 5.830597e-08
|
||||
2.853807e+07, 2.738522e-05, 8.905744e-02, 1.565534e-07, 5.706982e-08
|
||||
2.914311e+07, 2.775337e-05, 9.048640e-02, 1.533032e-07, 5.588500e-08
|
||||
2.974814e+07, 2.812161e-05, 9.192052e-02, 1.501852e-07, 5.474837e-08
|
||||
3.035318e+07, 2.848980e-05, 9.335938e-02, 1.471915e-07, 5.365706e-08
|
||||
3.095822e+07, 2.885782e-05, 9.480256e-02, 1.443149e-07, 5.260840e-08
|
||||
3.156326e+07, 2.922556e-05, 9.624970e-02, 1.415485e-07, 5.159995e-08
|
||||
3.216829e+07, 2.959289e-05, 9.770043e-02, 1.388862e-07, 5.062943e-08
|
||||
3.277333e+07, 2.995973e-05, 9.915443e-02, 1.363222e-07, 4.969475e-08
|
||||
3.337837e+07, 3.032596e-05, 1.006114e-01, 1.338511e-07, 4.879395e-08
|
||||
3.398340e+07, 3.069151e-05, 1.020710e-01, 1.314680e-07, 4.792523e-08
|
||||
3.458844e+07, 3.105629e-05, 1.035329e-01, 1.291683e-07, 4.708690e-08
|
||||
3.519348e+07, 3.142021e-05, 1.049970e-01, 1.269477e-07, 4.627739e-08
|
||||
3.579852e+07, 3.178320e-05, 1.064629e-01, 1.248021e-07, 4.549525e-08
|
||||
3.640355e+07, 3.214519e-05, 1.079305e-01, 1.227279e-07, 4.473911e-08
|
||||
3.700859e+07, 3.250612e-05, 1.093994e-01, 1.207215e-07, 4.400769e-08
|
||||
3.761363e+07, 3.286592e-05, 1.108695e-01, 1.187796e-07, 4.329980e-08
|
||||
3.821866e+07, 3.322454e-05, 1.123407e-01, 1.168992e-07, 4.261432e-08
|
||||
3.882370e+07, 3.358193e-05, 1.138126e-01, 1.150774e-07, 4.195021e-08
|
||||
3.942874e+07, 3.393803e-05, 1.152860e-01, 1.133115e-07, 4.130648e-08
|
||||
4.003378e+07, 3.429281e-05, 1.167624e-01, 1.115990e-07, 4.068221e-08
|
||||
4.063881e+07, 3.464623e-05, 1.182393e-01, 1.099375e-07, 4.007653e-08
|
||||
4.124385e+07, 3.499824e-05, 1.197165e-01, 1.083248e-07, 3.948861e-08
|
||||
4.184889e+07, 3.534881e-05, 1.211938e-01, 1.067587e-07, 3.891770e-08
|
||||
4.245392e+07, 3.569790e-05, 1.226712e-01, 1.052372e-07, 3.836306e-08
|
||||
4.305896e+07, 3.604551e-05, 1.241485e-01, 1.037584e-07, 3.782401e-08
|
||||
4.366400e+07, 3.639158e-05, 1.256256e-01, 1.023207e-07, 3.729989e-08
|
||||
4.426903e+07, 3.673611e-05, 1.271024e-01, 1.009223e-07, 3.679010e-08
|
||||
4.487407e+07, 3.707907e-05, 1.285788e-01, 9.956152e-08, 3.629406e-08
|
||||
4.547911e+07, 3.742045e-05, 1.300546e-01, 9.823699e-08, 3.581122e-08
|
||||
4.608415e+07, 3.776022e-05, 1.315299e-01, 9.694724e-08, 3.534106e-08
|
||||
4.668918e+07, 3.809837e-05, 1.330044e-01, 9.569092e-08, 3.488308e-08
|
||||
4.729422e+07, 3.843490e-05, 1.344782e-01, 9.446674e-08, 3.443682e-08
|
||||
4.789926e+07, 3.876979e-05, 1.359511e-01, 9.327349e-08, 3.400183e-08
|
||||
4.850429e+07, 3.910302e-05, 1.374231e-01, 9.211000e-08, 3.357770e-08
|
||||
4.910933e+07, 3.943461e-05, 1.388941e-01, 9.097519e-08, 3.316401e-08
|
||||
4.971437e+07, 3.976453e-05, 1.403641e-01, 8.986800e-08, 3.276040e-08
|
||||
5.031941e+07, 4.009278e-05, 1.418329e-01, 8.878743e-08, 3.236649e-08
|
||||
5.092444e+07, 4.041937e-05, 1.433005e-01, 8.773254e-08, 3.198194e-08
|
||||
5.152948e+07, 4.074429e-05, 1.447668e-01, 8.670242e-08, 3.160642e-08
|
||||
5.213452e+07, 4.106754e-05, 1.462319e-01, 8.569621e-08, 3.123962e-08
|
||||
5.273955e+07, 4.138912e-05, 1.476956e-01, 8.471309e-08, 3.088123e-08
|
||||
5.334459e+07, 4.170903e-05, 1.491579e-01, 8.375227e-08, 3.053098e-08
|
||||
5.394963e+07, 4.202727e-05, 1.506188e-01, 8.281300e-08, 3.018858e-08
|
||||
5.455467e+07, 4.234386e-05, 1.520782e-01, 8.189457e-08, 2.985377e-08
|
||||
5.515970e+07, 4.265878e-05, 1.535360e-01, 8.099628e-08, 2.952631e-08
|
||||
5.576474e+07, 4.297206e-05, 1.549923e-01, 8.011749e-08, 2.920595e-08
|
||||
5.636978e+07, 4.328368e-05, 1.564470e-01, 7.925756e-08, 2.889248e-08
|
||||
5.697481e+07, 4.359367e-05, 1.579001e-01, 7.841589e-08, 2.858566e-08
|
||||
5.757985e+07, 4.390203e-05, 1.593515e-01, 7.759191e-08, 2.828528e-08
|
||||
5.818489e+07, 4.420875e-05, 1.608011e-01, 7.678507e-08, 2.799116e-08
|
||||
5.878993e+07, 4.451387e-05, 1.622491e-01, 7.599484e-08, 2.770309e-08
|
||||
5.939496e+07, 4.481737e-05, 1.636953e-01, 7.522070e-08, 2.742088e-08
|
||||
6.000000e+07, 4.511927e-05, 1.651397e-01, 7.446218e-08, 2.714437e-08
|
|
61
test/data/methane_co2.yaml
Normal file
61
test/data/methane_co2.yaml
Normal file
@ -0,0 +1,61 @@
|
||||
units: {length: cm, quantity: mol, activation-energy: cal/mol}
|
||||
|
||||
phases:
|
||||
- name: methane_co2
|
||||
species: [CH4, CO2]
|
||||
thermo: Peng-Robinson
|
||||
kinetics: gas
|
||||
transport: mixture-averaged
|
||||
reactions: none
|
||||
state:
|
||||
T: 300
|
||||
P: 1 atm
|
||||
species:
|
||||
- name: CH4
|
||||
composition: {C: 1, H: 4}
|
||||
thermo:
|
||||
model: NASA7
|
||||
temperature-ranges: [200.0, 1000.0, 3500.0]
|
||||
data:
|
||||
- [5.14987613, -0.0136709788, 4.91800599e-05, -4.84743026e-08, 1.66693956e-11,
|
||||
-1.02466476e+04, -4.64130376]
|
||||
- [0.074851495, 0.0133909467, -5.73285809e-06, 1.22292535e-09, -1.0181523e-13,
|
||||
-9468.34459, 18.437318]
|
||||
note: L8/88
|
||||
transport:
|
||||
model: gas
|
||||
geometry: nonlinear
|
||||
well-depth: 141.4
|
||||
diameter: 3.746
|
||||
polarizability: 2.6
|
||||
rotational-relaxation: 13.0
|
||||
critical-parameters:
|
||||
critical-temperature: 190.7
|
||||
critical-pressure: 4.63e+06
|
||||
critical-molar-volume: 0.0989
|
||||
critical-compressibility: 0.288
|
||||
acentric-factor: 0.011
|
||||
- name: CO2
|
||||
composition: {C: 1, O: 2}
|
||||
thermo:
|
||||
model: NASA7
|
||||
temperature-ranges: [200.0, 1000.0, 3500.0]
|
||||
data:
|
||||
- [2.35677352, 8.98459677e-03, -7.12356269e-06, 2.45919022e-09, -1.43699548e-13,
|
||||
-4.83719697e+04, 9.90105222]
|
||||
- [3.85746029, 4.41437026e-03, -2.21481404e-06, 5.23490188e-10, -4.72084164e-14,
|
||||
-4.8759166e+04, 2.27163806]
|
||||
note: L7/88
|
||||
transport:
|
||||
model: gas
|
||||
geometry: linear
|
||||
well-depth: 244.0
|
||||
diameter: 3.763
|
||||
polarizability: 2.65
|
||||
rotational-relaxation: 2.1
|
||||
critical-parameters:
|
||||
critical-temperature: 304.2
|
||||
critical-pressure: 7.39e+06
|
||||
critical-molar-volume: 0.0948
|
||||
critical-compressibility: 0.275
|
||||
acentric-factor: 0.228
|
60
test/data/methane_co2_noCritProp.yaml
Normal file
60
test/data/methane_co2_noCritProp.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
units: {length: cm, quantity: mol, activation-energy: cal/mol}
|
||||
|
||||
phases:
|
||||
- name: methane_co2
|
||||
species: [CH4, CO2]
|
||||
thermo: Peng-Robinson
|
||||
kinetics: gas
|
||||
transport: mixture-averaged
|
||||
reactions: none
|
||||
state:
|
||||
T: 300
|
||||
P: 1 atm
|
||||
species:
|
||||
- name: CH4
|
||||
composition: {C: 1, H: 4}
|
||||
thermo:
|
||||
model: NASA7
|
||||
temperature-ranges: [200.0, 1000.0, 3500.0]
|
||||
data:
|
||||
- [5.14987613, -0.0136709788, 4.91800599e-05, -4.84743026e-08, 1.66693956e-11,
|
||||
-1.02466476e+04, -4.64130376]
|
||||
- [0.074851495, 0.0133909467, -5.73285809e-06, 1.22292535e-09, -1.0181523e-13,
|
||||
-9468.34459, 18.437318]
|
||||
note: L8/88
|
||||
transport:
|
||||
model: gas
|
||||
geometry: nonlinear
|
||||
well-depth: 141.4
|
||||
diameter: 3.746
|
||||
polarizability: 2.6
|
||||
rotational-relaxation: 13.0
|
||||
critical-parameters:
|
||||
critical-temperature: 190.7
|
||||
critical-pressure: 4.63e+06
|
||||
critical-molar-volume: 0.0989
|
||||
critical-compressibility: 0.288
|
||||
acentric-factor: 0.011
|
||||
- name: CO2
|
||||
composition: {C: 1, O: 2}
|
||||
thermo:
|
||||
model: NASA7
|
||||
temperature-ranges: [200.0, 1000.0, 3500.0]
|
||||
data:
|
||||
- [2.35677352, 8.98459677e-03, -7.12356269e-06, 2.45919022e-09, -1.43699548e-13,
|
||||
-4.83719697e+04, 9.90105222]
|
||||
- [3.85746029, 4.41437026e-03, -2.21481404e-06, 5.23490188e-10, -4.72084164e-14,
|
||||
-4.8759166e+04, 2.27163806]
|
||||
note: L7/88
|
||||
transport:
|
||||
model: gas
|
||||
geometry: linear
|
||||
well-depth: 244.0
|
||||
diameter: 3.763
|
||||
polarizability: 2.65
|
||||
rotational-relaxation: 2.1
|
||||
equation-of-state:
|
||||
model: Peng-Robinson
|
||||
a: 0
|
||||
b: 0
|
||||
acentric-factor: 0.228
|
@ -48,17 +48,17 @@
|
||||
<transport model="CK_Multi"/>
|
||||
</phase>
|
||||
<phase id="HighP" dim="3">
|
||||
<elementArray datasrc="elements.xml">H C</elementArray>
|
||||
<speciesArray datasrc="gri30.xml#species_data">H H2 CH3 CH4</speciesArray>
|
||||
<elementArray datasrc="elements.xml">H C O</elementArray>
|
||||
<speciesArray datasrc="gri30.xml#species_data">CO2 CH4</speciesArray>
|
||||
<reactionArray datasrc="gri30.xml#reaction_data">
|
||||
<skip species="undeclared" third_bodies="undeclared"/>
|
||||
</reactionArray>
|
||||
<state>
|
||||
<temperature units="K">1200.0</temperature>
|
||||
<pressure units="Pa">2666.4473684210525</pressure>
|
||||
<moleFractions>H:0.002, H2:0.988, CH3:0.0002, CH4:0.01</moleFractions>
|
||||
<moleFractions>CO2: 0.988, CH4: 0.012</moleFractions>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<thermo model="RedlichKwong"/>
|
||||
<kinetics model="GasKinetics"/>
|
||||
<transport model="HighP"/>
|
||||
</phase>
|
||||
|
@ -41,14 +41,13 @@ phases:
|
||||
state: {T: 1200.0 K, P: 2666.4473684210525 Pa, X: {H: 2.0e-03, H2: 0.988, CH3: 2.0e-04,
|
||||
CH4: 0.01}}
|
||||
- name: HighP
|
||||
elements: [H, C]
|
||||
elements: [H, C, O]
|
||||
species:
|
||||
- gri30.yaml/species: [H, H2, CH3, CH4]
|
||||
thermo: ideal-gas
|
||||
- methane_co2.yaml/species: [CO2, CH4]
|
||||
thermo: Redlich-Kwong
|
||||
transport: high-pressure
|
||||
skip-undeclared-third-bodies: true
|
||||
kinetics: gas
|
||||
reactions:
|
||||
- gri30.yaml/reactions: declared-species
|
||||
state: {T: 1200.0 K, P: 2666.4473684210525 Pa, X: {H: 2.0e-03, H2: 0.988, CH3: 2.0e-04,
|
||||
CH4: 0.01}}
|
||||
- gri30.yaml/reactions: none
|
||||
state: {T: 1200.0 K, P: 2666.4473684210525 Pa, X: {CO2: 0.988, CH4: 0.012}}
|
||||
|
@ -18,7 +18,7 @@ def pytest_addoption(parser):
|
||||
"--save-reference", action="store", default=None,
|
||||
help="Save the reference output files for specific tests. "
|
||||
"Options: diffusion, counterflow_premixed, counterflow_premixed_nonideal, "
|
||||
"combustor, wall"
|
||||
"combustor, wall, high_pressure_transport, high_pressure_chung_transport"
|
||||
)
|
||||
|
||||
def pytest_configure(config):
|
||||
|
@ -4,7 +4,9 @@ import pytest
|
||||
from pytest import approx
|
||||
|
||||
import cantera as ct
|
||||
|
||||
from .utilities import (
|
||||
compareProfiles
|
||||
)
|
||||
|
||||
class TestTransport:
|
||||
|
||||
@ -176,7 +178,7 @@ class TestTransport:
|
||||
assert gas1.thermal_conductivity == approx(gas2.thermal_conductivity)
|
||||
assert gas1.multi_diff_coeffs == approx(gas2.multi_diff_coeffs)
|
||||
|
||||
def test_species_viscosities(self, phase):
|
||||
def test_species_visosities(self, phase):
|
||||
for species_name in phase.species_names:
|
||||
# check that species viscosity matches overall for single-species
|
||||
# state
|
||||
@ -659,3 +661,119 @@ class TestIonGasTransportData:
|
||||
assert data['quadrupole-polarizability'] == approx(3.602)
|
||||
|
||||
assert 'dispersion-coefficient' not in gas.species('CO2').transport.input_data
|
||||
|
||||
|
||||
class TestHighPressureGasTransport():
|
||||
"""
|
||||
Note: to re-create the reference file:
|
||||
(1) Set PYTHONPATH to build/python.
|
||||
(2) Go into test/python directory and run:
|
||||
pytest --save-reference=high_pressure_transport test_transport.py::TestHighPressureGasTransport::test_high_pressure_transport
|
||||
pytest --save-reference=high_pressure_chung_transport test_transport.py::TestHighPressureGasTransport::test_high_pressure_chung_transport
|
||||
(3) Compare the reference files created in the current working directory with
|
||||
the ones in test/data and replace them if needed.
|
||||
"""
|
||||
|
||||
def test_failure_for_species_with_no_properties(self):
|
||||
"""
|
||||
All species must have critical properties defined to use the high pressure
|
||||
transport model. This test uses a YAML file with a specified value of the
|
||||
a and b parameters for the Peng-Robinson equation of state, which should
|
||||
be parsed by the thermo model and will set the critical properties to
|
||||
non-physical values. These non-physical values should trigger an error
|
||||
in the high-pressure transport model.
|
||||
"""
|
||||
gas = ct.Solution('methane_co2_noCritProp.yaml')
|
||||
|
||||
with pytest.raises(ct.CanteraError, match="must have critical properties defined"):
|
||||
gas.transport_model = 'high-pressure-Chung'
|
||||
|
||||
with pytest.raises(ct.CanteraError, match="must have critical properties defined"):
|
||||
gas.transport_model = 'high-pressure'
|
||||
|
||||
def test_high_pressure_transport(self, request, test_data_path):
|
||||
"""
|
||||
This test compares the viscosity and thermal conductivities of a mixture of
|
||||
CH4 and CO2 over a range of pressures using the high-pressure transport
|
||||
model and compares the results to a reference file. This is a regression test.
|
||||
"""
|
||||
referenceFile = "HighPressureTest.csv"
|
||||
|
||||
phasedef = """
|
||||
phases:
|
||||
- name: methane_co2
|
||||
species:
|
||||
- gri30.yaml/species: [CH4, CO2]
|
||||
thermo: Peng-Robinson
|
||||
transport: mixture-averaged
|
||||
state: {T: 300, P: 1 atm}
|
||||
"""
|
||||
gas = ct.Solution(yaml=phasedef)
|
||||
gas.transport_model = 'high-pressure'
|
||||
|
||||
pressures = np.linspace(101325, 6e7, 100)
|
||||
# Collect viscosities and thermal conductivities
|
||||
viscosities = []
|
||||
thermal_conductivities = []
|
||||
diffusion_coefficients = []
|
||||
for pressure in pressures:
|
||||
gas.TPX = 350, pressure, 'CH4:0.755, CO2:0.245'
|
||||
viscosities.append(gas.viscosity)
|
||||
thermal_conductivities.append(gas.thermal_conductivity)
|
||||
diffusion_coefficients.append(gas.mix_diff_coeffs)
|
||||
|
||||
data = np.empty((len(viscosities), 3+ len(diffusion_coefficients[0])))
|
||||
data[:,0] = pressures
|
||||
data[:,1] = viscosities
|
||||
data[:,2] = thermal_conductivities
|
||||
for i in range(len(diffusion_coefficients[0])):
|
||||
data[:,3+i] = [d[i] for d in diffusion_coefficients]
|
||||
|
||||
saveReference = request.config.getoption("--save-reference")
|
||||
if saveReference == 'high_pressure_transport':
|
||||
np.savetxt(referenceFile, data, '%11.6e', ', ')
|
||||
else:
|
||||
bad = compareProfiles(test_data_path / referenceFile, data,
|
||||
rtol=1e-2, atol=1e-8, xtol=1e-2)
|
||||
assert not bad, bad
|
||||
|
||||
def test_high_pressure_chung_transport(self, request, test_data_path):
|
||||
referenceFile = "HighPressureChungTest.csv"
|
||||
|
||||
phasedef = """
|
||||
phases:
|
||||
- name: methane_co2
|
||||
species:
|
||||
- gri30.yaml/species: [CH4, CO2]
|
||||
thermo: Peng-Robinson
|
||||
transport: mixture-averaged
|
||||
state: {T: 300, P: 1 atm}
|
||||
"""
|
||||
gas = ct.Solution(yaml=phasedef)
|
||||
gas.transport_model = 'high-pressure-Chung'
|
||||
|
||||
pressures = np.linspace(101325, 6e7, 100)
|
||||
# Collect viscosities and thermal conductivities
|
||||
viscosities = []
|
||||
thermal_conductivities = []
|
||||
diffusion_coefficients = []
|
||||
for pressure in pressures:
|
||||
gas.TPX = 350, pressure, 'CH4:0.755, CO2:0.245'
|
||||
viscosities.append(gas.viscosity)
|
||||
thermal_conductivities.append(gas.thermal_conductivity)
|
||||
diffusion_coefficients.append(gas.mix_diff_coeffs)
|
||||
|
||||
data = np.empty((len(viscosities), 3+gas.n_species))
|
||||
data[:,0] = pressures
|
||||
data[:,1] = viscosities
|
||||
data[:,2] = thermal_conductivities
|
||||
for i in range(len(diffusion_coefficients[0])):
|
||||
data[:,3+i] = [d[i] for d in diffusion_coefficients]
|
||||
|
||||
saveReference = request.config.getoption("--save-reference")
|
||||
if saveReference == 'high_pressure_chung_transport':
|
||||
np.savetxt(referenceFile, data, '%11.6e', ', ')
|
||||
else:
|
||||
bad = compareProfiles(test_data_path / referenceFile, data,
|
||||
rtol=1e-2, atol=1e-8, xtol=1e-2)
|
||||
assert not bad, bad
|
||||
|
Loading…
Reference in New Issue
Block a user