CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

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

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2017, 23:12
Default how to understant the "rotate" function in sixDoFRigidBodyMotion class?
  #1
New Member
 
Join Date: Mar 2017
Posts: 4
Rep Power: 6
tmatrix is on a distinguished road
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::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 do not know why five rotations should be carried out? Is there any detailed illustration for these treatments?
tmatrix is offline   Reply With Quote

Reply

Tags
rotate, sixdofrigidbodymotion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
foamToTecplot360 thomasduerr OpenFOAM Post-Processing 120 March 5, 2019 00:00
The udf.h headers are unable to open- in VISUAL STUDIO 13 sanjeetlimbu Fluent UDF and Scheme Programming 4 May 2, 2016 05:38
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42


All times are GMT -4. The time now is 14:37.