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

EulerCoordinateRotation.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-2010 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 Class
00025     Foam::EulerCoordinateRotation
00026 
00027 Description
00028     A coordinateRotation defined in the z-x-y Euler convention.
00029 
00030     The 3 rotations are defined in the Euler convention
00031     (around Z, around X' and around Z').
00032     For reference and illustration, see
00033     http://mathworld.wolfram.com/EulerAngles.html
00034     Note, however, that it is the reverse transformation
00035     (local->global) that is defined here.
00036 
00037     - the rotation angles are in degrees, unless otherwise explictly specified:
00038 
00039     @verbatim
00040         coordinateRotation
00041         {
00042             type        EulerRotation
00043             degrees     false;
00044             rotation    (0 0 3.141592654);
00045         }
00046     @endverbatim
00047 
00048 \*---------------------------------------------------------------------------*/
00049 
00050 #ifndef EulerCoordinateRotation_H
00051 #define EulerCoordinateRotation_H
00052 
00053 #include <meshTools/coordinateRotation.H>
00054 
00055 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00056 
00057 namespace Foam
00058 {
00059 
00060 /*---------------------------------------------------------------------------*\
00061                    Class EulerCoordinateRotation Declaration
00062 \*---------------------------------------------------------------------------*/
00063 
00064 class EulerCoordinateRotation
00065 :
00066     public coordinateRotation
00067 {
00068     // Private member functions
00069 
00070         //- Calculate transformation tensor
00071         void calcTransform
00072         (
00073             const scalar phiAngle,
00074             const scalar thetaAngle,
00075             const scalar psiAngle,
00076             const bool inDegrees=true
00077         );
00078 
00079 
00080 public:
00081 
00082     //- Runtime type information
00083     TypeName("EulerRotation");
00084 
00085 
00086     // Constructors
00087 
00088         //- Construct null
00089         EulerCoordinateRotation();
00090 
00091         //- Construct from rotation vector
00092         EulerCoordinateRotation
00093         (
00094             const vector& phiThetaPsi,
00095             const bool inDegrees=true
00096         );
00097 
00098         //- Construct from components of rotation vector
00099         EulerCoordinateRotation
00100         (
00101             const scalar phiAngle,
00102             const scalar thetaAngle,
00103             const scalar psiAngle,
00104             const bool inDegrees=true
00105         );
00106 
00107         //- Construct from dictionary
00108         EulerCoordinateRotation(const dictionary&);
00109 
00110 };
00111 
00112 
00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00114 
00115 } // End namespace Foam
00116 
00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00118 
00119 #endif
00120 
00121 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines