mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Fixes mantis issue 0000022: sixDoFRigidBodyMotion: Acceleration used as force.
This commit is contained in:
@ -423,23 +423,21 @@ void Foam::sixDoFRigidBodyMotion::updateForce
|
|||||||
scalar deltaT
|
scalar deltaT
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
vector a = vector::zero;
|
vector fGlobal = vector::zero;
|
||||||
|
|
||||||
vector tau = vector::zero;
|
vector tauGlobal = vector::zero;
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
fGlobal = sum(forces);
|
||||||
|
|
||||||
forAll(positions, i)
|
forAll(positions, i)
|
||||||
{
|
{
|
||||||
const vector& f = forces[i];
|
tauGlobal += (positions[i] - centreOfMass()) ^ forces[i];
|
||||||
|
|
||||||
a += f/mass_;
|
|
||||||
|
|
||||||
tau += Q().T() & ((positions[i] - centreOfMass()) ^ f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateForce(a, tau, deltaT);
|
updateForce(fGlobal, tauGlobal, deltaT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user