OpenFOAM logo
Open Source CFD Toolkit

pressureInletOutletVelocityFvPatchVectorField.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-2005 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     pressureInletOutletVelocityFvPatchVectorField
00027 
00028 Description
00029 
00030 SourceFiles
00031     pressureInletOutletVelocityFvPatchVectorField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef pressureInletOutletVelocityFvPatchVectorField_H
00036 #define pressureInletOutletVelocityFvPatchVectorField_H
00037 
00038 #include "fvPatchFields.H"
00039 #include "mixedFvPatchFields.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 /*---------------------------------------------------------------------------*\
00047               Class pressureInletOutletVelocityFvPatch Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 class pressureInletOutletVelocityFvPatchVectorField
00051 :
00052     public mixedFvPatchVectorField
00053 {
00054     // Private data
00055 
00056         word phiName_;
00057         word rhoName_;
00058 
00059         //- Optional tangential velocity component
00060         vectorField tangentialVelocity_;
00061 
00062 
00063 public:
00064 
00065     //- Runtime type information
00066     TypeName("pressureInletOutletVelocity");
00067 
00068 
00069     // Constructors
00070 
00071         //- Construct from patch and internal field
00072         pressureInletOutletVelocityFvPatchVectorField
00073         (
00074             const fvPatch&,
00075             const vectorField&
00076         );
00077 
00078         //- Construct from patch, internal field and dictionary
00079         pressureInletOutletVelocityFvPatchVectorField
00080         (
00081             const fvPatch&,
00082             const vectorField&,
00083             const dictionary&
00084         );
00085 
00086         //- Construct by mapping given
00087         //  pressureInletOutletVelocityFvPatchVectorField onto a new patch
00088         pressureInletOutletVelocityFvPatchVectorField
00089         (
00090             const pressureInletOutletVelocityFvPatchVectorField&,
00091             const fvPatch&,
00092             const vectorField&,
00093             const fvPatchFieldMapper&
00094         );
00095 
00096         //- Construct and return a clone
00097         virtual tmp<fvPatchVectorField> clone() const
00098         {
00099             return tmp<fvPatchVectorField>
00100             (
00101                 new pressureInletOutletVelocityFvPatchVectorField(*this)
00102             );
00103         }
00104 
00105         //- Construct as copy setting internal field reference
00106         pressureInletOutletVelocityFvPatchVectorField
00107         (
00108             const pressureInletOutletVelocityFvPatchVectorField&,
00109             const vectorField&
00110         );
00111 
00112         //- Construct and return a clone setting internal field reference
00113         virtual tmp<fvPatchVectorField> clone(const vectorField& iF) const
00114         {
00115             return tmp<fvPatchVectorField>
00116             (
00117                 new pressureInletOutletVelocityFvPatchVectorField(*this, iF)
00118             );
00119         }
00120 
00121 
00122     // Member functions
00123 
00124         // Access
00125 
00126             //- Return the tangential velocity
00127             const vectorField& tangentialVelocity() const
00128             {
00129                 return tangentialVelocity_;
00130             }
00131 
00132             //- Return reference to the tangential velocity to allow adjustment
00133             vectorField& tangentialVelocity()
00134             {
00135                 return tangentialVelocity_;
00136             }
00137 
00138 
00139         // Mapping functions
00140 
00141             //- Map (and resize as needed) from self given a mapping object
00142             virtual void autoMap
00143             (
00144                 const fvPatchFieldMapper&
00145             );
00146 
00147             //- Reverse map the given fvPatchField onto this fvPatchField
00148             virtual void rmap
00149             (
00150                 const fvPatchVectorField&,
00151                 const labelList&
00152             );
00153 
00154 
00155         //- Update the coefficients associated with the patch field
00156         virtual void updateCoeffs();
00157 
00158         //- Write
00159         virtual void write(Ostream&) const;
00160 
00161 
00162     // Member operators
00163 
00164         virtual void operator=(const fvPatchField<vector>& pvf)
00165         {
00166             fvPatchField<vector>::operator=(pvf);
00167         }
00168 };
00169 
00170 
00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00172 
00173 } // End namespace Foam
00174 
00175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00176 
00177 #endif
00178 
00179 // ************************************************************************* //
For further information go to www.openfoam.org