XiGModel.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::XiGModel
28 
29 Description
30  Base-class for all Xi generation models used by the b-Xi combustion model.
31  See Technical Report SH/RE/01R for details on the PDR modelling. For details
32  on the use of XiGModel see \link XiModel.H \endlink. The model available is
33  \link instabilityG.H \endlink
34 
35 SourceFiles
36  XiGModel.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef XiGModel_H
41 #define XiGModel_H
42 
43 #include "IOdictionary.H"
44 #include "psiuReactionThermo.H"
46 #include "runTimeSelectionTables.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class XiGModel Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class XiGModel
58 {
59 
60 protected:
61 
62  // Protected data
63 
65 
68  const volScalarField& Su_;
69 
70 
71 private:
72 
73  // Private Member Functions
74 
75  //- No copy construct
76  XiGModel(const XiGModel&) = delete;
77 
78  //- No copy assignment
79  void operator=(const XiGModel&) = delete;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("XiGModel");
86 
87 
88  // Declare run-time constructor selection table
89 
91  (
92  autoPtr,
93  XiGModel,
94  dictionary,
95  (
96  const dictionary& XiGProperties,
99  const volScalarField& Su
100  ),
101  (
102  XiGProperties,
103  thermo,
104  turbulence,
105  Su
106  )
107  );
108 
109 
110  // Selectors
111 
112  //- Return a reference to the selected XiG model
113  static autoPtr<XiGModel> New
114  (
115  const dictionary& XiGProperties,
116  const psiuReactionThermo& thermo,
118  const volScalarField& Su
119  );
120 
121 
122  // Constructors
123 
124  //- Construct from components
125  XiGModel
126  (
127  const dictionary& XiGProperties,
128  const psiuReactionThermo& thermo,
130  const volScalarField& Su
131  );
132 
133 
134  //- Destructor
135  virtual ~XiGModel();
136 
137 
138  // Member Functions
139 
140  //- Return the flame-wrinkling generation rate
141  virtual tmp<volScalarField> G() const = 0;
142 
143  //- Return the flame diffusivity
144  virtual tmp<volScalarField> Db() const
145  {
146  return turbulence_.muEff();
147  }
148 
149  //- Update properties from given dictionary
150  virtual bool read(const dictionary& XiGProperties) = 0;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
psiuReactionThermo.H
Foam::XiGModel::TypeName
TypeName("XiGModel")
Runtime type information.
Foam::XiGModel::Db
virtual tmp< volScalarField > Db() const
Return the flame diffusivity.
Definition: XiGModel.H:143
turbulence
Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\n"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::psiuReactionThermo
Foam::psiuReactionThermo.
Definition: psiuReactionThermo.H:55
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::XiGModel
Base-class for all Xi generation models used by the b-Xi combustion model. See Technical Report SH/RE...
Definition: XiGModel.H:56
Su
zeroField Su
Definition: alphaSuSp.H:1
Foam::XiGModel::~XiGModel
virtual ~XiGModel()
Destructor.
Foam::XiGModel::read
virtual bool read(const dictionary &XiGProperties)=0
Update properties from given dictionary.
Foam::XiGModel::thermo_
const psiuReactionThermo & thermo_
Definition: XiGModel.H:65
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::XiGModel::New
static autoPtr< XiGModel > New(const dictionary &XiGProperties, const psiuReactionThermo &thermo, const compressible::RASModel &turbulence, const volScalarField &Su)
Return a reference to the selected XiG model.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::XiGModel::turbulence_
const compressible::RASModel & turbulence_
Definition: XiGModel.H:66
IOdictionary.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::XiGModel::XiGModelCoeffs_
dictionary XiGModelCoeffs_
Definition: XiGModel.H:63
Foam::compressible::RASModel
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
Definition: turbulentFluidThermoModel.H:66
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::XiGModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, XiGModel, dictionary,(const dictionary &XiGProperties, const psiuReactionThermo &thermo, const compressible::RASModel &turbulence, const volScalarField &Su),(XiGProperties, thermo, turbulence, Su))
Foam::XiGModel::Su_
const volScalarField & Su_
Definition: XiGModel.H:67
Foam::XiGModel::G
virtual tmp< volScalarField > G() const =0
Return the flame-wrinkling generation rate.
Foam::GeometricField< scalar, fvPatchField, volMesh >
turbulentFluidThermoModel.H