initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / heatTransfer / chtMultiRegionFoam / derivedFvPatchFields / solidWallHeatFluxTemperature / solidWallHeatFluxTemperatureFvPatchScalarField.H
blob85a1ef1cf13f46466f9451e6e1295cde8a8e0d6a
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     solidWallHeatFluxTemperatureFvPatchScalarField
28 Description
29     Heat flux boundary condition for temperature on solid region
31     Example usage:
32         myWallPatch
33         {
34             type            solidWallHeatFluxTemperature;
35             K               K;                 // Name of K field
36             q               uniform 1000;      // Heat flux / [W/m2]
37             value           300.0;             // Initial temperature / [K]
38         }
41 SourceFiles
42     solidWallHeatFluxTemperatureFvPatchScalarField.C
44 \*---------------------------------------------------------------------------*/
46 #ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H
47 #define solidWallHeatFluxTemperatureFvPatchScalarField_H
49 #include "fixedValueFvPatchFields.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 namespace Foam
56 /*---------------------------------------------------------------------------*\
57       Class solidWallHeatFluxTemperatureFvPatchScalarField Declaration
58 \*---------------------------------------------------------------------------*/
60 class solidWallHeatFluxTemperatureFvPatchScalarField
62     public fixedValueFvPatchScalarField
64     // Private data
66         //- Heat flux / [W/m2]
67         scalarField q_;
69         //- Name of thermal conductivity field
70         word KName_;
73 public:
75     //- Runtime type information
76     TypeName("solidWallHeatFluxTemperature");
79     // Constructors
81         //- Construct from patch and internal field
82         solidWallHeatFluxTemperatureFvPatchScalarField
83         (
84             const fvPatch&,
85             const DimensionedField<scalar, volMesh>&
86         );
88         //- Construct from patch, internal field and dictionary
89         solidWallHeatFluxTemperatureFvPatchScalarField
90         (
91             const fvPatch&,
92             const DimensionedField<scalar, volMesh>&,
93             const dictionary&
94         );
96         //- Construct by mapping given
97         // solidWallHeatFluxTemperatureFvPatchScalarField
98         // onto a new patch
99         solidWallHeatFluxTemperatureFvPatchScalarField
100         (
101             const solidWallHeatFluxTemperatureFvPatchScalarField&,
102             const fvPatch&,
103             const DimensionedField<scalar, volMesh>&,
104             const fvPatchFieldMapper&
105         );
107         //- Construct as copy
108         solidWallHeatFluxTemperatureFvPatchScalarField
109         (
110             const solidWallHeatFluxTemperatureFvPatchScalarField&
111         );
113         //- Construct and return a clone
114         virtual tmp<fvPatchScalarField> clone() const
115         {
116             return tmp<fvPatchScalarField>
117             (
118                 new solidWallHeatFluxTemperatureFvPatchScalarField(*this)
119             );
120         }
122         //- Construct as copy setting internal field reference
123         solidWallHeatFluxTemperatureFvPatchScalarField
124         (
125             const solidWallHeatFluxTemperatureFvPatchScalarField&,
126             const DimensionedField<scalar, volMesh>&
127         );
129         //- Construct and return a clone setting internal field reference
130         virtual tmp<fvPatchScalarField> clone
131         (
132             const DimensionedField<scalar, volMesh>& iF
133         ) const
134         {
135             return tmp<fvPatchScalarField>
136             (
137                 new solidWallHeatFluxTemperatureFvPatchScalarField(*this, iF)
138             );
139         }
142     // Member functions
144         // Evaluation functions
146             //- Update the coefficients associated with the patch field
147             virtual void updateCoeffs();
150         // Mapping functions
152             //- Map (and resize as needed) from self given a mapping object
153             virtual void autoMap
154             (
155                 const fvPatchFieldMapper&
156             );
158             //- Reverse map the given fvPatchField onto this fvPatchField
159             virtual void rmap
160             (
161                 const fvPatchScalarField&,
162                 const labelList&
163             );
166         // I-O
168             //- Write
169             void write(Ostream&) const;
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 } // End namespace Foam
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 #endif
181 // ************************************************************************* //