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 parabolicVelocityFvPatchVectorField
29 Boundary condition specifies a parabolic velocity inlet profile
30 (fixed value), given maximum velocity value (peak of the parabola),
31 flow direction n and direction of the parabolic coordinate y
34 parabolicVelocityFvPatchVectorField.C
37 Hrvoje Jasak, Wikki Ltd. All rights reserved
39 \*---------------------------------------------------------------------------*/
41 #ifndef parabolicVelocityFvPatchVectorField_H
42 #define parabolicVelocityFvPatchVectorField_H
44 #include "fvPatchFields.H"
45 #include "fixedValueFvPatchFields.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class parabolicVelocityFvPatchField Declaration
54 \*---------------------------------------------------------------------------*/
56 class parabolicVelocityFvPatchVectorField
58 public fixedValueFvPatchVectorField
62 //- Peak velocity magnitude
68 //- Direction of the y-coordinate
74 //- Runtime type information
75 TypeName("parabolicVelocity");
80 //- Construct from patch and internal field
81 parabolicVelocityFvPatchVectorField
84 const DimensionedField<vector, volMesh>&
87 //- Construct from patch, internal field and dictionary
88 parabolicVelocityFvPatchVectorField
91 const DimensionedField<vector, volMesh>&,
95 //- Construct by mapping given parabolicVelocityFvPatchVectorField
97 parabolicVelocityFvPatchVectorField
99 const parabolicVelocityFvPatchVectorField&,
101 const DimensionedField<vector, volMesh>&,
102 const fvPatchFieldMapper&
105 //- Construct and return a clone
106 virtual tmp<fvPatchVectorField> clone() const
108 return tmp<fvPatchVectorField>
110 new parabolicVelocityFvPatchVectorField(*this)
114 //- Construct as copy setting internal field reference
115 parabolicVelocityFvPatchVectorField
117 const parabolicVelocityFvPatchVectorField&,
118 const DimensionedField<vector, volMesh>&
121 //- Construct and return a clone setting internal field reference
122 virtual tmp<fvPatchVectorField> clone
124 const DimensionedField<vector, volMesh>& iF
127 return tmp<fvPatchVectorField>
129 new parabolicVelocityFvPatchVectorField(*this, iF)
142 //- Return flow direction
148 //- Return y direction
154 //- Update coefficients
155 virtual void updateCoeffs();
158 virtual void write(Ostream&) const;
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace Foam
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 // ************************************************************************* //