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-2023 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 class zoneCombustion
55 :
56  public combustionModel
57 {
58  // Private Data
59 
60  //- The combustion model to be zone-filtered
61  autoPtr<combustionModel> combustionModelPtr_;
62 
63  //- List of zone names in which the reactions are active
64  wordList zoneNames_;
65 
66 
67  // Private Member Functions
68 
69  //- Filter the reaction-rate matrix on the cellZones
70  tmp<fvScalarMatrix> filter(const tmp<fvScalarMatrix>& tR) const;
71 
72  //- Filter the given field on the cellZones
73  template<class GeoField>
74  inline tmp<GeoField> filter(const tmp<GeoField>& 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,
91  const word& combustionProperties
92  );
93 
94  //- Disallow default bitwise copy construction
95  zoneCombustion(const zoneCombustion&) = delete;
96 
97 
98  //- Destructor
99  virtual ~zoneCombustion();
100 
101 
102  // Member Functions
103 
104  //- Correct combustion rate
105  virtual void correct();
106 
107  //- Specie consumption rate field
108  virtual tmp<volScalarField::Internal> R(const label speciei) const;
109 
110  //- Specie consumption rate matrix
111  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
112 
113  //- Heat release rate [kg/m/s^3]
114  virtual tmp<volScalarField> Qdot() const;
115 
116  //- Update properties from given dictionary
117  virtual bool read();
118 
119 
120  // Member Operators
121 
122  //- Disallow default bitwise assignment
123  void operator=(const zoneCombustion&) = delete;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace combustionModels
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base class for combustion models.
const fluidMulticomponentThermo & thermo() const
Return const access to the thermo.
Zone-filtered combustion model.
void operator=(const zoneCombustion &)=delete
Disallow default bitwise assignment.
virtual void correct()
Correct combustion rate.
TypeName("zoneCombustion")
Runtime type information.
zoneCombustion(const word &modelType, const fluidMulticomponentThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties)
Construct from components.
virtual tmp< volScalarField::Internal > R(const label speciei) const
Specie consumption rate field.
virtual tmp< volScalarField > Qdot() const
Heat release rate [kg/m/s^3].
virtual bool read()
Update properties from given dictionary.
Base class for single-phase compressible turbulence models.
Base-class for multi-component fluid thermodynamic properties.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
PtrList< volScalarField > & Y