turbulentHeatFluxTemperatureFvPatchScalarField.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) 2011-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::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField
26 
27 Group
28  grpIcoRASBoundaryConditions grpWallBoundaryConditions
29 
30 Description
31  Fixed heat boundary condition to specify temperature gradient. Input
32  heat source either specified in terms of an absolute power [W], or as a
33  flux [W/m^2].
34 
35  \heading Patch usage
36 
37  \table
38  Property | Description | Required | Default value
39  heatSource | 'power' [W] or 'flux' [W/m^2] | yes |
40  q | heat power or flux field | yes |
41  Qr | name of the radiative flux field | no | none
42  value | initial temperature value | no | calculated
43  gradient | initial gradient value | no | 0.0
44  \endtable
45 
46  Example of the boundary condition specification:
47  \verbatim
48  myPatch
49  {
50  type incompressible::turbulentHeatFluxTemperature;
51  heatSource flux;
52  q uniform 10;
53  value uniform 300; // place holder
54  }
55  \endverbatim
56 
57 Note
58  - The units of \c alphaEff are [kg/m/s]
59  - The density and specific heat capacity \c rho, Cp (units [kg/m^3], [J/kg/K])
60  are read from the transport dictionary entry
61 
62 SourceFiles
63  turbulentHeatFluxTemperatureFvPatchScalarField.C
64 
65 \*---------------------------------------------------------------------------*/
66 
67 #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
68 #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
69 
70 #include "fvPatchFields.H"
72 #include "NamedEnum.H"
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 namespace Foam
77 {
78 namespace incompressible
79 {
80 
81 /*---------------------------------------------------------------------------*\
82  Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration
83 \*---------------------------------------------------------------------------*/
84 
86 :
87  public fixedGradientFvPatchScalarField
88 {
89 public:
90 
91  // Data types
92 
93  //- Enumeration listing the possible hest source input modes
94  enum heatSourceType
95  {
96  hsPower,
97  hsFlux
98  };
99 
100 
101 private:
102 
103  // Private data
104 
105  //- Heat source type names
106  static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_;
107 
108  //- Heat source type
110 
111  //- Heat power [W] or flux [W/m2]
112  scalarField q_;
113 
114  //- Name of radiative in flux field
115  word QrName_;
116 
117 
118 public:
119 
120  //- Runtime type information
121  TypeName("turbulentHeatFluxTemperature");
122 
123 
124  // Constructors
125 
126  //- Construct from patch and internal field
128  (
129  const fvPatch&,
131  );
132 
133  //- Construct from patch, internal field and dictionary
135  (
136  const fvPatch&,
138  const dictionary&
139  );
140 
141  //- Construct by mapping given
142  // turbulentHeatFluxTemperatureFvPatchScalarField onto
143  // a new patch
145  (
147  const fvPatch&,
149  const fvPatchFieldMapper&
150  );
151 
152  //- Construct as copy
154  (
156  );
157 
158  //- Construct and return a clone
159  virtual tmp<fvPatchScalarField> clone() const
160  {
162  (
164  );
165  }
166 
167  //- Construct as copy setting internal field reference
169  (
172  );
173 
174  //- Construct and return a clone setting internal field reference
176  (
178  ) const
179  {
181  (
183  (
184  *this,
185  iF
186  )
187  );
188  }
189 
190 
191  // Member functions
192 
193  // Mapping functions
194 
195  //- Map (and resize as needed) from self given a mapping object
196  virtual void autoMap(const fvPatchFieldMapper&);
197 
198  //- Reverse map the given fvPatchField onto this fvPatchField
199  virtual void rmap
200  (
201  const fvPatchScalarField&,
202  const labelList&
203  );
204 
205 
206  // Evaluation functions
207 
208  //- Update the coefficients associated with the patch field
209  virtual void updateCoeffs();
210 
211 
212  // I-O
213 
214  //- Write
215  virtual void write(Ostream&) const;
216 };
217 
218 
219 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220 
221 } // End namespace incompressible
222 } // End namespace Foam
223 
224 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 
226 #endif
227 
228 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:48
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
NamedEnum.H
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::heatSource_
heatSourceType heatSource_
Heat source type.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:138
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:188
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:185
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::QrName_
word QrName_
Name of radiative in flux field.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:144
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::q_
scalarField q_
Heat power [W] or flux [W/m2].
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:141
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::turbulentHeatFluxTemperatureFvPatchScalarField
turbulentHeatFluxTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:74
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType
heatSourceType
Enumeration listing the possible hest source input modes.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:123
fixedGradientFvPatchFields.H
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames_
static const NamedEnum< heatSourceType, 2 > heatSourceTypeNames_
Heat source type names.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:135
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::TypeName
TypeName("turbulentHeatFluxTemperature")
Runtime type information.
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:252
fvPatchFields.H
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::rmap
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:168
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:158
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::hsPower
@ hsPower
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:125
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField
Fixed heat boundary condition to specify temperature gradient. Input heat source either specified in ...
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:114
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
turbulentHeatFluxTemperatureFvPatchScalarField
Fixed heat boundary condition to specify temperature gradient. Input heat source either specified in ...
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::hsFlux
@ hsFlux
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:126
Foam::NamedEnum< heatSourceType, 2 >
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51