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-2016 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::compressible::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  The thermal conductivity \c kappa can either be retrieved from various
33  possible sources, as detailed in the class temperatureCoupledBase.
34 
35 Usage
36  \table
37  Property | Description | Required | Default value
38  heatSource | 'power' [W] or 'flux' [W/m^2] | yes |
39  q | heat power or flux field | 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  kappaMethod | inherited from temperatureCoupledBase | inherited |
44  kappa | inherited from temperatureCoupledBase | inherited |
45  \endtable
46 
47  Note: If needed, both 'value' and 'gradient' must be defined to be used.
48 
49  Example usage:
50  \verbatim
51  hotWall
52  {
53  type compressible::turbulentHeatFluxTemperature;
54  heatSource flux;
55  q uniform 10;
56  kappaMethod fluidThermo;
57  kappa none;
58  Qr none;
59  }
60  \endverbatim
61 
62 See also
63  Foam::temperatureCoupledBase
64 
65 SourceFiles
66  turbulentHeatFluxTemperatureFvPatchScalarField.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
71 #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
72 
74 #include "temperatureCoupledBase.H"
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 namespace compressible
81 {
82 
83 /*---------------------------------------------------------------------------*\
84  Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration
85 \*---------------------------------------------------------------------------*/
86 
87 class turbulentHeatFluxTemperatureFvPatchScalarField
88 :
89  public fixedGradientFvPatchScalarField,
90  public temperatureCoupledBase
91 {
92 public:
93 
94  // Data types
95 
96  //- Enumeration listing the possible hest source input modes
97  enum heatSourceType
98  {
99  hsPower,
100  hsFlux
101  };
102 
103 
104 private:
105 
106  // Private data
107 
108  //- Heat source type names
109  static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_;
110 
111  //- Heat source type
112  heatSourceType heatSource_;
113 
114  //- Heat power [W] or flux [W/m2]
115  scalarField q_;
116 
117  //- Name of radiative in flux field
118  word QrName_;
119 
120 
121 public:
122 
123  //- Runtime type information
124  TypeName("compressible::turbulentHeatFluxTemperature");
125 
127  // Constructors
128 
129  //- Construct from patch and internal field
131  (
132  const fvPatch&,
134  );
135 
136  //- Construct from patch, internal field and dictionary
138  (
139  const fvPatch&,
141  const dictionary&
142  );
143 
144  //- Construct by mapping given
145  // turbulentHeatFluxTemperatureFvPatchScalarField onto
146  // a new patch
148  (
150  const fvPatch&,
152  const fvPatchFieldMapper&
153  );
154 
155  //- Construct as copy
157  (
159  );
160 
161  //- Construct and return a clone
162  virtual tmp<fvPatchScalarField> clone() const
163  {
165  (
167  );
168  }
169 
170  //- Construct as copy setting internal field reference
172  (
175  );
176 
177  //- Construct and return a clone setting internal field reference
179  (
181  ) const
182  {
184  (
186  (
187  *this,
188  iF
189  )
190  );
191  }
192 
193 
194  // Member functions
195 
196  // Mapping functions
197 
198  //- Map (and resize as needed) from self given a mapping object
199  virtual void autoMap(const fvPatchFieldMapper&);
200 
201  //- Reverse map the given fvPatchField onto this fvPatchField
202  virtual void rmap
203  (
204  const fvPatchScalarField&,
205  const labelList&
206  );
207 
208 
209  // Evaluation functions
210 
211  //- Update the coefficients associated with the patch field
212  virtual void updateCoeffs();
213 
214 
215  // I-O
216 
217  //- Write
218  virtual void write(Ostream&) const;
219 };
220 
221 
222 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223 
224 } // End namespace compressible
225 } // End namespace Foam
226 
227 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
228 
229 #endif
230 
231 // ************************************************************************* //
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Fixed heat boundary condition to specify temperature gradient. Input heat source either specified in ...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName("compressible::turbulentHeatFluxTemperature")
Runtime type information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:54
turbulentHeatFluxTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.
bool compressible
Definition: pEqn.H:30