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::pressureInletVelocityFvPatchVectorField
29 Velocity inlet boundary condition for patches where the pressure is
30 specified. The inflow velocity is obtained from the flux with a direction
31 normal to the patch faces. If reverse flow is possible or expected use
32 the "pressureInletOutletVelocityFvPatchVectorField" BC instead.
35 pressureInletVelocityFvPatchVectorField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef pressureInletVelocityFvPatchVectorField_H
40 #define pressureInletVelocityFvPatchVectorField_H
42 #include "fvPatchFields.H"
43 #include "fixedValueFvPatchFields.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class pressureInletVelocityFvPatch Declaration
52 \*---------------------------------------------------------------------------*/
54 class pressureInletVelocityFvPatchVectorField
56 public fixedValueFvPatchVectorField
66 //- Runtime type information
67 TypeName("pressureInletVelocity");
72 //- Construct from patch and internal field
73 pressureInletVelocityFvPatchVectorField
76 const DimensionedField<vector, volMesh>&
79 //- Construct from patch, internal field and dictionary
80 pressureInletVelocityFvPatchVectorField
83 const DimensionedField<vector, volMesh>&,
87 //- Construct by mapping given pressureInletVelocityFvPatchVectorField
89 pressureInletVelocityFvPatchVectorField
91 const pressureInletVelocityFvPatchVectorField&,
93 const DimensionedField<vector, volMesh>&,
94 const fvPatchFieldMapper&
98 pressureInletVelocityFvPatchVectorField
100 const pressureInletVelocityFvPatchVectorField&
103 //- Construct and return a clone
104 virtual tmp<fvPatchVectorField> clone() const
106 return tmp<fvPatchVectorField>
108 new pressureInletVelocityFvPatchVectorField(*this)
112 //- Construct as copy setting internal field reference
113 pressureInletVelocityFvPatchVectorField
115 const pressureInletVelocityFvPatchVectorField&,
116 const DimensionedField<vector, volMesh>&
119 //- Construct and return a clone setting internal field reference
120 virtual tmp<fvPatchVectorField> clone
122 const DimensionedField<vector, volMesh>& iF
125 return tmp<fvPatchVectorField>
127 new pressureInletVelocityFvPatchVectorField(*this, iF)
136 //- Return the name of rho
137 const word& rhoName() const
142 //- Return reference to the name of rho to allow adjustment
148 //- Return the name of phi
149 const word& phiName() const
154 //- Return reference to the name of phi to allow adjustment
161 //- Update the coefficients associated with the patch field
162 virtual void updateCoeffs();
165 virtual void write(Ostream&) const;
170 virtual void operator=(const fvPatchField<vector>& pvf);
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 // ************************************************************************* //