tow engines in a program

Asked by Alireza Sadeghi

Hello All,

I am a beginner in YADE. I want to simulate a simple compaction test which a piston will apply compaction force to particles. I want to use an engine for moving the particles and use another engine for movement of the piston. Could you please help me which engine should be the first?my engine for piston movement is:
O.engines=[
       ForceResetter(),
       InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb()]),
       InteractionLoop(
          [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
          [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys()],
          [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM()]
       ),

      TranslationEngine(dead=False,translationAxis=[0,0,-5],velocity=0.5,ids=pst), # piston motion
      GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.4, defaultDt=0.1*utils.PWaveTimeStep()),
        NewtonIntegrator(damping=0,gravity=[0,0,-9.8]),
]

Is it correct?
Thank you very much for your consideration in advance.

Best Regards

Alireza

Question information

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

Hello Alireza,

> I am a beginner in YADE

welcome :-)

> I want to use an engine for moving the particles

Please describe your needs more in detail. From the description I have the feeling that simply moving the piston is enough and the rest would be the "reaction"..

cheers
Jan

Revision history for this message
Alireza Sadeghi (asadeghime) said :
#2

Hello Jan,

Thank you very much for your response. I want to simulate a simple model which have a mold and piston and particles in there. I applied a engine for movement of particles caused by gravity, after that I want to compress particles by the piston to find force chain in the system during compaction.

Bests

Alireza

Revision history for this message
Jan Stránský (honzik) said :
#3

> I applied a engine for movement of particles caused by gravity

yes, NewtonIntegrator(...,gravity=[0,0,-9.8]) does this

> after that I want to compress particles by the piston

your TranslationEngine is ok.

There are several options how to make it work, e.g. I would add the piston with TranslationEngine after gravity deposition ends.

cheers
Jan

Revision history for this message
Chareyre (bruno-chareyre-9) said :
#4

Hi,
You can impose the velocity of the piston as b.state.vel=(x,y,z) after
setting b.state.blockedDOFs='xyzXYZ'. You then make it zero in the begining
and change for something else at some point.
TranslationEngine makes this simple thing excessively complex in my
opinion. I would suggest to forget it (*).
Bruno

(*) and even to remove it from source code for its anti-didactic effect, to
keep only truly involved helico-rotational motion engines present

Le jeu. 26 juil. 2018 16:43, Jan Stránský <
<email address hidden>> a écrit :

> Question #671132 on Yade changed:
> https://answers.launchpad.net/yade/+question/671132
>
> Status: Open => Answered
>
> Jan Stránský proposed the following answer:
> > I applied a engine for movement of particles caused by gravity
>
> yes, NewtonIntegrator(...,gravity=[0,0,-9.8]) does this
>
> > after that I want to compress particles by the piston
>
> your TranslationEngine is ok.
>
> There are several options how to make it work, e.g. I would add the
> piston with TranslationEngine after gravity deposition ends.
>
> cheers
> Jan
>
> --
> You received this question notification because your team yade-users 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
Alireza Sadeghi (asadeghime) said :
#5

Hello Jan,

Thank you for your response. I can't run it. it gives me the error:

TypeError: No registered converter was able to produce a C++ rvalue of type int from this Python object of type Body

when I run the below engines:

#================== engine for movement of particles =========================

O.engines=[
      ForceResetter(),
        InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb()]),
        InteractionLoop(
          [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
          [Ip2_FrictMat_FrictMat_FrictPhys()],
          [Law2_ScGeom_FrictPhys_CundallStrack()]
        ),

      NewtonIntegrator(damping=0.4,gravity=[0,0,-9.8],label="newton"),
]

#================== engine for movement of piston ===========================

O.engines=[
       ForceResetter(),
         InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb()]),
         InteractionLoop(
          [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
          [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys()],
          [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM()]
       ),
       NewtonIntegrator(damping=0,gravity=[0,0,-9.8],label="newton",),

       TranslationEngine(translationAxis=[0,0,-5],velocity=0.5,ids=pst)

     GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.4, defaultDt=0.1*utils.PWaveTimeStep()),
]

O.dt=.5*PWaveTimeStep()

O.saveTmp()

Bests

Alireza

Revision history for this message
Jan Stránský (honzik) said :
#6

Hello,

next time, please try to create a MWE [1]. Now we don't know what pst is (**probably** the source of the problem, see below):
Also please insert complete error messages, now we don't know where the error comes from :-)

Also note that kinematic engines (like TrnaslationEngine) should come before NewtonIntegrator [2].

cheers
Jan

[1] https://yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/user.html#base-engines

Revision history for this message
Launchpad Janitor (janitor) said :
#7

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