mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rotatingMotion: Corrected construction of quaternion for non-coordinate axis rotation
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1306
This commit is contained in:
@ -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(): "
|
||||
|
||||
Reference in New Issue
Block a user