1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 Base class for all non-premixed combustion models.
33 \*---------------------------------------------------------------------------*/
35 #ifndef combustionModel_H
36 #define combustionModel_H
38 #include "IOdictionary.H"
39 #include "hsCombustionThermo.H"
40 #include "turbulenceModel.H"
41 #include "multivariateSurfaceInterpolationScheme.H"
42 #include "runTimeSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class combustionModel Declaration
51 \*---------------------------------------------------------------------------*/
60 //- Dictionary of coefficients for the particular model
61 dictionary combustionModelCoeffs_;
63 //- Reference to the thermodynamic
64 const hsCombustionThermo& thermo_;
66 //- Reference to the turbulence model
67 const compressible::turbulenceModel& turbulence_;
69 //- Reference to the mesh database
72 //- Reference to mass-flux field
73 const surfaceScalarField& phi_;
75 //- Reference to the density field
76 const volScalarField& rho_;
78 //- Stoichiometric air-fuel mass ratio
79 dimensionedScalar stoicRatio_;
81 //- Stoichiometric oxygen-fuel mass ratio
84 //- Heat of combustion (J/Kg)
85 dimensionedScalar qFuel_;
90 // Private Member Functions
92 //- Disallow copy construct
93 combustionModel(const combustionModel&);
95 //- Disallow default bitwise assignment
96 void operator=(const combustionModel&);
98 const basicMultiComponentMixture& composition_;
103 //- Runtime type information
104 TypeName("combustionModel");
107 // Declare run-time constructor selection table
109 declareRunTimeSelectionTable
115 const dictionary& combustionProperties,
116 const hsCombustionThermo& thermo,
117 const compressible::turbulenceModel& turbulence,
118 const surfaceScalarField& phi,
119 const volScalarField& rho
122 combustionProperties,
133 //- Return a reference to the selected combustion model
134 static autoPtr<combustionModel> New
136 const dictionary& combustionProperties,
137 const hsCombustionThermo& thermo,
138 const compressible::turbulenceModel& turbulence,
139 const surfaceScalarField& phi,
140 const volScalarField& rho
146 //- Construct from components
149 const dictionary& combustionProperties,
150 const hsCombustionThermo& thermo,
151 const compressible::turbulenceModel& turbulence,
152 const surfaceScalarField& phi,
153 const volScalarField& rho
158 virtual ~combustionModel();
165 //- Access composition
166 const basicMultiComponentMixture& composition() const
171 //- Access combustion dictionary
172 const dictionary combustionModelCoeffs() const
174 return combustionModelCoeffs_;
177 //- Access heat of combustion
178 const dimensionedScalar qFuel() const
183 //- Return normalised consumption rate of (fu - fres)
184 virtual tmp<volScalarField> wFuelNorm() const = 0;
186 //- Fuel consumption rate matrix i.e. source-term for the fuel equation
187 virtual tmp<fvScalarMatrix> R(volScalarField& fu) const;
189 //- Heat-release rate calculated from the given
190 // fuel consumption rate matrix
191 virtual tmp<volScalarField> dQ(const fvScalarMatrix& Rfu) const;
193 //- Correct combustion rate
194 virtual void correct() = 0;
196 //- Update properties from given dictionary
197 virtual bool read(const dictionary& combustionProperties) = 0;
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 } // End namespace Foam
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 // ************************************************************************* //