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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::basicSolidChemistryModel
28
29Description
30 Chemistry model for solid thermodynamics
31
32SourceFiles
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"
45#include "solidReactionThermo.H"
46
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53// Forward Declarations
54class fvMesh;
55
56/*---------------------------------------------------------------------------*\
57 Class basicSolidChemistryModel Declaration
58\*---------------------------------------------------------------------------*/
61:
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
73protected:
74
75 // Protected Data
76
77 //- Solid thermo
79
80
81public:
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
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]
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// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Base class for chemistry models.
Chemistry model for solid thermodynamics.
solidReactionThermo & solidThermo_
Solid thermo.
static autoPtr< basicSolidChemistryModel > New(solidReactionThermo &thermo)
Selector.
virtual tmp< volScalarField::Internal > RRs() const =0
Return total solids mass source term [kg/m3/s].
virtual tmp< volScalarField::Internal > calculateRR(const label reactionI, const label speciei) const
Returns the reaction rate of the speciei in reactionI.
virtual const volScalarField::Internal & RR(const label i) const
Return const access to the total source terms.
virtual void setCellReacting(const label celli, const bool active)=0
Set reacting status of cell, celli.
virtual void calculate()=0
Calculates the reaction rates.
virtual tmp< volScalarField > gasHs(const volScalarField &p, const volScalarField &T, const label i) const =0
Return sensible enthalpy for gas i [J/Kg].
solidReactionThermo reactionThermo
Thermo type.
solidReactionThermo & solidThermo()
Return access to the solid thermo package.
TypeName("basicSolidChemistryModel")
Runtime type information.
virtual const volScalarField::Internal & RRg(const label i) const =0
Return chemical source terms for gases [kg/m3/s].
virtual const volScalarField::Internal & RRs(const label i) const =0
Return chemical source terms for solids [kg/m3/s].
virtual tmp< volScalarField::Internal > RRg() const =0
Return total gases mass source term [kg/m3/s].
virtual ~basicSolidChemistryModel()
Destructor.
virtual tmp< DimensionedField< scalar, volMesh > > RRsHs() const =0
Return net solid sensible enthalpy [J/Kg].
declareRunTimeSelectionTable(autoPtr, basicSolidChemistryModel, thermo,(solidReactionThermo &thermo),(thermo))
Declare run-time constructor selection tables.
virtual const speciesTable & gasTable() const =0
Return specie Table for gases.
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
Foam::solidReactionThermo.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
Definition: tmp.H:65
volScalarField & p
const volScalarField & T
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73