OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

MarshakRadiationMixedFvPatchScalarField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::MarshakRadiationFvPatchScalarField
00027 
00028 Description
00029     Marshak boundary for radiation G field
00030     - radiation temperature taken from patch value
00031 
00032 SourceFiles
00033     MarshakRadiationFvPatchScalarField.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef MarshakRadiationMixedFvPatchField_H
00038 #define MarshakRadiationMixedFvPatchField_H
00039 
00040 #include "mixedFvPatchFields.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048              Class MarshakRadiationFvPatchScalarField Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class MarshakRadiationFvPatchScalarField
00052 :
00053     public mixedFvPatchScalarField
00054 {
00055 
00056     // Private data
00057 
00058         //- Name of temperature field
00059         word TName_;
00060 
00061         //- Emissivity
00062         scalar emissivity_;
00063 
00064 
00065 public:
00066 
00067     //- Runtime type information
00068     TypeName("MarshakRadiation");
00069 
00070 
00071     // Constructors
00072 
00073         //- Construct from patch and internal field
00074         MarshakRadiationFvPatchScalarField
00075         (
00076             const fvPatch&,
00077             const DimensionedField<scalar, volMesh>&
00078         );
00079 
00080         //- Construct from patch, internal field and dictionary
00081         MarshakRadiationFvPatchScalarField
00082         (
00083             const fvPatch&,
00084             const DimensionedField<scalar, volMesh>&,
00085             const dictionary&
00086         );
00087 
00088         //- Construct by mapping given MarshakRadiationFvPatchField onto a new
00089         //  patch
00090         MarshakRadiationFvPatchScalarField
00091         (
00092             const MarshakRadiationFvPatchScalarField&,
00093             const fvPatch&,
00094             const DimensionedField<scalar, volMesh>&,
00095             const fvPatchFieldMapper&
00096         );
00097 
00098         //- Construct as copy
00099         MarshakRadiationFvPatchScalarField
00100         (
00101             const MarshakRadiationFvPatchScalarField&
00102         );
00103 
00104         //- Construct and return a clone
00105         virtual tmp<fvPatchScalarField> clone() const
00106         {
00107             return tmp<fvPatchScalarField>
00108             (
00109                 new MarshakRadiationFvPatchScalarField(*this)
00110             );
00111         }
00112 
00113         //- Construct as copy setting internal field reference
00114         MarshakRadiationFvPatchScalarField
00115         (
00116             const MarshakRadiationFvPatchScalarField&,
00117             const DimensionedField<scalar, volMesh>&
00118         );
00119 
00120         //- Construct and return a clone setting internal field reference
00121         virtual tmp<fvPatchScalarField> clone
00122         (
00123             const DimensionedField<scalar, volMesh>& iF
00124         ) const
00125         {
00126             return tmp<fvPatchScalarField>
00127             (
00128                 new MarshakRadiationFvPatchScalarField(*this, iF)
00129             );
00130         }
00131 
00132 
00133     // Member functions
00134 
00135         // Access
00136 
00137             //- Return the temperature field name
00138             const word& TName() const
00139             {
00140                 return TName_;
00141             }
00142 
00143             //- Return reference to the temperature field name to allow
00144             //  adjustment
00145             word& TName()
00146             {
00147                 return TName_;
00148             }
00149 
00150             //- Return the emissivity
00151             const scalar& emissivity() const
00152             {
00153                 return emissivity_;
00154             }
00155 
00156             //- Return reference to the emissivity to allow adjustment
00157             scalar& emissivity()
00158             {
00159                 return emissivity_;
00160             }
00161 
00162 
00163         // Mapping functions
00164 
00165             //- Map (and resize as needed) from self given a mapping object
00166             virtual void autoMap
00167             (
00168                 const fvPatchFieldMapper&
00169             );
00170 
00171             //- Reverse map the given fvPatchField onto this fvPatchField
00172             virtual void rmap
00173             (
00174                 const fvPatchScalarField&,
00175                 const labelList&
00176             );
00177 
00178 
00179         // Evaluation functions
00180 
00181             //- Update the coefficients associated with the patch field
00182             virtual void updateCoeffs();
00183 
00184 
00185         // I-O
00186 
00187             //- Write
00188             virtual void write(Ostream&) const;
00189 };
00190 
00191 
00192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00193 
00194 } // End namespace Foam
00195 
00196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00197 
00198 #endif
00199 
00200 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd