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

solidWallMixedTemperatureCoupledFvPatchScalarField.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     solidWallMixedTemperatureCoupledFvPatchScalarField
00026 
00027 Description
00028     Mixed boundary condition for temperature, to be used by the
00029     conjugate heat transfer solver.
00030     Both sides use a mix of zeroGradient and neighbourvalue.
00031 
00032     Example usage:
00033         myInterfacePatchName
00034         {
00035             type                solidWallMixedTemperatureCoupled;
00036             neighbourFieldName  T;
00037             K                   K;
00038             value               uniform 300;
00039         }
00040 
00041     Needs to be on underlying directMapped(Wall)FvPatch.
00042 
00043     Note: runs in parallel with arbitrary decomposition. Uses directMapped
00044     functionality to calculate exchange.
00045 
00046 SourceFiles
00047     solidWallMixedTemperatureCoupledFvPatchScalarField.C
00048 
00049 \*---------------------------------------------------------------------------*/
00050 
00051 #ifndef solidWallMixedTemperatureCoupledFvPatchScalarField_H
00052 #define solidWallMixedTemperatureCoupledFvPatchScalarField_H
00053 
00054 #include <finiteVolume/mixedFvPatchFields.H>
00055 
00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00057 
00058 namespace Foam
00059 {
00060 
00061 /*---------------------------------------------------------------------------*\
00062         Class solidWallMixedTemperatureCoupledFvPatchScalarField Declaration
00063 \*---------------------------------------------------------------------------*/
00064 
00065 class solidWallMixedTemperatureCoupledFvPatchScalarField
00066 :
00067     public mixedFvPatchScalarField
00068 {
00069     // Private data
00070 
00071         //- Name of field on the neighbour region
00072         const word neighbourFieldName_;
00073         
00074         //- Name of thermal conductivity field
00075         const word KName_;
00076 
00077 public:
00078 
00079     //- Runtime type information
00080     TypeName("solidWallMixedTemperatureCoupled");
00081 
00082 
00083     // Constructors
00084 
00085         //- Construct from patch and internal field
00086         solidWallMixedTemperatureCoupledFvPatchScalarField
00087         (
00088             const fvPatch&,
00089             const DimensionedField<scalar, volMesh>&
00090         );
00091 
00092         //- Construct from patch, internal field and dictionary
00093         solidWallMixedTemperatureCoupledFvPatchScalarField
00094         (
00095             const fvPatch&,
00096             const DimensionedField<scalar, volMesh>&,
00097             const dictionary&
00098         );
00099 
00100         //- Construct by mapping given
00101         //  solidWallMixedTemperatureCoupledFvPatchScalarField onto a new patch
00102         solidWallMixedTemperatureCoupledFvPatchScalarField
00103         (
00104             const solidWallMixedTemperatureCoupledFvPatchScalarField&,
00105             const fvPatch&,
00106             const DimensionedField<scalar, volMesh>&,
00107             const fvPatchFieldMapper&
00108         );
00109 
00110         //- Construct and return a clone
00111         virtual tmp<fvPatchScalarField> clone() const
00112         {
00113             return tmp<fvPatchScalarField>
00114             (
00115                 new solidWallMixedTemperatureCoupledFvPatchScalarField(*this)
00116             );
00117         }
00118 
00119         //- Construct as copy setting internal field reference
00120         solidWallMixedTemperatureCoupledFvPatchScalarField
00121         (
00122             const solidWallMixedTemperatureCoupledFvPatchScalarField&,
00123             const DimensionedField<scalar, volMesh>&
00124         );
00125 
00126         //- Construct and return a clone setting internal field reference
00127         virtual tmp<fvPatchScalarField> clone
00128         (
00129             const DimensionedField<scalar, volMesh>& iF
00130         ) const
00131         {
00132             return tmp<fvPatchScalarField>
00133             (
00134                 new solidWallMixedTemperatureCoupledFvPatchScalarField
00135                 (
00136                     *this,
00137                     iF
00138                 )
00139             );
00140         }
00141 
00142 
00143     // Member functions
00144 
00145         //- Get corresponding K field
00146         const fvPatchScalarField& K() const;
00147 
00148         //- Update the coefficients associated with the patch field
00149         virtual void updateCoeffs();
00150 
00151         //- Write
00152         virtual void write(Ostream&) const;
00153 };
00154 
00155 
00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00157 
00158 } // End namespace Foam
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 #endif
00163 
00164 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines