tpermeability1.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
       ---
       tpermeability1.py (925B)
       ---
            1 #!/usr/bin/env python
            2 import sphere
            3 import numpy
            4 
            5 
            6 for dp in [1.0e3, 2.0e3]:
            7     # Read initial configuration
            8     sim = sphere.sim('diffusivity-relax')
            9     sim.readlast()
           10 
           11     sim.sid = 'permeability-dp=' + str(dp)
           12     sim.cleanup()
           13 
           14     sim.g[2] = 0.0
           15     sim.nw = 0
           16     sim.initGrid()
           17     sim.zeroKinematics()
           18     sim.initFluid(mu = 17.87e-4, p = 1.0e5, hydrostatic=True)
           19 
           20     # Initialize to linear hydraulic gradient
           21     p_bottom = 10.0
           22     p_top = p_bottom + dp
           23     dz = sim.L[2]/sim.num[2]
           24     for iz in range(sim.num[2]-1):
           25         #z = dz*iz + 0.5*dz # cell-center z-coordinate
           26         z = dz*iz
           27         sim.p_f[:,:,iz] = p_bottom + dp/sim.L[2] * z
           28 
           29     sim.setFluidTopFixedPressure()
           30     sim.setFluidBottomFixedPressure()
           31     sim.p_f[:,:,-1] = p_top
           32     sim.setDEMstepsPerCFDstep(10)
           33     sim.initTemporal(total = 2.0, file_dt = 0.01, epsilon=0.07)
           34 
           35     sim.run(dry=True)
           36     sim.run(device=0)
           37     #sim.writeVTKall()