View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003345||OpenFOAM||Feature||public||2019-09-10 10:24||2019-09-11 11:46|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Fixed in Version|
|Summary||0003345: suggestion of including time information in restraint class in sixDoFRigidBodyMotion and rigidBodyDynamics|
|Description||In simulating 6 DoF motion, sometimes it comes in handy when time varying external forces to the body are available.|
for example, step function-like external force will be useful in towing simulation.
external forces acting on a body can be implemented with restraint class in sixDoFRigidBodyMotion and rigidBodyDynamics.
but in current implementation of restraint class, it is not possible to have a reference to time object.
It might be easy to add time support by passing objectRegistry object to restraint class constructor.
please check this feature implementation.
|Tags||No tags attached.|
||The rigidBodyDynamics classes are designed without the need for an objectRegistry so that they can be used in other contexts, e.g. robotics for which an OpenFOAM objectRegistry would not be required. If the current time is needed in the forces and restraint classes it would be better to pass that specifically rather than the high-level objectRegistry which may not exist for all applications of rigidBodyDynamics.|
tracing from rigidBodyMeshMotion class, time information is passed into RBD::rigidBodyMotion::solve.
in RBD::rigidBodyMotion::solve, time info is stored in motionState and only internal joint force and external force are passed into rigidBodySolver::solve member function.
in the rigidBodySolver::solve, those forces are passed into rigidBodyModel's member function applyRestraints.
and in the applyRestraints, restraints associated to a body are calculated by restrain member function.
So, time parameter will be added in rigidBodySolver::solve, rigidBodyModel::applyRestraints and restraints::restrain in order to pass current time information to restrain class.
Do you mean that the time parameter would need to be added to the rigidBodySolver::solve call or that rigidBodySolver::solve would pass it to rigidBodyModel::applyRestraints?
Given that rigidBodySolver::solve already has access to the current time from the rigidBodyModelState() protected member function I would suggest the latter.
A little while ago we added a reference to the rigidBodyModelState to the jcalc method of the joints for a
very similar reason (we needed more state information that we previously had). We could do the same for the restraints. This would allow the restraints to access the time, but also potentially any other aspect of the rigid body state.
Foam::RBD::restraint::restrain would need the new argument, as would all of it's derivations. Foam::RBD::rigidBodyModel::applyRestraints would also need it. The Foam::RBD::rigidBodySolvers then call applyRestraints with the same set of arguments as they use to call forwardDynamics.
Does that make sense? I don't know if the same is possible for sixDoF.
||yes, I think that make sense. for the sixDoF, I will study further.|
studying sixDoFRigidBodyMotion, sixDoFRigidBodyMotionState has not any information time.
access to restraints::restrain member function is maded in sixDoFRigidBodyMotion::applyRestraints() which is called in sixDoFRigidBodyMotion::updateAcceleration(fGlobal, tauGlobal).
sixDoFRigidBodyMotion::updateAcceleration is called in sixDoFSolver::updateAcceleration(fGlobal, tauGlobal)
sixDoFSolver::updateAcceleration is called in sixDoFSolver::solve(firstIter, fGlobal, tauGlobal, deltaT, deltaT0)
so sixDoF is using only time step and it doesn't look like an easy work to hand over time information up to restraint class unless chaning design of sixDoF classes or sixDoFRigidbodyMotionState. maybe best bet is to add time information to sixDoFRigidBodyMotioState and make it accessable.
||The longer term plan is to replace sixDoF with the more general and extensible rigidBody system, the only reason why this has not yet been done is that sixDoF supports implicit handling of restraints whereas they are currently handled explicitly in rigidBody and it is non-trivial to change this to an implicit implementation but this will get done eventually, particularly if we can secure funding for it. If your cases are not critically dependent on the implicit treatment of restraints I would recommend using the rigidBody system and update that to provide the time information to the restraints.|
||I got the feeling rigidBody would replace sixDoF before. in that sense, I agree with Henry. Thank you for letting me know the plan.|
|2019-09-10 10:24||handrake0724||New Issue|
|2019-09-10 10:33||henry||Note Added: 0010715|
|2019-09-10 12:27||handrake0724||Note Added: 0010717|
|2019-09-10 13:44||henry||Note Added: 0010718|
|2019-09-10 15:11||will||Note Added: 0010720|
|2019-09-10 23:21||handrake0724||Note Added: 0010724|
|2019-09-11 05:45||handrake0724||Note Added: 0010725|
|2019-09-11 08:05||henry||Note Added: 0010729|
|2019-09-11 08:49||handrake0724||Note Added: 0010730|