diff --git a/src/ODE/sixDOF/geometricSixDOF/geometricSixDOF.C b/src/ODE/sixDOF/geometricSixDOF/geometricSixDOF.C index 18a12d463..507c1d69b 100644 --- a/src/ODE/sixDOF/geometricSixDOF/geometricSixDOF.C +++ b/src/ODE/sixDOF/geometricSixDOF/geometricSixDOF.C @@ -79,7 +79,7 @@ Foam::dimensionedVector Foam::geometricSixDOF::A // Force in global coordinate system force() // Force in local coordinate system - + (dimensionedTensor("R_T", dimless, R.T()) & forceRelative()) + + (R.T() & forceRelative()) // Spring force in global coordinate system - (linSpringCoeffs() & xR) // Damping force in global coordinate system diff --git a/src/ODE/sixDOF/quaternionSixDOF/quaternionSixDOF.C b/src/ODE/sixDOF/quaternionSixDOF/quaternionSixDOF.C index 9d21aa448..f414f7aea 100644 --- a/src/ODE/sixDOF/quaternionSixDOF/quaternionSixDOF.C +++ b/src/ODE/sixDOF/quaternionSixDOF/quaternionSixDOF.C @@ -60,20 +60,21 @@ Foam::dimensionedVector Foam::quaternionSixDOF::A const HamiltonRodriguezRot& rotation ) const { - // Fix the global force for global rotation constraints - dimensionedVector fAbs = this->force(); + // Fix the total force in global coordinate system + dimensionedVector fAbs = + // Force in global coordinate system + force() + // Force in local coordinate system + + (rotation.invR() & forceRelative()) + // Spring force in global coordinate system + - (linSpringCoeffs() & xR) + // Damping force in global coordinate system + - (linDampingCoeffs() & uR); // Constrain translation constrainTranslation(fAbs.value()); - return - ( - - (linSpringCoeffs() & xR) // spring - - (linDampingCoeffs() & uR) // damping - + fAbs - // To absolute - + (rotation.invR() & forceRelative()) - )/mass(); + return fAbs/mass(); } diff --git a/src/ODE/sixDOF/quaternionSixDOF/quaternionSixDOF.H b/src/ODE/sixDOF/quaternionSixDOF/quaternionSixDOF.H index 2c7e528a9..648b49921 100644 --- a/src/ODE/sixDOF/quaternionSixDOF/quaternionSixDOF.H +++ b/src/ODE/sixDOF/quaternionSixDOF/quaternionSixDOF.H @@ -109,7 +109,7 @@ class quaternionSixDOF //- Fixed yaw (rotation around z) Switch fixedYaw_; - //- Restraints in referent coordinate system + //- Constraints in referent coordinate system Switch referentMotionConstraints_; //- Rotation of referent coordinate system