OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

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