← Back to team overview

yade-users team mailing list archive

Re: [Question #232941]: Capillary pressure between two particles

 

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

    Status: Open => Answered

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

after executing the script in command line, you are using play button in
GUI controller? To track particle displacement, add

from yade import plot

in the beginning of your script and add PyRunner engine at the bottom of
engines:

O.engines = [
   ...
   PyRunner(iterPeriod=5, command="plot.addData(
b0displ=O.bodies[0].state.displ(), b1displ=O.bodies[1].state.displ() )" )
]

change 5 to suitable value. See [2] for docs and [1] why 'plot' is used to
store values. If you add more values, it is maybe better to all the
plot.addData(..) write in separate function and call only that one in
PyRunner, see [2].

Another possibility how to see small movements of particles is to
exaggerate the displacement in view window. In the controller window, go to
Display tab and change dispScale values to something > 1.

I don't use capillary laws, so I can't help you with the other question

HTH
Jan

[1] https://yade-dem.org/doc/user.html#running-python-code
[2] https://yade-dem.org/doc/yade.plot.html



2013/7/24 Seungcheol Yeom <question232941@xxxxxxxxxxxxxxxxxxxxx>

> New question #232941 on Yade:
> https://answers.launchpad.net/yade/+question/232941
>
> Hello all,
>
> I am trying to run a simulation to see whether two particles are pulling
> each other due to the capillary pressure.
> However, it seems that two particles are not moving at all graphically.
> Can anyone tell me how to track either a capillary pressure or a
> displacement in order to check they are moving?
>
> Here is the script I am using:
>
> from yade import qt
>
> r = 1e-4 #particle radius
> h = 1e-5 #praticle distance
>
> #create two sphere paticles#
> O.bodies.append([
>    utils.sphere(center=(0,0,0),radius=r,fixed=False),
>    utils.sphere((0,0,2*r+h),r)
> ])
>
> #define engines#
> O.engines=[
>    ForceResetter(),
>    InsertionSortCollider([Bo1_Sphere_Aabb()]),
>    InteractionLoop(
>       [Ig2_Sphere_Sphere_L3Geom()],
>       [Ip2_FrictMat_FrictMat_CapillaryPhys()],
>       [Law2_ScGeom_FrictPhys_CundallStrack(neverErase=True)]
>    ),
>
>  Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure=10000,label='Cap'),
>    NewtonIntegrator(damping=0.4,gravity=(0,0,0))
> ]
>
> Cap.createDistantMeniscii=True
> O.run(1,True)
> Cap.createDistantMeniscii=False
>
> O.dt=0.5*PWaveTimeStep()
> qt.View()
> O.saveTmp()
>
> FYI, I am using yade-daily for this script
> I sincerely would appreciate for your help.
>
> Seungcheol
>
>
> --
> 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.