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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::basicSolidChemistryModel
28 
29 Description
30  Chemistry model for solid thermodynamics
31 
32 SourceFiles
33  basicSolidChemistryModelI.H
34  basicSolidChemistryModel.C
35  basicSolidChemistryModelNew.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef basicSolidChemistryModel_H
40 #define basicSolidChemistryModel_H
41 
42 #include "basicChemistryModel.H"
43 #include "autoPtr.H"
44 #include "runTimeSelectionTables.H"
45 #include "solidReactionThermo.H"
46 
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // Forward Declarations
54 class fvMesh;
55 
56 /*---------------------------------------------------------------------------*\
57  Class basicSolidChemistryModel Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
62  public basicChemistryModel
63 {
64  // Private Member Functions
65 
66  //- Construct as copy (not implemented)
68 
69  //- No copy assignment
70  void operator=(const basicSolidChemistryModel&) = delete;
71 
72 
73 protected:
74 
75  // Protected Data
76 
77  //- Solid thermo
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("basicSolidChemistryModel");
85 
86 
87  //- Thermo type
89 
90 
91  //- Declare run-time constructor selection tables
93  (
94  autoPtr,
96  thermo,
98  (thermo)
99  );
100 
101 
102  // Constructors
103 
104  //- Construct from thermo
106 
107 
108  //- Selector
110 
111 
112  //- Destructor
113  virtual ~basicSolidChemistryModel();
114 
115 
116  // Member Functions
117 
118  //- Return access to the solid thermo package
120 
121  //- Return const access to the solid thermo package
122  inline const solidReactionThermo& solidThermo() const;
123 
124  //- Return total gases mass source term [kg/m3/s]
125  virtual tmp<volScalarField::Internal> RRg() const = 0;
126 
127  //- Return total solids mass source term [kg/m3/s]
128  virtual tmp<volScalarField::Internal> RRs() const = 0;
129 
130  //- Return chemical source terms for solids [kg/m3/s]
131  virtual const volScalarField::Internal& RRs
132  (
133  const label i
134  ) const = 0;
135 
136  //- Return chemical source terms for gases [kg/m3/s]
137  virtual const volScalarField::Internal& RRg
138  (
139  const label i
140  ) const = 0;
141 
142  //- Returns the reaction rate of the speciei in reactionI
144  (
145  const label reactionI,
146  const label speciei
147  ) const;
148 
149  //- Return sensible enthalpy for gas i [J/Kg]
150  virtual tmp<volScalarField> gasHs
151  (
152  const volScalarField& p,
153  const volScalarField& T,
154  const label i
155  ) const = 0;
156 
157  //- Return net solid sensible enthalpy [J/Kg]
158  virtual tmp<DimensionedField<scalar, volMesh>> RRsHs() const = 0;
159 
160  //- Return specie Table for gases
161  virtual const speciesTable& gasTable() const = 0;
162 
163  //- Set reacting status of cell, celli
164  virtual void setCellReacting(const label celli, const bool active) = 0;
165 
166  //- Calculates the reaction rates
167  virtual void calculate() = 0;
168 
169  //- Return const access to the total source terms
170  virtual const volScalarField::Internal& RR
171  (
172  const label i
173  ) const;
174 
175  //- Return non-const access to the total source terms
176  virtual volScalarField::Internal& RR(const label i);
177 };
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 } // End namespace Foam
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
Foam::solidReactionThermo
Foam::solidReactionThermo.
Definition: solidReactionThermo.H:55
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::basicSolidChemistryModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, basicSolidChemistryModel, thermo,(solidReactionThermo &thermo),(thermo))
Declare run-time constructor selection tables.
Foam::basicSolidChemistryModel::setCellReacting
virtual void setCellReacting(const label celli, const bool active)=0
Set reacting status of cell, celli.
Foam::basicSolidChemistryModel::solidThermo
solidReactionThermo & solidThermo()
Return access to the solid thermo package.
Definition: basicSolidChemistryModelI.H:30
Foam::basicSolidChemistryModel::~basicSolidChemistryModel
virtual ~basicSolidChemistryModel()
Destructor.
Definition: basicSolidChemistryModel.C:54
basicSolidChemistryModelI.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::basicSolidChemistryModel::RRg
virtual tmp< volScalarField::Internal > RRg() const =0
Return total gases mass source term [kg/m3/s].
Foam::basicChemistryModel
Base class for chemistry models.
Definition: basicChemistryModel.H:58
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::basicSolidChemistryModel::solidThermo_
solidReactionThermo & solidThermo_
Solid thermo.
Definition: basicSolidChemistryModel.H:77
basicChemistryModel.H
Foam::basicSolidChemistryModel::RR
virtual const volScalarField::Internal & RR(const label i) const
Return const access to the total source terms.
Definition: basicSolidChemistryModel.C:59
Foam::hashedWordList
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
Definition: hashedWordList.H:54
Foam::basicSolidChemistryModel
Chemistry model for solid thermodynamics.
Definition: basicSolidChemistryModel.H:59
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::basicSolidChemistryModel::reactionThermo
solidReactionThermo reactionThermo
Thermo type.
Definition: basicSolidChemistryModel.H:87
Foam::basicSolidChemistryModel::calculateRR
virtual tmp< volScalarField::Internal > calculateRR(const label reactionI, const label speciei) const
Returns the reaction rate of the speciei in reactionI.
Definition: basicSolidChemistryModel.C:83
Foam::basicSolidChemistryModel::RRsHs
virtual tmp< DimensionedField< scalar, volMesh > > RRsHs() const =0
Return net solid sensible enthalpy [J/Kg].
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::basicSolidChemistryModel::New
static autoPtr< basicSolidChemistryModel > New(solidReactionThermo &thermo)
Selector.
Definition: basicSolidChemistryModelNew.C:34
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
solidReactionThermo.H
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::basicSolidChemistryModel::TypeName
TypeName("basicSolidChemistryModel")
Runtime type information.
Foam::basicSolidChemistryModel::calculate
virtual void calculate()=0
Calculates the reaction rates.
Foam::basicSolidChemistryModel::RRs
virtual tmp< volScalarField::Internal > RRs() const =0
Return total solids mass source term [kg/m3/s].
Foam::basicSolidChemistryModel::gasTable
virtual const speciesTable & gasTable() const =0
Return specie Table for gases.
Foam::basicSolidChemistryModel::gasHs
virtual tmp< volScalarField > gasHs(const volScalarField &p, const volScalarField &T, const label i) const =0
Return sensible enthalpy for gas i [J/Kg].
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
autoPtr.H