Initial release of the new fireFoam solver and ancillary libraries.
[OpenFOAM-1.6.x.git] / applications / solvers / combustion / fireFoam / combustionModels / combustionModel / combustionModel.H
blobca5b11abb5e2ae5e3ea6714d3bb045a8c25ff5a2
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::combustionModel
28 Description
29     Base class for all combustion models.
31 SourceFiles
32     combustionModel.C
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 /*---------------------------------------------------------------------------*\
51                         Class combustionModel Declaration
52 \*---------------------------------------------------------------------------*/
54 class combustionModel
57 protected:
59     // Protected data
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
70         const fvMesh& mesh_;
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
82         dimensionedScalar s_;
84         //- Heat of combustion (J/Kg)
85         dimensionedScalar qFuel_;
88 private:
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_;
101 public:
103     //- Runtime type information
104     TypeName("combustionModel");
107     // Declare run-time constructor selection table
109         declareRunTimeSelectionTable
110         (
111             autoPtr,
112             combustionModel,
113             dictionary,
114             (
115                 const dictionary& combustionProperties,
116                 const hsCombustionThermo& thermo,
117                 const compressible::turbulenceModel& turbulence,
118                 const surfaceScalarField& phi,
119                 const volScalarField& rho
120             ),
121             (
122                 combustionProperties,
123                 thermo,
124                 turbulence,
125                 phi,
126                 rho
127             )
128         );
131     // Selectors
133         //- Return a reference to the selected combustion model
134         static autoPtr<combustionModel> New
135         (
136             const dictionary& combustionProperties,
137             const hsCombustionThermo& thermo,
138             const compressible::turbulenceModel& turbulence,
139             const surfaceScalarField& phi,
140             const volScalarField& rho
141         );
144     // Constructors
146         //- Construct from components
147         combustionModel
148         (
149             const dictionary& combustionProperties,
150             const hsCombustionThermo& thermo,
151             const compressible::turbulenceModel& turbulence,
152             const surfaceScalarField& phi,
153             const volScalarField& rho
154         );
157     //- Destructor
158     virtual ~combustionModel();
161     // Member Functions
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;
175         // Access functions
177             //- Access composition
178             const basicMultiComponentMixture& composition() const
179             {
180                 return composition_;
181             }
183             //- Access combustion dictionary
184             const dictionary combustionModelCoeffs() const
185             {
186                 return combustionModelCoeffs_;
187             }
189             //- Access heat of combustion
190             const dimensionedScalar qFuel() const
191             {
192                 return qFuel_;
193             }
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace Foam
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 #endif
205 // ************************************************************************* //