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 and return a clone
125  virtual tmp<fvPatchScalarField> clone() const
126  {
128  (
130  );
131  }
132 
133  //- Construct as copy setting internal field reference
135  (
138  );
139 
140  //- Construct and return a clone setting internal field reference
142  (
144  ) const
145  {
147  (
149  );
150  }
151 
152 
153  // Member functions
154 
155  // Access
156 
157  //- Return Tinf
158  const scalarField& Tinf() const
159  {
160  return Tinf_;
161  }
162 
163  //- Return reference to Tinf to allow adjustment
164  scalarField& Tinf()
165  {
166  return Tinf_;
167  }
168 
169  //- Return alphaWall
170  const scalarField& alphaWall() const
171  {
172  return alphaWall_;
173  }
174 
175  //- Return reference to alphaWall to allow adjustment
177  {
178  return alphaWall_;
179  }
180 
181 
182  // Mapping functions
183 
184  //- Map (and resize as needed) from self given a mapping object
185  virtual void autoMap
186  (
187  const fvPatchFieldMapper&
188  );
189 
190  //- Reverse map the given fvPatchField onto this fvPatchField
191  virtual void rmap
192  (
193  const fvPatchScalarField&,
194  const labelList&
195  );
196 
197 
198  // Evaluation functions
199 
200  //- Update the coefficients associated with the patch field
201  virtual void updateCoeffs();
202 
203 
204  //- Write
205  virtual void write(Ostream&) const;
206 };
207 
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 } // End namespace Foam
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 #endif
216 
217 // ************************************************************************* //
Foam::fvPatchField< scalar >
Foam::wallHeatTransferFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: wallHeatTransferFvPatchScalarField.C:176
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
Foam::wallHeatTransferFvPatchScalarField::rmap
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: wallHeatTransferFvPatchScalarField.C:131
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::wallHeatTransferFvPatchScalarField::TypeName
TypeName("wallHeatTransfer")
Runtime type information.
Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
wallHeatTransferFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: wallHeatTransferFvPatchScalarField.C:36
Foam::wallHeatTransferFvPatchScalarField::Tinf
scalarField & Tinf()
Return reference to Tinf to allow adjustment.
Definition: wallHeatTransferFvPatchScalarField.H:178
Foam::wallHeatTransferFvPatchScalarField::alphaWall
const scalarField & alphaWall() const
Return alphaWall.
Definition: wallHeatTransferFvPatchScalarField.H:184
Foam::wallHeatTransferFvPatchScalarField
This boundary condition provides an enthalpy condition for wall heat transfer.
Definition: wallHeatTransferFvPatchScalarField.H:86
Foam::Field< scalar >
Foam::wallHeatTransferFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: wallHeatTransferFvPatchScalarField.H:139
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::wallHeatTransferFvPatchScalarField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: wallHeatTransferFvPatchScalarField.C:120
Foam::wallHeatTransferFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: wallHeatTransferFvPatchScalarField.C:146
Foam::wallHeatTransferFvPatchScalarField::alphaWall
scalarField & alphaWall()
Return reference to alphaWall to allow adjustment.
Definition: wallHeatTransferFvPatchScalarField.H:190
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
mixedFvPatchFields.H
Foam::List< label >
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::wallHeatTransferFvPatchScalarField::Tinf
const scalarField & Tinf() const
Return Tinf.
Definition: wallHeatTransferFvPatchScalarField.H:172