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