facetCylinder disintegrates when being rotated

Asked by Steve

Hi,

I am trying to apply rotation to a facetCylinder with rotationEngine. However, when rotation is applied, the cylinder starts behaving weirdly and the lines start to separate into two groups. Is this because facetCylinders are not meant to be rotated?

Thanks,
Steve

Question information

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

Hi Steve,
please, if possible, always provide a MWE [1]. We could e.g. immediately if rotateAroundZero [2] is missing or not

###
ids=O.bodies.append(geom.facetCylinder((0,0,0),1,2))
O.engines = [
   ForceResetter(),
   RotationEngine(ids=ids,angularVelocity=1,rotateAroundZero=True),
   NewtonIntegrator(),
]
O.dt = 1e-6
###

cheers
Jan

[1] https://yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.RotationEngine

Revision history for this message
Steve (oneinchofgrey) said :
#2

Hi Jan,

Thanks for the answer and it worked. I will also make sure to provide MWEs in the future.

Another question though, is that how would I rotate the cylinder about its centroid without having to change the zeroPoint? According to the reference manual, if rotateAroundZero=false, then the cylinder will automatically rotate around its centroid.

Thanks again,
Steve

Revision history for this message
Steve (oneinchofgrey) said :
#3

Thanks Jan Stránský, that solved my question.

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

Hi Steve

> According to the reference manual, if rotateAroundZero=false, then the cylinder will automatically rotate around its centroid.

no, the manual says "bodies will not rotate around their centroids", meaning each single body (each facet) will rotate around its centroid. This results in the "separation".

cheers
Jan