CombinedKinematicEngine, using Dead=True/False

Asked by Luis Barbosa on 2019-01-14

Hi all,

I am using a script where the .st have to wait particle stabilization before starts its TranslationEngine+ RotationEngine.
For this I am using in O. engines:
...
CombinedKinematicEngine(ids=rod,label='combEngine', Dead=True) + TranslationEngine(translationAxis=(0,0,1),velocity=vel) + RotationEngine(rotationAxis=(1,0,0), angularVelocity=angVel, rotateAroundZero=True, zeroPoint=(0,0,0)),
PyRunner(command='checkUnbalanced()',iterPeriod=500),

...

def checkUnbalanced():
 print "Unbalanced: ",utils.unbalancedForce()
 if utils.unbalancedForce()<0.22:
  O.engines=O.engines+[PyRunner(iterPeriod=1, command="updateKinematicEngines()" ), CombinedKinematicEngine(ids=rod,label='combEngine', Dead=False ) + TranslationEngine(translationAxis=(0,0,1),velocity=vel) + RotationEngine(rotationAxis=(1,0,0), angularVelocity=angVel, rotateAroundZero=True, zeroPoint=(0,0,0))]
  transEngine, rotEngine = combEngine.comb[0], combEngine.comb[1]

The problem is that the stl loses its center and the rotation is around another zeroPoint (perhaps the global zero point, not the stl zero point).

Any idea of what is wrong?

Thank you
Luis

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-01-16
Last reply:
2019-02-01
Jan Stránský (honzik) said : #1

Hi Luis,
RotationEngine.zeroPoint is always in global coordinate system.
You can set it to any value any time if need
cheers
Jan

Luis Barbosa (luis-pires-b) said : #2

Hi Jan,
Perhaps I was stupid in my question sorry.

The thing is, when I don't use the ''Dead'' feature, consequently the model starts to move as soon the simulation starts, then it works perfectly.

But, when I complement the script with ''Dead'' feature in def checkUnbalanced(): , once the movement starts, then I see that it uses a different zeroPoint.

I don't know if the problem is in the way I call the function in def checkUnbalanced(), or if I have to change zeroPoint. In this last case, I wouldn't know to which value.

Tks,
Luis

Jan Stránský (honzik) said : #3

I am afraid a complete (ideally MWE) script would be needed in this case..
Jan

Launchpad Janitor (janitor) said : #4

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.