53 int main(
int argc,
char *argv[])
61 IFstream controlFile(controlFileName);
64 if (!controlFile.good())
67 <<
"Cannot read file " << controlFileName
76 mixture rMix(control.lookup(
"reactants"));
77 mixture pMix(control.lookup(
"products"));
80 Info<<
nl <<
"Reading thermodynamic data dictionary" <<
endl;
85 IFstream thermoDataFile(thermoDataFileName);
88 if (!thermoDataFile.good())
91 <<
"Cannot read file " << thermoDataFileName
100 rMix[0].volFrac()*
thermo(thermoData.subDict(rMix[0].name()))
103 for (
label i = 1; i < rMix.size(); i++)
105 reactants = reactants
106 + rMix[i].volFrac()*
thermo(thermoData.subDict(rMix[i].name()));
112 2*pMix[0].volFrac()*
thermo(thermoData.subDict(pMix[0].name()))
115 for (
label i = 1; i < pMix.size(); i++)
118 + 2*pMix[i].volFrac()*
thermo(thermoData.subDict(pMix[i].name()));
121 Info<<
"Adiabatic flame temperature of mixture " << rMix.name() <<
" = " 122 << 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 function as the standard enthalpy functi...
psiReactionThermo & 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 succesful.
errorManip< error > abort(error &err)
fileName findEtcFile(const fileName &, bool mandatory=false)
Search for a file using findEtcFiles.
Foam::argList args(argc, argv)