FreeFOAM The Cross-Platform CFD Toolkit
EulerCoordinateRotation.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::EulerCoordinateRotation
26 
27 Description
28  A coordinateRotation defined in the z-x-y Euler convention.
29 
30  The 3 rotations are defined in the Euler convention
31  (around Z, around X' and around Z').
32  For reference and illustration, see
33  http://mathworld.wolfram.com/EulerAngles.html
34  Note, however, that it is the reverse transformation
35  (local->global) that is defined here.
36 
37  - the rotation angles are in degrees, unless otherwise explictly specified:
38 
39  @verbatim
40  coordinateRotation
41  {
42  type EulerRotation
43  degrees false;
44  rotation (0 0 3.141592654);
45  }
46  @endverbatim
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef EulerCoordinateRotation_H
51 #define EulerCoordinateRotation_H
52 
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class EulerCoordinateRotation Declaration
62 \*---------------------------------------------------------------------------*/
63 
65 :
66  public coordinateRotation
67 {
68  // Private member functions
69 
70  //- Calculate transformation tensor
71  void calcTransform
72  (
73  const scalar phiAngle,
74  const scalar thetaAngle,
75  const scalar psiAngle,
76  const bool inDegrees=true
77  );
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("EulerRotation");
84 
85 
86  // Constructors
87 
88  //- Construct null
90 
91  //- Construct from rotation vector
93  (
94  const vector& phiThetaPsi,
95  const bool inDegrees=true
96  );
97 
98  //- Construct from components of rotation vector
100  (
101  const scalar phiAngle,
102  const scalar thetaAngle,
103  const scalar psiAngle,
104  const bool inDegrees=true
105  );
106 
107  //- Construct from dictionary
109 
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************ vim: set sw=4 sts=4 et: ************************ //