forked from di2325/phase_VI_FSI
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun
78 lines (75 loc) · 2.16 KB
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
if [[ "$1" == "dec" ]]; then
echo 'Decomposing fluid ...'
decomposePar -region fluid > log.decomposePar.Fluid
echo 'Decomposing solid ...'
decomposePar -region solid > log.decomposePar.Solid
exit 0
elif [[ "$1" == "rec" ]]; then
echo 'Reconstructing fluid ...'
reconstructPar -region fluid > log.reconstructPar.Fluid
echo 'Reconstructing solid ...'
reconstructPar -region solid > log.reconstructPar.Solid
exit 0
elif [[ "$1" == "run" ]]; then
mpirun -np 8 solids4Foam -parallel
exit 0
elif [[ "$1" == "all" ]]; then
echo 'Decomposing fluid ...'
decomposePar -region fluid > log.decomposePar.Fluid
echo 'Decomposing solid ...'
decomposePar -region solid > log.decomposePar.Solid
mpirun -np 8 solids4Foam -parallel
echo 'Reconstructing fluid ...'
reconstructPar -region fluid > log.reconstructPar.Fluid
echo 'Reconstructing solid ...'
reconstructPar -region solid > log.reconstructPar.Solid
exit 0
elif [[ "$1" == "clean" ]]; then
rm -rf 0.* 1* 2* 3* 4* 5* 6* 7* 8* 9* pro* log* history*
exit 0
elif [[ "$1" == "mesh" ]]; then
setSet -batch setBatchGgi -region fluid
setsToZones -noFlipMap -region fluid
exit 0
elif [[ "$1" == "test" ]]; then
setSet -batch setBatchGgi -region fluid
setsToZones -noFlipMap -region fluid
solids4Foam
exit 0
else
echo 'Nothing'
exit 0
fi
#runApplication setSet -batch setBatchGgi
#runApplication setsToZones -noFlipMap
#if [ "$WM_PROJECT" == "foam" ]
#then
# if (( $(echo "$WM_PROJECT_VERSION < 4.1" |bc -l) ))
# then
# echo "Tutorial not compatible with this version of OpenFOAM"
# exit 0
# fi
#else
# echo; echo "This case currently only runs in foam-extend"; echo
# exit 0
#fi
# frontIn
# {
# type ggi;
# nFaces 3152;
# startFace 443688;
# shadowPatch frontOut;
# zone frontInZone;
# bridgeOverlap true;
# }
# frontOut
# {
# type ggi;
# nFaces 3192;
# startFace 446840;
# shadowPatch frontIn;
# zone frontOutZone;
# bridgeOverlap true;
# }
# ----------------------------------------------------------------- end-of-file