Loading...
Searching...
No Matches
atmTurbulentHeatFluxTemperatureFvPatchScalarField.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) 2020 ENERCON GmbH
9 Copyright (C) 2020-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::atmTurbulentHeatFluxTemperatureFvPatchScalarField
29
30Group
31 grpAtmWallFunctions
32
33Description
34 This boundary condition provides a fixed heat constraint on temperature
35 (i.e. \c T) to specify temperature gradient through an input heat source
36 which can either be specified as absolute power [W], or as flux [W/m2].
37
38 Required fields:
39 \verbatim
40 nut | Turbulent viscosity [m2/s]
41 k | Turbulent kinetic energy [m2/s2]
42 \endverbatim
43
44Usage
45 Example of the boundary condition specification:
46 \verbatim
47 <patchName>
48 {
49 // Mandatory entries (unmodifiable)
50 type atmTurbulentHeatFluxTemperature;
51 heatSource flux;
52 alphaEff alphaEff;
53
54 // Mandatory entries (runtime modifiable)
55 Cp0 0.001;
56 q uniform 10;
57
58 // Optional (inherited) entries
59 ...
60 }
61 \endverbatim
62
63 where the entries mean:
64 \table
65 Property | Description | Type | Reqd | Dflt
66 heatSource | Heat source type | word | yes | -
67 alphaEff | Name of turbulent thermal diff. field [kg/m/s] <!--
68 --> | word | yes | -
69 Cp0 | Specific heat capacity [m2/s2/K] <!--
70 --> | Function1<scalar> | yes | -
71 q | Heat source value [W (power) or W/m2 (flux)] <!--
72 --> | PatchFunction1<scalar> | yes | -
73 \endtable
74
75 The inherited entries are elaborated in:
76 - \link fixedGradientFvPatchScalarField.H \endlink
77 - \link Function1.H \endlink
78 - \link PatchFunction1.H \endlink
79
80 Options for the \c heatSource entry:
81 \verbatim
82 power | Absolute power heat source [W]
83 flux | Flux heat source [W/m2]
84 \endverbatim
85
86SourceFiles
87 atmTurbulentHeatFluxTemperatureFvPatchScalarField.C
88
89\*---------------------------------------------------------------------------*/
90
91#ifndef atmTurbulentHeatFluxTemperatureFvPatchScalarFields_H
92#define atmTurbulentHeatFluxTemperatureFvPatchScalarFields_H
93
94#include "fvPatchFields.H"
96#include "Function1.H"
97#include "PatchFunction1.H"
98
99// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100
101namespace Foam
102{
103
104/*---------------------------------------------------------------------------*\
105 Class atmTurbulentHeatFluxTemperatureFvPatchScalarField Declaration
106\*---------------------------------------------------------------------------*/
107
109:
110 public fixedGradientFvPatchScalarField
111{
112 // Private Enumerations
113
114 //- Options for the heat source input modes
115 enum heatSourceType
116 {
117 POWER,
118 FLUX
119 };
120
121 //- Names for heatSourceType
122 static const Enum<heatSourceType> heatSourceTypeNames;
123
124
125 // Private Data
126
127 //- Heat source type
128 const enum heatSourceType heatSource_;
129
130 //- Name of effective thermal diffusivity field [kg/m/s]
131 word alphaEffName_;
132
133 //- Specific heat capacity [m2/s2/K]
134 autoPtr<Function1<scalar>> Cp0_;
135
136 //- Heat power [W] or flux [W/m2]
137 // Divided by density, rho, if used in kinematic form
138 autoPtr<PatchFunction1<scalar>> q_;
140public:
141
142 //- Runtime type information
143 TypeName("atmTurbulentHeatFluxTemperature");
144
145
146 // Constructors
147
148 //- Construct from patch and internal field
150 (
151 const fvPatch&,
153 );
154
155 //- Construct from patch, internal field and dictionary
157 (
158 const fvPatch&,
160 const dictionary&
161 );
162
163 //- Construct by mapping given
164 //- atmTurbulentHeatFluxTemperatureFvPatchScalarField onto
165 //- a new patch
167 (
169 const fvPatch&,
171 const fvPatchFieldMapper&
172 );
173
174 //- Construct as copy
176 (
178 );
179
180 //- Construct as copy setting internal field reference
182 (
185 );
186
187 //- Return a clone
188 virtual tmp<fvPatchField<scalar>> clone() const
190 return fvPatchField<scalar>::Clone(*this);
191 }
192
193 //- Clone with an internal field reference
195 (
197 ) const
198 {
199 return fvPatchField<scalar>::Clone(*this, iF);
200 }
201
202
203 // Member Functions
204
205 // Mapping
206
207 //- Map (and resize as needed) from self given a mapping object
208 virtual void autoMap(const fvPatchFieldMapper&);
209
210 //- Reverse map the given fvPatchField onto this fvPatchField
211 virtual void rmap
212 (
213 const fvPatchScalarField&,
214 const labelList&
215 );
216
217
218 // Evaluation
219
220 //- Update the coefficients associated with the patch field
221 virtual void updateCoeffs();
222
223
224 // I-O
225
226 //- Write
227 virtual void write(Ostream&) const;
228};
229
230
231// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232
233} // End namespace Foam
234
235// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236
237#endif
238
239// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition Enum.H:57
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
This boundary condition provides a fixed heat constraint on temperature (i.e. T) to specify temperatu...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
atmTurbulentHeatFluxTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
TypeName("atmTurbulentHeatFluxTemperature")
Runtime type information.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
fvPatchField< scalar > fvPatchScalarField
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68