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 | Copyright (C) 2016 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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace combustionModels
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class zoneCombustion Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class Type>
53 class zoneCombustion
54 :
55  public Type
56 {
57  // Private data
58 
59  //- The combustion model to be zone-filtered
60  autoPtr<Type> combustionModelPtr_;
61 
62  //- List of zone names in which the reactions are active
63  wordList zoneNames_;
64 
65 
66  // Private Member Functions
67 
68  //- Filter the reaction-rate matrix on the cellZones
69  tmp<fvScalarMatrix> filter(const tmp<fvScalarMatrix>& tR) const;
70 
71  //- Filter the given field on the cellZones
72  tmp<volScalarField> filter(const tmp<volScalarField>& tS) const;
73 
74  //- Disallow copy construct
76 
77  //- Disallow default bitwise assignment
78  void operator=(const zoneCombustion&);
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("zoneCombustion");
85 
86 
87  // Constructors
88 
89  //- Construct from components
91  (
92  const word& modelType,
93  const fvMesh& mesh,
94  const word& combustionProperties,
95  const word& phaseName
96  );
97 
98 
99  //- Destructor
100  virtual ~zoneCombustion();
101 
102 
103  // Member Functions
104 
105  //- Return access to the thermo package
106  virtual typename Type::ReactionThermo& thermo();
107 
108  //- Return const access to the thermo package
109  virtual const typename Type::ReactionThermo& thermo() const;
110 
111  //- Correct combustion rate
112  virtual void correct();
113 
114  //- Fuel consumption rate matrix.
115  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
116 
117  //- Heat release rate [kg/m/s3]
118  virtual tmp<volScalarField> Qdot() const;
119 
120  //- Update properties from given dictionary
121  virtual bool read();
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace combustionModels
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #ifdef NoRepository
133  #include "zoneCombustion.C"
134 #endif
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
virtual bool read()
Update properties from given dictionary.
virtual Type::ReactionThermo & thermo()
Return access to the thermo package.
virtual tmp< volScalarField > Qdot() const
Heat release rate [kg/m/s3].
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
TypeName("zoneCombustion")
Runtime type information.
Zone-filtered combustion model.
PtrList< volScalarField > & Y
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
A class for managing temporary objects.
Definition: PtrList.H:53
virtual void correct()
Correct combustion rate.
Namespace for OpenFOAM.