tconsolidation-curves.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
       ---
       tconsolidation-curves.py (1289B)
       ---
            1 #!/usr/bin/env python
            2 import sphere
            3 import numpy
            4 import sys
            5 
            6 # launch with:
            7 # $ python consolidation-curves <DEVICE> <C_PHI> <C_GRAD_P>
            8 
            9 # Unique simulation parameters
           10 device = int(sys.argv[1])
           11 c_phi = float(sys.argv[2])
           12 c_grad_p = float(sys.argv[3])
           13 
           14 sim = sphere.sim('cons-sigma0=' + str(5.0e3) + '-c_phi=' + \
           15             str(c_phi) + '-c_grad_p=' + str(c_grad_p), fluid=True)
           16 sim.readlast()
           17 
           18 sigma0 = 10.0e3
           19 sim.sid = 'cons-sigma0=' + str(sigma0) + '-c_phi=' + str(c_phi) + \
           20         '-c_grad_p=' + str(c_grad_p) + '-tall'
           21 print('\n###### ' + sim.sid + ' ######')
           22 
           23 # Checkerboard colors
           24 sim.checkerboardColors()
           25 sim.cleanup()
           26 #sim.adjustUpperWall()
           27 sim.zeroKinematics()
           28 
           29 #sim.consolidate(normal_stress = sigma0)
           30 sim.w_sigma0[0] = sigma0
           31 
           32 sim.L[2] *= 2.0
           33 sim.num[2] *= 2
           34 sim.initFluid(mu = 17.87e-4, p = 1.0e5, hydrostatic = True)
           35 #sim.setFluidBottomNoFlow()
           36 #sim.setFluidTopFixedPressure()
           37 sim.setDEMstepsPerCFDstep(10)
           38 sim.setMaxIterations(2e5)
           39 sim.initTemporal(total = 10.0, file_dt = 0.01, epsilon=0.07)
           40 sim.c_grad_p[0] = c_grad_p
           41 sim.c_phi[0] = c_phi
           42 
           43 # Fix lowermost particles
           44 #dz = sim.L[2]/sim.num[2]
           45 #I = numpy.nonzero(sim.x[:,2] < 1.5*dz)
           46 #sim.fixvel[I] = 1
           47 
           48 sim.run(dry=True)
           49 sim.run(device=device)
           50 #sim.writeVTKall()
           51 #sim.visualize('walls')
           52 #sim.visualize('fluid-pressure')