File: bouncingbubble.py

package info (click to toggle)
yade 2025.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,308 kB
  • sloc: cpp: 93,298; python: 50,409; sh: 577; makefile: 162
file content (18 lines) | stat: -rw-r--r-- 827 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- encoding=utf-8 -*-

#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=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)])
O.dt = 1e-7

O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb()]),
        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.81))
]
O.saveTmp()