#!/bin/sh
usage () {
exec 1>&2
while [ “$#” -ge 1 ]; do echo “$1″; shift; done
cat &1
}# VARIABLES
distort=””
pBC=””
UBC=””# OPTIONS
while [ “$#” -gt 0 ]
do
case “$1″ in
-d | -distort)
distort=”yes”
shift
;;
-h | -help)
usage
;;
-p | -pBC)
[ “$#” -ge 2 ] || usage “‘$1’ option requires an argument”
pBC=”$2″
shift 2
;;
-U | -UBC)
[ “$#” -ge 2 ] || usage “‘$1’ option requires an argument”
UBC=”$2″
shift 2
;;
-test)
shift
;;
-*)
usage “Invalid option ‘$1′”
;;
*)
break
;;
esac
donecase “$pBC” in
totalPressure|fixedValue|””) ;;
*)
usage “Invalid boundary condition ‘$pBC’ for p.”\r
“Valid options: ‘totalPressure’, ‘fixedValue’.”
;;
esaccase “$UBC” in
pressureInletOutletVelocity|zeroGradient|””) ;;
*)
usage “Invalid boundary condition ‘$UBC’ for U.”\r
“Valid options: ‘pressureInletOutletVelocity’, ‘zeroGradient’.”
;;
esac# Run from this directory
cd “${0%/*}” || exit 1# Source tutorial run functions
. “$WM_PROJECT_DIR/bin/tools/RunFunctions”runApplication blockMesh
[ “$distort” ] && distort
runApplication extrudeMesh[ “$pBC” ] && setAtmosphereBC p “$pBC”
[ “$UBC” ] && setAtmosphereBC U “$UBC”runApplication “$(getApplication)”
#——————————————————————————
実行年月:07/01/2021