pyrolysisModel.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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 "pyrolysisModel.H"
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32 namespace regionModels
33 {
34 namespace pyrolysisModels
35 {
36 
37 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 
39 defineTypeNameAndDebug(pyrolysisModel, 0);
40 defineRunTimeSelectionTable(pyrolysisModel, mesh);
41 defineRunTimeSelectionTable(pyrolysisModel, dictionary);
42 
43 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
44 
45 void pyrolysisModel::readPyrolysisControls()
46 {}
47 
48 
50 {
51  if (regionModel1D::read())
52  {
53  readPyrolysisControls();
54  return true;
55  }
56  else
57  {
58  return false;
59  }
60 }
61 
62 
64 {
65  if (regionModel1D::read(dict))
66  {
67  readPyrolysisControls();
68  return true;
69  }
70  else
71  {
72  return false;
73  }
74 }
75 
76 
77 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
78 
79 pyrolysisModel::pyrolysisModel(const fvMesh& mesh, const word& regionType)
80 :
81  regionModel1D(mesh, regionType)
82 {}
83 
84 
86 (
87  const word& modelType,
88  const fvMesh& mesh,
89  const word& regionType
90 )
91 :
92  regionModel1D(mesh, regionType, modelType)
93 {
94  if (active_)
95  {
96  read();
97  }
98 }
99 
100 
102 (
103  const word& modelType,
104  const fvMesh& mesh,
105  const dictionary& dict,
106  const word& regionType
107 )
108 :
109  regionModel1D(mesh, regionType, modelType, dict)
110 {
111  if (active_)
112  {
113  read(dict);
114  }
115 }
116 
117 
118 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
119 
121 {}
122 
123 
124 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
125 
127 (
128  const label patchi,
129  const label facei
130 )
131 {
132  return 0.0;
133 }
134 
135 
137 {
138  return -great;
139 }
140 
141 
143 {
144  return great;
145 }
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace pyrolysisModels
151 } // End namespace regionModels
152 } // End namespace Foam
153 
154 // ************************************************************************* //
dictionary dict
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
Base class for 1-D region models.
Definition: regionModel1D.H:52
defineRunTimeSelectionTable(pyrolysisModel, mesh)
virtual scalar addMassSources(const label patchi, const label facei)
External hook to add mass to the primary region.
virtual bool read()
Read control parameters.
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
virtual scalar maxDiff() const
Return max diffusivity allowed in the solid.
Switch active_
Active flag.
Definition: regionModel.H:87
virtual scalar solidRegionDiffNo() const
Mean diffusion number of the solid region.
label patchi
virtual bool read()
Read control parameters from dictionary.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
pyrolysisModel(const fvMesh &mesh, const word &regionType)
Construct null from mesh.
Namespace for OpenFOAM.