FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2011 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Namespace
00025     Foam::SRF
00026 
00027 Description
00028     Namespace for single rotating frame (SRF) models
00029 
00030 Class
00031     Foam::SRF::SRFModel
00032 
00033 Description
00034     Top level model for single rotating frame
00035     - Steady state only - no time derivatives included
00036 
00037 SourceFiles
00038     SRFModel.C
00039 
00040 \*---------------------------------------------------------------------------*/
00041 
00042 #ifndef SRFModel_H
00043 #define SRFModel_H
00044 
00045 #include <OpenFOAM/IOdictionary.H>
00046 #include <OpenFOAM/autoPtr.H>
00047 #include <OpenFOAM/runTimeSelectionTables.H>
00048 #include <finiteVolume/fvMesh.H>
00049 #include <finiteVolume/volFields.H>
00050 #include <OpenFOAM/vectorField.H>
00051 
00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00053 
00054 namespace Foam
00055 {
00056 namespace SRF
00057 {
00058 
00059 /*---------------------------------------------------------------------------*\
00060                            Class SRFModel Declaration
00061 \*---------------------------------------------------------------------------*/
00062 
00063 class SRFModel
00064 :
00065     public IOdictionary
00066 {
00067 
00068 protected:
00069 
00070     // Protected data
00071 
00072         //- Reference to the relative velocity field
00073         const volVectorField& Urel_;
00074 
00075         //- Reference to the mesh
00076         const fvMesh& mesh_;
00077 
00078         //- Axis of rotation
00079         vector axis_;
00080 
00081         //- SRF model coeficients dictionary
00082         dictionary SRFModelCoeffs_;
00083 
00084         //- Angular velocity of the frame (rad/s)
00085         dimensionedVector omega_;
00086 
00087 
00088 private:
00089 
00090     // Private Member Functions
00091 
00092         //- Disallow default bitwise copy construct
00093         SRFModel(const SRFModel&);
00094 
00095         //- Disallow default bitwise assignment
00096         void operator=(const SRFModel&);
00097 
00098 
00099 public:
00100 
00101     //- Runtime type information
00102     TypeName("SRFModel");
00103 
00104 
00105     // Declare runtime constructor selection table
00106 
00107          declareRunTimeSelectionTable
00108          (
00109              autoPtr,
00110              SRFModel,
00111              dictionary,
00112              (
00113                  const volVectorField& Urel
00114              ),
00115              (Urel)
00116          );
00117 
00118 
00119     // Constructors
00120 
00121         //- Construct from components
00122         SRFModel
00123         (
00124             const word& type,
00125             const volVectorField& Urel
00126         );
00127 
00128 
00129     // Selectors
00130 
00131          //- Return a reference to the selected SRF model
00132          static autoPtr<SRFModel> New
00133          (
00134              const volVectorField& Urel
00135          );
00136 
00137 
00138     // Destructor
00139 
00140         virtual ~SRFModel();
00141 
00142 
00143     // Member Functions
00144 
00145         // Edit
00146 
00147             //- Read radiationProperties dictionary
00148             virtual bool read();
00149 
00150 
00151         // Access
00152 
00153             //- Return the axis of rotation
00154             const vector& axis() const;
00155 
00156             //- Return the angular velocity field [rad/s]
00157             const dimensionedVector& omega() const;
00158 
00159             //- Return the coriolis force
00160             tmp<DimensionedField<vector, volMesh> > Fcoriolis() const;
00161 
00162             //- Return the centrifugal force
00163             tmp<DimensionedField<vector, volMesh> > Fcentrifugal() const;
00164 
00165             //- Source term component for momentum equation
00166             tmp<DimensionedField<vector, volMesh> > Su() const;
00167 
00168             //- Return velocity vector from positions
00169             vectorField velocity(const vectorField& positions) const;
00170 
00171             //- Return velocity of SRF for complete mesh
00172             tmp<volVectorField> U() const;
00173 
00174             //- Return absolute velocity for complete mesh
00175             tmp<volVectorField> Uabs() const;
00176 };
00177 
00178 
00179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00180 
00181 } // End namespace SRF
00182 } // End namespace Foam
00183 
00184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00185 
00186 #endif
00187 
00188 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines