moved workflows to example directory
This commit is contained in:
67
example/drainage/eos-MorphDrain.pbs
Normal file
67
example/drainage/eos-MorphDrain.pbs
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
#PBS -A GEO106
|
||||
#PBS -N MorphDrain
|
||||
#PBS -j oe
|
||||
##PBS -l walltime=02:00:00,nodes=216
|
||||
#PBS -l walltime=01:00:00,nodes=4
|
||||
##PBS -l gres=widow2%widow3
|
||||
##PBS -q killable
|
||||
##PBS -q debug
|
||||
|
||||
#cd /tmp/work/$USER
|
||||
date
|
||||
|
||||
cd $PBS_O_WORKDIR
|
||||
|
||||
#LBPM_WIA_INSTALL_DIR=/lustre/atlas/proj-shared/geo106/build-eos-LBPM-WIA
|
||||
|
||||
LBPM_WIA_INSTALL_DIR=$MEMBERWORK/geo106/eos-LBPM-WIA
|
||||
|
||||
#echo "PBS_O_WORKDIR: `echo $PBS_O_WORKDIR`"
|
||||
source $MODULESHOME/init/bash
|
||||
module swap PrgEnv-intel PrgEnv-gnu
|
||||
|
||||
#module swap cray-mpich2 cray-mpich2/5.6.3
|
||||
#module load cudatoolkit
|
||||
|
||||
export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}
|
||||
#export MPICH_RDMA_ENABLED_CUDA=1
|
||||
#aprun -n 27 -N 1 /lustre/atlas/scratch/mcclurej/geo106/LBPM-WIA/bin/lb2_Color_wia_mpi
|
||||
|
||||
#LIST=$(ls|grep sw)
|
||||
#for DIR in $LIST; do
|
||||
# cd $DIR
|
||||
# sat=$(cat Color.in |head -3 | tail -1)
|
||||
# aprun -n 64 $LBPM_WIA_INSTALL_DIR/bin/lbpm_segmented_decomp
|
||||
# aprun -n 64 $LBPM_WIA_INSTALL_DIR/bin/lbpm_segmented_pp
|
||||
# aprun -n 144 $LBPM_WIA_INSTALL_DIR/bin/lbpm_random_pp 1 0
|
||||
# aprun -n 144 $LBPM_WIA_INSTALL_DIR/bin/lbpm_random_pp 1 1
|
||||
|
||||
# aprun -n 64 $LBPM_WIA_INSTALL_DIR/bin/lbpm_segmented_decomp 1 2
|
||||
# aprun -n 64 $LBPM_WIA_INSTALL_DIR/bin/lbpm_segmented_pp
|
||||
|
||||
# aprun -n 64 $LBPM_WIA_INSTALL_DIR/bin/lbpm_random_pp 0 1
|
||||
|
||||
#mkdir -p MEDIA
|
||||
#cp ID* MEDIA/
|
||||
|
||||
cp MEDIA/ID* ./
|
||||
|
||||
LABEL="lrc32_sandpack"
|
||||
# Run morphological drainage and set up input files for media
|
||||
RADIUS="5.4 5.35 5.2 5 4.8 4.6 4.4 4.2 4 3.67 3.33 3 2.67 2.33 2 1.5"
|
||||
echo "radius sw" > morphdrain.csv
|
||||
for r in $RADIUS; do
|
||||
aprun -n 64 $LBPM_WIA_INSTALL_DIR/bin/lbpm_morphdrain_pp $r > morph.log
|
||||
sat=$(grep sat morph.log | sed 's/Final saturation=//g')
|
||||
tag=$(wc -l morphdrain.csv | cut -c1-2)
|
||||
echo "$r $sat" >> morphdrain.csv
|
||||
DIR=$LABEL"_drain_"$tag
|
||||
mkdir -p $DIR
|
||||
cp ID.* $DIR
|
||||
cp SignDist.* $DIR
|
||||
cp Domain.in $DIR
|
||||
done
|
||||
|
||||
exit;
|
||||
|
||||
74
example/drainage/setup-drain.py
Executable file
74
example/drainage/setup-drain.py
Executable file
@@ -0,0 +1,74 @@
|
||||
import os
|
||||
import sys
|
||||
import csv
|
||||
|
||||
name=sys.argv[1]
|
||||
#numpts=int(sys.argv[2])
|
||||
process="drain"
|
||||
cwd=os.getcwd()
|
||||
|
||||
print("Initializing morphological drainage cases")
|
||||
print("Base name is "+name)
|
||||
|
||||
# Parameters for color LBM
|
||||
tau=0.7
|
||||
alpha=0.005
|
||||
beta=0.95
|
||||
phisol=-1.0
|
||||
saturation=0.0
|
||||
Fx=0.0
|
||||
Fy=0.0
|
||||
Fz=0.0
|
||||
Restart=0
|
||||
pBC=1
|
||||
din=1.001
|
||||
dout=0.999
|
||||
maxtime=100005
|
||||
interval=50000
|
||||
tolerance=1e-5
|
||||
|
||||
viscosity=(tau-0.5)/3
|
||||
ift=5.796*alpha
|
||||
|
||||
radius=[]
|
||||
sw=[]
|
||||
with open("morphdrain.csv","r") as f:
|
||||
for line in f:
|
||||
reader=csv.reader(f,delimiter=' ')
|
||||
for row in reader:
|
||||
radius.append(float(row[0]))
|
||||
sw.append(float(row[1]))
|
||||
|
||||
numpts=len(radius)
|
||||
print("Number of cases "+str(numpts))
|
||||
|
||||
for pt in range(0,numpts):
|
||||
#compute the pressure difference
|
||||
tag=pt+1
|
||||
dp=2*ift/radius[pt]
|
||||
din=1.0+0.5*dp
|
||||
dout=1.0-0.5*dp
|
||||
dirname=str(name)+"_"+str(process)+"_"+str(tag)
|
||||
print("Creating " + dirname)
|
||||
if not os.path.exists(dirname):
|
||||
os.mkdir(dirname)
|
||||
os.chdir(dirname)
|
||||
ParamFile = open("Color.in","w")
|
||||
ParamFile.write("%f\n" % tau)
|
||||
ParamFile.write("%f " % alpha)
|
||||
ParamFile.write("%f " % beta)
|
||||
ParamFile.write("%f\n" % phisol)
|
||||
ParamFile.write("%f\n" % saturation)
|
||||
ParamFile.write("%f " % Fx)
|
||||
ParamFile.write("%f " % Fy)
|
||||
ParamFile.write("%f\n" % Fz)
|
||||
ParamFile.write("%i " % Restart)
|
||||
ParamFile.write("%i " % pBC)
|
||||
ParamFile.write("%f " % din)
|
||||
ParamFile.write("%f\n" % dout)
|
||||
ParamFile.write("%i " % maxtime)
|
||||
ParamFile.write("%i " % interval)
|
||||
ParamFile.write("%f\n" % tolerance)
|
||||
ParamFile.close()
|
||||
|
||||
os.chdir(cwd)
|
||||
Reference in New Issue
Block a user