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