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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
28 
29 Description
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 
74 See also
75  Foam::temperatureCoupledBase
76 
77 SourceFiles
78  filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C
79 
80 \*---------------------------------------------------------------------------*/
81 
82 #ifndef filmPyrolysisRadiativeCoupledMixedFvPatchScalarField_H
83 #define filmPyrolysisRadiativeCoupledMixedFvPatchScalarField_H
84 
85 #include "mixedFvPatchFields.H"
86 #include "temperatureCoupledBase.H"
87 #include "thermoSingleLayer.H"
88 #include "pyrolysisModel.H"
89 
90 
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 
93 namespace Foam
94 {
95 
96 /*---------------------------------------------------------------------------*\
97  Class filmPyrolysisRadiativeCoupledMixedFvPatchScalarField Declaration
98 \*---------------------------------------------------------------------------*/
99 
101 :
102  public mixedFvPatchScalarField,
104 {
105 public:
106 
109 
112 
113 
114 private:
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 
146 public:
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  (
230  const fvPatchField<scalar>&,
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 // ************************************************************************* //
Foam::regionModels::pyrolysisModels::pyrolysisModel
Base class for pyrolysis models.
Definition: pyrolysisModel.H:61
Foam::fvPatchField< scalar >
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
Mixed boundary condition for temperature, to be used in the flow and pyrolysis regions when a film re...
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H:99
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C:419
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::TypeName
TypeName("filmPyrolysisRadiativeCoupledMixed")
Runtime type information.
Foam::temperatureCoupledBase
Common functions used in temperature coupled boundaries.
Definition: temperatureCoupledBase.H:135
thermoSingleLayer.H
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C:229
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::pyrolysisModelType
Foam::regionModels::pyrolysisModels::pyrolysisModel pyrolysisModelType
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H:110
pyrolysisModel.H
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::rmap
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C:239
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::K
tmp< scalarField > K() const
Get corresponding K field.
Foam::regionModels::surfaceFilmModels::thermoSingleLayer
Thermodynamic form of single-cell layer surface film model.
Definition: thermoSingleLayer.H:67
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H:181
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
temperatureCoupledBase.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
mixedFvPatchFields.H
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C:105
Foam::List< label >
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C:256
Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmModelType
Foam::regionModels::surfaceFilmModels::thermoSingleLayer filmModelType
Definition: filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H:107
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54