|
[Sponsors] |
Leapfrog orientation adjustment in sixDoFRigidBodyMotion.C |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 6, 2015, 03:25 |
Leapfrog orientation adjustment in sixDoFRigidBodyMotion.C
|
#1 |
Senior Member
Join Date: Jul 2011
Posts: 120
Rep Power: 14 |
Hi all, I am trying to understand the idea behind the leapfrog motion and orientation adjustments and I am not sure why during the adjustments. Q() from the previous time step Q0() is used with pi() from the current time step, is there any reason for this?
Code:
// Leapfrog orientation adjustment Tuple2<tensor, vector> Qpi = rotate(Q0(), pi(), deltaT, deltaT0); Q() = Qpi.first(); pi() = rConstraints_ & Qpi.second(); Code:
// Leapfrog move part centreOfRotation() = centreOfRotation0() + deltaT*v(); Code:
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; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Coordinate System Orientation | ryancoe | STAR-CCM+ | 7 | November 4, 2014 03:46 |
Changing orientation of object in Paraview | Jochem | OpenFOAM | 0 | July 28, 2010 04:52 |
Face orientation in blockMesh | WiWo | OpenFOAM | 0 | March 18, 2010 11:10 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 05:12 |
Y+ orientation | Ashish | Siemens | 1 | April 22, 2003 03:58 |