53 int main(
int argc,
char *argv[])
63 IFstream propertiesFile(propertiesFileName);
66 if (!propertiesFile.good())
69 <<
"Cannot read file " << propertiesFileName
76 scalar
p(properties.lookup<scalar>(
"P"));
77 scalar
T0(properties.lookup<scalar>(
"T0"));
78 mixture rMix(properties.lookup(
"reactants"));
79 mixture pMix(properties.lookup(
"products"));
82 Info<<
nl <<
"Reading thermodynamic data dictionary" <<
endl;
87 IFstream thermoDataFile(thermoDataFileName);
90 if (!thermoDataFile.good())
93 <<
"Cannot read file " << thermoDataFileName
100 const thermo reactant0(thermoData.subDict(rMix[0].name()));
102 thermo reactants(rMix[0].volFrac()*reactant0.rho(
p,
T0)*reactant0);
104 for (
label i=1; i<rMix.size(); i++)
106 const thermo reactanti(thermoData.subDict(rMix[i].name()));
107 reactants += rMix[i].volFrac()*reactanti.rho(
p,
T0)*reactanti;
110 const thermo product0(thermoData.subDict(pMix[0].name()));
111 thermo products(pMix[0].volFrac()*product0.rho(
p,
T0)*product0);
113 for (
label i=1; i<pMix.size(); i++)
115 const thermo producti(thermoData.subDict(pMix[i].name()));
116 products += pMix[i].volFrac()*producti.rho(
p,
T0)*producti;
119 Info<<
"Adiabatic flame temperature of mixture " << rMix.name() <<
" = " 120 << products.THa(reactants.Ha(
p,
T0),
p, 1000.0) <<
" K" <<
endl;
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
fluidReactionThermo & thermo
A class for handling file names.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
Thermodynamics mapping class to expose the absolute enthalpy functions.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Functions to search 'etc' directories for configuration files etc.
Extract command arguments and options from the supplied argc and argv parameters. ...
errorManip< error > abort(error &err)
fileName findEtcFile(const fileName &, bool mandatory=false)
Search for a file using findEtcFiles.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::argList args(argc, argv)