filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H
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) 2013-2016 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 Class
25  Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
26 
27 Description
28  Mixed boundary condition for temperature, to be used in the flow and
29  pyrolysis regions when a film region model is used.
30 
31  Example usage:
32  \verbatim
33  myInterfacePatchName
34  {
35  type filmPyrolysisRadiativeCoupledMixed;
36  Tnbr T;
37  kappa fluidThermo;
38  Qr Qr;
39  kappaName none;
40  filmDeltaDry 0.0;
41  filmDeltaWet 3e-4;
42  value $internalField;
43  }
44  \endverbatim
45 
46  Needs to be on underlying mapped(Wall)FvPatch.
47  It calculates local field as:
48 
49  \verbatim
50  ratio = (filmDelta - filmDeltaDry)/(filmDeltaWet - filmDeltaDry)
51  \endverbatim
52 
53  when ratio = 1 is considered wet and the film temperature is fixed at
54  the wall. If ratio = 0 (dry) it emulates the normal radiative solid BC.
55 
56  In between ratio 0 and 1 the gradient and value contributions are
57  weighted using the ratio field in the following way:
58 
59  \verbatim
60  qConv = ratio*htcwfilm*(Tfilm - *this);
61  qRad = (1.0 - ratio)*Qr;
62  \endverbatim
63 
64  Then the solid can gain or loose energy through radiation or conduction
65  towards the film.
66 
67  Notes:
68 
69  - kappa and \c kappaName are inherited from temperatureCoupledBase.
70  - Qr is the radiative flux defined in the radiation model.
71 
72 
73 See also
74  Foam::temperatureCoupledBase
75 
76 SourceFiles
77  filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C
78 
79 \*---------------------------------------------------------------------------*/
80 
81 #ifndef filmPyrolysisRadiativeCoupledMixedFvPatchScalarField_H
82 #define filmPyrolysisRadiativeCoupledMixedFvPatchScalarField_H
83 
84 #include "mixedFvPatchFields.H"
85 #include "temperatureCoupledBase.H"
86 #include "thermoSingleLayer.H"
87 #include "pyrolysisModel.H"
88 
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 namespace Foam
93 {
94 
95 /*---------------------------------------------------------------------------*\
96  Class filmPyrolysisRadiativeCoupledMixedFvPatchScalarField Declaration
97 \*---------------------------------------------------------------------------*/
98 
100 :
101  public mixedFvPatchScalarField,
103 {
104 public:
105 
108 
111 
112 
113 private:
114 
115  // Private data
116 
117  //- Name of film region
118  const word filmRegionName_;
119 
120  //- Name of pyrolysis region
121  const word pyrolysisRegionName_;
122 
123  //- Name of field on the neighbour region
124  const word TnbrName_;
125 
126  //- Name of the radiative heat flux
127  const word QrName_;
128 
129  //- Convective Scaling Factor (as determined by Prateep's tests)
130  const scalar convectiveScaling_;
131 
132  //- Minimum delta film to be consired dry
133  const scalar filmDeltaDry_;
134 
135  //- Maximum delta film to be consired wet
136  const scalar filmDeltaWet_;
137 
138  //- Retrieve film model from the database
139  const filmModelType& filmModel() const;
140 
141  //- Retrieve pyrolysis model from the database
142  const pyrolysisModelType& pyrModel() const;
143 
144 
145 public:
146 
147  //- Runtime type information
148  TypeName("filmPyrolysisRadiativeCoupledMixed");
149 
150 
151  // Constructors
152 
153  //- Construct from patch and internal field
155  (
156  const fvPatch&,
158  );
159 
160  //- Construct from patch, internal field and dictionary
162  (
163  const fvPatch&,
165  const dictionary&
166  );
167 
168  //- Construct by mapping given
169  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
170  // new patch
172  (
173  const
175  const fvPatch&,
177  const fvPatchFieldMapper&
178  );
179 
180  //- Construct and return a clone
181  virtual tmp<fvPatchScalarField> clone() const
182  {
184  (
186  (
187  *this
188  )
189  );
190  }
191 
192  //- Construct as copy setting internal field reference
194  (
197  );
198 
199  //- Construct and return a clone setting internal field reference
201  (
203  ) const
204  {
206  (
208  (
209  *this,
210  iF
211  )
212  );
213  }
214 
215 
216  // Member functions
217 
218  //- Get corresponding K field
219  tmp<scalarField> K() const;
220 
221  //- Update the coefficients associated with the patch field
222  virtual void updateCoeffs();
223 
224  //- Write
225  virtual void write(Ostream&) const;
226 };
227 
228 
229 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 
231 } // End namespace Foam
232 
233 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 
235 #endif
236 
237 // ************************************************************************* //
Mixed boundary condition for temperature, to be used in the flow and pyrolysis regions when a film re...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for handling words, derived from string.
Definition: word.H:59
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
tmp< scalarField > K() const
Get corresponding K field.
Common functions used in temperature coupled boundaries.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
TypeName("filmPyrolysisRadiativeCoupledMixed")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.