OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

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-2007 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     EulerCoordinateRotation
00027 
00028 Description
00029     The 3 rotations are defined in the Euler convention
00030     (around Z, around X' and around Z').
00031     For reference and illustration, see
00032     http://mathworld.wolfram.com/EulerAngles.html
00033     Note, however, that it is the reverse transformation
00034     (local->global) that is defined here.
00035 
00036 \*---------------------------------------------------------------------------*/
00037 
00038 #ifndef EulerCoordinateRotation_H
00039 #define EulerCoordinateRotation_H
00040 
00041 #include "coordinateRotation.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                    Class EulerCoordinateRotation Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class EulerCoordinateRotation
00053 :
00054     public coordinateRotation
00055 {
00056     // Private member functions
00057 
00058         //- Calculate transformation tensor
00059         void calcTransform
00060         (
00061             const scalar phiAngle,
00062             const scalar thetaAngle,
00063             const scalar psiAngle,
00064             const bool inDegrees = true
00065         );
00066 
00067 
00068 public:
00069 
00070     //- Runtime type information
00071     TypeName("EulerRotation");
00072 
00073 
00074     // Constructors
00075 
00076         //- Construct null
00077         EulerCoordinateRotation();
00078 
00079         //- Construct from rotation vector
00080         EulerCoordinateRotation
00081         (
00082             const vector& phiThetaPsi,
00083             const bool inDegrees = true
00084         );
00085 
00086         //- Construct from components of rotation vector
00087         EulerCoordinateRotation
00088         (
00089             const scalar phiAngle,
00090             const scalar thetaAngle,
00091             const scalar psiAngle,
00092             const bool inDegrees = true
00093         );
00094 
00095         //- Construct from dictionary
00096         EulerCoordinateRotation(const dictionary&);
00097 
00098 };
00099 
00100 
00101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00102 
00103 } // End namespace Foam
00104 
00105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00106 
00107 #endif
00108 
00109 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd