initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / finiteVolume / cfdTools / general / SRF / SRFModel / SRFModel / SRFModel.H
blob65dc508a3f67006a519769735197437a10a6c4e7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Namespace
26     Foam::SRF
28 Description
29     Namespace for single rotating frame (SRF) models
31 Class
32     Foam::SRF::SRFModel
34 Description
35     Top level model for single rotating frame
36     - Steady state only - no time derivatives included
38 SourceFiles
39     SRFModel.C
41 \*---------------------------------------------------------------------------*/
43 #ifndef SRFModel_H
44 #define SRFModel_H
46 #include "IOdictionary.H"
47 #include "autoPtr.H"
48 #include "runTimeSelectionTables.H"
49 #include "fvMesh.H"
50 #include "volFields.H"
51 #include "vectorField.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 namespace Foam
57 namespace SRF
60 /*---------------------------------------------------------------------------*\
61                            Class SRFModel Declaration
62 \*---------------------------------------------------------------------------*/
64 class SRFModel
66     public IOdictionary
69 protected:
71     // Protected data
73         //- Reference to the relative velocity field
74         const volVectorField& Urel_;
76         //- Reference to the mesh
77         const fvMesh& mesh_;
79         //- Axis of rotation
80         vector axis_;
82         //- SRF model coeficients dictionary
83         dictionary SRFModelCoeffs_;
85         //- Angular velocity of the frame (rad/s)
86         dimensionedVector omega_;
89 private:
91     // Private Member Functions
93         //- Disallow default bitwise copy construct
94         SRFModel(const SRFModel&);
96         //- Disallow default bitwise assignment
97         void operator=(const SRFModel&);
100 public:
102     //- Runtime type information
103     TypeName("SRFModel");
106     // Declare runtime constructor selection table
108          declareRunTimeSelectionTable
109          (
110              autoPtr,
111              SRFModel,
112              dictionary,
113              (
114                  const volVectorField& Urel
115              ),
116              (Urel)
117          );
120     // Constructors
122         //- Construct from components
123         SRFModel
124         (
125             const word& type,
126             const volVectorField& Urel
127         );
130     // Selectors
132          //- Return a reference to the selected SRF model
133          static autoPtr<SRFModel> New
134          (
135              const volVectorField& Urel
136          );
139     // Destructor
141         virtual ~SRFModel();
144     // Member Functions
146         // Edit
148             //- Read radiationProperties dictionary
149             virtual bool read();
152         // Access
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 #endif
189 // ************************************************************************* //