Loading...
Searching...
No Matches
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
80:
81 public mixedFvPatchScalarField,
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 );
120
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 as copy setting internal field reference
140 (
143 );
144
145 //- Return a clone
146 virtual tmp<fvPatchField<scalar>> clone() const
147 {
148 return fvPatchField<scalar>::Clone(*this);
149 }
150
151 //- Clone with an internal field reference
153 (
155 ) const
156 {
157 return fvPatchField<scalar>::Clone(*this, iF);
158 }
159
160
161 // Member functions
162
163 // Mapping functions
164
165 //- Map (and resize as needed) from self given a mapping object
166 virtual void autoMap
167 (
168 const fvPatchFieldMapper&
169 );
170
171 //- Reverse map the given fvPatchField onto this fvPatchField
172 virtual void rmap
173 (
174 const fvPatchField<scalar>&,
175 const labelList&
176 );
177
178
179 // Evaluation functions
180
181 //- Update the coefficients associated with the patch field
182 virtual void updateCoeffs();
183
184
185 // I-O
186
187 //- Write
188 void write(Ostream&) const;
189};
191
192// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193
194} // End namespace Foam
195
196// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197
198#endif
199
200// ************************************************************************* //
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:59
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.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
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
TypeName("lumpedMassWallTemperature")
Runtime type information.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
lumpedMassWallTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Common functions used in temperature coupled boundaries.
temperatureCoupledBase(const fvPatch &patch, const KMethodType method=KMethodType::mtFluidThermo)
Default construct from patch, using fluidThermo (default) or specified method.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68