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::pressureInletUniformVelocityFvPatchVectorField
29 Velocity inlet boundary condition for patches where the pressure is
30 specified. The uniform inflow velocity is obtained by averaging the flux
31 over the patch and apply it in the direction normal to the patch faces.
34 pressureInletUniformVelocityFvPatchVectorField.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef pressureInletUniformVelocityFvPatchVectorField_H
39 #define pressureInletUniformVelocityFvPatchVectorField_H
41 #include "pressureInletVelocityFvPatchVectorField.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class pressureInletUniformVelocityFvPatch Declaration
50 \*---------------------------------------------------------------------------*/
52 class pressureInletUniformVelocityFvPatchVectorField
54 public pressureInletVelocityFvPatchVectorField
59 //- Runtime type information
60 TypeName("pressureInletUniformVelocity");
65 //- Construct from patch and internal field
66 pressureInletUniformVelocityFvPatchVectorField
69 const DimensionedField<vector, volMesh>&
72 //- Construct from patch, internal field and dictionary
73 pressureInletUniformVelocityFvPatchVectorField
76 const DimensionedField<vector, volMesh>&,
80 //- Construct by mapping given
81 // pressureInletUniformVelocityFvPatchVectorField onto a new patch
82 pressureInletUniformVelocityFvPatchVectorField
84 const pressureInletUniformVelocityFvPatchVectorField&,
86 const DimensionedField<vector, volMesh>&,
87 const fvPatchFieldMapper&
91 pressureInletUniformVelocityFvPatchVectorField
93 const pressureInletUniformVelocityFvPatchVectorField&
96 //- Construct and return a clone
97 virtual tmp<fvPatchVectorField> clone() const
99 return tmp<fvPatchVectorField>
101 new pressureInletUniformVelocityFvPatchVectorField(*this)
105 //- Construct as copy setting internal field reference
106 pressureInletUniformVelocityFvPatchVectorField
108 const pressureInletUniformVelocityFvPatchVectorField&,
109 const DimensionedField<vector, volMesh>&
112 //- Construct and return a clone setting internal field reference
113 virtual tmp<fvPatchVectorField> clone
115 const DimensionedField<vector, volMesh>& iF
118 return tmp<fvPatchVectorField>
120 new pressureInletUniformVelocityFvPatchVectorField(*this, iF)
127 //- Update the coefficients associated with the patch field
128 virtual void updateCoeffs();
133 virtual void operator=(const fvPatchField<vector>& pvf);
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 } // End namespace Foam
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 // ************************************************************************* //