yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #12758
[Question #294232]: change in volume of meniscus as a function of capillary pressure
New question #294232 on Yade:
https://answers.launchpad.net/yade/+question/294232
Hello all,
I hope you all well. I have a simple question.
I am wondering whether I can simulate the change in volume of meniscus as a function of capillary pressure.
It seems like I can change the capillary pressure in the loop but the interaction between the spheres are not updated.
Here is my script:
from yade import plot, geom
r = 3e-6 #particle radius of clay, meter
h = 1e-6 #praticle distance, meter
#create two sphere paticles#
O.bodies.append([
utils.sphere(center=(0,0,0),radius=r,fixed=True),
utils.sphere((0,0,2*r+h),r,fixed=True)
])
#define engines#
O.engines=[
ForceResetter(), #0
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=2)]), #1
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=2)], #2
[Ip2_FrictMat_FrictMat_MindlinCapillaryPhys()],
[Law2_ScGeom_MindlinPhys_Mindlin(neverErase=True)]
),
Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure=10000,label='capillary'), #3
NewtonIntegrator(damping=0.4,gravity=(0,0,0)), #4
PyRunner(command='change_capillary()',iterPeriod=100,label='start'), #5
]
O.trackEnergy = True
capillary.createDistantMeniscii=True
O.run(1,True)
capillary.createDistantMeniscii=False
#define the force on the sphere#
def change_capillary():
global cur_capillary,delta_V,count
count = 0
while (count<1):
cur_capillary = capillary.capillaryPressure - 100
i = O.interactions[0,1]
delta_V = i.phys.vMeniscus
i.phys.isBroken = True
O.engines = O.engines[:3]+[Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure=cur_capillary,label='capillary')]+O.engines[3:]
count = count + 1
print cur_capillary,delta_V
if cur_capillary < 9000:
O.pause()
O.dt=0.5*PWaveTimeStep()
O.run()
Any helps are appreciated.
Sincerely,
Seungcheol
--
You received this question notification because your team yade-users is
an answer contact for Yade.