Loading...
Searching...
No Matches
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{
96/*---------------------------------------------------------------------------*\
97 Class filmPyrolysisRadiativeCoupledMixedFvPatchScalarField Declaration
98\*---------------------------------------------------------------------------*/
99
101:
102 public mixedFvPatchScalarField,
104{
105public:
109
112
114
115
116private:
117
118 // Private Data
119
120 //- Name of film region
121 const word filmRegionName_;
122
123 //- Name of pyrolysis region
124 const word pyrolysisRegionName_;
125
126 //- Name of field on the neighbour region
127 const word TnbrName_;
128
129 //- Name of the radiative heat flux
130 const word qrName_;
131
132 //- Convective Scaling Factor (as determined by Prateep's tests)
133 const scalar convectiveScaling_;
134
135 //- Minimum delta film to be considered dry
136 const scalar filmDeltaDry_;
137
138 //- Maximum delta film to be considered wet
139 const scalar filmDeltaWet_;
140
141
142 // Private Member Functions
143
144 //- Retrieve film model from the database, or FatalError
145 const filmModelType& filmModel() const;
146
147 //- Retrieve pyrolysis model from the database, or FatalError
148 const pyrolysisModelType& pyrModel() const;
149
150
151public:
152
153 //- Runtime type information
154 TypeName("filmPyrolysisRadiativeCoupledMixed");
155
156
157 // Constructors
158
159 //- Construct from patch and internal field
161 (
162 const fvPatch&,
164 );
165
166 //- Construct from patch, internal field and dictionary
168 (
169 const fvPatch&,
171 const dictionary&
172 );
173
174 //- Construct by mapping given
175 // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
176 // new patch
178 (
179 const
181 const fvPatch&,
183 const fvPatchFieldMapper&
184 );
185
186 //- Construct as copy setting internal field reference
188 (
191 );
192
193 //- Return a clone
194 virtual tmp<fvPatchField<scalar>> clone() const
195 {
196 return fvPatchField<scalar>::Clone(*this);
197 }
198
199 //- Clone with an internal field reference
201 (
203 ) const
204 {
205 return fvPatchField<scalar>::Clone(*this, iF);
206 }
207
208
209 // Member functions
210
211 // Mapping functions
212
213 //- Map (and resize as needed) from self given a mapping object
214 virtual void autoMap
215 (
216 const fvPatchFieldMapper&
217 );
218
219 //- Reverse map the given fvPatchField onto this fvPatchField
220 virtual void rmap
221 (
223 const labelList&
224 );
225
226
227 //- Get corresponding K field
229
230 //- Update the coefficients associated with the patch field
231 virtual void updateCoeffs();
232
233 //- Write
234 virtual void write(Ostream&) const;
235};
236
237
238// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
239
240} // End namespace Foam
241
242// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
243
244#endif
245
246// ************************************************************************* //
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:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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...
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
Thermodynamic form of single-cell layer surface film model.
temperatureCoupledBase(const fvPatch &patch, const KMethodType method=KMethodType::mtFluidThermo)
Default construct from patch, using fluidThermo (default) or specified method.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68