← Back to team overview

yade-users team mailing list archive

Re: [Question #222250]: model a direct shear test

 

Question #222250 on Yade changed:
https://answers.launchpad.net/yade/+question/222250

    Status: Open => Answered

Anton Gladky proposed the following answer:
Hi,

I think, you do not need to use a C++ to solve this task.
You need to define to boxes (or set of facets) and use 2 TranslationEngines to
move them. You can also control their movement using engine labels and PyRunner.

==========================================
...
TranslationEngine(translationAxis=[1,0,0],velocity=2.0,ids=UpperBoxIDs,
label="Upper"),
TranslationEngine(translationAxis=[-1,0,0],velocity=2.0,ids=BottomBoxIDs,
label="Bottom"),
PyRunner(iterPeriod=50,command='ControlPlates()'),
...

def ControlPlates()
if (...):
  Upper.velocity = Upper.velocity - 1.0
  Bottom.velocity = Bottom.velocity - 1.0
==========================================

Cheers,

Anton

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.