twoPhaseEulerFoam: Correction to GidaspowErgunWenYu drag model
[OpenFOAM-1.7.x.git] / applications / solvers / combustion / fireFoam / combustionModels / combustionModel / combustionModel.H
blob354ad0ccaa2c70738c0f4503ef378cfe0f1db391
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2010 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
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
19     for more details.
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/>.
24 Class
25     Foam::combustionModel
27 Description
28     Base class for all non-premixed combustion models.
30 SourceFiles
31     combustionModel.C
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 /*---------------------------------------------------------------------------*\
50                         Class combustionModel Declaration
51 \*---------------------------------------------------------------------------*/
53 class combustionModel
56 protected:
58     // Protected data
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
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         //- Stoichiometric air-fuel mass ratio
79         dimensionedScalar stoicRatio_;
81         //- Stoichiometric oxygen-fuel mass 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         // Access functions
165             //- Access composition
166             const basicMultiComponentMixture& composition() const
167             {
168                 return composition_;
169             }
171             //- Access combustion dictionary
172             const dictionary combustionModelCoeffs() const
173             {
174                 return combustionModelCoeffs_;
175             }
177             //- Access heat of combustion
178             const dimensionedScalar qFuel() const
179             {
180                 return qFuel_;
181             }
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 #endif
209 // ************************************************************************* //