initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / radiation / derivedFvPatchFields / MarshakRadiationFixedT / MarshakRadiationFixedTMixedFvPatchScalarField.H
blob49fc1bed675496dac23eea1853fbe42f6fdcbbf7
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::MarshakRadiationFixedTMixedFvPatchScalarField
28 Description
29     Marshak boundary for radiation G field
30     - radiation temperature specified
32 SourceFiles
33     MarshakRadiationFixedTMixedFvPatchScalarField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef MarshakRadiationFixedTMixedFvPatchField_H
38 #define MarshakRadiationFixedTMixedFvPatchField_H
40 #include "mixedFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48         Class MarshakRadiationFixedTMixedFvPatchScalarField Declaration
49 \*---------------------------------------------------------------------------*/
51 class MarshakRadiationFixedTMixedFvPatchScalarField
53     public mixedFvPatchScalarField
56     // Private data
58         //- Radiation temperature field
59         scalarField Trad_;
61         //- Emissivity
62         scalar emissivity_;
65 public:
67     //- Runtime type information
68     TypeName("MarshakRadiationFixedT");
71     // Constructors
73         //- Construct from patch and internal field
74         MarshakRadiationFixedTMixedFvPatchScalarField
75         (
76             const fvPatch&,
77             const DimensionedField<scalar, volMesh>&
78         );
80         //- Construct from patch, internal field and dictionary
81         MarshakRadiationFixedTMixedFvPatchScalarField
82         (
83             const fvPatch&,
84             const DimensionedField<scalar, volMesh>&,
85             const dictionary&
86         );
88         //- Construct by mapping given MarshakRadiationFvPatchField onto a new
89         //  patch
90         MarshakRadiationFixedTMixedFvPatchScalarField
91         (
92             const MarshakRadiationFixedTMixedFvPatchScalarField&,
93             const fvPatch&,
94             const DimensionedField<scalar, volMesh>&,
95             const fvPatchFieldMapper&
96         );
98         //- Construct as copy
99         MarshakRadiationFixedTMixedFvPatchScalarField
100         (
101             const MarshakRadiationFixedTMixedFvPatchScalarField&
102         );
104         //- Construct and return a clone
105         virtual tmp<fvPatchScalarField> clone() const
106         {
107             return tmp<fvPatchScalarField>
108             (
109                 new MarshakRadiationFixedTMixedFvPatchScalarField(*this)
110             );
111         }
113         //- Construct as copy setting internal field reference
114         MarshakRadiationFixedTMixedFvPatchScalarField
115         (
116             const MarshakRadiationFixedTMixedFvPatchScalarField&,
117             const DimensionedField<scalar, volMesh>&
118         );
120         //- Construct and return a clone setting internal field reference
121         virtual tmp<fvPatchScalarField> clone
122         (
123             const DimensionedField<scalar, volMesh>& iF
124         ) const
125         {
126             return tmp<fvPatchScalarField>
127             (
128                 new MarshakRadiationFixedTMixedFvPatchScalarField(*this, iF)
129             );
130         }
133     // Member functions
135         // Access
137             //- Return the radiation temperature
138             const scalarField& Trad() const
139             {
140                 return Trad_;
141             }
143             //- Return reference to the radiation temperature to allow
144             //  adjustment
145             scalarField& Trad()
146             {
147                 return Trad_;
148             }
150             //- Return the emissivity
151             const scalar& emissivity() const
152             {
153                 return emissivity_;
154             }
156             //- Return reference to the emissivity to allow adjustment
157             scalar& emissivity()
158             {
159                 return emissivity_;
160             }
163         // Mapping functions
165             //- Map (and resize as needed) from self given a mapping object
166             virtual void autoMap
167             (
168                 const fvPatchFieldMapper&
169             );
171             //- Reverse map the given fvPatchField onto this fvPatchField
172             virtual void rmap
173             (
174                 const fvPatchScalarField&,
175                 const labelList&
176             );
179         // Evaluation functions
181             //- Update the coefficients associated with the patch field
182             virtual void updateCoeffs();
185         // I-O
187             //- Write
188             virtual void write(Ostream&) const;
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 } // End namespace Foam
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 #endif
200 // ************************************************************************* //