initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / radiation / derivedFvPatchFields / greyDiffusiveRadiation / greyDiffusiveRadiationMixedFvPatchScalarField.H
blobcad873ab725423ad055a576793f9c4149a356dc6
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-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::greyDiffusiveRadiationMixedFvPatchScalarField
28 Description
29     Radiation temperature specified
31 SourceFiles
32     greyDiffusiveRadiationMixedFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef greyDiffusiveRadiationMixedFvPatchScalarField_H
37 #define greyDiffusiveRadiationMixedFvPatchScalarField_H
39 #include "mixedFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
45 namespace radiation
47 /*---------------------------------------------------------------------------*\
48         Class greyDiffusiveRadiationMixedFvPatchScalarField Declaration
49 \*---------------------------------------------------------------------------*/
51 class greyDiffusiveRadiationMixedFvPatchScalarField
53     public mixedFvPatchScalarField
55     // Private data
57         //- Name of temperature field
58         word TName_;
60         //- Emissivity
61         scalar emissivity_;
64 public:
66     //- Runtime type information
67     TypeName("greyDiffusiveRadiation");
70     // Constructors
72         //- Construct from patch and internal field
73         greyDiffusiveRadiationMixedFvPatchScalarField
74         (
75             const fvPatch&,
76             const DimensionedField<scalar, volMesh>&
77         );
79         //- Construct from patch, internal field and dictionary
80         greyDiffusiveRadiationMixedFvPatchScalarField
81         (
82             const fvPatch&,
83             const DimensionedField<scalar, volMesh>&,
84             const dictionary&
85         );
87         //- Construct by mapping given a
88         //  greyDiffusiveRadiationMixedFvPatchScalarField onto a new patch
89         greyDiffusiveRadiationMixedFvPatchScalarField
90         (
91             const greyDiffusiveRadiationMixedFvPatchScalarField&,
92             const fvPatch&,
93             const DimensionedField<scalar, volMesh>&,
94             const fvPatchFieldMapper&
95         );
97         //- Construct as copy
98         greyDiffusiveRadiationMixedFvPatchScalarField
99         (
100             const greyDiffusiveRadiationMixedFvPatchScalarField&
101         );
103         //- Construct and return a clone
104         virtual tmp<fvPatchScalarField> clone() const
105         {
106             return tmp<fvPatchScalarField>
107             (
108                 new greyDiffusiveRadiationMixedFvPatchScalarField(*this)
109             );
110         }
112         //- Construct as copy setting internal field reference
113         greyDiffusiveRadiationMixedFvPatchScalarField
114         (
115             const greyDiffusiveRadiationMixedFvPatchScalarField&,
116             const DimensionedField<scalar, volMesh>&
117         );
119         //- Construct and return a clone setting internal field reference
120         virtual tmp<fvPatchScalarField> clone
121         (
122             const DimensionedField<scalar, volMesh>& iF
123         ) const
124         {
125             return tmp<fvPatchScalarField>
126             (
127                 new greyDiffusiveRadiationMixedFvPatchScalarField(*this, iF)
128             );
129         }
132     // Member functions
134         // Access
136             //- Return the temperature field name
137             const word& TName() const
138             {
139                 return TName_;
140             }
142             //- Return reference to the temperature field name to allow
143             //  adjustment
144             word& TName()
145             {
146                 return TName_;
147             }
149             //- Return the emissivity
150             const scalar& emissivity() const
151             {
152                 return emissivity_;
153             }
155             //- Return reference to the emissivity to allow adjustment
156             scalar& emissivity()
157             {
158                 return emissivity_;
159             }
162         // Evaluation functions
164             //- Update the coefficients associated with the patch field
165             virtual void updateCoeffs();
168         // I-O
170             //- Write
171             virtual void write(Ostream&) const;
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 } // End namespace Foam
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 #endif
184 // ************************************************************************* //