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::rotatingWallVelocityFvPatchVectorField
29 Foam::rotatingWallVelocityFvPatchVectorField
32 rotatingWallVelocityFvPatchVectorField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef rotatingWallVelocityFvPatchVectorField_H
37 #define rotatingWallVelocityFvPatchVectorField_H
39 #include "fixedValueFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class rotatingWallVelocityFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 class rotatingWallVelocityFvPatchVectorField
52 public fixedValueFvPatchVectorField
56 //- Origin of the rotation
59 //- Axis of the rotation
68 //- Runtime type information
69 TypeName("rotatingWallVelocity");
74 //- Construct from patch and internal field
75 rotatingWallVelocityFvPatchVectorField
78 const DimensionedField<vector, volMesh>&
81 //- Construct from patch, internal field and dictionary
82 rotatingWallVelocityFvPatchVectorField
85 const DimensionedField<vector, volMesh>&,
89 //- Construct by mapping given rotatingWallVelocityFvPatchVectorField
91 rotatingWallVelocityFvPatchVectorField
93 const rotatingWallVelocityFvPatchVectorField&,
95 const DimensionedField<vector, volMesh>&,
96 const fvPatchFieldMapper&
100 rotatingWallVelocityFvPatchVectorField
102 const rotatingWallVelocityFvPatchVectorField&
105 //- Construct and return a clone
106 virtual tmp<fvPatchVectorField> clone() const
108 return tmp<fvPatchVectorField>
110 new rotatingWallVelocityFvPatchVectorField(*this)
114 //- Construct as copy setting internal field reference
115 rotatingWallVelocityFvPatchVectorField
117 const rotatingWallVelocityFvPatchVectorField&,
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 rotatingWallVelocityFvPatchVectorField(*this, iF)
139 //- Return the origin of the rotation
140 const vector& origin() const
145 //- Return the axis of the rotation
146 const vector& axis() const
151 //- Return the rotational speed
152 const scalar& omega() const
157 //- Return non-const access to the origin of the rotation
163 //- Return non-const access to the axis of the rotation
169 //- Return non-const access to the rotational speed
176 //- Update the coefficients associated with the patch field
177 virtual void updateCoeffs();
180 virtual void write(Ostream&) const;
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 } // End namespace Foam
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 // ************************************************************************* //