Go to the documentation of this file.
59 int main(
int argc,
char *argv[])
63 "Calculate adiabatic flame temperature for a given mixture"
64 " at a given temperature"
76 IFstream controlFile(controlFileName);
79 if (!controlFile.good())
82 <<
"Cannot read file " << controlFileName
89 const scalar P(control.get<scalar>(
"P"));
90 const scalar
T0(control.get<scalar>(
"T0"));
91 mixture rMix(control.lookup(
"reactants"));
92 mixture pMix(control.lookup(
"products"));
95 Info<<
nl <<
"Reading thermodynamic data dictionary" <<
endl;
100 IFstream thermoDataFile(thermoDataFileName);
103 if (!thermoDataFile.good())
106 <<
"Cannot read file " << thermoDataFileName
115 rMix[0].volFrac()*
thermo(thermoData.subDict(rMix[0].name()))
118 for (label i = 1; i < rMix.size(); i++)
120 reactants = reactants
121 + rMix[i].volFrac()*
thermo(thermoData.subDict(rMix[i].name()));
127 2*pMix[0].volFrac()*
thermo(thermoData.subDict(pMix[0].name()))
130 for (label i = 1; i < pMix.size(); i++)
133 + 2*pMix[i].volFrac()*
thermo(thermoData.subDict(pMix[i].name()));
136 Info<<
"Adiabatic flame temperature of mixture " << rMix.name() <<
" = "
137 << products.THa(reactants.Ha(P,
T0), P, 1000.0) <<
" K" <<
endl;
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A class for handling file names.
Input from file stream, using an ISstream.
psiReactionThermo & thermo
Thermodynamics mapping class to expose the absolute enthalpy functions.
static void addNote(const string ¬e)
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
T get(const label index) const
static void addArgument(const string &argName, const string &usage="")
static void noFunctionObjects(bool addWithOption=false)
fileName findEtcFile(const fileName &name, const bool mandatory=false, unsigned short location=0777)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
errorManip< error > abort(error &err)
Functions to search 'etc' directories for configuration files etc.
#define FatalErrorInFunction
Foam::argList args(argc, argv)