1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
10 OpenFOAM is free software: you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License
21 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 \*---------------------------------------------------------------------------*/
25 #include "combustionModel.H"
26 #include "surfaceFields.H"
27 #include "fvScalarMatrix.H"
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 defineTypeNameAndDebug(combustionModel, 0);
34 defineRunTimeSelectionTable(combustionModel, dictionary);
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 Foam::combustionModel::combustionModel
42 const dictionary& combustionProps,
43 hsCombustionThermo& thermo,
44 const compressible::turbulenceModel& turbulence,
45 const surfaceScalarField& phi,
46 const volScalarField& rho
49 coeffs_(dictionary::null),
51 turbulence_(turbulence),
58 Foam::combustionModel::combustionModel
60 const word& modelType,
61 const dictionary& combustionProps,
62 hsCombustionThermo& thermo,
63 const compressible::turbulenceModel& turbulence,
64 const surfaceScalarField& phi,
65 const volScalarField& rho
68 coeffs_(combustionProps.subDict(modelType + "Coeffs")),
70 turbulence_(turbulence),
77 // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
79 Foam::combustionModel::~combustionModel()
83 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
85 void Foam::combustionModel::correct()
91 Foam::tmp<Foam::fvScalarMatrix> Foam::combustionModel::R
96 return tmp<fvScalarMatrix>
98 new fvScalarMatrix(Y, dimMass/dimTime*Y.dimensions())
103 Foam::tmp<Foam::volScalarField> Foam::combustionModel::dQ() const
105 return tmp<Foam::volScalarField>
112 mesh_.time().timeName(),
118 dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
124 Foam::tmp<Foam::volScalarField> Foam::combustionModel::wFuelNorm() const
126 return tmp<Foam::volScalarField>
133 mesh_.time().timeName(),
139 dimensionedScalar("zero", dimMass/dimTime/pow3(dimLength), 0.0)
145 bool Foam::combustionModel::read(const dictionary& combustionProps)
147 coeffs_ = combustionProps.subDict(type() + "Coeffs");
153 // ************************************************************************* //