Allrun-parallel 1002 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

cd ${0%/*} || exit 1    # run from this directory

. $WM_PROJECT_DIR/bin/tools/RunFunctions  # Tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions

# Compute test case with different synthetic inflow models
declare -a Models=(
    "reducedDigitalFilter"
    "digitalFilter"
    "DFSEM"
)

# Collect data in 'results' directory
[ -d "results" ] || mkdir results
restore0Dir
runApplication blockMesh

# Compute parallel and collect data
for val in ${Models[@]}; do
  echo "Running the case with the model: $val"
Andrew Heather's avatar
Andrew Heather committed
23
  \rm -f 0/U*
24
  \cp 0.orig/U.$val 0/U
Andrew Heather's avatar
Andrew Heather committed
25
  \rm -rf constant/boundaryData/inlet
26
27
28
29
30
31
32
33
34
35
36
  \cp -r constant/boundaryData/inlet.$val constant/boundaryData/inlet
  runApplication decomposePar
  runParallel pimpleFoam
  gnuplot plot.patch
  gnuplot plot.cell
  mv postProcessing results/postProcessing.$val
  mv stress* results/postProcessing.$val/.
  mv log* results/postProcessing.$val/.
  cleanTimeDirectories
  \rm -rf processor* > /dev/null 2>&1
done