FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

turbulentHeatFluxTemperatureFvPatchScalarField.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::turbulentHeatFluxTemperatureFvPatchScalarField
00026 
00027 Description
00028     Fixed heat flux boundary condition for temperature.
00029 
00030 SourceFiles
00031     turbulentHeatFluxTemperatureFvPatchScalarField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
00036 #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
00037 
00038 #include <finiteVolume/fvPatchFields.H>
00039 #include <finiteVolume/fixedGradientFvPatchFields.H>
00040 #include <OpenFOAM/NamedEnum.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace compressible
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050      Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class turbulentHeatFluxTemperatureFvPatchScalarField
00054 :
00055     public fixedGradientFvPatchScalarField
00056 {
00057 public:
00058 
00059     // Data types
00060 
00061         //- Enumeration listing the possible hest source input modes
00062         enum heatSourceType
00063         {
00064             hsPower,
00065             hsFlux
00066         };
00067 
00068 
00069 private:
00070 
00071     // Private data
00072 
00073         //- Heat source type names
00074         static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_;
00075 
00076         //- Heat source type
00077         heatSourceType heatSource_;
00078 
00079         //- Heat power [W] or flux [W/m2]
00080         scalarField q_;
00081 
00082 
00083 
00084 public:
00085 
00086     //- Runtime type information
00087     TypeName("compressible::turbulentHeatFluxTemperature");
00088 
00089 
00090     // Constructors
00091 
00092         //- Construct from patch and internal field
00093         turbulentHeatFluxTemperatureFvPatchScalarField
00094         (
00095             const fvPatch&,
00096             const DimensionedField<scalar, volMesh>&
00097         );
00098 
00099         //- Construct from patch, internal field and dictionary
00100         turbulentHeatFluxTemperatureFvPatchScalarField
00101         (
00102             const fvPatch&,
00103             const DimensionedField<scalar, volMesh>&,
00104             const dictionary&
00105         );
00106 
00107         //- Construct by mapping given
00108         //  turbulentHeatFluxTemperatureFvPatchScalarField onto
00109         //  a new patch
00110         turbulentHeatFluxTemperatureFvPatchScalarField
00111         (
00112             const turbulentHeatFluxTemperatureFvPatchScalarField&,
00113             const fvPatch&,
00114             const DimensionedField<scalar, volMesh>&,
00115             const fvPatchFieldMapper&
00116         );
00117 
00118         //- Construct as copy
00119         turbulentHeatFluxTemperatureFvPatchScalarField
00120         (
00121             const turbulentHeatFluxTemperatureFvPatchScalarField&
00122         );
00123 
00124         //- Construct and return a clone
00125         virtual tmp<fvPatchScalarField> clone() const
00126         {
00127             return tmp<fvPatchScalarField>
00128             (
00129                 new turbulentHeatFluxTemperatureFvPatchScalarField(*this)
00130             );
00131         }
00132 
00133         //- Construct as copy setting internal field reference
00134         turbulentHeatFluxTemperatureFvPatchScalarField
00135         (
00136             const turbulentHeatFluxTemperatureFvPatchScalarField&,
00137             const DimensionedField<scalar, volMesh>&
00138         );
00139 
00140         //- Construct and return a clone setting internal field reference
00141         virtual tmp<fvPatchScalarField> clone
00142         (
00143             const DimensionedField<scalar, volMesh>& iF
00144         ) const
00145         {
00146             return tmp<fvPatchScalarField>
00147             (
00148                 new turbulentHeatFluxTemperatureFvPatchScalarField
00149                 (
00150                     *this,
00151                     iF
00152                 )
00153             );
00154         }
00155 
00156 
00157     // Member functions
00158 
00159         // Mapping functions
00160 
00161             //- Map (and resize as needed) from self given a mapping object
00162             virtual void autoMap(const fvPatchFieldMapper&);
00163 
00164             //- Reverse map the given fvPatchField onto this fvPatchField
00165             virtual void rmap
00166             (
00167                 const fvPatchScalarField&,
00168                 const labelList&
00169             );
00170 
00171 
00172         // Evaluation functions
00173 
00174             //- Update the coefficients associated with the patch field
00175             virtual void updateCoeffs();
00176 
00177 
00178         // I-O
00179 
00180             //- Write
00181             virtual void write(Ostream&) const;
00182 };
00183 
00184 
00185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00186 
00187 } // End namespace compressible
00188 } // End namespace Foam
00189 
00190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00191 
00192 #endif
00193 
00194 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines