Introduction
Introduction Statistics Contact Development Disclaimer Help
timproved argument handling - sphere - GPU-based 3D discrete element method alg…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 18cdc6391837e9d947e7f7407e956bb986010f40
parent 85b464877207c1a3712369d033c57a28416ee687
Author: Anders Damsgaard <[email protected]>
Date: Wed, 30 Jul 2014 12:21:53 +0200
improved argument handling
Diffstat:
M python/permeability-starter.py | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/python/permeability-starter.py b/python/permeability-starter.py
t@@ -4,14 +4,24 @@ import numpy
import sys
# launch with:
-# $ python permeability-starter <DEVICE> <C_PHI> <DP_LOW> <DP_HIGH>
+# $ python permeability-starter <DEVICE> <C_PHI> <C_GRAD_P> <DP_1, DP_2, ...>
-for dp in [float(sys.argv[3]), float(sys.argv[4])]:
+for dp_str in sys.argv[4:]:
+
+ dp = float(dp_str)
+ device = int(sys.argv[1])
+ c_phi = float(sys.argv[2])
+ c_grad_p = float(sys.argv[3])
+ print('permeability-dp=' + str(dp) + '-c_phi=' + str(c_phi) + \
+ '-c_grad_p=' + str(c_grad_p))
+
+ '''
# Read initial configuration
sim = sphere.sim('diffusivity-relax')
sim.readlast()
- sim.sid = 'permeability-dp=' + str(dp)
+ sim.sid = 'permeability-dp=' + str(dp) + '-c_phi=' + str(c_phi) + \
+ '-c_grad_p=' + str(c_grad_p)
sim.cleanup()
sim.g[2] = 0.0
t@@ -34,8 +44,10 @@ for dp in [float(sys.argv[3]), float(sys.argv[4])]:
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.c_phi[0] = c_phi
+ sim.c_grad_p[0] = c_grad_p
sim.run(dry=True)
- sim.run(device=int(sys.argv[1]))
+ sim.run(device=device)
#sim.writeVTKall()
+ '''
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.