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