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  typedef wallHeatTransferFvPatchScalarField this_bctype;
77  typedef mixedFvPatchScalarField parent_bctype;
78 
79  // Private Data
80 
81  //- Temperature at the wall
82  scalarField Tinf_;
83 
84  //- Thermal diffusivity at the wall
85  scalarField alphaWall_;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("wallHeatTransfer");
92 
93 
94  // Constructors
95 
96  //- Construct from patch and internal field
98  (
99  const fvPatch&,
101  );
102 
103  //- Construct from patch, internal field and dictionary
105  (
106  const fvPatch&,
108  const dictionary&
109  );
110 
111  //- Construct by mapping onto a new patch
113  (
114  const this_bctype&,
115  const fvPatch&,
117  const fvPatchFieldMapper&
118  );
119 
120  //- Construct as copy setting internal field reference
122  (
123  const this_bctype&,
125  );
126 
127  //- No copy without an internal field
129 
130  //- Clone with an internal field reference
132  (
134  ) const
135  {
136  return fvPatchField<scalar>::Clone(*this, iF);
137  }
138 
139 
140  // Member functions
141 
142  // Access
143 
144  //- Return Tinf
145  const scalarField& Tinf() const
146  {
147  return Tinf_;
148  }
149 
150  //- Return reference to Tinf to allow adjustment
151  scalarField& Tinf()
152  {
153  return Tinf_;
154  }
155 
156  //- Return alphaWall
157  const scalarField& alphaWall() const
158  {
159  return alphaWall_;
160  }
161 
162  //- Return reference to alphaWall to allow adjustment
164  {
165  return alphaWall_;
166  }
167 
168 
169  // Mapping functions
170 
171  //- Map (and resize as needed) from self given a mapping object
172  virtual void autoMap
173  (
174  const fvPatchFieldMapper&
175  );
176 
177  //- Reverse map the given fvPatchField onto this fvPatchField
178  virtual void rmap
179  (
180  const fvPatchScalarField&,
181  const labelList&
182  );
184 
185  // Evaluation functions
186 
187  //- Update the coefficients associated with the patch field
188  virtual void updateCoeffs();
189 
190 
191  //- Write
192  virtual void write(Ostream&) const;
193 
194 
195  // Member Operators
196 
197  //- Inherit assignment
198  using parent_bctype::operator=;
199 };
200 
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 } // End namespace Foam
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 #endif
209 
210 // ************************************************************************* //
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:130
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:635
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
wallHeatTransferFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.