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

solidWallHeatFluxTemperatureFvPatchScalarField.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     solidWallHeatFluxTemperatureFvPatchScalarField
00027 
00028 Description
00029     Heat flux boundary condition for temperature on solid region
00030 
00031     Example usage:
00032         myWallPatch
00033         {
00034             type            solidWallHeatFluxTemperature;
00035             K               K;                 // Name of K field
00036             q               uniform 1000;      // Heat flux / [W/m2]
00037             value           300.0;             // Initial temperature / [K]
00038         }
00039 
00040 
00041 SourceFiles
00042     solidWallHeatFluxTemperatureFvPatchScalarField.C
00043 
00044 \*---------------------------------------------------------------------------*/
00045 
00046 #ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H
00047 #define solidWallHeatFluxTemperatureFvPatchScalarField_H
00048 
00049 #include "fixedValueFvPatchFields.H"
00050 
00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00052 
00053 namespace Foam
00054 {
00055 
00056 /*---------------------------------------------------------------------------*\
00057       Class solidWallHeatFluxTemperatureFvPatchScalarField Declaration
00058 \*---------------------------------------------------------------------------*/
00059 
00060 class solidWallHeatFluxTemperatureFvPatchScalarField
00061 :
00062     public fixedValueFvPatchScalarField
00063 {
00064     // Private data
00065 
00066         //- Heat flux / [W/m2]
00067         scalarField q_;
00068 
00069         //- Name of thermal conductivity field
00070         word KName_;
00071 
00072 
00073 public:
00074 
00075     //- Runtime type information
00076     TypeName("solidWallHeatFluxTemperature");
00077 
00078 
00079     // Constructors
00080 
00081         //- Construct from patch and internal field
00082         solidWallHeatFluxTemperatureFvPatchScalarField
00083         (
00084             const fvPatch&,
00085             const DimensionedField<scalar, volMesh>&
00086         );
00087 
00088         //- Construct from patch, internal field and dictionary
00089         solidWallHeatFluxTemperatureFvPatchScalarField
00090         (
00091             const fvPatch&,
00092             const DimensionedField<scalar, volMesh>&,
00093             const dictionary&
00094         );
00095 
00096         //- Construct by mapping given
00097         // solidWallHeatFluxTemperatureFvPatchScalarField
00098         // onto a new patch
00099         solidWallHeatFluxTemperatureFvPatchScalarField
00100         (
00101             const solidWallHeatFluxTemperatureFvPatchScalarField&,
00102             const fvPatch&,
00103             const DimensionedField<scalar, volMesh>&,
00104             const fvPatchFieldMapper&
00105         );
00106 
00107         //- Construct as copy
00108         solidWallHeatFluxTemperatureFvPatchScalarField
00109         (
00110             const solidWallHeatFluxTemperatureFvPatchScalarField&
00111         );
00112 
00113         //- Construct and return a clone
00114         virtual tmp<fvPatchScalarField> clone() const
00115         {
00116             return tmp<fvPatchScalarField>
00117             (
00118                 new solidWallHeatFluxTemperatureFvPatchScalarField(*this)
00119             );
00120         }
00121 
00122         //- Construct as copy setting internal field reference
00123         solidWallHeatFluxTemperatureFvPatchScalarField
00124         (
00125             const solidWallHeatFluxTemperatureFvPatchScalarField&,
00126             const DimensionedField<scalar, volMesh>&
00127         );
00128 
00129         //- Construct and return a clone setting internal field reference
00130         virtual tmp<fvPatchScalarField> clone
00131         (
00132             const DimensionedField<scalar, volMesh>& iF
00133         ) const
00134         {
00135             return tmp<fvPatchScalarField>
00136             (
00137                 new solidWallHeatFluxTemperatureFvPatchScalarField(*this, iF)
00138             );
00139         }
00140 
00141 
00142     // Member functions
00143 
00144         // Evaluation functions
00145 
00146             //- Update the coefficients associated with the patch field
00147             virtual void updateCoeffs();
00148 
00149 
00150         // Mapping functions
00151 
00152             //- Map (and resize as needed) from self given a mapping object
00153             virtual void autoMap
00154             (
00155                 const fvPatchFieldMapper&
00156             );
00157 
00158             //- Reverse map the given fvPatchField onto this fvPatchField
00159             virtual void rmap
00160             (
00161                 const fvPatchScalarField&,
00162                 const labelList&
00163             );
00164 
00165 
00166         // I-O
00167 
00168             //- Write
00169             void write(Ostream&) const;
00170 };
00171 
00172 
00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00174 
00175 } // End namespace Foam
00176 
00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00178 
00179 #endif
00180 
00181 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd