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/>.
33 \*---------------------------------------------------------------------------*/
35 #ifndef pyrolysisModel_H
36 #define pyrolysisModel_H
38 #include "runTimeSelectionTables.H"
39 #include "volFieldsFwd.H"
40 #include "solidChemistryModel.H"
41 #include "basicSolidThermo.H"
42 #include "regionModel1D.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 // Forward declaration of classes
53 namespace regionModels
55 namespace pyrolysisModels
58 /*---------------------------------------------------------------------------*\
59 Class pyrolysisModel Declaration
60 \*---------------------------------------------------------------------------*/
68 // Private Member Functions
71 void constructMeshObjects();
73 //- Read pyrolysis controls
74 void readPyrolysisControls();
76 //- Disallow default bitwise copy construct
77 pyrolysisModel(const pyrolysisModel&);
79 //- Disallow default bitwise assignment
80 void operator=(const pyrolysisModel&);
87 //- Flag to indicate whether pyrolysis region coupled to a film region
90 //- Pointer to film thickness field
91 autoPtr<volScalarField> filmDeltaPtr_;
93 //- Film height below which reactions can occur [m]
94 scalar reactionDeltaMin_;
97 // Protected Member Functions
99 //- Read control parameters
102 //- Read control parameters from dictionary
103 virtual bool read(const dictionary& dict);
108 //- Runtime type information
109 TypeName("pyrolysisModel");
112 // Declare runtime constructor selection table
114 declareRunTimeSelectionTable
120 const word& modelType,
126 declareRunTimeSelectionTable
132 const word& modelType,
134 const dictionary& dict
136 (modelType, mesh, dict)
142 //- Construct null from mesh
143 pyrolysisModel(const fvMesh& mesh);
145 //- Construct from type name and mesh
146 pyrolysisModel(const word& modelType, const fvMesh& mesh);
148 //- Construct from type name and mesh and dictionary
151 const word& modelType,
153 const dictionary& dict
157 autoPtr<pyrolysisModel> clone() const
159 notImplemented("autoPtr<pyrolysisModel> clone() const");
160 return autoPtr<pyrolysisModel>(NULL);
165 //- Return a reference to the selected pyrolysis model
166 static autoPtr<pyrolysisModel> New(const fvMesh& mesh);
168 //- Return a reference to a named selected pyrolysis model
169 static autoPtr<pyrolysisModel> New
172 const dictionary& dict
176 //- Return pointer to new pyrolysis created on freestore from Istream
183 iNew(const fvMesh& mesh)
188 autoPtr<pyrolysisModel> operator()(Istream& is) const
193 return autoPtr<pyrolysisModel>
195 pyrolysisModel::New(mesh_, dict)
202 virtual ~pyrolysisModel();
211 //- Return density [kg/m3]
212 virtual const volScalarField& rho() const = 0;
214 //- Return const temperature [K]
215 virtual const volScalarField& T() const = 0;
217 //- Return specific heat capacity [J/kg/K]
218 virtual const tmp<volScalarField> Cp() const = 0;
220 //- Return the region absorptivity [1/m]
221 virtual const volScalarField& kappa() const = 0;
223 //- Return the region thermal conductivity [W/m/k]
224 virtual const volScalarField& K() const = 0;
226 //- Return the total gas mass flux to primary region [kg/m2/s]
227 virtual const surfaceScalarField& phiGas() const = 0;
231 //- External hook to add mass to the primary region
232 virtual scalar addMassSources
241 //- Pre-evolve region
242 virtual void preEvolveRegion();
247 //- Mean diffusion number of the solid region
248 virtual scalar solidRegionDiffNo() const;
250 //- Return max diffusivity allowed in the solid
251 virtual scalar maxDiff() const;
255 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
257 } // End namespace pyrolysisModels
258 } // End namespace regionModels
259 } // End namespace Foam
261 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
265 // ************************************************************************* //