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-2018 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  //- Disallow copy construct
78 
79  //- Disallow default bitwise assignment
80  void operator=(const zoneCombustion&);
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("zoneCombustion");
87 
88 
89  // Constructors
90 
91  //- Construct from components
93  (
94  const word& modelType,
95  ReactionThermo& thermo,
96  const compressibleTurbulenceModel& turb,
97  const word& combustionProperties
98  );
99 
100 
101  //- Destructor
102  virtual ~zoneCombustion();
103 
104 
105  // Member Functions
106 
107  //- Return access to the thermo package
108  virtual ReactionThermo& thermo();
109 
110  //- Return const access to the thermo package
111  virtual const ReactionThermo& thermo() const;
112 
113  //- Correct combustion rate
114  virtual void correct();
115 
116  //- Fuel consumption rate matrix.
117  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
118 
119  //- Heat release rate [kg/m/s3]
120  virtual tmp<volScalarField> Qdot() const;
121 
122  //- Update properties from given dictionary
123  virtual bool read();
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace combustionModels
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #ifdef NoRepository
135  #include "zoneCombustion.C"
136 #endif
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
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.
virtual tmp< volScalarField > Qdot() const
Heat release rate [kg/m/s3].
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
virtual void correct()
Correct combustion rate.
Namespace for OpenFOAM.