Forums Anyscript.org  

Go Back   Forums Anyscript.org > Professional Forum > Debug model

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2018, 11:19 AM
Mirmel Mirmel is offline
Junior Member
 
Join Date: Oct 2018
Posts: 3
Post FDK, kinematically indeterminate

Hello,
I'm currently working on a model that has a rod that should be movable in the x and y direction (not in the direction of expansion). To allwo certin movement I implemented a FDK element similar to the one in the FDK tutorial. It should allow movements in two translational directions. When loading the model everything works as it should. However, once I run the Study.Kinematics an error message appears that the model is indeterminate.
My code includes a point fixed with the origin and a pole whose center is defined as a node to implement the FDK between the fixed point and the center.

The code of the FDK looks like this:
AnyRevoluteJoint SpringJoint = {
AnyRefNode &EndL = Main.MyModel.EnvironmentModel.Bar.Center;
AnyRefNode &End = Main.MyModel.EnvironmentModel.Holding.End;
Constraints = {
CType = {ForceDep, ForceDep, Hard, Hard, Hard};
Reaction.Type= {Off, Off, On, On, On};
}; //should allow movement in x and y direction
};

AnyForce SpringStiffnessR = { // add characteristics (Stiffness)
AnyKinLinear &lin = Main.MyModel.EnvironmentModel.SpringJoint.Linear;
F = {-1000*lin.Pos[0], -5000*lin.Pos[1], 0};
}; //SpringStiffness

My question is now, which aspect I have disregarded and whether the FDK is properly defined for this purpose as well as which factor plays in to determine the model statically.

Best regards and thanks in advance.
Reply With Quote
  #2  
Old 10-11-2018, 11:32 AM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 954
Default

Hi,

First of all, please provide your details and affiliation. This is a professional forum, and we would like to know whom we are helping.

Secondly, from the code that was shared I see that you have 5 constraints for the rod object, which has 6 degrees of freedom. Possibly you have an additional constraint elsewhere in the code, but if not start by defining this 6th constraint.

The kinematically indeterminate error arises when you have more DoFs than constraints in your model. Please check.

Kind regards,
Pavel
Reply With Quote
  #3  
Old 10-12-2018, 11:46 AM
Mirmel Mirmel is offline
Junior Member
 
Join Date: Oct 2018
Posts: 3
Default

Hi Pavel,

first of all, sorry for that. I've added my details and thanks for your quick answer.

Yesterday I've tried a few different ways to define my 6th constraint. By adding another 'Hard' to the CType I allways get an error saying: Number of elements in CType specification must match number of elements in Pos vector. I've found that "Reaktion.Type = {Off, Off, Off, On, On}; will mean that all three forces reactions are switched off whereas the moment reactions is still On."
Theoretically there should be a third moment, shouldn't it? How do I know witch moment I need to restrict? Do I need to restrict it elsewhere in my code?

Best regards
Lisa
Reply With Quote
  #4  
Old 10-12-2018, 01:06 PM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 954
Default

Hi Lisa,

AnyRevoluteJoint is an object that adds 5 constraints (3 translations and 2 out of plane rotations to your system), leaving 1 rotational degree of freedom undefined. In order to provide all necessary constraints you need to add another one that would define the rotation in the plane of choice.

Normally you would define another object like AnyKinEqSimpleDriver for the remaining DoF or something more complex depending on your task. Please check our tutorials, where all this is covered quite well.

Normally, the overall number of active reaction forces should be equal to the number of degrees of freedom, minus those that are modeled through FDK, where RF are generally represented by boney contacts or other elastic structures, minus those that are carried by muscles. For example, looking at the knee (idealized revolute) joint we have 3 linear constraints representing 0 translations (bone contacts), and 2 fixed rotations (moment generating bone contacts), whereas the remaining flexion degree of freedom is carried by muscles.

I recommend you to do our tutorials, and probably watch this particular video on our YouTube channel: https://www.youtube.com/watch?v=6m7elLpc7vs and this one: https://www.youtube.com/watch?v=Qljy...youtu.be&t=362

Kind regards,
Pavel
Reply With Quote
  #5  
Old 10-16-2018, 02:44 PM
Mirmel Mirmel is offline
Junior Member
 
Join Date: Oct 2018
Posts: 3
Default

Hi Pavel,

thanks for the great tipps and videos. I now got my model kinematically determinated and it looks like it works now. But I'm not sure, if my aim to allow 'spring' movement in x and y direction is reached or wheather I blocked this movement as well.

You would really do me a favour if you could have a quick look at my complete code - perhaps you see if there is any mistake made.

_______________________________________
Main = {
AnyFolder MyModel = {
AnyFixedRefFrame GlobalRef = {
AnyDrawRefFrame drw={ScaleXYZ=0.3*{1,1,1};};
}; //GlobalRef

AnyFolder EnvironmentModel = {
AnySeg Bar = {
r0= {0,0,0.7};
Mass = 1;
Jii = {0, 0, 0};
};

// Fix the holdingL joint at a constant angle
AnyKinEqSimpleDriver HoldingRAngle = {
AnyRevoluteJoint &HoldR = .HoldR;
DriverPos = {pi/2};
DriverVel = {0};}; //HoldingRAngle

// Fix the holdingL joint at a constant angle
AnyKinEqSimpleDriver SpringJointAngle = {
AnyRevoluteJoint &Spring = .SpringJointR;
DriverPos = {pi/2};
DriverVel = {0};}; // SpringJointAngle

// Spring characteristics
AnyForce SpringStiffnessR = {
AnyKinLinear &lin = Main.MyModel.EnvironmentModel.SpringJointR.Linear;
F = {-1*lin.Pos[0], -5*lin.Pos[1], 0};}; //SpringStiffness
}; // EnvironmentModel
}; // MyModel

AnyBodyStudy MyStudy = {
tStart = 1;
tEnd = 10;
nStep = 11;
AnyFolder &Model = .MyModel;
Gravity = {0.0, -9.81, 0.0};
InverseDynamics.ForceDepKinOnOff = On;
};

}; // Main
______________________________________

Sorry for all the questions and uncertainty. You alredy were a big help to carry on the model.

Best regards
Lisa

Last edited by Mirmel; 10-16-2018 at 10:31 PM.
Reply With Quote
  #6  
Old 10-16-2018, 04:04 PM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 954
Default

Hi Lisa,

I think you have what you want, but probably your springs are not strong enough to hold this system in equilibrium. I changed something and now it moves and can find equilibrium - here are modifications:
Code:
      // Fix the holdingL joint at a constant angle
      AnyKinEqSimpleDriver HoldingRAngle = {
        AnyRevoluteJoint &HoldR = .HoldR;
        DriverPos = {pi/2};
        DriverVel = {pi/100};
      }; //HoldingRAngle


      // Fix the holdingL joint at a constant angle
      AnyKinEqSimpleDriver SpringJointAngle = {
        AnyRevoluteJoint &Spring = .SpringJointR;
        DriverPos = {pi/2};
        DriverVel = {pi/100};}; // SpringJointAngle
      
      // Spring characteristics
      AnyForce SpringStiffnessR = {
        AnyKinLinear &lin = Main.MyModel.EnvironmentModel.SpringJointR.Linear;
        F = {-1*lin.Pos[0], -15*lin.Pos[1], 0}*10;}; //SpringStiffness
    }; // EnvironmentModel

  AnyBodyStudy MyStudy = {
    tStart = 1;
    tEnd = 100;
    nStep = 111;
    AnyFolder &Model = .MyModel;
    Gravity = {0.0, -9.81, 0.0};
    InverseDynamics.ForceDepKinOnOff = On;
  };
It moves in a circular manner and fully dependent on a 2D spring.

You seem to have what you need. But the rod moves in a plane perpendicular to the axis of the rod.

I am not sure whether this is what you wanted to do or not.

Kind regards,
Pavel
Reply With Quote
Reply

Tags
fdk

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:18 PM.