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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "noPyrolysis.H"
31#include "volFields.H"
33
34// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35
36namespace Foam
37{
38namespace regionModels
39{
40namespace pyrolysisModels
41{
42
43// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
44
48
49// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
50
52{
53 solidThermo_.reset
54 (
56 );
57
58 solidChemistry_.reset
59 (
61 );
62
64 (
65 solidChemistry_->solidThermo().T()
66 ).ptr());
67}
68
69
71{
72 // No additional info to read
73 return pyrolysisModel::read();
74}
75
76
78{
79 // No additional info to read
81}
82
83
84// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
85
87(
88 const word& modelType,
89 const fvMesh& mesh,
90 const word& regionType
91)
92:
93 pyrolysisModel(mesh, regionType),
94 solidThermo_(nullptr),
95 solidChemistry_(nullptr),
96 radiation_(nullptr)
97{
98 if (active())
99 {
101 }
102}
103
104
106(
107 const word& modelType,
108 const fvMesh& mesh,
109 const dictionary& dict,
110 const word& regionType
111)
112:
113 pyrolysisModel(mesh, regionType),
114 solidThermo_(nullptr),
115 solidChemistry_(nullptr),
116 radiation_(nullptr)
117{
118 if (active())
119 {
121 }
122}
123
124
125// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
126
128{}
129
130
131// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
132
134{}
135
136
138{}
139
140
142{
143 return solidChemistry_->solidThermo().rho();
144}
145
146
148{
149 return solidChemistry_->solidThermo().T();
150}
151
152
154{
155 return solidChemistry_->solidThermo().Cp();
156}
157
158
160{
161 return radiation_->absorptionEmission().a();
162}
163
164
166{
167 return solidChemistry_->solidThermo().kappa();
168}
169
170
172{
174 << "phiGas field not available for " << type() << abort(FatalError);
176}
177
178
179// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180
181} // End namespace surfaceFilmModels
182} // End namespace regionModels
183} // End namespace Foam
184
185// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
static const GeometricField< scalar, fvsPatchField, surfaceMesh > & null()
Return a null geometric field.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Dummy surface pyrolysis model for 'none'.
Definition: noPyrolysis.H:60
virtual const volScalarField & rho() const
Return density [kg/m3].
Definition: noPyrolysis.C:141
virtual tmp< volScalarField > kappa() const
Return the region thermal conductivity [W/m/k].
Definition: noPyrolysis.C:165
autoPtr< solidReactionThermo > solidThermo_
Reference to solid thermo.
Definition: noPyrolysis.H:86
virtual const volScalarField & T() const
Return const temperature [K].
Definition: noPyrolysis.C:147
virtual tmp< volScalarField > kappaRad() const
Return the region absorptivity [1/m].
Definition: noPyrolysis.C:159
virtual const tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
Definition: noPyrolysis.C:153
autoPtr< basicSolidChemistryModel > solidChemistry_
Reference to the solid chemistry model.
Definition: noPyrolysis.H:89
virtual void preEvolveRegion()
Pre-evolve region.
Definition: noPyrolysis.C:133
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
Definition: noPyrolysis.H:92
void constructThermoChemistry()
Reset solidChemistryModel and solidThermo pointers.
Definition: noPyrolysis.C:51
virtual const surfaceScalarField & phiGas() const
Return the total gas mass flux to primary region [kg/m2/s].
Definition: noPyrolysis.C:171
virtual bool read()
Read control parameters from dictionary.
Definition: noPyrolysis.C:70
virtual void evolveRegion()
Evolve the pyrolysis equations.
Definition: noPyrolysis.C:137
virtual bool read()
Read control parameters.
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:64
Switch active() const
Return the active flag.
Definition: regionModelI.H:46
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
dynamicFvMesh & mesh
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
errorManip< error > abort(error &err)
Definition: errorManip.H:144
error FatalError
dictionary dict