# how to understant the "rotate" function in sixDoFRigidBodyMotion class?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 4, 2017, 23:12 how to understant the "rotate" function in sixDoFRigidBodyMotion class? #1 New Member   Join Date: Mar 2017 Posts: 4 Rep Power: 9 hi, everyone I'm read the code of sixDoFRigidBodyMotion class recently. There is a function rotate in this class and the details are shown as following: inline Foam::Tuple2 Foam::sixDoFRigidBodyMotion::rotate ( const tensor& Q0, const vector& pi0, const scalar deltaT ) const { Tuple2 Qpi(Q0, pi0); tensor& Q = Qpi.first(); vector& pi = Qpi.second(); tensor R = rotationTensorX(0.5*deltaT*pi.x()/momentOfInertia_.xx()); pi = pi & R; Q = Q & R; R = rotationTensorY(0.5*deltaT*pi.y()/momentOfInertia_.yy()); pi = pi & R; Q = Q & R; R = rotationTensorZ(deltaT*pi.z()/momentOfInertia_.zz()); pi = pi & R; Q = Q & R; R = rotationTensorY(0.5*deltaT*pi.y()/momentOfInertia_.yy()); pi = pi & R; Q = Q & R; R = rotationTensorX(0.5*deltaT*pi.x()/momentOfInertia_.xx()); pi = pi & R; Q = Q & R; return Qpi; } I do not know why five rotations should be carried out? Is there any detailed illustration for these treatments?

 Tags rotate, sixdofrigidbodymotion