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

fanFvPatchField.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::fanFvPatchField
00026 
00027 Description
00028     Foam::fanFvPatchField
00029 
00030 SourceFiles
00031     fanFvPatchField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef fanFvPatchField_H
00036 #define fanFvPatchField_H
00037 
00038 #include <finiteVolume/jumpCyclicFvPatchField.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                            Class jumpCyclicFvPatch Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 template<class Type>
00050 class fanFvPatchField
00051 :
00052     public jumpCyclicFvPatchField<Type>
00053 {
00054     // Private data
00055 
00056         //- Fan pressure rise polynomial coefficients
00057         List<scalar> f_;
00058 
00059         //- "jump" field
00060         Field<Type> jump_;
00061 
00062 
00063 public:
00064 
00065     //- Runtime type information
00066     TypeName("fan");
00067 
00068 
00069     // Constructors
00070 
00071         //- Construct from patch and internal field
00072         fanFvPatchField
00073         (
00074             const fvPatch&,
00075             const DimensionedField<Type, volMesh>&
00076         );
00077 
00078         //- Construct from patch, internal field and dictionary
00079         fanFvPatchField
00080         (
00081             const fvPatch&,
00082             const DimensionedField<Type, volMesh>&,
00083             const dictionary&
00084         );
00085 
00086         //- Construct by mapping given fanFvPatchField onto a new patch
00087         fanFvPatchField
00088         (
00089             const fanFvPatchField<Type>&,
00090             const fvPatch&,
00091             const DimensionedField<Type, volMesh>&,
00092             const fvPatchFieldMapper&
00093         );
00094 
00095         //- Construct as copy
00096         fanFvPatchField
00097         (
00098             const fanFvPatchField<Type>&
00099         );
00100 
00101         //- Construct and return a clone
00102         virtual tmp<fvPatchField<Type> > clone() const
00103         {
00104             return tmp<fvPatchField<Type> >
00105             (
00106                 new fanFvPatchField<Type>(*this)
00107             );
00108         }
00109 
00110         //- Construct as copy setting internal field reference
00111         fanFvPatchField
00112         (
00113             const fanFvPatchField<Type>&,
00114             const DimensionedField<Type, volMesh>&
00115         );
00116 
00117         //- Construct and return a clone setting internal field reference
00118         virtual tmp<fvPatchField<Type> > clone
00119         (
00120             const DimensionedField<Type, volMesh>& iF
00121         ) const
00122         {
00123             return tmp<fvPatchField<Type> >
00124             (
00125                 new fanFvPatchField<Type>(*this, iF)
00126             );
00127         }
00128 
00129 
00130     // Member functions
00131 
00132         // Access
00133 
00134             //- Return the "jump" across the patch as a "half" field 
00135             virtual tmp<Field<Type> > jump() const
00136             {
00137                 return jump_;
00138             }
00139 
00140 
00141         // Mapping functions
00142 
00143             //- Map (and resize as needed) from self given a mapping object
00144             virtual void autoMap
00145             (
00146                 const fvPatchFieldMapper&
00147             );
00148 
00149             //- Reverse map the given fvPatchField onto this fvPatchField
00150             virtual void rmap
00151             (
00152                 const fvPatchField<Type>&,
00153                 const labelList&
00154             );
00155 
00156         // Evaluation functions
00157 
00158             //- Update the coefficients associated with the patch field
00159             virtual void updateCoeffs();
00160 
00161 
00162         //- Write
00163         virtual void write(Ostream&) const;
00164 };
00165 
00166 
00167 //- Specialisation of the jump-condition for the pressure
00168 template<>
00169 void fanFvPatchField<scalar>::updateCoeffs();
00170 
00171 
00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00173 
00174 } // End namespace Foam
00175 
00176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00177 
00178 #ifdef NoRepository
00179 #   include <finiteVolume/fanFvPatchField.C>
00180 #endif
00181 
00182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00183 
00184 #endif
00185 
00186 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines