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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
28
29Description
30 Mixed boundary condition for temperature, to be used in the flow and
31 pyrolysis regions when a film region model is used.
32
33 Example usage:
34 \verbatim
35 myInterfacePatchName
36 {
37 type filmPyrolysisRadiativeCoupledMixed;
38 Tnbr T;
39 kappaMethod fluidThermo;
40 kappa none;
41 qr qr;
42 filmDeltaDry 0.0;
43 filmDeltaWet 3e-4;
44 value $internalField;
45 }
46 \endverbatim
47
48 Needs to be on underlying mapped(Wall)FvPatch.
49 It calculates local field as:
50
51 \verbatim
52 ratio = (filmDelta - filmDeltaDry)/(filmDeltaWet - filmDeltaDry)
53 \endverbatim
54
55 when ratio = 1 is considered wet and the film temperature is fixed at
56 the wall. If ratio = 0 (dry) it emulates the normal radiative solid BC.
57
58 In between ratio 0 and 1 the gradient and value contributions are
59 weighted using the ratio field in the following way:
60
61 \verbatim
62 qConv = ratio*htcwfilm*(Tfilm - *this);
63 qRad = (1.0 - ratio)*qr;
64 \endverbatim
65
66 Then the solid can gain or loose energy through radiation or conduction
67 towards the film.
68
69 Notes:
70 - \c kappaMethod and \c kappa are inherited from temperatureCoupledBase.
71 - qr is the radiative flux defined in the radiation model.
72
73
74See also
75 Foam::temperatureCoupledBase
76
77SourceFiles
78 filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C
79
80\*---------------------------------------------------------------------------*/
81
82#ifndef filmPyrolysisRadiativeCoupledMixedFvPatchScalarField_H
83#define filmPyrolysisRadiativeCoupledMixedFvPatchScalarField_H
84
85#include "mixedFvPatchFields.H"
87#include "thermoSingleLayer.H"
88#include "pyrolysisModel.H"
89
90
91// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92
93namespace Foam
94{
95
96/*---------------------------------------------------------------------------*\
97 Class filmPyrolysisRadiativeCoupledMixedFvPatchScalarField Declaration
98\*---------------------------------------------------------------------------*/
101:
102 public mixedFvPatchScalarField,
104{
105public:
106
109
112
113
114private:
115
116 // Private data
117
118 //- Name of film region
119 const word filmRegionName_;
120
121 //- Name of pyrolysis region
122 const word pyrolysisRegionName_;
123
124 //- Name of field on the neighbour region
125 const word TnbrName_;
126
127 //- Name of the radiative heat flux
128 const word qrName_;
129
130 //- Convective Scaling Factor (as determined by Prateep's tests)
131 const scalar convectiveScaling_;
132
133 //- Minimum delta film to be considered dry
134 const scalar filmDeltaDry_;
135
136 //- Maximum delta film to be considered wet
137 const scalar filmDeltaWet_;
138
139 //- Retrieve film model from the database
140 const filmModelType& filmModel() const;
141
142 //- Retrieve pyrolysis model from the database
143 const pyrolysisModelType& pyrModel() const;
144
145
146public:
147
148 //- Runtime type information
149 TypeName("filmPyrolysisRadiativeCoupledMixed");
150
151
152 // Constructors
153
154 //- Construct from patch and internal field
156 (
157 const fvPatch&,
159 );
160
161 //- Construct from patch, internal field and dictionary
163 (
164 const fvPatch&,
166 const dictionary&
167 );
168
169 //- Construct by mapping given
170 // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
171 // new patch
173 (
174 const
176 const fvPatch&,
178 const fvPatchFieldMapper&
179 );
180
181 //- Construct and return a clone
182 virtual tmp<fvPatchScalarField> clone() const
183 {
185 (
187 (
188 *this
189 )
190 );
191 }
192
193 //- Construct as copy setting internal field reference
195 (
198 );
199
200 //- Construct and return a clone setting internal field reference
202 (
204 ) const
205 {
207 (
209 (
210 *this,
211 iF
212 )
213 );
214 }
215
216
217 // Member functions
218
219 // Mapping functions
220
221 //- Map (and resize as needed) from self given a mapping object
222 virtual void autoMap
223 (
224 const fvPatchFieldMapper&
225 );
226
227 //- Reverse map the given fvPatchField onto this fvPatchField
228 virtual void rmap
229 (
231 const labelList&
232 );
233
234
235 //- Get corresponding K field
236 tmp<scalarField> K() const;
237
238 //- Update the coefficients associated with the patch field
239 virtual void updateCoeffs();
240
241 //- Write
242 virtual void write(Ostream&) const;
243};
244
245
246// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
247
248} // End namespace Foam
249
250// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
251
252#endif
253
254// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mixed boundary condition for temperature, to be used in the flow and pyrolysis regions when a film re...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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.
TypeName("filmPyrolysisRadiativeCoupledMixed")
Runtime type information.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:82
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
Thermodynamic form of single-cell layer surface film model.
Common functions used in temperature coupled boundaries.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73