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_;
144 
145  //- name of the other phase (vapor/liquid phase)
146  word otherPhaseName_;
147 
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_;
156 
157 
158  // Private members
159 
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 and return a clone
200  virtual tmp<fvPatchScalarField> clone() const
201  {
203  (
205  (
206  *this
207  )
208  );
209  }
210 
211  //- Construct as copy setting internal field reference
213  (
216  );
217 
218  //- Construct and return a clone setting internal field reference
220  (
222  ) const
223  {
225  (
227  (
228  *this,
229  iF
230  )
231  );
232  }
233 
234 
235  // Member functions
236 
237  //- Update the coefficients associated with the patch field
238  virtual void updateCoeffs();
239 
240  //- Write
241  virtual void write(Ostream&) const;
242 };
243 
244 
245 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
246 
247 } // End namespace compressible
248 } // End namespace Foam
249 
250 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
251 
252 #endif
253 
254 // ************************************************************************* //
Foam::Enum< regionType >
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::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::mtLookup
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:149
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
scalarList.H
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::fluid
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:159
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::KMethodType
KMethodType
Type of supplied Kappa.
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:146
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::mtPhaseSystem
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:150
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::regionType
regionType
Enumeration listing the region.
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:156
Foam::Field< scalar >
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
compressible
bool compressible
Definition: pEqn.H:2
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
mixedFvPatchFields.H
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::solid
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:158
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:236
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::mtSolidThermo
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:148
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
Mixed boundary condition for temperature and radiation heat transfer to be used for in multiregion ca...
Definition: turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H:137
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Foam::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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::compressible::turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::TypeName
TypeName("compressible::turbulentTemperatureTwoPhaseRadCoupledMixed")
Runtime type information.
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54