1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::solidChemistryModel
28 Chemistry model for solid thermodynamics
31 solidChemistryModelI.H
33 newChemistrySolidModel.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef solidChemistryModel_H
38 #define solidChemistryModel_H
40 #include "basicChemistryModel.H"
42 #include "runTimeSelectionTables.H"
43 #include "basicSolidThermo.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 // Forward declaration of classes
54 /*---------------------------------------------------------------------------*\
55 class solidChemistryModel Declaration
56 \*---------------------------------------------------------------------------*/
58 class solidChemistryModel
60 public basicChemistryModel
62 // Private Member Functions
64 //- Construct as copy (not implemented)
65 solidChemistryModel(const solidChemistryModel&);
67 //- Disallow default bitwise assignment
68 void operator=(const solidChemistryModel&);
75 //- Solid thermo package
76 autoPtr<basicSolidThermo> solidThermo_;
81 //- Runtime type information
82 TypeName("solidChemistryModel");
85 //- Declare run-time constructor selection tables
86 declareRunTimeSelectionTable
93 const word& compTypeName,
94 const word& solidThermoTypeName
96 (mesh, compTypeName, solidThermoTypeName)
102 //- Construct from mesh and thermo type name
106 const word& solidThermoTypeName
111 static autoPtr<solidChemistryModel> New(const fvMesh& mesh);
115 virtual ~solidChemistryModel();
120 //- Return access to the solid thermo package
121 inline basicSolidThermo& solidThermo();
123 //- Return const access to the solid thermo package
124 inline const basicSolidThermo& solidThermo() const;
126 //- Return total gases mass source term [kg/m3/s]
127 virtual tmp<volScalarField> RRg() const = 0;
129 //- Return total solids mass source term [kg/m3/s]
130 virtual tmp<volScalarField> RRs() const = 0;
132 //- Return chemical source terms for solids [kg/m3/s]
133 virtual tmp<volScalarField> RRs(const label i) const = 0;
135 //- Return chemical source terms for gases [kg/m3/s]
136 virtual tmp<volScalarField> RRg(const label i) const = 0;
138 //- Return sensible enthalpy for gas i [J/Kg]
139 virtual tmp<volScalarField> gasHs
141 const volScalarField& T,
145 //- Return specie Table for gases
146 virtual const speciesTable& gasTable() const = 0;
148 //- Set reacting status of cell, cellI
149 virtual void setCellReacting(const label cellI, const bool active) = 0;
151 //- Calculates the reaction rates
152 virtual void calculate() = 0;
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 } // End namespace Foam
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 #include "solidChemistryModelI.H"
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 // ************************************************************************* //