initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / basic / derivedFvPatchFields / wallHeatTransfer / wallHeatTransferFvPatchScalarField.H
bloba50f3fc1e5646cc0f11b8b5868495580d2e74fe7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::wallHeatTransferFvPatchScalarField
28 Description
29     Enthalpy boundary conditions for wall heat transfer
31 SourceFiles
32     wallHeatTransferFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef wallHeatTransferFvPatchScalarField_H
37 #define wallHeatTransferFvPatchScalarField_H
39 #include "mixedFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                   Class wallHeatTransferFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 class wallHeatTransferFvPatchScalarField
52     public mixedFvPatchScalarField
54     // Private data
56         //- Tinf
57         scalarField Tinf_;
59         //- alphaWall
60         scalarField alphaWall_;
63 public:
65     //- Runtime type information
66     TypeName("wallHeatTransfer");
69     // Constructors
71         //- Construct from patch and internal field
72         wallHeatTransferFvPatchScalarField
73         (
74             const fvPatch&,
75             const DimensionedField<scalar, volMesh>&
76         );
78         //- Construct from patch, internal field and dictionary
79         wallHeatTransferFvPatchScalarField
80         (
81             const fvPatch&,
82             const DimensionedField<scalar, volMesh>&,
83             const dictionary&
84         );
86         //- Construct by mapping given wallHeatTransferFvPatchScalarField
87         // onto a new patch
88         wallHeatTransferFvPatchScalarField
89         (
90             const wallHeatTransferFvPatchScalarField&,
91             const fvPatch&,
92             const DimensionedField<scalar, volMesh>&,
93             const fvPatchFieldMapper&
94         );
96         //- Construct as copy
97         wallHeatTransferFvPatchScalarField
98         (
99             const wallHeatTransferFvPatchScalarField&
100         );
102         //- Construct and return a clone
103         virtual tmp<fvPatchScalarField> clone() const
104         {
105             return tmp<fvPatchScalarField>
106             (
107                 new wallHeatTransferFvPatchScalarField(*this)
108             );
109         }
111         //- Construct as copy setting internal field reference
112         wallHeatTransferFvPatchScalarField
113         (
114             const wallHeatTransferFvPatchScalarField&,
115             const DimensionedField<scalar, volMesh>&
116         );
118         //- Construct and return a clone setting internal field reference
119         virtual tmp<fvPatchScalarField> clone
120         (
121             const DimensionedField<scalar, volMesh>& iF
122         ) const
123         {
124             return tmp<fvPatchScalarField>
125             (
126                 new wallHeatTransferFvPatchScalarField(*this, iF)
127             );
128         }
131     // Member functions
133         // Access
135             //- Return Tinf
136             const scalarField& Tinf() const
137             {
138                 return Tinf_;
139             }
141             //- Return reference to Tinf to allow adjustment
142             scalarField& Tinf()
143             {
144                 return Tinf_;
145             }
147             //- Return alphaWall
148             const scalarField& alphaWall() const
149             {
150                 return alphaWall_;
151             }
153             //- Return reference to alphaWall to allow adjustment
154             scalarField& alphaWall()
155             {
156                 return alphaWall_;
157             }
160         // Mapping functions
162             //- Map (and resize as needed) from self given a mapping object
163             virtual void autoMap
164             (
165                 const fvPatchFieldMapper&
166             );
168             //- Reverse map the given fvPatchField onto this fvPatchField
169             virtual void rmap
170             (
171                 const fvPatchScalarField&,
172                 const labelList&
173             );
176         // Evaluation functions
178             //- Update the coefficients associated with the patch field
179             virtual void updateCoeffs();
182         //- Write
183         virtual void write(Ostream&) const;
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 } // End namespace Foam
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 #endif
195 // ************************************************************************* //