tuniversal starter for permeability experiments - 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
       ---
 (DIR) commit 85b464877207c1a3712369d033c57a28416ee687
 (DIR) parent 70987f25c5d5eaed2f415b609c8f37b238698dc2
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Wed, 30 Jul 2014 11:35:13 +0200
       
       universal starter for permeability experiments
       
       Diffstat:
         A python/permeability-starter.py      |      41 +++++++++++++++++++++++++++++++
       
       1 file changed, 41 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/python/permeability-starter.py b/python/permeability-starter.py
       t@@ -0,0 +1,41 @@
       +#!/usr/bin/env python
       +import sphere
       +import numpy
       +import sys
       +
       +# launch with:
       +# $ python permeability-starter <DEVICE> <C_PHI> <DP_LOW> <DP_HIGH>
       +
       +for dp in [float(sys.argv[3]), float(sys.argv[4])]:
       +    # Read initial configuration
       +    sim = sphere.sim('diffusivity-relax')
       +    sim.readlast()
       +
       +    sim.sid = 'permeability-dp=' + str(dp)
       +    sim.cleanup()
       +
       +    sim.g[2] = 0.0
       +    sim.nw[0] = 0
       +    sim.initGrid()
       +    sim.zeroKinematics()
       +    sim.initFluid(mu = 17.87e-4, p = 1.0e5, hydrostatic=True)
       +
       +    # Initialize to linear hydraulic gradient
       +    p_bottom = 10.0
       +    p_top = p_bottom + dp
       +    dz = sim.L[2]/sim.num[2]
       +    for iz in range(sim.num[2]-1):
       +        #z = dz*iz + 0.5*dz # cell-center z-coordinate
       +        z = dz*iz
       +        sim.p_f[:,:,iz] = p_bottom + dp/sim.L[2] * z
       +
       +    sim.setFluidTopFixedPressure()
       +    sim.setFluidBottomFixedPressure()
       +    sim.p_f[:,:,-1] = p_top
       +    sim.setDEMstepsPerCFDstep(10)
       +    sim.initTemporal(total = 2.0, file_dt = 0.01, epsilon=0.07)
       +    sim.c_phi[0] = float(sys.argv[2])
       +
       +    sim.run(dry=True)
       +    sim.run(device=int(sys.argv[1]))
       +    #sim.writeVTKall()