lumpedMassWallTemperatureFvPatchScalarField.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) 2016 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::lumpedMassWallTemperatureFvPatchScalarField
28
29Group
30 grpThermoBoundaryConditions grpWallBoundaryConditions
31
32Description
33 Employs a lumped mass model for temperature.
34
35 It considers a single temperature value for the whole patch and evaluates
36 the temperature evolution using the net heat flux into the patch.
37
38Usage
39 \table
40 Property | Description | Required | Default value
41 kappaMethod | thermal conductivity option | yes |
42 Cp | Heat capacity [J/kg.K] | yes |
43 mass | Total mass [kg] | yes |
44 \endtable
45
46 Example of the boundary condition specification:
47 \verbatim
48 myPatch
49 {
50 type lumpedMassWallTemperature;
51 kappaMethod fluidThermo;
52 kappa none;
53 mass 1000;
54 Cp 4100;
55 value uniform 300.0;
56 }
57 \endverbatim
58
59SourceFiles
60 lumpedMassWallTemperatureFvPatchScalarField.C
61
62\*---------------------------------------------------------------------------*/
63
64#ifndef lumpedMassWallTemperatureFvPatchScalarField_H
65#define lumpedMassWallTemperatureFvPatchScalarField_H
66
67#include "mixedFvPatchFields.H"
69
70// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71
72namespace Foam
73{
74
75/*---------------------------------------------------------------------------*\
76 Class lumpedMassWallTemperatureFvPatchScalarField Declaration
77\*---------------------------------------------------------------------------*/
78
79class lumpedMassWallTemperatureFvPatchScalarField
80:
81 public mixedFvPatchScalarField,
82 public temperatureCoupledBase
83{
84private:
85
86 // Private data
87
88 //- Specific heat capacity [J/kg/K]
89 scalar Cp_;
90
91 //- Mass [kg]
92 scalar mass_;
93
94 //- Current time index (used for updating)
95 label curTimeIndex_;
96
97
98public:
99
100 //- Runtime type information
101 TypeName("lumpedMassWallTemperature");
102
103
104 // Constructors
105
106 //- Construct from patch and internal field
108 (
109 const fvPatch&,
111 );
112
113 //- Construct from patch, internal field and dictionary
115 (
116 const fvPatch&,
118 const dictionary&
119 );
121 //- Construct by mapping given
122 // lumpedMassWallTemperatureFvPatchScalarField
123 // onto a new patch
125 (
127 const fvPatch&,
129 const fvPatchFieldMapper&
130 );
131
132 //- Construct as copy
134 (
136 );
137
138 //- Construct and return a clone
139 virtual tmp<fvPatchScalarField> clone() const
140 {
142 (
144 );
145 }
146
147 //- Construct as copy setting internal field reference
149 (
152 );
153
154 //- Construct and return a clone setting internal field reference
156 (
158 ) const
159 {
161 (
163 );
164 }
165
166
167 // Member functions
168
169 // Mapping functions
170
171 //- Map (and resize as needed) from self given a mapping object
172 virtual void autoMap
173 (
175 );
176
177 //- Reverse map the given fvPatchField onto this fvPatchField
178 virtual void rmap
179 (
181 const labelList&
182 );
183
184
185 // Evaluation functions
186
187 //- Update the coefficients associated with the patch field
188 virtual void updateCoeffs();
189
190
191 // I-O
192
193 //- Write
194 void write(Ostream&) const;
195};
196
197
198// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199
200} // End namespace Foam
201
202// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203
204#endif
205
206// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:82
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
TypeName("lumpedMassWallTemperature")
Runtime type information.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Common functions used in temperature coupled boundaries.
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73