34 namespace sixDoFRigidBodyMotionRestraints
39 sixDoFRigidBodyMotionRestraint,
40 sphericalAngularSpring,
92 refDir[(cmpt + 1) % 3] = 1;
96 axis = (refQ_ & axis);
98 refDir = (refQ_ & refDir);
100 newDir -= (axis & newDir)*axis;
102 restraintMoment += -stiffness_*(refDir ^ newDir);
105 restraintMoment += -damping_*motion.
omega();
115 Info<<
" force " << restraintForce
116 <<
" moment " << restraintMoment
129 refQ_ = sDoFRBMRCoeffs_.lookupOrDefault<
tensor>(
"referenceOrientation",
I);
135 "Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularSpring::"
138 "const dictionary& sDoFRBMRDict"
141 <<
"referenceOrientation " << refQ_ <<
" is not a rotation tensor. "
142 <<
"mag(referenceOrientation) - sqrt(3) = "
147 sDoFRBMRCoeffs_.lookup(
"stiffness") >> stiffness_;
149 sDoFRBMRCoeffs_.lookup(
"damping") >> damping_;