ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / combustionModels / combustionModel / combustionModel.H
blob1c35b92e6808a68ac4a24482b1d9cb7d54e4c9d5
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
18     for more details.
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 Class
24     Foam::combustionModel
26 Description
27     Base class for all non-premixed combustion models based on single step
28     chemistry
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 "runTimeSelectionTables.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                      Class combustionModel Declaration
50 \*---------------------------------------------------------------------------*/
52 class combustionModel
55 protected:
57     // Protected data
59         //- Dictionary of coefficients for the particular model
60         dictionary coeffs_;
62         //- Reference to the thermodynamics
63         hsCombustionThermo& thermo_;
65         //- Reference to the turbulence model
66         const compressible::turbulenceModel& turbulence_;
68         //- Reference to the mesh database
69         const fvMesh& mesh_;
71         //- Reference to mass-flux field
72         const surfaceScalarField& phi_;
74         //- Reference to the density field
75         const volScalarField& rho_;
78 private:
80     // Private Member Functions
82         //- Disallow copy construct
83         combustionModel(const combustionModel&);
85         //- Disallow default bitwise assignment
86         void operator=(const combustionModel&);
89 public:
91     //- Runtime type information
92     TypeName("combustionModel");
95     // Declare run-time constructor selection table
97         declareRunTimeSelectionTable
98         (
99             autoPtr,
100             combustionModel,
101             dictionary,
102             (
103                 const dictionary& combustionProperties,
104                 hsCombustionThermo& thermo,
105                 const compressible::turbulenceModel& turbulence,
106                 const surfaceScalarField& phi,
107                 const volScalarField& rho
108             ),
109             (
110                 combustionProperties,
111                 thermo,
112                 turbulence,
113                 phi,
114                 rho
115             )
116         );
119     // Selectors
121         //- Return a reference to the selected combustion model
122         static autoPtr<combustionModel> New
123         (
124             const dictionary& combustionProperties,
125             hsCombustionThermo& thermo,
126             const compressible::turbulenceModel& turbulence,
127             const surfaceScalarField& phi,
128             const volScalarField& rho
129         );
132     // Constructors
134         //- Construct null from components
135         combustionModel
136         (
137             const dictionary& combustionProps,
138             hsCombustionThermo& thermo,
139             const compressible::turbulenceModel& turbulence,
140             const surfaceScalarField& phi,
141             const volScalarField& rho
142         );
144         //- Construct from components
145         combustionModel
146         (
147             const word& modelType,
148             const dictionary& combustionProperties,
149             hsCombustionThermo& thermo,
150             const compressible::turbulenceModel& turbulence,
151             const surfaceScalarField& phi,
152             const volScalarField& rho
153         );
156     //- Destructor
157     virtual ~combustionModel();
160     // Member Functions
162         // Access functions
164             //- Access combustion dictionary
165             const dictionary coeffs() const
166             {
167                 return coeffs_;
168             }
171     // Evolution
173         //- Correct combustion rate
174         virtual void correct();
176         //- Fuel consumption rate matrix, i.e. source term for fuel equation
177         virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
179         //- Heat release rate calculated from fuel consumption rate matrix
180         virtual tmp<volScalarField> dQ() const;
182         //- Return normalised consumption rate of (fu - fres)
183         virtual tmp<Foam::volScalarField> wFuelNorm() const;
186     // I-O
188         //- Update properties from given dictionary
189         virtual bool read(const dictionary& combustionProps);
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 } // End namespace Foam
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 #endif
201 // ************************************************************************* //