tadd starter scripts with new fluid scaling parameters - 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 b0a3fac06279120fa500d5123948c5db6a003565
 (DIR) parent faf2f12c851b388d98771e33163cbde3ae4a428b
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Fri, 24 Oct 2014 13:44:49 +0200
       
       add starter scripts with new fluid scaling parameters
       
       Diffstat:
         A python/halfshear-c_v=1.0-c_a=0.0-v… |      50 +++++++++++++++++++++++++++++++
         M python/halfshear-starter-rate.py    |      13 ++++++++-----
         M python/halfshear-starter.py         |       2 +-
       
       3 files changed, 59 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/python/halfshear-c_v=1.0-c_a=0.0-velfac.sh b/python/halfshear-c_v=1.0-c_a=0.0-velfac.sh
       t@@ -0,0 +1,50 @@
       +#!/bin/sh
       +#PBS -N halfshear-c_v=1.0-c_a=0.0-velfac
       +#PBS -l nodes=1:ppn=3
       +#PBS -l walltime=48:00:00
       +#PBS -q qfermi
       +#PBS -M adc@geo.au.dk
       +#PBS -m abe
       +
       +# Grendel CUDA
       +source /com/gcc/4.6.4/load.sh
       +CUDAPATH=/com/cuda/5.5.22
       +export PATH=$HOME/bin:$PATH
       +export PATH=$CUDAPATH/bin:$PATH
       +export LD_LIBRARY_PATH=$CUDAPATH/lib64:$CUDAPATH/lib:$LD_LIBRARY_PATH
       +
       +# Manually installed Python modules
       +export PYTHONPATH=$HOME/.local/lib/python:$PYTHONPATH
       +export PYTHONPATH=$HOME/.local/lib64/python:$PYTHONPATH
       +
       +# Manually installed Python
       +#export PATH=/home/adc/.local/bin:$PATH
       +
       +# Shared Python2.7
       +PYTHON=/com/python/2.7.6
       +export PYTHONPATH=$PYTHON/lib:$PYTHONPATH
       +export PATH=$PYTHON/bin:$PATH
       +
       +echo "`whoami`@`hostname`"
       +echo "Start at `date`"
       +
       +ORIGDIR=/home/adc/code/sphere
       +#WORKDIR=/scratch/$PBS_JOBID
       +WORKDIR=$ORIGDIR
       +
       +#cp -r $ORIGDIR/* $WORKDIR
       +
       +cd $WORKDIR
       +nvidia-smi
       +rm CMakeCache.txt
       +cmake . && make
       +cd python
       +# $ python halfshear-starter-rate.py <DEVICE> <FLUID> <C_PHI> <C_V> <SIGMA_0> <VELOCITY FACTOR> <C_A>
       +python halfshear-starter-rate.py 0 1 1.0 1.0 20000.0 2.0 0.0 &
       +python halfshear-starter-rate.py 1 1 1.0 1.0 20000.0 1.0 0.0 &
       +python halfshear-starter-rate.py 2 1 1.0 1.0 20000.0 0.5 0.0 &
       +wait
       +
       +#cp $WORKDIR/output/* $ORIGDIR/output/
       +
       +echo "End at `date`"
 (DIR) diff --git a/python/halfshear-starter-rate.py b/python/halfshear-starter-rate.py
       t@@ -4,14 +4,15 @@ import numpy
        import sys
        
        # launch with:
       -# $ python shear-starter.py <DEVICE> <FLUID> <C_PHI> <C_GRAD_P> <SIGMA_0> <VELOCITY FACTOR>
       +# $ python halfshear-starter-rate.py <DEVICE> <FLUID> <C_PHI> <C_V> <SIGMA_0> <VELOCITY FACTOR> <C_A>
        
        device = int(sys.argv[1])
        wet = int(sys.argv[2])
        c_phi = float(sys.argv[3])
       -c_grad_p = float(sys.argv[4])
       +c_v = float(sys.argv[4])
        sigma0 = float(sys.argv[5])
        velfac = float(sys.argv[6])
       +c_a = float(sys.argv[7])
        
        #sim = sphere.sim('diffusivity-sigma0=' + str(sigma0) + '-c_phi=' + \
        #        str(c_phi) + '-c_grad_p=' + str(c_grad_p), fluid=True)
       t@@ -28,8 +29,9 @@ sim.readlast()
        
        sim.fluid = fluid
        if fluid:
       -    sim.id('halfshear-sigma0=' + str(sigma0) + '-c=' + str(c_grad_p) + \
       -    '-velfac=' + str(velfac) + '-shear')
       +    sim.id('halfshear-sigma0=' + str(sigma0) + '-c_v=' + str(c_v) + \
       +            '-c_a=' + str(c_a) + \
       +            '-velfac=' + str(velfac) + '-shear')
        else:
            sim.id('halfshear-sigma0=' + str(sigma0) + \
                    '-velfac=' + str(velfac) + '-shear')
       t@@ -51,7 +53,8 @@ if fluid:
            sim.setDEMstepsPerCFDstep(100)
            sim.setMaxIterations(2e5)
            sim.c_phi[0] = c_phi
       -    sim.c_grad_p[0] = c_grad_p
       +    sim.c_v[0] = c_v
       +    sim.c_a[0] = c_a
        
        sim.initTemporal(total = 20.0/velfac, file_dt = 0.01/velfac, epsilon=0.07)
        sim.w_devs[0] = sigma0
 (DIR) diff --git a/python/halfshear-starter.py b/python/halfshear-starter.py
       t@@ -24,7 +24,7 @@ sim.readlast()
        
        sim.fluid = fluid
        if fluid:
       -    sim.id('halfshear-sigma0=' + str(sigma0) + '-c_v=' + str(c_v) + 
       +    sim.id('halfshear-sigma0=' + str(sigma0) + '-c_v=' + str(c_v) + \
                    '-c_a=' + str(c_a) + '-shear')
        else:
            sim.id('halfshear-sigma0=' + str(sigma0) + '-shear')