basicSolidChemistryModel.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) 2013-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::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 package
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("basicSolidChemistryModel");
83 
84 
85  //- Declare run-time constructor selection tables
87  (
88  autoPtr,
90  fvMesh,
91  (const fvMesh& mesh, const word& phaseName),
92  (mesh, phaseName)
93  );
94 
95 
96  // Constructors
97 
98  //- Construct from mesh
99  basicSolidChemistryModel(const fvMesh& mesh, const word& phaseName);
100 
101 
102  //- Selector
104  (
105  const fvMesh& mesh,
106  const word& phaseName=word::null
107  );
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<DimensionedField<scalar, volMesh>> RRg() const = 0;
124 
125  //- Return total solids mass source term [kg/m3/s]
126  virtual tmp<DimensionedField<scalar, volMesh>> RRs() const = 0;
127 
128  //- Return chemical source terms for solids [kg/m3/s]
130  (
131  const label i
132  ) const = 0;
133 
134  //- Return chemical source terms for gases [kg/m3/s]
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
166  (
167  const label i
168  ) const;
169 
170  //- Return non-const access to the total source terms
171  virtual DimensionedField<scalar, volMesh>& 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.
virtual const DimensionedField< scalar, volMesh > & RR(const label i) const
Return const access to the total source terms.
static autoPtr< basicSolidChemistryModel > New(const fvMesh &mesh, const word &phaseName=word::null)
Selector.
Chemistry model for solid thermodynamics.
TypeName("basicSolidChemistryModel")
Runtime type information.
virtual void calculate()=0
Calculates the reaction rates.
virtual void setCellReacting(const label celli, const bool active)=0
Set reacting status of cell, celli.
virtual tmp< DimensionedField< scalar, volMesh > > RRs() const =0
Return total solids mass source term [kg/m3/s].
A class for handling words, derived from string.
Definition: word.H:59
const fvMesh & mesh() const
Return const access to the mesh database.
static const word null
An empty word.
Definition: word.H:77
virtual tmp< DimensionedField< scalar, volMesh > > calculateRR(const label reactionI, const label speciei) const
Returns the reaction rate of the speciei in reactionI.
virtual tmp< DimensionedField< scalar, volMesh > > RRg() const =0
Return total gases mass source term [kg/m3/s].
solidReactionThermo & solidThermo()
Return access to the solid thermo package.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
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.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Macros to ease declaration of run-time selection tables.
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:54
autoPtr< solidReactionThermo > solidThermo_
Solid thermo package.
Namespace for OpenFOAM.
Base class for chemistry models.
declareRunTimeSelectionTable(autoPtr, basicSolidChemistryModel, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
Declare run-time constructor selection tables.