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::turbulentHeatFluxTemperatureFvPatchScalarField
26 
27 Description
28  Fixed heat boundary condition to specify temperature gradient. Input
29  heat source either specified in terms of an absolute power [W], or as a
30  flux [W/m^2].
31 
32  \heading Patch usage
33 
34  \table
35  Property | Description | Required | Default value
36  heatSource | 'power' [W] or 'flux' [W/m^2] | yes |
37  q | heat power or flux field | yes |
38  kappa | inherited from temperatureCoupledBase | yes |
39  kappaName | inherited from temperatureCoupledBase | yes |
40  Qr | name of the radiative flux field | yes |
41  value | initial temperature value | no | calculated
42  gradient | initial gradient value | no | 0.0
43  \endtable
44 
45  Note: If needed, both 'value' and 'gradient' must be defined to be used.
46 
47  Example usage:
48  \verbatim
49  hotWall
50  {
51  type compressible::turbulentHeatFluxTemperature;
52  heatSource flux;
53  q uniform 10;
54  kappa fluidThermo;
55  kappaName none;
56  Qr none;
57  }
58  \endverbatim
59 
60 
61 SeeAlso
62  Foam::temperatureCoupledBase
63 
64 SourceFiles
65  turbulentHeatFluxTemperatureFvPatchScalarField.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
70 #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
71 
73 #include "temperatureCoupledBase.H"
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 namespace compressible
80 {
81 
82 /*---------------------------------------------------------------------------*\
83  Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration
84 \*---------------------------------------------------------------------------*/
85 
87 :
88  public fixedGradientFvPatchScalarField,
89  public temperatureCoupledBase
90 {
91 public:
92 
93  // Data types
94 
95  //- Enumeration listing the possible hest source input modes
96  enum heatSourceType
97  {
98  hsPower,
99  hsFlux
100  };
101 
102 
103 private:
104 
105  // Private data
106 
107  //- Heat source type names
108  static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_;
109 
110  //- Heat source type
112 
113  //- Heat power [W] or flux [W/m2]
114  scalarField q_;
115 
116  //- Name of radiative in flux field
117  word QrName_;
118 
119 
120 public:
121 
122  //- Runtime type information
123  TypeName("compressible::turbulentHeatFluxTemperature");
124 
125 
126  // Constructors
127 
128  //- Construct from patch and internal field
130  (
131  const fvPatch&,
133  );
134 
135  //- Construct from patch, internal field and dictionary
137  (
138  const fvPatch&,
140  const dictionary&
141  );
142 
143  //- Construct by mapping given
144  // turbulentHeatFluxTemperatureFvPatchScalarField onto
145  // a new patch
147  (
149  const fvPatch&,
151  const fvPatchFieldMapper&
152  );
153 
154  //- Construct as copy
156  (
158  );
159 
160  //- Construct and return a clone
161  virtual tmp<fvPatchScalarField> clone() const
162  {
164  (
166  );
167  }
168 
169  //- Construct as copy setting internal field reference
171  (
174  );
175 
176  //- Construct and return a clone setting internal field reference
178  (
180  ) const
181  {
183  (
185  (
186  *this,
187  iF
188  )
189  );
190  }
191 
192 
193  // Member functions
194 
195  // Mapping functions
196 
197  //- Map (and resize as needed) from self given a mapping object
198  virtual void autoMap(const fvPatchFieldMapper&);
199 
200  //- Reverse map the given fvPatchField onto this fvPatchField
201  virtual void rmap
202  (
203  const fvPatchScalarField&,
204  const labelList&
205  );
206 
207 
208  // Evaluation functions
209 
210  //- Update the coefficients associated with the patch field
211  virtual void updateCoeffs();
212 
213 
214  // I-O
215 
216  //- Write
217  virtual void write(Ostream&) const;
218 };
219 
220 
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222 
223 } // End namespace compressible
224 } // End namespace Foam
225 
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 
228 #endif
229 
230 // ************************************************************************* //
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
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::TypeName
TypeName("compressible::turbulentHeatFluxTemperature")
Runtime type information.
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:233
Foam::temperatureCoupledBase
Common functions for use in temperature coupled boundaries.
Definition: temperatureCoupledBase.H:104
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames_
static const NamedEnum< heatSourceType, 2 > heatSourceTypeNames_
Heat source type names.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:147
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::hsPower
@ hsPower
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:137
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
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::hsFlux
@ hsFlux
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:138
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::QrName_
word QrName_
Name of radiative in flux field.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:156
fixedGradientFvPatchFields.H
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType
heatSourceType
Enumeration listing the possible hest source input modes.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:135
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:125
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:200
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::rmap
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:173
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
compressible
bool compressible
Definition: pEqn.H:40
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::turbulentHeatFluxTemperatureFvPatchScalarField
turbulentHeatFluxTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:73
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:163
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::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.C:190
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::q_
scalarField q_
Heat power [W] or flux [W/m2].
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:153
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
Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::heatSource_
heatSourceType heatSource_
Heat source type.
Definition: turbulentHeatFluxTemperatureFvPatchScalarField.H:150