50 rigidBodyMotion& body,
75 qDot() = qDot0() + 0.5*deltaT0()*qDdot();
76 q() = q0() + deltaT()*qDot();
79 correctQuaternionJoints();
82 model_.forwardDynamicsCorrection(state());
87 model_.applyRestraints(rtau, rfx, state());
91 model_.forwardDynamics(state(), rtau, rfx);
95 qDot() += 0.5*deltaT()*qDdot();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Six degree of freedom motion for a rigid body.
void correctQuaternionJoints()
Correct the quaternion joints based on the current change in q.
rigidBodyMotion & model_
The rigid-body model.
scalarField & qDot()
Return the current joint quaternion.
const scalarField & qDot0() const
Return the current joint quaternion.
scalar deltaT0() const
Return the previous time-step.
rigidBodyModelState & state()
Return the motion state.
scalar deltaT() const
Return the current time-step.
rigidBodySolver(rigidBodyMotion &body)
const scalarField & q0() const
Return the current joint position and orientation.
scalarField & q()
Return the current joint position and orientation.
scalarField & qDdot()
Return the current joint acceleration.
Symplectic 2nd-order explicit time-integrator for rigid-body motion.
virtual void solve(const scalarField &tau, const Field< spatialVector > &fx)
Integrate the rigid-body motion for one time-step.
virtual ~symplectic()
Destructor.
symplectic(rigidBodyMotion &body, const dictionary &dict)
Construct for the given body from dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.