zoneCombustion.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) 2016-2017 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::combustionModels::zoneCombustion
28 
29 Description
30  Zone-filtered combustion model.
31 
32  Enable the reactions within the specified list of cell-zones and set
33  to zero elsewhere.
34 
35 SourceFiles
36  zoneCombustion.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef zoneCombustion_H
41 #define zoneCombustion_H
42 
43 #include "CombustionModel.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace combustionModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class zoneCombustion Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class ReactionThermo>
57 class zoneCombustion
58 :
59  public CombustionModel<ReactionThermo>
60 {
61  // Private data
62 
63  //- The combustion model to be zone-filtered
64  autoPtr<CombustionModel<ReactionThermo>> combustionModelPtr_;
65 
66  //- List of zone names in which the reactions are active
67  wordList zoneNames_;
68 
69 
70  // Private Member Functions
71 
72  //- Filter the reaction-rate matrix on the cellZones
73  tmp<fvScalarMatrix> filter(const tmp<fvScalarMatrix>& tR) const;
74 
75  //- Filter the given field on the cellZones
76  tmp<volScalarField> filter(const tmp<volScalarField>& tS) const;
77 
78  //- No copy construct
79  zoneCombustion(const zoneCombustion&) = delete;
80 
81  //- No copy assignment
82  void operator=(const zoneCombustion&) = delete;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("zoneCombustion");
89 
90 
91  // Constructors
92 
93  //- Construct from components
95  (
96  const word& modelType,
97  ReactionThermo& thermo,
99  const word& combustionProperties
100  );
101 
102 
103  //- Destructor
104  virtual ~zoneCombustion();
105 
106 
107  // Member Functions
108 
109  //- Return access to the thermo package
110  virtual ReactionThermo& thermo();
111 
112  //- Return const access to the thermo package
113  virtual const ReactionThermo& thermo() const;
114 
115  //- Correct combustion rate
116  virtual void correct();
117 
118  //- Fuel consumption rate matrix.
119  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
120 
121  //- Heat release rate [kg/m/s3]
122  virtual tmp<volScalarField> Qdot() const;
123 
124  //- Update properties from given dictionary
125  virtual bool read();
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace combustionModels
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #ifdef NoRepository
137  #include "zoneCombustion.C"
138 #endif
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
Foam::CombustionModel
Combustion models for templated thermodynamics.
Definition: CombustionModel.H:55
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::combustionModels::zoneCombustion::read
virtual bool read()
Update properties from given dictionary.
Definition: zoneCombustion.C:188
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::combustionModels::zoneCombustion::correct
virtual void correct()
Correct combustion rate.
Definition: zoneCombustion.C:162
zoneCombustion.C
Foam::combustionModels::zoneCombustion::Qdot
virtual tmp< volScalarField > Qdot() const
Heat release rate [kg/m/s3].
Definition: zoneCombustion.C:181
Foam::combustionModels::zoneCombustion::R
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
Definition: zoneCombustion.C:171
CombustionModel.H
Foam::combustionModels::zoneCombustion
Zone-filtered combustion model.
Definition: zoneCombustion.H:56
Foam::combustionModels::zoneCombustion::~zoneCombustion
virtual ~zoneCombustion()
Destructor.
Definition: zoneCombustion.C:140
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Y
PtrList< volScalarField > & Y
Definition: createFieldRefs.H:7
Foam::combustionModels::zoneCombustion::thermo
virtual ReactionThermo & thermo()
Return access to the thermo package.
Definition: zoneCombustion.C:147
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::List< word >
Foam::combustionModels::zoneCombustion::TypeName
TypeName("zoneCombustion")
Runtime type information.
Foam::GeometricField< scalar, fvPatchField, volMesh >
turb
compressible::turbulenceModel & turb
Definition: setRegionFluidFields.H:10
Foam::compressibleTurbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: compressibleTurbulenceModel.H:54