XiEqModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::XiEqModel
26 
27 Description
28  Base-class for all XiEq models used by the b-XiEq combustion model.
29  The available models are :
30  \link basicXiSubXiEq.H \endlink
31  \link Gulder.H \endlink
32  \link instabilityXiEq.H \endlink
33  \link SCOPEBlendXiEq.H \endlink
34  \link SCOPEXiEq.H \endlink
35 
36 SourceFiles
37  XiEqModel.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef XiEqModel_H
42 #define XiEqModel_H
43 
44 #include "IOdictionary.H"
45 #include "psiuReactionThermo.H"
47 #include "runTimeSelectionTables.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class XiEqModel Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class XiEqModel
59 {
60 
61 protected:
62 
63  // Protected data
64 
65  //- Dictionary
67 
68  //- Thermo
70 
71  //- Turbulence
73 
74  //- Laminar burning velocity
75  const volScalarField& Su_;
76 
77 
78 private:
79 
80  // Private Member Functions
81 
82  //- Disallow copy construct
83  XiEqModel(const XiEqModel&);
84 
85  //- Disallow default bitwise assignment
86  void operator=(const XiEqModel&);
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("XiEqModel");
93 
94 
95  // Declare run-time constructor selection table
96 
98  (
99  autoPtr,
100  XiEqModel,
101  dictionary,
102  (
103  const dictionary& XiEqProperties,
104  const psiuReactionThermo& thermo,
106  const volScalarField& Su
107  ),
108  (
109  XiEqProperties,
110  thermo,
111  turbulence,
112  Su
113  )
114  );
115 
116 
117  // Selectors
118 
119  //- Return a reference to the selected XiEq model
120  static autoPtr<XiEqModel> New
121  (
122  const dictionary& XiEqProperties,
123  const psiuReactionThermo& thermo,
124  const compressible::RASModel& turbulence,
125  const volScalarField& Su
126  );
127 
128 
129  // Constructors
130 
131  //- Construct from components
132  XiEqModel
133  (
134  const dictionary& XiEqProperties,
135  const psiuReactionThermo& thermo,
136  const compressible::RASModel& turbulence,
137  const volScalarField& Su
138  );
139 
140 
141  //- Destructor
142  virtual ~XiEqModel();
143 
144 
145  // Member Functions
146 
147  //- Return the flame-wrinking XiEq
148  virtual tmp<volScalarField> XiEq() const
149  {
150  return turbulence_.muEff();
151  }
152 
153  //- Return the sub-grid Schelkin effect
154  tmp<volScalarField> calculateSchelkinEffect(const scalar) const;
155 
156  //- Update properties from given dictionary
157  virtual bool read(const dictionary& XiEqProperties) = 0;
158 
159  //- Write fields
160  void writeFields() const;
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
Foam::psiuReactionThermo.
void writeFields() const
Write fields.
dictionary XiEqModelCoeffs_
Dictionary.
Definition: XiEqModel.H:65
static autoPtr< XiEqModel > New(const dictionary &XiEqProperties, const psiuReactionThermo &thermo, const compressible::RASModel &turbulence, const volScalarField &Su)
Return a reference to the selected XiEq model.
Macros to ease declaration of run-time selection tables.
const compressible::RASModel & turbulence_
Turbulence.
Definition: XiEqModel.H:71
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
const volScalarField & Su_
Laminar burning velocity.
Definition: XiEqModel.H:74
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
Namespace for OpenFOAM.
tmp< GeometricField< Type, fvPatchField, volMesh > > Su(const GeometricField< Type, fvPatchField, volMesh > &su, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:44
virtual ~XiEqModel()
Destructor.
TypeName("XiEqModel")
Runtime type information.
virtual tmp< volScalarField > XiEq() const
Return the flame-wrinking XiEq.
Definition: XiEqModel.H:147
const psiuReactionThermo & thermo_
Thermo.
Definition: XiEqModel.H:68
declareRunTimeSelectionTable(autoPtr, XiEqModel, dictionary,( const dictionary &XiEqProperties, const psiuReactionThermo &thermo, const compressible::RASModel &turbulence, const volScalarField &Su ),( XiEqProperties, thermo, turbulence, Su ))
virtual bool read(const dictionary &XiEqProperties)=0
Update properties from given dictionary.
tmp< volScalarField > calculateSchelkinEffect(const scalar) const
Return the sub-grid Schelkin effect.
Base-class for all XiEq models used by the b-XiEq combustion model. The available models are : basicX...
Definition: XiEqModel.H:57
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
A class for managing temporary objects.
Definition: PtrList.H:118