basicSolidChemistryModel.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) 2013-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::basicSolidChemistryModel
26 
27 Description
28  Chemistry model for solid thermodynamics
29 
30 SourceFiles
31  basicSolidChemistryModelI.H
32  basicSolidChemistryModel.C
33  newChemistrySolidModel.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef basicSolidChemistryModel_H
38 #define basicSolidChemistryModel_H
39 
40 #include "basicChemistryModel.H"
41 #include "autoPtr.H"
42 #include "runTimeSelectionTables.H"
43 #include "solidReactionThermo.H"
44 
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward declaration of classes
52 class fvMesh;
53 
54 /*---------------------------------------------------------------------------*\
55  class basicSolidChemistryModel Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public basicChemistryModel
61 {
62  // Private Member Functions
63 
64  //- Construct as copy (not implemented)
66 
67  //- Disallow default bitwise assignment
68  void operator=(const basicSolidChemistryModel&);
69 
70 
71 protected:
72 
73  // Protected data
74 
75  //- Solid thermo
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("basicSolidChemistryModel");
83 
84 
85  //- Thermo type
87 
88 
89  //- Declare run-time constructor selection tables
91  (
92  autoPtr,
94  thermo,
96  (thermo)
97  );
98 
99 
100  // Constructors
101 
102  //- Construct from thermo
104 
105 
106  //- Selector
108 
109 
110  //- Destructor
111  virtual ~basicSolidChemistryModel();
112 
113 
114  // Member Functions
115 
116  //- Return access to the solid thermo package
118 
119  //- Return const access to the solid thermo package
120  inline const solidReactionThermo& solidThermo() const;
121 
122  //- Return total gases mass source term [kg/m3/s]
123  virtual tmp<volScalarField::Internal> RRg() const = 0;
124 
125  //- Return total solids mass source term [kg/m3/s]
126  virtual tmp<volScalarField::Internal> RRs() const = 0;
127 
128  //- Return chemical source terms for solids [kg/m3/s]
129  virtual const volScalarField::Internal& RRs
130  (
131  const label i
132  ) const = 0;
133 
134  //- Return chemical source terms for gases [kg/m3/s]
135  virtual const volScalarField::Internal& RRg
136  (
137  const label i
138  ) const = 0;
139 
140  //- Returns the reaction rate of the speciei in reactionI
142  (
143  const label reactionI,
144  const label speciei
145  ) const;
146 
147  //- Return sensible enthalpy for gas i [J/Kg]
148  virtual tmp<volScalarField> gasHs
149  (
150  const volScalarField& p,
151  const volScalarField& T,
152  const label i
153  ) const = 0;
154 
155  //- Return specie Table for gases
156  virtual const speciesTable& gasTable() const = 0;
157 
158  //- Set reacting status of cell, celli
159  virtual void setCellReacting(const label celli, const bool active) = 0;
160 
161  //- Calculates the reaction rates
162  virtual void calculate() = 0;
163 
164  //- Return const access to the total source terms
165  virtual const volScalarField::Internal& RR
166  (
167  const label i
168  ) const;
169 
170  //- Return non-const access to the total source terms
171  virtual volScalarField::Internal& RR(const label i);
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #endif
186 
187 // ************************************************************************* //
virtual const speciesTable & gasTable() const =0
Return specie Table for gases.
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
virtual ~basicSolidChemistryModel()
Destructor.
Foam::solidReactionThermo.
rhoReactionThermo & thermo
Definition: createFields.H:28
Chemistry model for solid thermodynamics.
TypeName("basicSolidChemistryModel")
Runtime type information.
virtual void calculate()=0
Calculates the reaction rates.
static autoPtr< basicSolidChemistryModel > New(solidReactionThermo &thermo)
Selector.
virtual void setCellReacting(const label celli, const bool active)=0
Set reacting status of cell, celli.
virtual tmp< volScalarField::Internal > RRs() const =0
Return total solids mass source term [kg/m3/s].
declareRunTimeSelectionTable(autoPtr, basicSolidChemistryModel, thermo,(solidReactionThermo &thermo),(thermo))
Declare run-time constructor selection tables.
solidReactionThermo & solidThermo()
Return access to the solid thermo package.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual const volScalarField::Internal & RR(const label i) const
Return const access to the total source terms.
virtual tmp< volScalarField > gasHs(const volScalarField &p, const volScalarField &T, const label i) const =0
Return sensible enthalpy for gas i [J/Kg].
A wordList with hashed indices for faster lookup by name.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
solidReactionThermo reactionThermo
Thermo type.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
virtual tmp< volScalarField::Internal > calculateRR(const label reactionI, const label speciei) const
Returns the reaction rate of the speciei in reactionI.
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< volScalarField::Internal > RRg() const =0
Return total gases mass source term [kg/m3/s].
solidReactionThermo & solidThermo_
Solid thermo.
Namespace for OpenFOAM.
Base class for chemistry models.