ReactingPhaseModel.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) 2015-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::ReactingPhaseModel
26 
27 Description
28  Class which represents phases with volumetric reactions. Returns the
29  reaction rate and heat.
30 
31 SourceFiles
32  ReactingPhaseModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef ReactingPhaseModel_H
37 #define ReactingPhaseModel_H
38 
39 #include "phaseModel.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class combustionModel;
47 
48 /*---------------------------------------------------------------------------*\
49  Class ReactingPhaseModel Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class BasePhaseModel>
54 :
55  public BasePhaseModel
56 {
57 protected:
58 
59  // Protected data
60 
61  //- Reaction model
63 
64 
65 public:
66 
67  // Constructors
68 
70  (
71  const phaseSystem& fluid,
72  const word& phaseName,
73  const bool referencePhase,
74  const label index
75  );
76 
77 
78  //- Destructor
79  virtual ~ReactingPhaseModel();
80 
81 
82  // Member Functions
83 
84  //- Correct the reaction rates
85  virtual void correctReactions();
86 
87  //- Return the fuel consumption rate matrix
88  virtual tmp<fvScalarMatrix> R(volScalarField& Yi) const;
89 
90  //- Return heat release rate
91  virtual tmp<volScalarField> Qdot() const;
92 };
93 
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 } // End namespace Foam
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 #ifdef NoRepository
102  #include "ReactingPhaseModel.C"
103 #endif
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #endif
108 
109 // ************************************************************************* //
Generic GeometricField class.
Class which represents phases with volumetric reactions. Returns the reaction rate and heat.
virtual void correctReactions()
Correct the reaction rates.
ReactingPhaseModel(const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
virtual ~ReactingPhaseModel()
Destructor.
autoPtr< combustionModel > reaction_
Reaction model.
virtual tmp< volScalarField > Qdot() const
Return heat release rate.
virtual tmp< fvScalarMatrix > R(volScalarField &Yi) const
Return the fuel consumption rate matrix.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:73
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