Initialization - how to use value of a design variable?

#1

Hello,

I want to use the dynamic position of a mocap marker to insert a force vector at this position.
So first, I want to create a AnyRefNode:

AnyRefNode ForceRefNode_r = {
  sRel={0,Main.ModelSetup.MocapDrivers.RKNE.Driver.Pos[1],0}; 

With this code I get the error:
— Driver.Pos : argument will not be ready for evaluation until moment ‘PosVar’ —

So I know that it is an initialization problem with the Pos-Array, because the position is not loaded before my analysis runs and therefore I do not get a value. How can I cope with this problem? I don’t want to use a constant position value.

Thanks!
David

#2

Hi David,

RKNE.Driver.Pos is a vector that will be varying with time of the simulation and will be evaluated when kinematics is solved - hence the PosVar. It cannot be used to define a fixed reference node, which has a constant position on a segment or a fixed reference frame.

Could you elaborate what you are trying to do? Do you want to apply a force to a fixed node on a segment (this will require just to find this fixed sRel)?

Or would you like this node to be moving? If the force application node has to move - you could define a segment that is floating in space, drive it to the relevant position, and apply the force to this segment and transfer the load onto the segment of interest using, for example, an AnyReacForce object.

Kind regards, Pavel