wallHeatTransferFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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::wallHeatTransferFvPatchScalarField
26 
27 Description
28  This boundary condition provides an enthalpy condition for wall heat
29  transfer
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  Tinf | wall temperature | yes |
35  alphaWall | thermal diffusivity | yes |
36  \endtable
37 
38  Example of the boundary condition specification:
39  \verbatim
40  <patchName>
41  {
42  type wallHeatTransfer;
43  Tinf uniform 500;
44  alphaWall uniform 1;
45  }
46  \endverbatim
47 
48 SourceFiles
49  wallHeatTransferFvPatchScalarField.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef wallHeatTransferFvPatchScalarField_H
54 #define wallHeatTransferFvPatchScalarField_H
55 
56 #include "mixedFvPatchFields.H"
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class wallHeatTransferFvPatchScalarField Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 class wallHeatTransferFvPatchScalarField
68 :
69  public mixedFvPatchScalarField
70 {
71  // Private data
72 
73  //- Temperature at the wall
74  scalarField Tinf_;
75 
76  //- Thermal diffusivity at the wall
77  scalarField alphaWall_;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("wallHeatTransfer");
84 
85 
86  // Constructors
87 
88  //- Construct from patch and internal field
90  (
91  const fvPatch&,
93  );
94 
95  //- Construct from patch, internal field and dictionary
97  (
98  const fvPatch&,
100  const dictionary&
101  );
102 
103  //- Construct by mapping given wallHeatTransferFvPatchScalarField
104  // onto a new patch
106  (
108  const fvPatch&,
110  const fvPatchFieldMapper&
111  );
112 
113  //- Construct as copy
115  (
117  );
118 
119  //- Construct and return a clone
120  virtual tmp<fvPatchScalarField> clone() const
121  {
123  (
125  );
126  }
127 
128  //- Construct as copy setting internal field reference
130  (
133  );
135  //- Construct and return a clone setting internal field reference
137  (
139  ) const
140  {
142  (
144  );
145  }
146 
147 
148  // Member functions
149 
150  // Access
152  //- Return Tinf
153  const scalarField& Tinf() const
154  {
155  return Tinf_;
156  }
157 
158  //- Return reference to Tinf to allow adjustment
159  scalarField& Tinf()
160  {
161  return Tinf_;
162  }
163 
164  //- Return alphaWall
165  const scalarField& alphaWall() const
166  {
167  return alphaWall_;
168  }
169 
170  //- Return reference to alphaWall to allow adjustment
172  {
173  return alphaWall_;
174  }
175 
176 
177  // Mapping functions
178 
179  //- Map (and resize as needed) from self given a mapping object
180  virtual void autoMap
181  (
182  const fvPatchFieldMapper&
183  );
184 
185  //- Reverse map the given fvPatchField onto this fvPatchField
186  virtual void rmap
187  (
188  const fvPatchScalarField&,
189  const labelList&
190  );
191 
192 
193  // Evaluation functions
194 
195  //- Update the coefficients associated with the patch field
196  virtual void updateCoeffs();
197 
198 
199  //- Write
200  virtual void write(Ostream&) const;
201 };
202 
203 
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 
206 } // End namespace Foam
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 #endif
211 
212 // ************************************************************************* //
TypeName("wallHeatTransfer")
Runtime type information.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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:66
const scalarField & alphaWall() const
Return alphaWall.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
This boundary condition provides an enthalpy condition for wall heat transfer.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A class for managing temporary objects.
Definition: PtrList.H:53
wallHeatTransferFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.