1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
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
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
26 Foam::pressureNormalInletOutletVelocityFvPatchVectorField
29 Velocity inlet/outlet boundary condition for patches where the pressure is
30 specified. zero-gradient is applied for outflow (as defined by the flux)
31 and for inflow the velocity is obtained from the flux with a direction
32 normal to the patch faces.
35 pressureNormalInletOutletVelocityFvPatchVectorField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef pressureNormalInletOutletVelocityFvPatchVectorField_H
40 #define pressureNormalInletOutletVelocityFvPatchVectorField_H
42 #include "fvPatchFields.H"
43 #include "mixedFvPatchFields.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class pressureNormalInletOutletVelocityFvPatch Declaration
52 \*---------------------------------------------------------------------------*/
54 class pressureNormalInletOutletVelocityFvPatchVectorField
56 public mixedFvPatchVectorField
66 //- Runtime type information
67 TypeName("pressureNormalInletOutletVelocity");
72 //- Construct from patch and internal field
73 pressureNormalInletOutletVelocityFvPatchVectorField
76 const DimensionedField<vector, volMesh>&
79 //- Construct from patch, internal field and dictionary
80 pressureNormalInletOutletVelocityFvPatchVectorField
83 const DimensionedField<vector, volMesh>&,
87 //- Construct by mapping given
88 // pressureNormalInletOutletVelocityFvPatchVectorField
90 pressureNormalInletOutletVelocityFvPatchVectorField
92 const pressureNormalInletOutletVelocityFvPatchVectorField&,
94 const DimensionedField<vector, volMesh>&,
95 const fvPatchFieldMapper&
99 pressureNormalInletOutletVelocityFvPatchVectorField
101 const pressureNormalInletOutletVelocityFvPatchVectorField&
104 //- Construct and return a clone
105 virtual tmp<fvPatchVectorField> clone() const
107 return tmp<fvPatchVectorField>
109 new pressureNormalInletOutletVelocityFvPatchVectorField
116 //- Construct as copy setting internal field reference
117 pressureNormalInletOutletVelocityFvPatchVectorField
119 const pressureNormalInletOutletVelocityFvPatchVectorField&,
120 const DimensionedField<vector, volMesh>&
123 //- Construct and return a clone setting internal field reference
124 virtual tmp<fvPatchVectorField> clone
126 const DimensionedField<vector, volMesh>& iF
129 return tmp<fvPatchVectorField>
131 new pressureNormalInletOutletVelocityFvPatchVectorField
144 //- Return the name of rho
145 const word& rhoName() const
150 //- Return reference to the name of rho to allow adjustment
156 //- Return the name of phi
157 const word& phiName() const
163 //- Return reference to the name of phi to allow adjustment
170 //- Update the coefficients associated with the patch field
171 virtual void updateCoeffs();
174 virtual void write(Ostream&) const;
179 virtual void operator=(const fvPatchField<vector>& pvf);
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 // ************************************************************************* //