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

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1306
parent ca4d1530
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -75,9 +75,9 @@ Foam::solidBodyMotionFunctions::rotatingMotion::transformation() const
scalar t = time_.value();
// 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_));
Info<< "solidBodyMotionFunctions::rotatingMotion::transformation(): "
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment