wallHeatTransferFvPatchScalarField.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) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::wallHeatTransferFvPatchScalarField
28 
29 Group
30  grpThermoBoundaryConditions grpWallBoundaryConditions
31 
32 Description
33  This boundary condition provides an enthalpy condition for wall heat
34  transfer
35 
36 Usage
37  \table
38  Property | Description | Required | Default value
39  Tinf | wall temperature | yes |
40  alphaWall | thermal diffusivity | yes |
41  \endtable
42 
43  Example of the boundary condition specification:
44  \verbatim
45  <patchName>
46  {
47  type wallHeatTransfer;
48  Tinf uniform 500;
49  alphaWall uniform 1;
50  }
51  \endverbatim
52 
53 SourceFiles
54  wallHeatTransferFvPatchScalarField.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef wallHeatTransferFvPatchScalarField_H
59 #define wallHeatTransferFvPatchScalarField_H
60 
61 #include "mixedFvPatchFields.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class wallHeatTransferFvPatchScalarField Declaration
70 \*---------------------------------------------------------------------------*/
71 
72 class wallHeatTransferFvPatchScalarField
73 :
74  public mixedFvPatchScalarField
75 {
76  // Private data
77 
78  //- Temperature at the wall
79  scalarField Tinf_;
80 
81  //- Thermal diffusivity at the wall
82  scalarField alphaWall_;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("wallHeatTransfer");
89 
90 
91  // Constructors
92 
93  //- Construct from patch and internal field
95  (
96  const fvPatch&,
98  );
99 
100  //- Construct from patch, internal field and dictionary
102  (
103  const fvPatch&,
105  const dictionary&
106  );
107 
108  //- Construct by mapping given wallHeatTransferFvPatchScalarField
109  // onto a new patch
111  (
113  const fvPatch&,
115  const fvPatchFieldMapper&
116  );
117 
118  //- Construct as copy
120  (
122  );
123 
124  //- Construct as copy setting internal field reference
126  (
129  );
130 
131  //- Return a clone
132  virtual tmp<fvPatchField<scalar>> clone() const
133  {
134  return fvPatchField<scalar>::Clone(*this);
135  }
136 
137  //- Clone with an internal field reference
139  (
141  ) const
142  {
143  return fvPatchField<scalar>::Clone(*this, iF);
144  }
145 
146 
147  // Member functions
148 
149  // Access
150 
151  //- Return Tinf
152  const scalarField& Tinf() const
153  {
154  return Tinf_;
155  }
156 
157  //- Return reference to Tinf to allow adjustment
158  scalarField& Tinf()
159  {
160  return Tinf_;
161  }
162 
163  //- Return alphaWall
164  const scalarField& alphaWall() const
165  {
166  return alphaWall_;
167  }
168 
169  //- Return reference to alphaWall to allow adjustment
171  {
172  return alphaWall_;
173  }
174 
175 
176  // Mapping functions
177 
178  //- Map (and resize as needed) from self given a mapping object
179  virtual void autoMap
180  (
181  const fvPatchFieldMapper&
182  );
183 
184  //- Reverse map the given fvPatchField onto this fvPatchField
185  virtual void rmap
186  (
187  const fvPatchScalarField&,
188  const labelList&
189  );
190 
191 
192  // Evaluation functions
194  //- Update the coefficients associated with the patch field
195  virtual void updateCoeffs();
196 
197 
198  //- Write
199  virtual void write(Ostream&) const;
200 };
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 } // End namespace Foam
206 
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 
209 #endif
210 
211 // ************************************************************************* //
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 a number of values (eg...
Definition: dictionary.H:129
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
const scalarField & alphaWall() const
Return alphaWall.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
This boundary condition provides an enthalpy condition for wall heat transfer.
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: HashPtrTable.H:50
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
wallHeatTransferFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.