← Back to team overview

yade-users team mailing list archive

Re: [Question #224128]: How to learn and start a 2D simulation in YADE

 

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

    Status: Open => Answered

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

please ask questions here (not only to one person), so that other poeple
can help you and the answers can be useful also to other people.

if you do

O.periodic=1
from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0.5),(3,3,0.5),-1,.4,200,periodic=True)
sp.toSimulation()

you get overlaping particles, because the packing is created in an
independent periodic cell of defined size (3,3,0), but actual periodic cell
in the main simulation (O.cell) has unmodified default size (1,1,1). To
obtain desired behavior, you have to set new size to the periodic cell
according to the dimensions of creating (third dimensions does not matter,
but it should not be zero):

O.cell.setBox(3,3,1) # [1]

The overalps were therefore not only visualization, but it would affect
actual simulation.

To your second question, it is possible to specify both particle size and
desired number of generated particles, just see makeCloud documentation [2]

cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Cell.setBox
[2]
https://yade-dem.org/doc/yade.pack.html#yade._packSpheres.SpherePack.makeCloud


2013/3/20 Fu zuoguang <question224128@xxxxxxxxxxxxxxxxxxxxx>

> Question #224128 on Yade changed:
> https://answers.launchpad.net/yade/+question/224128
>
> Fu zuoguang gave more information on the question:
> Dear Jan Stránský:
>        now I have a visualization problem in 2D simulation and I send an e
> email to you with a document. Seeking your help!
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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