1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
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
29 Namespace for single rotating frame (SRF) models
35 Top level model for single rotating frame
36 - Steady state only - no time derivatives included
41 \*---------------------------------------------------------------------------*/
46 #include "IOdictionary.H"
48 #include "runTimeSelectionTables.H"
50 #include "volFields.H"
51 #include "vectorField.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 /*---------------------------------------------------------------------------*\
61 Class SRFModel Declaration
62 \*---------------------------------------------------------------------------*/
73 //- Reference to the relative velocity field
74 const volVectorField& Urel_;
76 //- Reference to the mesh
82 //- SRF model coeficients dictionary
83 dictionary SRFModelCoeffs_;
85 //- Angular velocity of the frame (rad/s)
86 dimensionedVector omega_;
91 // Private Member Functions
93 //- Disallow default bitwise copy construct
94 SRFModel(const SRFModel&);
96 //- Disallow default bitwise assignment
97 void operator=(const SRFModel&);
102 //- Runtime type information
103 TypeName("SRFModel");
106 // Declare runtime constructor selection table
108 declareRunTimeSelectionTable
114 const volVectorField& Urel
122 //- Construct from components
126 const volVectorField& Urel
132 //- Return a reference to the selected SRF model
133 static autoPtr<SRFModel> New
135 const volVectorField& Urel
148 //- Read radiationProperties dictionary
154 //- Return the axis of rotation
155 const vector& axis() const;
157 //- Return the angular velocity field [rad/s]
158 const dimensionedVector& omega() const;
160 //- Return the coriolis force
161 tmp<DimensionedField<vector, volMesh> > Fcoriolis() const;
163 //- Return the centrifugal force
164 tmp<DimensionedField<vector, volMesh> > Fcentrifugal() const;
166 //- Source term component for momentum equation
167 tmp<DimensionedField<vector, volMesh> > Su() const;
169 //- Return velocity vector from positions
170 vectorField velocity(const vectorField& positions) const;
172 //- Return velocity of SRF for complete mesh
173 tmp<volVectorField> U() const;
175 //- Return absolute velocity for complete mesh
176 tmp<volVectorField> Uabs() const;
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 } // End namespace SRF
183 } // End namespace Foam
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 // ************************************************************************* //