1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Base class for all combustion models.
34 \*---------------------------------------------------------------------------*/
36 #ifndef combustionModel_H
37 #define combustionModel_H
39 #include "IOdictionary.H"
40 #include "hsCombustionThermo.H"
41 #include "turbulenceModel.H"
42 #include "multivariateSurfaceInterpolationScheme.H"
43 #include "runTimeSelectionTables.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class combustionModel Declaration
52 \*---------------------------------------------------------------------------*/
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 //- Air-fuel stoichiometric ratio
79 dimensionedScalar stoicRatio_;
81 //- Oxygen-fuel stoichiometric 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();
163 //- Correct combustion rate
164 virtual void correct() = 0;
166 //- Return normalised consumption rate of (fu - fres)
167 virtual tmp<volScalarField> wFuelNorm() const = 0;
169 //- Sensible enthalpy source term from the rate of fuel consumption
170 virtual tmp<volScalarField> Sh(const volScalarField& Rfu) const;
172 //- Update properties from given dictionary
173 virtual bool read(const dictionary& combustionProperties) = 0;
177 //- Access composition
178 const basicMultiComponentMixture& composition() const
183 //- Access combustion dictionary
184 const dictionary combustionModelCoeffs() const
186 return combustionModelCoeffs_;
189 //- Access heat of combustion
190 const dimensionedScalar qFuel() const
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace Foam
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 // ************************************************************************* //