Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "combustionModel.H"
00027 #include <finiteVolume/fvm.H>
00028
00029
00030
00031 namespace Foam
00032 {
00033 defineTypeNameAndDebug(combustionModel, 0);
00034 defineRunTimeSelectionTable(combustionModel, dictionary);
00035 };
00036
00037
00038
00039
00040 Foam::combustionModel::combustionModel
00041 (
00042 const dictionary& combustionProperties,
00043 const hsCombustionThermo& thermo,
00044 const compressible::turbulenceModel& turbulence,
00045 const surfaceScalarField& phi,
00046 const volScalarField& rho
00047 )
00048 :
00049 combustionModelCoeffs_
00050 (
00051 combustionProperties.subDict
00052 (
00053 word(combustionProperties.lookup("combustionModel")) + "Coeffs"
00054 )
00055 ),
00056 thermo_(thermo),
00057 turbulence_(turbulence),
00058 mesh_(phi.mesh()),
00059 phi_(phi),
00060 rho_(rho),
00061 stoicRatio_(thermo.lookup("stoichiometricAirFuelMassRatio")),
00062 s_(thermo.lookup("stoichiometricOxygenFuelMassRatio")),
00063 qFuel_(thermo_.lookup("qFuel")),
00064 composition_(thermo.composition())
00065 {}
00066
00067
00068
00069
00070 Foam::combustionModel::~combustionModel()
00071 {}
00072
00073
00074
00075
00076 Foam::tmp<Foam::fvScalarMatrix>
00077 Foam::combustionModel::combustionModel::R(volScalarField& fu) const
00078 {
00079 const basicMultiComponentMixture& composition = thermo_.composition();
00080 const volScalarField& ft = composition.Y("ft");
00081 volScalarField fres = composition.fres(ft, stoicRatio_.value());
00082 volScalarField wFuelNorm = this->wFuelNorm()*pos(fu - fres);
00083
00084 return wFuelNorm*fres - fvm::Sp(wFuelNorm, fu);
00085 }
00086
00087
00088 Foam::tmp<Foam::volScalarField> Foam::combustionModel::combustionModel::dQ
00089 (
00090 const fvScalarMatrix& Rfu
00091 ) const
00092 {
00093 const basicMultiComponentMixture& composition = thermo_.composition();
00094 const volScalarField& fu = composition.Y("fu");
00095
00096 return (-qFuel_)*(Rfu & fu);
00097 }
00098
00099
00100 bool Foam::combustionModel::read(const dictionary& combustionProperties)
00101 {
00102 combustionModelCoeffs_ = combustionProperties.subDict(type() + "Coeffs");
00103
00104 return true;
00105 }
00106
00107
00108