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-2019 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 protected:
63 
64  // Protected data
65 
66  //- Solid thermo
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("basicSolidChemistryModel");
74 
75 
76  //- Thermo type
78 
79 
80  //- Declare run-time constructor selection tables
82  (
83  autoPtr,
85  thermo,
87  (thermo)
88  );
89 
90 
91  // Constructors
92 
93  //- Construct from thermo
95 
96  //- Construct as copy (not implemented)
98 
99 
100  //- Selector
102 
103 
104  //- Destructor
105  virtual ~basicSolidChemistryModel();
106 
107 
108  // Member Functions
109 
110  //- Return access to the solid thermo package
112 
113  //- Return const access to the solid thermo package
114  inline const solidReactionThermo& solidThermo() const;
115 
116  //- Return total gases mass source term [kg/m^3/s]
117  virtual tmp<volScalarField::Internal> RRg() const = 0;
118 
119  //- Return total solids mass source term [kg/m^3/s]
120  virtual tmp<volScalarField::Internal> RRs() const = 0;
121 
122  //- Return chemical source terms for solids [kg/m^3/s]
123  virtual const volScalarField::Internal& RRs
124  (
125  const label i
126  ) const = 0;
127 
128  //- Return chemical source terms for gases [kg/m^3/s]
129  virtual const volScalarField::Internal& RRg
130  (
131  const label i
132  ) const = 0;
133 
134  //- Returns the reaction rate of the speciei in reactionI
136  (
137  const label reactionI,
138  const label speciei
139  ) const;
140 
141  //- Return sensible enthalpy for gas i [J/Kg]
142  virtual tmp<volScalarField> gasHs
143  (
144  const volScalarField& p,
145  const volScalarField& T,
146  const label i
147  ) const = 0;
148 
149  //- Return specie Table for gases
150  virtual const speciesTable& gasTable() const = 0;
151 
152  //- Set reacting status of cell, celli
153  virtual void setCellReacting(const label celli, const bool active) = 0;
154 
155  //- Calculates the reaction rates
156  virtual void calculate() = 0;
157 
158  //- Return const access to the total source terms
159  virtual const volScalarField::Internal& RR
160  (
161  const label i
162  ) const;
163 
164  //- Return non-const access to the total source terms
165  virtual volScalarField::Internal& RR(const label i);
166 
167 
168  // Member Operators
169 
170  //- Disallow default bitwise assignment
171  void operator=(const basicSolidChemistryModel&) = delete;
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
void operator=(const basicSolidChemistryModel &)=delete
Disallow default bitwise assignment.
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/m^3/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.
basicSolidChemistryModel(solidReactionThermo &thermo)
Construct from thermo.
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/m^3/s].
solidReactionThermo & solidThermo_
Solid thermo.
Namespace for OpenFOAM.
Base class for chemistry models.