deactivate and activate engines in CombinedKinematicEngine

Asked by Oguz Cebeci

Hi,
I want to ask, if it's possible to deactivate one engine and activate other, when some attribute of engine one is reached. For example:
Engine one starts. If it's Amplitude reaches a Value, engine one should stop and Engine two + three starts. is there any possibility?
Like:

CombinedKinematicEngine(ids=fctIds,label='comb')
 +HarmonicRotationEngine(ids=fctIds,rotationAxis=[1,0,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=-.5,f=1,dead=False,)

If A reaches -.5 start stop the first engine and start the rest. Dead=True for engine one

 +HarmonicRotationEngine(ids=fctIds,rotationAxis=[1,0,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=.5,f=1,dead=False)
 +HarmonicRotationEngine(ids=fctIds,rotationAxis=[0,1,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=.5,f=1,dead=False,)

Sry for bad english,
Best regards

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Anton Gladky
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

yes, you can set different dead values of engines according to runtime
conditions (see also [1]). I think that the easiest way is to add PyRunned
to O.engines with iterPeriod=1, checking some constidion and switching
dead=True/False if the condition is met.

But I think that amplitude is not very good trigger, as it is an attribute
of the HarmonicRotationEngine and is constant (if you don't change it from
outside).

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/237437
PS: sorry for very quick answer due to lack of time, in case it is not
clear, I will try to explain more in detail tomorrow

2013/12/3 Oguz Cebeci <email address hidden>

> New question #240225 on Yade:
> https://answers.launchpad.net/yade/+question/240225
>
> Hi,
> I want to ask, if it's possible to deactivate one engine and activate
> other, when some attribute of engine one is reached. For example:
> Engine one starts. If it's Amplitude reaches a Value, engine one should
> stop and Engine two + three starts. is there any possibility?
> Like:
>
>
> CombinedKinematicEngine(ids=fctIds,label='comb')
>
> +HarmonicRotationEngine(ids=fctIds,rotationAxis=[1,0,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=-.5,f=1,dead=False,)
>
> If A reaches -.5 start stop the first engine and start the rest. Dead=True
> for engine one
>
>
>
>
> +HarmonicRotationEngine(ids=fctIds,rotationAxis=[1,0,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=.5,f=1,dead=False)
>
> +HarmonicRotationEngine(ids=fctIds,rotationAxis=[0,1,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=.5,f=1,dead=False,)
>
>
>
> Sry for bad english,
> Best regards
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Oguz Cebeci (oce1907) said :
#2

An easier Solution would be, if i could rotate the importet .stl object around a specific angular. But i read that the .stl importer does not support to change any oriantation and direction of the importet object.

Revision history for this message
Best Anton Gladky (gladky-anton) said :
#3

2013/12/3 Oguz Cebeci <email address hidden>:
> An easier Solution would be, if i could rotate the importet .stl object
> around a specific angular. But i read that the .stl importer does not
> support to change any oriantation and direction of the importet object.

Try admesh [1] for that purpose. Or use gmsh [2] to convert stl to mesh
format, then you can import and rotate it using ymport.gmsh command.

[1] http://packages.qa.debian.org/a/admesh.html
[2] http://packages.qa.debian.org/g/gmsh.html

Anton

Revision history for this message
Oguz Cebeci (oce1907) said :
#4

Thanks Anton Gladky, that solved my question.