tshear2.py - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
tshear2.py (528B)
---
1 #!/usr/bin/env python
2 import sphere
3
4 fluid = True
5
6 sim = sphere.sim('cons2-20kPa')
7 sim.readlast()
8 c = 1.0
9 sim.id('shear2-20kPa-c=' + str(c))
10 sim.shear(1.0/20.0)
11
12 if fluid:
13 #sim.num[2] *= 2
14 #sim.L[2] *= 2.0
15 sim.initFluid(mu=1.787e-6, p=600.0e3, hydrostatic=True)
16 sim.setFluidBottomNoFlow()
17 sim.setFluidTopFixedPressure()
18 sim.setDEMstepsPerCFDstep(100)
19 sim.setMaxIterations(2e5)
20 sim.c_grad_p[0] = c
21
22 sim.checkerboardColors()
23 sim.initTemporal(20.0, epsilon=0.07)
24 sim.run(device=1)
25 sim.writeVTKall()