yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21167
Re: [Question #685604]: stl geometry problem
Question #685604 on Yade changed:
https://answers.launchpad.net/yade/+question/685604
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
please read [1] and (next time) try to:
- make the question self-contained (see section "Please, no external links!")
- try to make the code MWE
M in MWE stands for minimal. In this case of moving a disk, specimen, material, recorder... are irrelevant.
In this light, you can create a few facets manually, still preserving the core of the problem and breaking the need of external files.
Creating a MWE and localizing the problem, often you can solve the problem yourself.
Solution:
- RotationEngine(...,rotateAroundZero=True) # [2]
- specify zeroPoint of RotationEngine [3]
- (probably) you will need to update zeroPoint each time step according to the translation of the cutter
a MWE:
###
O.bodies.append((
facet(((0,0,0),(0,-1,0),(0,0,-1))),
facet(((0,0,0),(0,-1,0),(0,0,+1))),
facet(((0,0,0),(0,+1,0),(0,0,-1))),
facet(((0,0,0),(0,+1,0),(0,0,+1))),
))
ids = (0,1,2,3)
O.engines = [
ForceResetter(),
CombinedKinematicEngine(ids=ids,comb=[
TranslationEngine(translationAxis=[0,0,1],velocity=-580,label="trans"),
RotationEngine(angularVelocity=6700,rotationAxis=[1,0,0],rotateAroundZero=True,zeroPoint=(0,0,0),label="rot")
],label='Eng'),
NewtonIntegrator(),
PyRunner(iterPeriod=1,command="rot.zeroPoint+=(0,0,trans.velocity*O.dt)")
]
O.dt = 1e-8
###
cheers
Jan
[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.RotationEngine.rotateAroundZero
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.RotationEngine.zeroPoint
--
You received this question notification because your team yade-users is
an answer contact for Yade.