CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Rotation using quaternion (https://www.cfd-online.com/Forums/openfoam-programming-development/77635-rotation-using-quaternion.html)

cwang5 June 29, 2010 09:45

Rotation using quaternion
 
Hi guys,

I am working on a program that would allow 1DoF rotation about an arbitrary axis in 3D space. From what I've been reading on the forum on the 3/6DoF motion solver, it appears that the quaternion method is the best for the job. However, when I implemented the quaternion into my code, the total angle rotated by the quaternion.R() does not match up with the total angle theta that was input into the quaternion in the form quaternion(AxisOfRotation, theta). I'm wondering if I have somehow mis-read the source code in quaternion.H and messed up the quaternion. Any help would be appreciated, thanks in advance.

John


All times are GMT -4. The time now is 17:48.