zoneCombustion.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2019 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::combustionModels::zoneCombustion
26 
27 Description
28  Zone-filtered combustion model.
29 
30  Enable the reactions within the specified list of cell-zones and set
31  to zero elsewhere.
32 
33 SourceFiles
34  zoneCombustion.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef zoneCombustion_H
39 #define zoneCombustion_H
40 
41 #include "CombustionModel.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace combustionModels
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class zoneCombustion Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class ReactionThermo>
55 class zoneCombustion
56 :
57  public CombustionModel<ReactionThermo>
58 {
59  // Private Data
60 
61  //- The combustion model to be zone-filtered
62  autoPtr<CombustionModel<ReactionThermo>> combustionModelPtr_;
63 
64  //- List of zone names in which the reactions are active
65  wordList zoneNames_;
66 
67 
68  // Private Member Functions
69 
70  //- Filter the reaction-rate matrix on the cellZones
71  tmp<fvScalarMatrix> filter(const tmp<fvScalarMatrix>& tR) const;
72 
73  //- Filter the given field on the cellZones
74  tmp<volScalarField> filter(const tmp<volScalarField>& tS) const;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("zoneCombustion");
81 
82 
83  // Constructors
84 
85  //- Construct from components
87  (
88  const word& modelType,
89  ReactionThermo& thermo,
90  const compressibleTurbulenceModel& turb,
91  const word& combustionProperties
92  );
93 
94  //- Disallow default bitwise copy construction
96 
97 
98  //- Destructor
99  virtual ~zoneCombustion();
100 
101 
102  // Member Functions
103 
104  //- Return access to the thermo package
105  virtual ReactionThermo& thermo();
106 
107  //- Return const access to the thermo package
108  virtual const ReactionThermo& thermo() const;
109 
110  //- Correct combustion rate
111  virtual void correct();
112 
113  //- Fuel consumption rate matrix.
114  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
115 
116  //- Heat release rate [kg/m/s^3]
117  virtual tmp<volScalarField> Qdot() const;
118 
119  //- Update properties from given dictionary
120  virtual bool read();
121 
122 
123  // Member Operators
124 
125  //- Disallow default bitwise assignment
126  void operator=(const zoneCombustion&) = delete;
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace combustionModels
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #ifdef NoRepository
138  #include "zoneCombustion.C"
139 #endif
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
virtual ReactionThermo & thermo()
Return access to the thermo package.
virtual bool read()
Update properties from given dictionary.
void operator=(const zoneCombustion &)=delete
Disallow default bitwise assignment.
virtual tmp< volScalarField > Qdot() const
Heat release rate [kg/m/s^3].
A class for handling words, derived from string.
Definition: word.H:59
TypeName("zoneCombustion")
Runtime type information.
Zone-filtered combustion model.
Abstract base class for turbulence models (RAS, LES and laminar).
Combustion models for templated thermodynamics.
PtrList< volScalarField > & Y
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
zoneCombustion(const word &modelType, ReactionThermo &thermo, const compressibleTurbulenceModel &turb, const word &combustionProperties)
Construct from components.
virtual void correct()
Correct combustion rate.
Namespace for OpenFOAM.