OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

SRFModel.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Namespace
00026     Foam::SRF
00027 
00028 Description
00029     Namespace for single rotating frame (SRF) models
00030 
00031 Class
00032     Foam::SRF::SRFModel
00033 
00034 Description
00035     Top level model for single rotating frame
00036     - Steady state only - no time derivatives included
00037 
00038 SourceFiles
00039     SRFModel.C
00040 
00041 \*---------------------------------------------------------------------------*/
00042 
00043 #ifndef SRFModel_H
00044 #define SRFModel_H
00045 
00046 #include "IOdictionary.H"
00047 #include "autoPtr.H"
00048 #include "runTimeSelectionTables.H"
00049 #include "fvMesh.H"
00050 #include "volFields.H"
00051 #include "vectorField.H"
00052 
00053 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00054 
00055 namespace Foam
00056 {
00057 namespace SRF
00058 {
00059 
00060 /*---------------------------------------------------------------------------*\
00061                            Class SRFModel Declaration
00062 \*---------------------------------------------------------------------------*/
00063 
00064 class SRFModel
00065 :
00066     public IOdictionary
00067 {
00068 
00069 protected:
00070 
00071     // Protected data
00072 
00073         //- Reference to the relative velocity field
00074         const volVectorField& Urel_;
00075 
00076         //- Reference to the mesh
00077         const fvMesh& mesh_;
00078 
00079         //- Axis of rotation
00080         vector axis_;
00081 
00082         //- SRF model coeficients dictionary
00083         dictionary SRFModelCoeffs_;
00084 
00085         //- Angular velocity of the frame (rad/s)
00086         dimensionedVector omega_;
00087 
00088 
00089 private:
00090 
00091     // Private Member Functions
00092 
00093         //- Disallow default bitwise copy construct
00094         SRFModel(const SRFModel&);
00095 
00096         //- Disallow default bitwise assignment
00097         void operator=(const SRFModel&);
00098 
00099 
00100 public:
00101 
00102     //- Runtime type information
00103     TypeName("SRFModel");
00104 
00105 
00106     // Declare runtime constructor selection table
00107 
00108          declareRunTimeSelectionTable
00109          (
00110              autoPtr,
00111              SRFModel,
00112              dictionary,
00113              (
00114                  const volVectorField& Urel
00115              ),
00116              (Urel)
00117          );
00118 
00119 
00120     // Constructors
00121 
00122         //- Construct from components
00123         SRFModel
00124         (
00125             const word& type,
00126             const volVectorField& Urel
00127         );
00128 
00129 
00130     // Selectors
00131 
00132          //- Return a reference to the selected SRF model
00133          static autoPtr<SRFModel> New
00134          (
00135              const volVectorField& Urel
00136          );
00137 
00138 
00139     // Destructor
00140 
00141         virtual ~SRFModel();
00142 
00143 
00144     // Member Functions
00145 
00146         // Edit
00147 
00148             //- Read radiationProperties dictionary
00149             virtual bool read();
00150 
00151 
00152         // Access
00153 
00154             //- Return the axis of rotation
00155             const vector& axis() const;
00156 
00157             //- Return the angular velocity field [rad/s]
00158             const dimensionedVector& omega() const;
00159 
00160             //- Return the coriolis force
00161             tmp<DimensionedField<vector, volMesh> > Fcoriolis() const;
00162 
00163             //- Return the centrifugal force
00164             tmp<DimensionedField<vector, volMesh> > Fcentrifugal() const;
00165 
00166             //- Source term component for momentum equation
00167             tmp<DimensionedField<vector, volMesh> > Su() const;
00168 
00169             //- Return velocity vector from positions
00170             vectorField velocity(const vectorField& positions) const;
00171 
00172             //- Return velocity of SRF for complete mesh
00173             tmp<volVectorField> U() const;
00174 
00175             //- Return absolute velocity for complete mesh
00176             tmp<volVectorField> Uabs() const;
00177 };
00178 
00179 
00180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00181 
00182 } // End namespace SRF
00183 } // End namespace Foam
00184 
00185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00186 
00187 #endif
00188 
00189 // ************************************************************************* //
00190 
Copyright © 2000-2009 OpenCFD Ltd