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

STARCDCoordinateRotation.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 Class
00026     Foam::STARCDCoordinateRotation
00027 
00028 Description
00029     A coordinateRotation defined by the STAR-CD convention.
00030 
00031     The 3 rotations are defined in the STAR-CD convention
00032     (around Z, around X' and around Y'').
00033     The order of the parameter arguments matches this rotation order.
00034 
00035     - the rotation angles are in degrees, unless otherwise explictly specified:
00036 
00037     @verbatim
00038         coordinateRotation
00039         {
00040             type        STARCDRotation;
00041             degrees     false;
00042             rotation    (0 0 3.141592654);
00043         }
00044     @endverbatim
00045 
00046 \*---------------------------------------------------------------------------*/
00047 
00048 #ifndef STARCDCoordinateRotation_H
00049 #define STARCDCoordinateRotation_H
00050 
00051 #include "coordinateRotation.H"
00052 
00053 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00054 
00055 namespace Foam
00056 {
00057 
00058 /*---------------------------------------------------------------------------*\
00059                   Class STARCDCoordinateRotation Declaration
00060 \*---------------------------------------------------------------------------*/
00061 
00062 class STARCDCoordinateRotation
00063 :
00064     public coordinateRotation
00065 {
00066     // Private member functions
00067 
00068         //- Calculate transformation tensor
00069         void calcTransform
00070         (
00071             const scalar rotZ,
00072             const scalar rotX,
00073             const scalar rotY,
00074             const bool inDegrees=true
00075         );
00076 
00077 
00078 public:
00079 
00080     //- Runtime type information
00081     TypeName("STARCDRotation");
00082 
00083 
00084     // Constructors
00085 
00086         //- Construct null
00087         STARCDCoordinateRotation();
00088 
00089         //- Construct from rotation vector
00090         STARCDCoordinateRotation
00091         (
00092             const vector& rotZrotXrotY,
00093             const bool inDegrees=true
00094         );
00095 
00096         //- Construct from components of rotation vector
00097         STARCDCoordinateRotation
00098         (
00099             const scalar rotZ,
00100             const scalar rotX,
00101             const scalar rotY,
00102             const bool inDegrees=true
00103         );
00104 
00105         //- Construct from dictionary
00106         STARCDCoordinateRotation(const dictionary&);
00107 
00108 };
00109 
00110 
00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00112 
00113 } // End namespace Foam
00114 
00115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00116 
00117 #endif
00118 
00119 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd