OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

fluxCorrectedVelocityFvPatchVectorField.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-2009 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     Foam::fluxCorrectedVelocityFvPatchVectorField
00027 
00028 Description
00029     Velocity outlet boundary condition for patches where the pressure is
00030     specified. The outflow velocity is obtained by "zeroGradient" and then
00031     corrected from the flux.  If reverse flow is possible or expected use
00032     the "pressureInletOutletVelocityFvPatchVectorField" BC instead.
00033 
00034 SourceFiles
00035     fluxCorrectedVelocityFvPatchVectorField.C
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef fluxCorrectedVelocityFvPatchVectorField_H
00040 #define fluxCorrectedVelocityFvPatchVectorField_H
00041 
00042 #include "fvPatchFields.H"
00043 #include "zeroGradientFvPatchFields.H"
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                    Class fluxCorrectedVelocityFvPatch Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class fluxCorrectedVelocityFvPatchVectorField
00055 :
00056     public zeroGradientFvPatchVectorField
00057 {
00058     // Private data
00059 
00060         word phiName_;
00061         word rhoName_;
00062 
00063 
00064 public:
00065 
00066     //- Runtime type information
00067     TypeName("fluxCorrectedVelocity");
00068 
00069 
00070     // Constructors
00071 
00072         //- Construct from patch and internal field
00073         fluxCorrectedVelocityFvPatchVectorField
00074         (
00075             const fvPatch&,
00076             const DimensionedField<vector, volMesh>&
00077         );
00078 
00079         //- Construct from patch, internal field and dictionary
00080         fluxCorrectedVelocityFvPatchVectorField
00081         (
00082             const fvPatch&,
00083             const DimensionedField<vector, volMesh>&,
00084             const dictionary&
00085         );
00086 
00087         //- Construct by mapping given fluxCorrectedVelocityFvPatchVectorField
00088         //  onto a new patch
00089         fluxCorrectedVelocityFvPatchVectorField
00090         (
00091             const fluxCorrectedVelocityFvPatchVectorField&,
00092             const fvPatch&,
00093             const DimensionedField<vector, volMesh>&,
00094             const fvPatchFieldMapper&
00095         );
00096 
00097         //- Construct and return a clone
00098         virtual tmp<fvPatchVectorField> clone() const
00099         {
00100             return tmp<fvPatchVectorField>
00101             (
00102                 new fluxCorrectedVelocityFvPatchVectorField(*this)
00103             );
00104         }
00105 
00106         //- Construct as copy setting internal field reference
00107         fluxCorrectedVelocityFvPatchVectorField
00108         (
00109             const fluxCorrectedVelocityFvPatchVectorField&,
00110             const DimensionedField<vector, volMesh>&
00111         );
00112 
00113         //- Construct and return a clone setting internal field reference
00114         virtual tmp<fvPatchVectorField> clone
00115         (
00116             const DimensionedField<vector, volMesh>& iF
00117         ) const
00118         {
00119             return tmp<fvPatchVectorField>
00120             (
00121                 new fluxCorrectedVelocityFvPatchVectorField(*this, iF)
00122             );
00123         }
00124 
00125 
00126     // Member functions
00127 
00128         // Evaluation functions
00129 
00130             //- Evaluate the patch field
00131             virtual void evaluate
00132             (
00133                 const Pstream::commsTypes commsType=Pstream::blocking
00134             );
00135 
00136 
00137         //- Write
00138         virtual void write(Ostream&) const;
00139 };
00140 
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 } // End namespace Foam
00145 
00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00147 
00148 #endif
00149 
00150 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd