|
[Sponsors] |
How to understand "rotate" function in sixDoFRigidBodyMotion? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Mar 2017
Posts: 4
Rep Power: 9 ![]() |
Hi, everyone
I recently read the code of sixDoFRigidBodyMotion class. There is a function rotate in this class and the corresponding code is shown as following: inline Foam::Tuple2<Foam::tensor, Foam::vector> Foam::sixDoFRigidBodyMotion::rotate ( const tensor& Q0, const vector& pi0, const scalar deltaT ) const { Tuple2<tensor, vector> 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 don't know why five rotation should be carried out in this function? Is there any comments for this treatment? |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 ![]() |
Did you find an answer? What's the exact reason to rotate in this order: first half angle around the x-axis, then half angle around y-axis, than the full angle around the z-axis, the half angle around the y-axis and last half angle around the x-axis?
|
|
![]() |
![]() |
![]() |
Tags |
motionsolver, rigidbody, rotate, sixdofrigidbodymotion |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lets talk about relaxation factor optimization | chriss85 | OpenFOAM Running, Solving & CFD | 35 | June 21, 2019 09:54 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 01:47 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 09:56 |
Compilation errors in ThirdPartymallochoard | feng_w | OpenFOAM Installation | 1 | January 25, 2009 06:59 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 20:50 |