drivaerFastback

#!/bin/sh

# Run from this directory
cd “${0%/*}” || exit 1

# Source tutorial run functions
. “$WM_PROJECT_DIR/bin/tools/RunFunctions”

usage () {
exec 1>&2
while [ “$#” -ge 1 ]; do echo “$1”; shift; done
cat /dev/null
}

nRefine=1
nCores=8

while [ “$#” -gt 0 ]
do
case “$1” in
-c | -cores)
[ “$#” -ge 2 ] || usage “‘$1’ option requires an argument”
nCores=$2
shift 2
checkCores “$nCores” || usage
setKeyword numberOfSubdomains “$nCores” system/decomposeParDict
;;
-h | -help)
usage
;;
-m | -mesh)
[ “$#” -ge 2 ] || usage “‘$1’ option requires an argument”
mesh=$2
shift 2
case “$mesh” in
S) ;;
M) nRefine=1 ;;
L) nRefine=2 ; setKeyword endTime 2000 system/controlDict ;;
XL) nRefine=3 ; setKeyword endTime 2000 system/controlDict ;;
*) usage “Invalid argument ‘$mesh’ to -m|-mesh .” ;;
esac
;;
-test)
shift
;;
-*)
usage “Invalid option ‘$1′”
;;
*)
break
;;
esac
done

# START OF MAIN SCRIPT

runApplication blockMesh

runApplication decomposePar -copyZero

refineBackgroundMesh $nRefine

# echo “Switching to ptscotch for dynamic load balancing with snappyHexMesh”
# setKeyword method ptscotch system/decomposeParDict

runParallel snappyHexMesh -overwrite

runParallel checkMesh

runParallel “$(getApplication)”

# runApplication reconstructParMesh -constant
# runApplication reconstructPar -latestTime

#——————————————————————————

実行年月:07/01/2021