@bestucan
非常感谢您的回复,对我的启发很大。
之前提到的硕士论文中的流程图如下:

我之前一直在研究interDyMFoam.C对sixDoFRigidBodyMotion类的调用流程,以及sixDoFSolver下的Newmark.C的源码结构,所以忽略了对于速度v这个变量定义的位置。我去看了一下sixDoFSolver和sixDoFRigidBodyMotion这两个类的头文件。
六自由度运动求解器sixDoFSolver在sixDoFSolver.H62行处,声明了一个sixDoFRigidBodyMotion的类:
sixDoFRigidBodyMotion& body_;
而在sixDoFRigidBodyMotion类的头文件sixDoFRigidBodyMotion.H中,在第79到83行,有如下声明:
//- Motion state data object
sixDoFRigidBodyMotionState motionState_;
//- Motion state data object for previous time-step
sixDoFRigidBodyMotionState motionState0_;
并且对于速度v、加速度a的声明,源码中将其声明为内联函数,在sixDoFRigidBodyMotionI.H中的第143到第152行:
inline const Foam::vector& Foam::sixDoFRigidBodyMotion::v() const
{
return motionState_.v();
}
inline const Foam::vector& Foam::sixDoFRigidBodyMotion::a() const
{
return motionState_.a();
}
所以按照代码的思路和我的理解,应该是将所有的状态量如速度v、加速度a等,保存在sixDoFRigidBodyMotionState这个类中,并且除了当前时间步的运动状态,前一时间步的运动状态也能够访问。
关于取速度的问题,我认为是可行的。在查阅源码时,见到了sixDoFRigidBodyMotionRestraint的子类linearDamper::restrain()调用了sixDoFRigidBodyMotion的v()。

代码在linearDamper.C的第73到89行,如下
void Foam::sixDoFRigidBodyMotionRestraints::linearDamper::restrain
(
const sixDoFRigidBodyMotion& motion,
vector& restraintPosition,
vector& restraintForce,
vector& restraintMoment
) const
{
restraintForce = -coeff_*motion.v();
restraintMoment = Zero;
if (motion.report())
{
Info<< " force " << restraintForce
<< endl;
}
}
不难理解,阻尼与速度成正比,所以需要得到六自由度浮体的速度v,即公式中的motion.v()。而调用restrain函数需要把sixDoFRigidBodyMotion& motion传入,因此实现了对速度的调用。
除此之外,类似的像是 sphericalAngularDamper、sphericalAngularSpring、linearAxialAngularSpring、tabulatedAxialAngularSpring这些约束模型,实现了对角速度omega()的调用,如下图所示

以上是我的一些拙见,有错误的地方还请多多指点。