Introduction
Introduction Statistics Contact Development Disclaimer Help
tMerge branch 'master' of github.com:anders-dc/sphere - sphere - GPU-based 3D d…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 7626d19392ecba63c4b2e5f4d419e8423d7a90a0
parent f8c44ac1a8fcdc4d6d1112db0cc1467597912e69
Author: Anders Damsgaard <[email protected]>
Date: Mon, 11 Aug 2014 10:16:44 +0200
Merge branch 'master' of github.com:anders-dc/sphere
Diffstat:
A python/diffusivity-c_grad_p=0.01.sh | 49 +++++++++++++++++++++++++++++…
A python/diffusivity-c_grad_p=0.1.sh | 49 +++++++++++++++++++++++++++++…
A python/diffusivity-c_grad_p=0.5.sh | 49 +++++++++++++++++++++++++++++…
A python/diffusivity-c_phi=0.1.sh | 49 +++++++++++++++++++++++++++++…
A python/diffusivity-c_phi=0.5.sh | 49 +++++++++++++++++++++++++++++…
A python/diffusivity-starter.py | 53 ++++++++++++++++++++++++++++++
6 files changed, 298 insertions(+), 0 deletions(-)
---
diff --git a/python/diffusivity-c_grad_p=0.01.sh b/python/diffusivity-c_grad_p=…
t@@ -0,0 +1,49 @@
+#!/bin/sh
+#PBS -N diffusivity-c_grad_p=0.01
+#PBS -l nodes=1:ppn=3
+#PBS -l walltime=1920:00:00
+#PBS -q qfermi
+#PBS -M [email protected]
+#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 diffusivity-starter.py 0 1.0 0.01 10.0e3 20.0e3 &
+python diffusivity-starter.py 1 1.0 0.01 40.0e3 60.0e3 &
+python diffusivity-starter.py 2 1.0 0.01 80.0e3 120.0e3 &
+wait
+
+#cp $WORKDIR/output/* $ORIGDIR/output/
+
+echo "End at `date`"
diff --git a/python/diffusivity-c_grad_p=0.1.sh b/python/diffusivity-c_grad_p=0…
t@@ -0,0 +1,49 @@
+#!/bin/sh
+#PBS -N diffusivity-c_grad_p=0.1
+#PBS -l nodes=1:ppn=3
+#PBS -l walltime=1920:00:00
+#PBS -q qfermi
+#PBS -M [email protected]
+#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 diffusivity-starter.py 0 1.0 0.1 10.0e3 20.0e3 &
+python diffusivity-starter.py 1 1.0 0.1 40.0e3 60.0e3 &
+python diffusivity-starter.py 2 1.0 0.1 80.0e3 120.0e3 &
+wait
+
+#cp $WORKDIR/output/* $ORIGDIR/output/
+
+echo "End at `date`"
diff --git a/python/diffusivity-c_grad_p=0.5.sh b/python/diffusivity-c_grad_p=0…
t@@ -0,0 +1,49 @@
+#!/bin/sh
+#PBS -N diffusivity-c_grad_p=0.5
+#PBS -l nodes=1:ppn=3
+#PBS -l walltime=1920:00:00
+#PBS -q qfermi
+#PBS -M [email protected]
+#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 diffusivity-starter.py 0 1.0 0.5 10.0e3 20.0e3 &
+python diffusivity-starter.py 1 1.0 0.5 40.0e3 60.0e3 &
+python diffusivity-starter.py 2 1.0 0.5 80.0e3 120.0e3 &
+wait
+
+#cp $WORKDIR/output/* $ORIGDIR/output/
+
+echo "End at `date`"
diff --git a/python/diffusivity-c_phi=0.1.sh b/python/diffusivity-c_phi=0.1.sh
t@@ -0,0 +1,49 @@
+#!/bin/sh
+#PBS -N diffusivity-c_phi=0.1
+#PBS -l nodes=1:ppn=3
+#PBS -l walltime=1920:00:00
+#PBS -q qfermi
+#PBS -M [email protected]
+#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 diffusivity-starter.py 0 0.1 1.0 10.0e3 20.0e3 &
+python diffusivity-starter.py 1 0.1 1.0 40.0e3 60.0e3 &
+python diffusivity-starter.py 2 0.1 1.0 80.0e3 120.0e3 &
+wait
+
+#cp $WORKDIR/output/* $ORIGDIR/output/
+
+echo "End at `date`"
diff --git a/python/diffusivity-c_phi=0.5.sh b/python/diffusivity-c_phi=0.5.sh
t@@ -0,0 +1,49 @@
+#!/bin/sh
+#PBS -N diffusivity-c_phi=0.5
+#PBS -l nodes=1:ppn=3
+#PBS -l walltime=1920:00:00
+#PBS -q qfermi
+#PBS -M [email protected]
+#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 diffusivity-starter.py 0 0.5 1.0 10.0e3 20.0e3 &
+python diffusivity-starter.py 1 0.5 1.0 40.0e3 60.0e3 &
+python diffusivity-starter.py 2 0.5 1.0 80.0e3 120.0e3 &
+wait
+
+#cp $WORKDIR/output/* $ORIGDIR/output/
+
+echo "End at `date`"
diff --git a/python/diffusivity-starter.py b/python/diffusivity-starter.py
t@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+import sphere
+import numpy
+import sys
+
+# launch with:
+# $ python diffusivity-starter <DEVICE> <C_PHI> <C_GRAD_P> <DP_1, DP_2, ...>
+
+for sigma0_str in sys.argv[4:]:
+
+ sigma0 = float(sigma0_str)
+ device = int(sys.argv[1])
+ c_phi = float(sys.argv[2])
+ c_grad_p = float(sys.argv[3])
+
+ sim = sphere.sim('diffusivity-relax')
+ sim.readlast()
+
+ sim.sid = 'permeability-dp=' + str(dp) + '-c_phi=' + str(c_phi) + \
+ '-c_grad_p=' + str(c_grad_p)
+ print(sim.sid)
+
+ # Checkerboard colors
+ x_min = numpy.min(sim.x[:,0])
+ x_max = numpy.max(sim.x[:,0])
+ y_min = numpy.min(sim.x[:,1])
+ y_max = numpy.max(sim.x[:,1])
+ z_min = numpy.min(sim.x[:,2])
+ z_max = numpy.max(sim.x[:,2])
+ color_nx = 6
+ color_ny = 6
+ color_nz = 6
+ for i in range(sim.np):
+ ix = numpy.floor((sim.x[i,0] - x_min)/(x_max/color_nx))
+ iy = numpy.floor((sim.x[i,1] - y_min)/(y_max/color_ny))
+ iz = numpy.floor((sim.x[i,2] - z_min)/(z_max/color_nz))
+ sim.color[i] = (-1)**ix + (-1)**iy + (-1)**iz
+
+ sim.cleanup()
+ sim.adjustUpperWall()
+ sim.zeroKinematics()
+ sim.consolidate(normal_stress = 10.0e3)
+ sim.initFluid(mu = 17.87e-4, p = 1.0e5, hydrostatic = True)
+ sim.setFluidBottomNoFlow()
+ sim.setFluidTopFixedPressure()
+ sim.setDEMstepsPerCFDstep(10)
+ sim.setMaxIterations(2e5)
+ sim.initTemporal(total = 5.0, file_dt = 0.01, epsilon=0.07)
+ sim.run(dry=True)
+ sim.run(device=0)
+ #sim.writeVTKall()
+ sim.visualize('walls')
+ sim.visualize('fluid-pressure')
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.