53 int main(
int argc,
char *argv[])
63 IFstream propertiesFile(propertiesFileName);
66 if (!propertiesFile.good())
69 <<
"Cannot read file " << propertiesFileName
77 scalar T0(
readScalar(properties.lookup(
"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
102 rMix[0].volFrac()*
thermo(thermoData.subDict(rMix[0].name()))
105 for (
label i = 1; i < rMix.size(); i++)
107 reactants = reactants
108 + rMix[i].volFrac()*
thermo(thermoData.subDict(rMix[i].name()));
114 2*pMix[0].volFrac()*
thermo(thermoData.subDict(pMix[0].name()))
117 for (
label i = 1; i < pMix.size(); i++)
120 + 2*pMix[i].volFrac()*
thermo(thermoData.subDict(pMix[i].name()));
123 Info<<
"Adiabatic flame temperature of mixture " << rMix.name() <<
" = " 124 << 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.
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.
rhoReactionThermo & thermo
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. ...
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
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)