noPyrolysis.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "noPyrolysis.H"
28 #include "volFields.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace regionModels
36 {
37 namespace pyrolysisModels
38 {
39 
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 
45 
46 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
47 
49 {
50  solidChemistry_.reset
51  (
53  );
54 
56  (
57  solidChemistry_->solidThermo().T()
58  ).ptr());
59 }
60 
61 
63 {
65  {
66  // no additional info to read
67  return true;
68  }
69  else
70  {
71  return false;
72  }
73 }
74 
75 
77 {
79  {
80  // no additional info to read
81  return true;
82  }
83  else
84  {
85  return false;
86  }
87 }
88 
89 
90 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
91 
93 (
94  const word& modelType,
95  const fvMesh& mesh,
96  const word& regionType
97 )
98 :
99  pyrolysisModel(mesh, regionType),
100  solidChemistry_(NULL),
101  radiation_(NULL)
102 {
103  if (active())
104  {
105  constructThermoChemistry();
106  }
107 }
108 
109 
111 (
112  const word& modelType,
113  const fvMesh& mesh,
114  const dictionary& dict,
115  const word& regionType
116 )
117 :
118  pyrolysisModel(mesh, regionType),
119  solidChemistry_(NULL),
120  radiation_(NULL)
121 {
122  if (active())
123  {
124  constructThermoChemistry();
125  }
126 }
127 
128 
129 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
130 
132 {}
133 
134 
135 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
136 
138 {
139  //Do nothing
140 }
141 
142 
144 {
145  //Do nothing
146 }
147 
148 
150 {
151  return solidChemistry_->solidThermo().rho();
152 }
153 
154 
156 {
157  return solidChemistry_->solidThermo().T();
158 }
159 
160 
162 {
163  return solidChemistry_->solidThermo().Cp();
164 }
165 
166 
168 {
169  return radiation_->absorptionEmission().a();
170 }
171 
172 
174 {
175  return solidChemistry_->solidThermo().kappa();
176 }
177 
178 
180 {
182  << "phiGas field not available for " << type() << abort(FatalError);
183  return surfaceScalarField::null();
184 }
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace surfaceFilmModels
190 } // End namespace regionModels
191 } // End namespace Foam
192 
193 // ************************************************************************* //
Foam::regionModels::pyrolysisModels::pyrolysisModel
Base class for pyrolysis models.
Definition: pyrolysisModel.H:60
volFields.H
Foam::regionModels::pyrolysisModels::noPyrolysis::kappa
virtual tmp< volScalarField > kappa() const
Return the region thermal conductivity [W/m/k].
Definition: noPyrolysis.C:173
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::regionModels::pyrolysisModels::noPyrolysis
Definition: noPyrolysis.H:55
Foam::regionModels::pyrolysisModels::noPyrolysis::evolveRegion
virtual void evolveRegion()
Evolve the pyrolysis equations.
Definition: noPyrolysis.C:143
Foam::regionModels::pyrolysisModels::noPyrolysis::constructThermoChemistry
void constructThermoChemistry()
Reset solidChemistryModel and solidThermo pointers.
Definition: noPyrolysis.C:48
Foam::regionModels::pyrolysisModels::noPyrolysis::rho
virtual const volScalarField & rho() const
Return density [kg/m3].
Definition: noPyrolysis.C:149
Foam::regionModels::pyrolysisModels::noPyrolysis::T
virtual const volScalarField & T() const
Return const temperature [K].
Definition: noPyrolysis.C:155
Foam::regionModels::pyrolysisModels::defineTypeNameAndDebug
defineTypeNameAndDebug(noPyrolysis, 0)
Foam::regionModels::pyrolysisModels::noPyrolysis::phiGas
virtual const surfaceScalarField & phiGas() const
Return the total gas mass flux to primary region [kg/m2/s].
Definition: noPyrolysis.C:179
Foam::radiation::radiationModel::New
static autoPtr< radiationModel > New(const volScalarField &T)
Return a reference to the selected radiation model.
Definition: radiationModelNew.C:33
Foam::basicSolidChemistryModel::New
static autoPtr< basicSolidChemistryModel > New(const fvMesh &mesh, const word &phaseName=word::null)
Selector.
Definition: basicSolidChemistryModelNew.C:32
Foam::regionModels::pyrolysisModels::pyrolysisModel::read
virtual bool read()
Read control parameters.
Definition: pyrolysisModel.C:53
Foam::regionModels::pyrolysisModels::noPyrolysis::read
virtual bool read()
Read control parameters from dictionary.
Definition: noPyrolysis.C:62
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::regionModels::pyrolysisModels::noPyrolysis::radiation_
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
Definition: noPyrolysis.H:87
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:131
Foam::regionModels::pyrolysisModels::noPyrolysis::Cp
virtual const tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
Definition: noPyrolysis.C:161
Foam::regionModels::pyrolysisModels::noPyrolysis::kappaRad
virtual tmp< volScalarField > kappaRad() const
Return the region absorptivity [1/m].
Definition: noPyrolysis.C:167
Foam::regionModels::pyrolysisModels::noPyrolysis::preEvolveRegion
virtual void preEvolveRegion()
Pre-evolve region.
Definition: noPyrolysis.C:137
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
absorptionEmissionModel.H
Foam::regionModels::pyrolysisModels::noPyrolysis::noPyrolysis
noPyrolysis(const noPyrolysis &)
Disallow default bitwise copy construct.
Foam::GeometricField::null
static const GeometricField< Type, PatchField, GeoMesh > & null()
Return a null geometric field.
Definition: GeometricFieldI.H:30
Foam::regionModels::pyrolysisModels::noPyrolysis::~noPyrolysis
virtual ~noPyrolysis()
Destructor.
Definition: noPyrolysis.C:131
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::regionModels::pyrolysisModels::noPyrolysis::solidChemistry_
autoPtr< basicSolidChemistryModel > solidChemistry_
Pointer to the solid chemistry model.
Definition: noPyrolysis.H:84
Foam::regionModels::pyrolysisModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, mesh)
noPyrolysis.H
Foam::regionModels::regionModel::regionMesh
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61