Rigid body module python commands

  • 35 Views
  • Last Post 19 January 2019
Mordrag posted this 18 January 2019

Is there anyone familiar with the python commands used in the Rigid Body module? I need to add a load to a joint 2 based on a moment measure from joint 1. Both joints are revolute and have defined stops so that they produce a reaction when loaded.

Now I think I have the right code because it works for the Case A, which is shown in the picture below. Case A is when the link is loaded by force, which produces a torque at joint T=F*L which complies with the joint probe and drives the second joint through the script.

But the problem is, that if I load the joint directly by moment, the script stops doing what is it supposed to be doing and the reaction read by the script is 0 (even if the joint probe shows the correct reaction). The same thing occurs if the first joint is loaded by an acceleration (M=alfa*I), I get 0 reaction by the script.

Do you have any idea how to make this work?

Please see the attached .wbzp project and the script below.

Attached Files

Order By: Standard | Newest | Votes
peteroznewman posted this 18 January 2019

A joint load is an input to the joint, while a reaction is an output from the joint.
Why are you requesting the Reaction Moment result when you are applying a Moment? 
You already have the answer, it's the Moment you applied.

It's like in Static Structural, if you apply a displacement to nodes on an element as an input, you can get the reaction force as an output. But if you apply a force to those same nodes on an element, there is no longer a reaction force result.

  • Liked by
  • Jackely
Mordrag posted this 18 January 2019

This is just a very simplified model of my real problem to ilustrate the behaviour. In the big model I drive the joint by rotation through a nonlinear spring that converts that rotation to moment. This is why I want to read the moment I am applying here, it's just a test case.

Well, if you apply force in static structural and use FSUM or probe in workbench, you should still get a force reaction which is equal to the force you applied, isn't this true?

If I input rotational velocity to joint 1, I can drive joint 2 by reading out the velocity reaction at joint 1 so I do not understand why it should not work with the moment. Then another case, I drive joint 1 by rot. acceleration which produces moment reaction, but my script will read out zero. I am really confused by this.

peteroznewman posted this 19 January 2019

It's smart to make very simplified models to understand clearly what the model, the solver and the post-processor is capable of. You've done the test and learned that requesting a moment reaction on a joint with an applied moment results in 0 being returned. You want to know why.

I assume the developers of the code didn't think it was necessary because of what I said above. Instead of asking why, perhaps you should submit an enhancement request or a bug report and describe why you think it would be useful to report the moments going through a joint with an applied moment. It just doesn't in this release. You will have to work with that limitation for now.

Close