Ignis
|
#include <streams.h>
Public Member Functions | |
void | getProdOfCompleteComb (const double mixf, std::vector< double > &ypcc, double &hpcc, double &Tpcc) |
void | getEquilibrium_HP (const double mixf, std::vector< double > &yeq, double &heq, double &Teq) |
void | getEquilibrium_TP (const double mixf, double Teq, std::vector< double > &yeq, double &heq) |
void | getMixingState (const double mixf, std::vector< double > &ymix, double &hmix, double &Tmix) |
double | getMixtureFraction (const double *y, const bool doBeta01=false) |
streams () | |
streams (std::shared_ptr< Cantera::Solution > csol, const double _P, const double _h0, const double _h1, const std::vector< double > &_y0, const std::vector< double > &_y1) | |
~streams () | |
Public Attributes | |
double | h0 |
stream mixf=0 enthalpy (J/kg) | |
double | h1 |
stream mixf=1 enthalpy (J/kg) | |
std::vector< double > | y0 |
stream mixf=0 composition vector | |
std::vector< double > | y1 |
stream mixf=1 composition vector | |
double | P |
std::shared_ptr< Cantera::ThermoPhase > | gas |
double | mixfStoic |
stoichiometric mixture fraction | |
int | nspc |
number of species in gas mechanism | |
double | beta0 |
mixf = (beta-beta0) / (beta1-beta0) | |
double | beta1 |
mixf = (beta-beta0) / (beta1-beta0) | |
std::vector< double > | gCHON |
gammas, as in beta = sum_i (y_i*gamma_i) | |
Private Member Functions | |
void | setStoicMixf () |
std::vector< double > | getElementMassFracs (const double *y) |
std::vector< double > | getElementMoleFracs (const double *y) |
std::vector< double > | getElementMoles (const double *x, double &nOnotFromO2, double &nHnotFromH2O, double &nCnotFromCO2) |
Class implementing streams for use in mixing and or reaction problems. This is writting in terms of mixture fraction with streams defined in an input file. The class can implement products of complete combustion, or equilibrium (through the Cantera IdealGasPhase object, if desired). This class holds a pointer to a Cantera IdealGasPhase object (defined up front in main) that computes thermodynamic, kinetic, and transport data.
streams::streams | ( | std::shared_ptr< Cantera::Solution > | csol, |
const double | _P, | ||
const double | _h0, | ||
const double | _h1, | ||
const std::vector< double > & | _y0, | ||
const std::vector< double > & | _y1 | ||
) |
void streams::getProdOfCompleteComb | ( | const double | mixf, |
std::vector< double > & | ypcc, | ||
double & | hpcc, | ||
double & | Tpcc | ||
) |
Computes the temperature, enthalpy, and composition of complete combustion at the given mixf. For nonpremixed flames (don't do anything funny, like have oxygen in the fuel stream)
mixf | input: mixture fraction, defines elemental composition. |
ypcc | output: mass fractions of products of complete combustion. |
hpcc | output: enthalpy of products of complete combustion. |
Tpcc | output: temperature of products of complete combustion. |
Definition at line 135 of file streams.cc.
void streams::getEquilibrium_HP | ( | const double | mixf, |
std::vector< double > & | yeq, | ||
double & | heq, | ||
double & | Teq | ||
) |
Computes the temperature, enthalpy, and composition of equilibrium at the given mixf.
mixf | input: mixture fraction, defines elemental composition. |
yeq | output: mass fractions |
heq | output: enthalpy |
Teq | output: temperature |
Definition at line 76 of file streams.cc.
void streams::getEquilibrium_TP | ( | const double | mixf, |
double | Teq, | ||
std::vector< double > & | yeq, | ||
double & | heq | ||
) |
Computes the enthalpy, and composition of equilibrium at the given mixf for given T
mixf | input: mixture fraction, defines elemental composition. |
Teq | input: temperature |
yeq | output: mass fractions |
heq | output: enthalpy |
Definition at line 106 of file streams.cc.
void streams::getMixingState | ( | const double | mixf, |
std::vector< double > & | ymix, | ||
double & | hmix, | ||
double & | Tmix | ||
) |
Computes the temperature, enthalpy, and composition of mixing among streams.
mixf | input: mixture fraction, defines elemental composition. |
ymix | output: mass fractions of products of complete combustion. |
hmix | output: enthalpy of products of complete combustion. |
Tmix | output: temperature of products of complete combustion. |
Definition at line 53 of file streams.cc.
double streams::getMixtureFraction | ( | const double * | y, |
const bool | doBeta01 = false |
||
) |
Compute the mixture fraction from the mass fractions using Bilger's mixf. Set doBeta01=true on first call to initialize members beta0, beta1. Later calls of this function only use the first parameter.
y | input: vector of species mass fractions. |
doBeta01 | input: flag=true on first call to set members beta0, beta1. |
Definition at line 337 of file streams.cc.
|
private |
Set the stoichiometric mixture fraction using Bilger's definition */
Definition at line 238 of file streams.cc.
|
private |
Sets the elements to have the correct Mass Fractions based on the specified array.
y | input: mass fraction array to use to get corresponding element fractions. |
Definition at line 275 of file streams.cc.
|
private |
|
private |
Get amount of moles for each element.
x | input: pointer to vector of species mole fractions. |
nOnotFromO2 | input: number of moles of oxygen not from O2 (oxygen in the base fuel). |
nHnotFromH2O | input: number of moles of hydrogen not from H2O. |
nCnotFromCO2 | input: number of moles of carbon not from CO2. |
Definition at line 295 of file streams.cc.
std::vector<double> streams::y0 |
std::vector<double> streams::y1 |
std::vector<double> streams::gCHON |