bak_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  OpenFOAM is free software: you can redistribute it and/or modify it
11  under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17  for more details.
18  You should have received a copy of the GNU General Public License
19  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
20 Class
21  Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField
22 Group
23  grpIcoRASBoundaryConditions grpWallBoundaryConditions
24 Description
25  Fixed heat boundary condition to specify temperature gradient. Input
26  heat source either specified in terms of an absolute power [W], or as a
27  flux [W/m^2].
28  \heading Patch usage
29  \table
30  Property | Description | Required | Default value
31  heatSource | heat source type: \c flux [W/m^2] or \c power [W]| yes |
32  q | heat source value | yes |
33  alphaEff | turbulent thermal diffusivity field name | yes |
34  \endtable
35  Example of the boundary condition specification:
36  \verbatim
37  myPatch
38  {
39  type turbulentHeatFluxTemperature;
40  heatSource flux;
41  q uniform 10;
42  alphaEff alphaEff;
43  value uniform 300; // place holder
44  }
45  \endverbatim
46 Note
47  - The units of \c alphaEff are [kg/m/s]
48  - The density*specific heat capacity \c rhoCp0 (units [kg/m^3]*[J/kg/K])
49  is read from the transport dictionary entry
50 SourceFiles
51  turbulentHeatFluxTemperatureFvPatchScalarField.C
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
55 #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
56 
57 #include "fvPatchFields.H"
59 #include "NamedEnum.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 namespace incompressible
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration
70 \*---------------------------------------------------------------------------*/
71 
73 :
74  public fixedGradientFvPatchScalarField
75 {
76 public:
77 
78  // Data types
79 
80  //- Enumeration listing the possible hest source input modes
81  enum heatSourceType
82  {
83  hsPower,
84  hsFlux
85  };
86 
87 
88 private:
89 
90  // Private data
91 
92  //- Heat source type names
93  static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_;
94 
95  //- Heat source type
97 
98  //- Heat power [W] or flux [W/m2]
100 
101  //- Name of effective thermal diffusivity field
103 
104 
105 public:
106 
107  //- Runtime type information
108  TypeName("turbulentHeatFluxTemperature");
109 
110 
111  // Constructors
112 
113  //- Construct from patch and internal field
115  (
116  const fvPatch&,
118  );
119 
120  //- Construct from patch, internal field and dictionary
122  (
123  const fvPatch&,
125  const dictionary&
126  );
127 
128  //- Construct by mapping given
129  // turbulentHeatFluxTemperatureFvPatchScalarField onto
130  // a new patch
132  (
134  const fvPatch&,
136  const fvPatchFieldMapper&
137  );
138 
139  //- Construct as copy
141  (
143  );
144 
145  //- Construct and return a clone
146  virtual tmp<fvPatchScalarField> clone() const
147  {
149  (
151  );
152  }
153 
154  //- Construct as copy setting internal field reference
156  (
159  );
160 
161  //- Construct and return a clone setting internal field reference
163  (
165  ) const
166  {
168  (
170  (
171  *this,
172  iF
173  )
174  );
175  }
176 
177 
178  // Member functions
179 
180  // Mapping functions
181 
182  //- Map (and resize as needed) from self given a mapping object
183  virtual void autoMap(const fvPatchFieldMapper&);
184 
185  //- Reverse map the given fvPatchField onto this fvPatchField
186  virtual void rmap
187  (
188  const fvPatchScalarField&,
189  const labelList&
190  );
191 
192 
193  // Evaluation functions
194 
195  //- Update the coefficients associated with the patch field
196  virtual void updateCoeffs();
197 
198 
199  // I-O
200 
201  //- Write
202  virtual void write(Ostream&) const;
203 };
204 
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 } // End namespace incompressible
209 } // End namespace Foam
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 #endif
214 
215 // ************************************************************************* //
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: bak_turbulentHeatFluxTemperatureFvPatchScalarField.H:165
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:185
Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::alphaEffName_
word alphaEffName_
Name of effective thermal diffusivity field.
Definition: bak_turbulentHeatFluxTemperatureFvPatchScalarField.H:121
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
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