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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "noPyrolysis.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "volFields.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace regionModels
36 namespace pyrolysisModels
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 defineTypeNameAndDebug(noPyrolysis, 0);
42 addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, mesh);
43 addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, dictionary);
45 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
47 void noPyrolysis::constructThermoChemistry()
51 solidChemistryModel::New(regionMesh()).ptr()
54 solidThermo_.reset(&solidChemistry_->solidThermo());
57 bool noPyrolysis::read()
59 if (pyrolysisModel::read())
61 // no additional info to read
71 bool noPyrolysis::read(const dictionary& dict)
73 if (pyrolysisModel::read(dict))
75 // no additional info to read
85 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
87 noPyrolysis::noPyrolysis(const word& modelType, const fvMesh& mesh)
90 solidChemistry_(NULL),
95 constructThermoChemistry();
100 noPyrolysis::noPyrolysis
102 const word& modelType,
104 const dictionary& dict
106 pyrolysisModel(mesh),
107 solidChemistry_(NULL),
112 constructThermoChemistry();
116 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
118 noPyrolysis::~noPyrolysis()
122 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
124 void noPyrolysis::preEvolveRegion()
130 void noPyrolysis::evolveRegion()
136 const volScalarField& noPyrolysis::rho() const
138 return (solidThermo_->rho());
142 const volScalarField& noPyrolysis::T() const
144 return (solidThermo_->T());
148 const tmp<volScalarField> noPyrolysis::Cp() const
150 return (solidThermo_->Cp());
154 const volScalarField& noPyrolysis::kappa() const
156 return (solidThermo_->kappa());
160 const volScalarField& noPyrolysis::K() const
162 return (solidThermo_->K());
166 const surfaceScalarField& noPyrolysis::phiGas() const
168 FatalErrorIn("const volScalarField& noPyrolysis::phiGas() const")
169 << "phiGas field not available for " << type() << abort(FatalError);
170 return surfaceScalarField::null();
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace surfaceFilmModels
177 } // End namespace regionModels
178 } // End namespace Foam
180 // ************************************************************************* //