CG
Version 25
|
#include <Reactions.h>
Public Types | |
enum | Mechanism { nonEquilibrium, equilibrium, frozen } |
Public Member Functions | |
Reactions () | |
virtual | ~Reactions () |
void | useScaledVariables (bool trueOrFalse=TRUE) |
bool | usingScaledVariables () const |
virtual void | reactionRates (const real &teS, const RealArray &kb, const RealArray &kf)=0 |
virtual void | chemicalSource (const real &rhoS, const real &teS, const RealArray &y, const RealArray &sigma, const RealArray &sy=Overture::nullRealArray())=0 |
virtual void | chemicalSource (const RealArray &rhoS, const RealArray &teS, const RealArray &y, const RealArray &sigma, const RealArray &sy=Overture::nullRealArray()) |
virtual real | mw (const int &species) const |
virtual real | h (const int species, const real teS) |
virtual RealArray & | h (const int species, const RealArray &teS, const RealArray &h0) |
virtual real | cp (const int species, const real teS) |
virtual RealArray & | cp (const int species, const RealArray &teS, const RealArray &cp0) |
virtual RealArray & | entropy (const RealArray &teS, const RealArray &pS, const RealArray &y, const RealArray &entropy) |
virtual RealArray & | h (const RealArray &teS, const RealArray &hi) |
virtual RealArray & | cp (const RealArray &teS, const RealArray &cpi) |
virtual RealArray & | sigmaFromPTY (const RealArray &pS, const RealArray &teS, const RealArray &y, const RealArray &sigmai) |
virtual RealArray & | sigmaFromRPTY (const RealArray &rhoS, const RealArray &pS, const RealArray &teS, const RealArray &y, const RealArray &sigmai) |
virtual void | chemistrySource (const RealArray &pS, const RealArray &teS, const RealArray &y, const RealArray &rhoS, const RealArray &source) |
RealArray & | massFractionToMoleFraction (const RealArray &y, const RealArray &x) |
virtual RealArray & | viscosity (const RealArray &teS, const RealArray &x, const RealArray &eta) |
virtual RealArray & | thermalConductivity (const RealArray &teS, const RealArray &x, const RealArray &lambda) |
virtual RealArray & | diffusion (const RealArray &pS, const RealArray &teS, const RealArray &x, const RealArray &lambda) |
int | pFromRTY (const RealArray &rho, const RealArray &teS, const RealArray &y, RealArray &pS) const |
int | rFromPTY (const RealArray &pS, const RealArray &teS, const RealArray &y, RealArray &rho) const |
int | numberOfElements () const |
int | numberOfSpecies () const |
int | numberOfReactions () const |
aString | getName (const int &species) const |
int | setScaleForRho (real rho0) |
int | setScaleForT (real te0) |
int | setScaleForP (real p0, real pStatic) |
int | setScaleForL (real l0) |
int | setScaleForU (real u0) |
virtual void | setScales (real rho0=1., real te0=1., real pStatic=1., real l0=1., real u0=1., real p0=-1.) |
real | getScaleForRho () const |
real | getScaleForT () const |
real | getScaleForP () const |
real | getScaleForStaticP () const |
real | getScaleForL () const |
real | getScaleForU () const |
real | getScaleForR () const |
void | getScales (real &rho0, real &te0, real &pStatic, real &l0, real &u0, real &p0) const |
void | setPressureLevel (const real &pressureLevel) |
void | setPressureIsConstant (const bool &trueOrFalse=TRUE) |
bool | getPressureIsConstant () |
virtual void | chemistrySourceAndJacobian (const RealArray &pS, const RealArray &teS, const RealArray &y, const RealArray &rhoS, const RealArray &source, const RealArray &sy) |
virtual int | solveImplicitForRTYGivenP (RealArray &u, const RealArray &rhs, const int &rc, const int &pc, const int &tc, const int &sc, const Index &I1, const Index &I2, const Index &I3, const real &dt, bool equilibrium=FALSE) |
virtual int | solveImplicitForYGivenRTP (RealArray &u, const RealArray &rhs, const int &rc, const int &pc, const int &tc, const int &sc, const Index &I1, const Index &I2, const Index &I3, const real &dt, bool equilibrium=FALSE) |
virtual int | solveImplicitForPTYGivenR (RealArray &u, const RealArray &rhs, const int &rc, const int &pc, const int &tc, const int &sc, const Index &I1, const Index &I2, const Index &I3, const real &dt, bool equilibrium=FALSE) |
virtual void | computeEigenvaluesOfTheChemicalSourceJacobian (const real rhoS, const RealArray &y, const RealArray &sigma, const RealArray &sy, const RealArray &reLambda, const RealArray &imLambda) |
void | computeEigenvaluesOfTheChemicalSourceJacobian (const RealArray &rhoS, const RealArray &teS, const RealArray &y, const RealArray &reLambda, const RealArray &imLambda) |
void | checkChemicalSourceJacobian () |
Public Attributes | |
enum Reactions::Mechanism | reactionMechanism |
MaterialProperties | mp |
Static Public Attributes | |
static int | debug =0 |
Protected Attributes | |
int | numberOfSpecies_ |
int | numberOfElements_ |
int | numberOfReactions_ |
RealArray | molecularWeight |
real | rho0 |
real | pStatic |
real | p0 |
real | te0 |
real | l0 |
real | u0 |
real | R0 |
real | rho0Saved |
real | pStaticSaved |
real | p0Saved |
real | te0Saved |
real | l0Saved |
real | u0Saved |
real | R0Saved |
aString * | speciesName |
MaterialProperties::material * | speciesNumber |
bool | pressureIsConstant |
real | pressureLevel |
bool | variablesScaled |
enum Reactions::Mechanism |
Reactions::Reactions | ( | ) |
References l0, nonEquilibrium, numberOfElements_, numberOfReactions_, numberOfSpecies_, p0, pressureIsConstant, pressureLevel, pStatic, reactionMechanism, rho0, speciesName, speciesNumber, te0, u0, and variablesScaled.
|
virtual |
References speciesName, and speciesNumber.
void Reactions::checkChemicalSourceJacobian | ( | ) |
References all, chemicalSource(), display(), m, numberOfSpecies_, rho, S, sigma, sy, and y.
|
pure virtual |
|
virtual |
Reimplemented in OneStepReaction, BranchingReaction, and Chemkin.
References chemicalSource(), i1, i2, i3, numberOfSpecies_, s, sigma, sy, and y.
|
virtual |
References cp(), debug, h(), I1, I2, I3, molecularWeight, mp, numberOfSpecies_, p0, pressureIsConstant, MaterialProperties::R, r, rho0, s, sigmaFromRPTY(), sigmai, te0, and y.
Referenced by chemistrySourceAndJacobian().
|
virtual |
References chemistrySource(), delta, eps, I1, I2, I3, n, numberOfSpecies_, R, sy, te0, and y.
Referenced by solveImplicitForPTYGivenR(), and solveImplicitForRTYGivenP().
|
virtual |
void Reactions::computeEigenvaluesOfTheChemicalSourceJacobian | ( | const RealArray & | rhoS, |
const RealArray & | teS, | ||
const RealArray & | y, | ||
const RealArray & | reLambda, | ||
const RealArray & | imLambda | ||
) |
References chemicalSource(), computeEigenvaluesOfTheChemicalSourceJacobian(), i1, i2, i3, numberOfSpecies_, s, and y.
|
virtual |
Reimplemented in Chemkin.
References MaterialProperties::cp(), mw(), numberOfSpecies_, speciesNumber, and te0.
Referenced by chemistrySource(), and Cgasf::computeSource().
|
virtual |
Reimplemented in Chemkin.
References MaterialProperties::cp(), i1, i2, i3, mw(), numberOfSpecies_, speciesNumber, and te0.
|
virtual |
Reimplemented in Chemkin.
References MaterialProperties::cp(), i1, i2, i3, mw(), numberOfSpecies_, s, speciesNumber, and te0.
|
virtual |
Reimplemented in Chemkin.
Referenced by Cgasf::getUt().
|
virtual |
Reimplemented in Chemkin.
References i1, i2, i3, MaterialProperties::mw(), numberOfSpecies_, p0, pressureLevel, MaterialProperties::R, s, MaterialProperties::s(), speciesNumber, te0, x, and y.
aString Reactions::getName | ( | const int & | species | ) | const |
Referenced by AsfParameters::setParameters(), and CnsParameters::setParameters().
bool Reactions::getPressureIsConstant | ( | ) |
References pressureIsConstant.
Referenced by Cgasf::getUt().
real Reactions::getScaleForL | ( | ) | const |
References l0.
real Reactions::getScaleForP | ( | ) | const |
References p0.
real Reactions::getScaleForR | ( | ) | const |
References R0.
real Reactions::getScaleForRho | ( | ) | const |
References rho0.
real Reactions::getScaleForStaticP | ( | ) | const |
References pStatic.
real Reactions::getScaleForT | ( | ) | const |
References te0.
real Reactions::getScaleForU | ( | ) | const |
References u0.
void Reactions::getScales | ( | real & | rho0, |
real & | te0, | ||
real & | pStatic, | ||
real & | l0, | ||
real & | u0, | ||
real & | p0 | ||
) | const |
|
virtual |
Reimplemented in Chemkin.
References MaterialProperties::hF(), mw(), numberOfSpecies_, speciesNumber, and te0.
Referenced by chemistrySource(), and Cgasf::computeSource().
|
virtual |
Reimplemented in Chemkin.
References MaterialProperties::hF(), i1, i2, i3, mw(), numberOfSpecies_, speciesNumber, and te0.
|
virtual |
Reimplemented in Chemkin.
References MaterialProperties::hF(), i1, i2, i3, mw(), numberOfSpecies_, s, speciesNumber, and te0.
RealArray & Reactions::massFractionToMoleFraction | ( | const RealArray & | y, |
const RealArray & | x | ||
) |
References mw(), numberOfSpecies_, s, x, and y.
Referenced by Cgasf::getUt().
|
virtual |
Reimplemented in Chemkin.
References MaterialProperties::mw().
Referenced by Cgcns::assignTestProblem(), Cgasf::assignTestProblem(), Cgasf::computeSource(), cp(), h(), and massFractionToMoleFraction().
|
inline |
References numberOfElements_.
|
inline |
References numberOfReactions_.
|
inline |
References numberOfSpecies_.
int Reactions::pFromRTY | ( | const RealArray & | rho, |
const RealArray & | teS, | ||
const RealArray & | y, | ||
RealArray & | pS | ||
) | const |
References I1, I2, I3, MaterialProperties::R, r, s, and y.
Referenced by solveImplicitForPTYGivenR().
|
pure virtual |
Implemented in OneStepReaction, BranchingReaction, and Chemkin.
int Reactions::rFromPTY | ( | const RealArray & | pS, |
const RealArray & | teS, | ||
const RealArray & | y, | ||
RealArray & | rho | ||
) | const |
void Reactions::setPressureIsConstant | ( | const bool & | trueOrFalse = TRUE | ) |
References pressureIsConstant.
Referenced by Cgcns::assignTestProblem(), and Cgasf::assignTestProblem().
void Reactions::setPressureLevel | ( | const real & | pressureLevel | ) |
References pressureLevel.
Referenced by Cgcns::assignTestProblem(), and Cgasf::assignTestProblem().
int Reactions::setScaleForP | ( | real | p0, |
real | pStatic | ||
) |
|
virtual |
|
virtual |
Reimplemented in Chemkin.
Referenced by Cgasf::computeSource().
|
virtual |
Reimplemented in Chemkin, OneStepReaction, and BranchingReaction.
Referenced by chemistrySource().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in Chemkin.
Referenced by Cgasf::getUt().
void Reactions::useScaledVariables | ( | bool | trueOrFalse = TRUE | ) |
|
inline |
References variablesScaled.
|
virtual |
Reimplemented in Chemkin.
Referenced by Cgasf::getUt().
|
static |
|
protected |
Referenced by getScaleForL(), getScales(), Reactions(), setScaleForL(), setScales(), and useScaledVariables().
|
protected |
Referenced by setScaleForL(), setScales(), and useScaledVariables().
|
protected |
Referenced by chemistrySource(), and solveImplicitForRTYGivenP().
MaterialProperties Reactions::mp |
|
protected |
Referenced by numberOfElements(), and Reactions().
|
protected |
Referenced by numberOfReactions(), and Reactions().
|
protected |
Referenced by BranchingReaction::BranchingReaction(), checkChemicalSourceJacobian(), chemicalSource(), chemistrySource(), chemistrySourceAndJacobian(), computeEigenvaluesOfTheChemicalSourceJacobian(), cp(), entropy(), h(), massFractionToMoleFraction(), numberOfSpecies(), OneStepReaction::OneStepReaction(), Reactions(), solveImplicitForPTYGivenR(), solveImplicitForRTYGivenP(), and solveImplicitForYGivenRTP().
|
protected |
|
protected |
Referenced by setScaleForP(), setScales(), and useScaledVariables().
|
protected |
Referenced by chemistrySource(), getPressureIsConstant(), Reactions(), and setPressureIsConstant().
|
protected |
Referenced by entropy(), Reactions(), and setPressureLevel().
|
protected |
Referenced by getScaleForStaticP(), getScales(), Reactions(), setScaleForP(), setScaleForRho(), setScaleForT(), setScales(), and useScaledVariables().
|
protected |
Referenced by setScaleForP(), setScales(), and useScaledVariables().
|
protected |
Referenced by getScaleForR(), setScaleForP(), setScaleForRho(), setScaleForT(), setScales(), and useScaledVariables().
|
protected |
Referenced by setScales(), and useScaledVariables().
enum Reactions::Mechanism Reactions::reactionMechanism |
Referenced by Reactions().
|
protected |
Referenced by BranchingReaction::BranchingReaction(), chemistrySource(), computeEigenvaluesOfTheChemicalSourceJacobian(), getScaleForRho(), getScales(), OneStepReaction::OneStepReaction(), Reactions(), setScaleForP(), setScaleForRho(), setScaleForT(), setScales(), solveImplicitForRTYGivenP(), solveImplicitForYGivenRTP(), and useScaledVariables().
|
protected |
Referenced by setScaleForRho(), setScales(), and useScaledVariables().
|
protected |
|
protected |
Referenced by cp(), entropy(), h(), Reactions(), and ~Reactions().
|
protected |
Referenced by BranchingReaction::BranchingReaction(), chemistrySource(), chemistrySourceAndJacobian(), cp(), entropy(), getScaleForT(), getScales(), h(), OneStepReaction::OneStepReaction(), Reactions(), setScaleForP(), setScaleForRho(), setScaleForT(), setScales(), solveImplicitForPTYGivenR(), solveImplicitForRTYGivenP(), and useScaledVariables().
|
protected |
Referenced by setScaleForT(), setScales(), and useScaledVariables().
|
protected |
Referenced by getScaleForU(), getScales(), Reactions(), setScaleForU(), setScales(), and useScaledVariables().
|
protected |
Referenced by setScaleForU(), setScales(), and useScaledVariables().
|
protected |
Referenced by Reactions(), useScaledVariables(), and usingScaledVariables().