← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4123: Update bubble example script.

 

------------------------------------------------------------
revno: 4123
author: Nolan Dyck <ndyck@xxxxxx>
committer: Anton Gladky <gladk@xxxxxxxxxx>
timestamp: Tue 2014-07-29 21:02:55 +0200
message:
  Update bubble example script.
modified:
  examples/bouncingbubble.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'examples/bouncingbubble.py'
--- examples/bouncingbubble.py	2014-07-28 06:24:36 +0000
+++ examples/bouncingbubble.py	2014-07-29 19:02:55 +0000
@@ -1,18 +1,20 @@
 
-rad = 5e-1
+#Simulates a 5mm Diameter bubble in water rising and colliding with another bubble of the same diameter
+
+rad = 2.5e-3
 #O.materials.append(FrictMat(young=1e3,density=1000))
-O.materials.append(BubbleMat(density=1))
+O.materials.append(BubbleMat(density=1000,surfaceTension=71.97e-3))
 O.bodies.append([
    utils.sphere(center=(0,0,0),radius=rad,fixed=True),
-   utils.sphere((0,0,2*rad*1.1),rad)
+   utils.sphere((0,0,-2*rad*1.1),rad)
 ])
-O.dt = 1e-6
+O.dt = 1e-7
 
 O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb()]),
-   InteractionLoop([Ig2_Sphere_Sphere_ScGeom()],[Ip2_BubbleMat_BubbleMat_BubblePhys()],[Law2_ScGeom_BubblePhys_Bubble(surfaceTension=0.035)]),
+   InteractionLoop([Ig2_Sphere_Sphere_ScGeom()],[Ip2_BubbleMat_BubbleMat_BubblePhys()],[Law2_ScGeom_BubblePhys_Bubble()]),
 #   InteractionLoop([Ig2_Sphere_Sphere_ScGeom()],[Ip2_FrictMat_FrictMat_FrictPhys()],[Law2_ScGeom_FrictPhys_CundallStrack()]),
-   NewtonIntegrator(damping=0.1,gravity=(0,0,-9.81e-2))
+   NewtonIntegrator(damping=0.1,gravity=(0,0,9.81))
 ]
 O.saveTmp()