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

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