initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / derived / fluxCorrectedVelocity / fluxCorrectedVelocityFvPatchVectorField.H
blob77b6d926f7de1e3d78e061f87b31a19de95ffe99
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::fluxCorrectedVelocityFvPatchVectorField
28 Description
29     Velocity outlet boundary condition for patches where the pressure is
30     specified. The outflow velocity is obtained by "zeroGradient" and then
31     corrected from the flux.  If reverse flow is possible or expected use
32     the "pressureInletOutletVelocityFvPatchVectorField" BC instead.
34 SourceFiles
35     fluxCorrectedVelocityFvPatchVectorField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef fluxCorrectedVelocityFvPatchVectorField_H
40 #define fluxCorrectedVelocityFvPatchVectorField_H
42 #include "fvPatchFields.H"
43 #include "zeroGradientFvPatchFields.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 /*---------------------------------------------------------------------------*\
51                    Class fluxCorrectedVelocityFvPatch Declaration
52 \*---------------------------------------------------------------------------*/
54 class fluxCorrectedVelocityFvPatchVectorField
56     public zeroGradientFvPatchVectorField
58     // Private data
60         word phiName_;
61         word rhoName_;
64 public:
66     //- Runtime type information
67     TypeName("fluxCorrectedVelocity");
70     // Constructors
72         //- Construct from patch and internal field
73         fluxCorrectedVelocityFvPatchVectorField
74         (
75             const fvPatch&,
76             const DimensionedField<vector, volMesh>&
77         );
79         //- Construct from patch, internal field and dictionary
80         fluxCorrectedVelocityFvPatchVectorField
81         (
82             const fvPatch&,
83             const DimensionedField<vector, volMesh>&,
84             const dictionary&
85         );
87         //- Construct by mapping given fluxCorrectedVelocityFvPatchVectorField
88         //  onto a new patch
89         fluxCorrectedVelocityFvPatchVectorField
90         (
91             const fluxCorrectedVelocityFvPatchVectorField&,
92             const fvPatch&,
93             const DimensionedField<vector, volMesh>&,
94             const fvPatchFieldMapper&
95         );
97         //- Construct and return a clone
98         virtual tmp<fvPatchVectorField> clone() const
99         {
100             return tmp<fvPatchVectorField>
101             (
102                 new fluxCorrectedVelocityFvPatchVectorField(*this)
103             );
104         }
106         //- Construct as copy setting internal field reference
107         fluxCorrectedVelocityFvPatchVectorField
108         (
109             const fluxCorrectedVelocityFvPatchVectorField&,
110             const DimensionedField<vector, volMesh>&
111         );
113         //- Construct and return a clone setting internal field reference
114         virtual tmp<fvPatchVectorField> clone
115         (
116             const DimensionedField<vector, volMesh>& iF
117         ) const
118         {
119             return tmp<fvPatchVectorField>
120             (
121                 new fluxCorrectedVelocityFvPatchVectorField(*this, iF)
122             );
123         }
126     // Member functions
128         // Evaluation functions
130             //- Evaluate the patch field
131             virtual void evaluate
132             (
133                 const Pstream::commsTypes commsType=Pstream::blocking
134             );
137         //- Write
138         virtual void write(Ostream&) const;
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 } // End namespace Foam
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 #endif
150 // ************************************************************************* //