Skip to content
Snippets Groups Projects
Commit c36677f1 authored by Henry's avatar Henry Committed by Andrew Heather
Browse files

rotatingMotion: Corrected construction of quaternion for non-coordinate axis rotation

parent ca4d1530
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -75,9 +75,9 @@ Foam::solidBodyMotionFunctions::rotatingMotion::transformation() const ...@@ -75,9 +75,9 @@ Foam::solidBodyMotionFunctions::rotatingMotion::transformation() const
scalar t = time_.value(); scalar t = time_.value();
// Rotation around axis // Rotation around axis
vector eulerAngles = omega_->integrate(0, t)*axis_; scalar angle = omega_->integrate(0, t);
quaternion R(eulerAngles.x(), eulerAngles.y(), eulerAngles.z()); quaternion R(axis_, angle);
septernion TR(septernion(origin_)*R*septernion(-origin_)); septernion TR(septernion(origin_)*R*septernion(-origin_));
Info<< "solidBodyMotionFunctions::rotatingMotion::transformation(): " Info<< "solidBodyMotionFunctions::rotatingMotion::transformation(): "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment