turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.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) 2018 OpenCFD Ltd
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::compressible::
28  turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
29 
30 Description
31  Mixed boundary condition for temperature and radiation heat transfer
32  to be used for in multiregion cases with two phase Euler system
33 
34 Usage
35  \table
36  Property | Description | Required | Default value
37  Tnbr | name of the field | no | T
38  qrNbr | name of the radiative flux in the nbr region | no | none
39  qr | name of the radiative flux in this region | no | none
40  region | region to which this BC belongs | yes
41  otherPhase | name of the vapour phase in the fluid region | yes
42  kappaMethod | inherited from temperatureCoupledBase | inherited |
43  kappa | inherited from temperatureCoupledBase | inherited |
44  \endtable
45 
46  Example of the boundary condition specification on the fluid region:
47  \verbatim
48  <patchName>
49  {
50  type compressible::turbulentTemperatureTwoPhaseRadCoupledMixed;
51  Tnbr T;
52  qrNbr none;
53  qr none;
54  kappaMethod phaseSystem;
55  region fluid;
56  otherPhase gas;
57  value uniform 300;
58  }
59  \endverbatim
60 
61  Example of the boundary condition specification on the solid region:
62  \verbatim
63  <patchName>
64  {
65  type compressible::turbulentTemperatureTwoPhaseRadCoupledMixed;
66  Tnbr T.liquid;
67  qrNbr none;
68  qr none;
69  kappaMethod solidThermo;
70  region solid;
71  otherPhase gas;
72  value uniform 300;
73  }
74  \endverbatim
75 
76  Needs to be on underlying mapped(Wall)FvPatch.
77 
78 
79 SourceFiles
80  turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C
81 
82 \*---------------------------------------------------------------------------*/
83 
84 #ifndef turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField_H
85 #define turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField_H
86 
87 #include "mixedFvPatchFields.H"
88 #include "scalarList.H"
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 namespace Foam
93 {
94 namespace compressible
95 {
96 
97 /*---------------------------------------------------------------------------*\
98  Class turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField Declaration
99 \*---------------------------------------------------------------------------*/
100 
101 class turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
102 :
103  public mixedFvPatchScalarField
104 {
105 public:
106 
107  // Public enumerations
108 
109  //- Type of supplied Kappa
110  enum KMethodType
111  {
113  mtLookup,
115  };
116 
117  // Data types
118 
119  //- Enumeration listing the region
120  enum regionType
121  {
122  solid,
123  fluid
124  };
125 
126 private:
127 
128  // Private data
129 
130  //- Heat source type names
131  static const Enum<regionType> regionTypeNames_;
132 
133  //- Kappa method types
134  static const Enum<KMethodType> KMethodTypeNames_;
135 
136  //- Heat source type
137  regionType regionType_;
138 
139  //- How to get K
140  const KMethodType method_;
141 
142  //- Name of thermal conductivity field (if looked up from database)
143  const word kappaName_;
145  //- name of the other phase (vapor/liquid phase)
146  word otherPhaseName_;
148  //- Name of field on the neighbour region
149  const word TnbrName_;
150 
151  //- Name of the radiative heat flux in the neighbour region
152  const word qrNbrName_;
153 
154  //- Name of the radiative heat flux in local region
155  const word qrName_;
157 
158  // Private members
160  //- Given patch temperature calculate corresponding K field
161  tmp<scalarField> kappa(const scalarField& Tp) const;
162 
163 
164 public:
165 
166  //- Runtime type information
167  TypeName("compressible::turbulentTemperatureTwoPhaseRadCoupledMixed");
168 
169 
170  // Constructors
171 
172  //- Construct from patch and internal field
174  (
175  const fvPatch&,
177  );
178 
179  //- Construct from patch, internal field and dictionary
181  (
182  const fvPatch&,
184  const dictionary&
185  );
186 
187  //- Construct by mapping given
188  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
189  // new patch
191  (
192  const
194  const fvPatch&,
196  const fvPatchFieldMapper&
197  );
198 
199  //- Construct as copy setting internal field reference
201  (
204  );
205 
206  //- Return a clone
207  virtual tmp<fvPatchField<scalar>> clone() const
208  {
209  return fvPatchField<scalar>::Clone(*this);
210  }
211 
212  //- Clone with an internal field reference
214  (
216  ) const
217  {
218  return fvPatchField<scalar>::Clone(*this, iF);
219  }
220 
221 
222  // Member functions
223 
224  //- Update the coefficients associated with the patch field
225  virtual void updateCoeffs();
226 
227  //- Write
228  virtual void write(Ostream&) const;
229 };
230 
231 
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 
234 } // End namespace compressible
235 } // End namespace Foam
236 
237 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
238 
239 #endif
240 
241 // ************************************************************************* //
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
A class for handling words, derived from Foam::string.
Definition: word.H:63
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
bool compressible
Definition: pEqn.H:2
TypeName("compressible::turbulentTemperatureTwoPhaseRadCoupledMixed")
Runtime type information.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Mixed boundary condition for temperature and radiation heat transfer to be used for in multiregion ca...
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.