pyrolysisModel.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 -------------------------------------------------------------------------------
11 License
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 "pyrolysisModel.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace regionModels
36 {
37 namespace pyrolysisModels
38 {
39 
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 
42 defineTypeNameAndDebug(pyrolysisModel, 0);
43 defineRunTimeSelectionTable(pyrolysisModel, mesh);
44 defineRunTimeSelectionTable(pyrolysisModel, dictionary);
45 
46 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
47 
48 void pyrolysisModel::readPyrolysisControls()
49 {}
50 
51 
53 {
54  if (regionModel1D::read())
55  {
56  readPyrolysisControls();
57  return true;
58  }
59 
60  return false;
61 }
62 
63 
65 {
67  {
68  readPyrolysisControls();
69  return true;
70  }
71 
72  return false;
73 }
74 
75 
76 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
77 
78 pyrolysisModel::pyrolysisModel(const fvMesh& mesh, const word& regionType)
79 :
80  regionModel1D(mesh, regionType)
81 {}
82 
83 
84 pyrolysisModel::pyrolysisModel
85 (
86  const word& modelType,
87  const fvMesh& mesh,
88  const word& regionType
89 )
90 :
91  regionModel1D(mesh, regionType, modelType)
92 {
93  if (active_)
94  {
95  read();
96  }
97 }
98 
99 
100 pyrolysisModel::pyrolysisModel
101 (
102  const word& modelType,
103  const fvMesh& mesh,
104  const dictionary& dict,
105  const word& regionType
106 )
107 :
108  regionModel1D(mesh, regionType, modelType, dict)
109 {
110  if (active_)
111  {
112  read(dict);
113  }
114 }
115 
116 
117 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
118 
120 {}
121 
122 
123 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
124 
126 (
127  const label patchi,
128  const label facei
129 )
130 {
131  return 0.0;
132 }
133 
134 
136 {
137  return -GREAT;
138 }
139 
140 
142 {
143  return GREAT;
144 }
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace pyrolysisModels
150 } // End namespace regionModels
151 } // End namespace Foam
152 
153 // ************************************************************************* //
Foam::regionModels::regionModel1D::read
virtual bool read()
Read control parameters from dictionary.
Definition: regionModel1D.C:170
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::read
bool read(const char *buf, int32_t &val)
Same as readInt32.
Definition: int32.H:108
Foam::regionModels::pyrolysisModels::pyrolysisModel::~pyrolysisModel
virtual ~pyrolysisModel()
Destructor.
Definition: pyrolysisModel.C:119
Foam::regionModels::pyrolysisModels::defineRunTimeSelectionTable
defineRunTimeSelectionTable(pyrolysisModel, mesh)
pyrolysisModel.H
Foam::regionModels::pyrolysisModels::defineTypeNameAndDebug
defineTypeNameAndDebug(noPyrolysis, 0)
Foam::regionModels::pyrolysisModels::pyrolysisModel::read
virtual bool read()
Read control parameters.
Definition: pyrolysisModel.C:52
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::regionModels::pyrolysisModels::pyrolysisModel::addMassSources
virtual scalar addMassSources(const label patchi, const label facei)
External hook to add mass to the primary region.
Definition: pyrolysisModel.C:126
Foam::regionModels::regionModel1D
Base class for 1-D region models.
Definition: regionModel1D.H:54
Foam::regionModels::pyrolysisModels::pyrolysisModel::solidRegionDiffNo
virtual scalar solidRegionDiffNo() const
Mean diffusion number of the solid region.
Definition: pyrolysisModel.C:135
Foam::regionModels::pyrolysisModels::pyrolysisModel::maxDiff
virtual scalar maxDiff() const
Return max diffusivity allowed in the solid.
Definition: pyrolysisModel.C:141