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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

using periodic contact detection, particles can have arbitrary position in 
space, but for "ordinary" contacts, their positions are wrapped into the cell 
and it works well, no matter how "far" they are.
However, if you use allowBiggerThanPeriod [1]*, the interactions of the "large" 
body is handled differently, not always using the periodicity.

* probably, didn't search the source code in detail, but the docs and
results suggest this and I remember something similar was discussed
before

So you can try 2) or 3) below, optionally also with 1):

1) wrap all particles before saving (not sure how important it is for this 
case, but I consider it a good habit)
###
for b in O.bodies:
    b.state.pos = O.cell.wrap(b.state.pos)
export.text(OUT+".isoCompression")
###

2) enlarge the boxes to have "safe" widths
Using extents=(10*length,thickness/5.,10*width) in MWE2, all spheres remained 
within the walls

3) model the walls with multiple (e.g. 3x3 or 4x4?) boxes, not using
allowBiggerThanPeriod

I personally would go 1)+2)

cheers
Jan

[1] https://yade-
dem.org/doc/yade.wrapper.html#yade.wrapper.InsertionSortCollider.allowBiggerThanPeriod

PS: A few not important notes:

> for b in range(len(O.bodies)):
>    O.bodies[b].shape.radius = O.bodies[b].shape.radius * 0.99

iterating bodies directly is more natural, more readable and more error prone:
for b in O.bodies:
    b.shape.radius = b.shape.radius * 0.99

Furthermore, you can use *= to reduce code duplication:
b.shape.radius *= 0.99

-- 
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     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to