openfoam/tutorials/multiphase/interFoam/RAS/motorBike/Allrun.pre
2021-06-08 20:14:09 +00:00

37 lines
982 B
Bash
Executable File

#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
mkdir -p constant/triSurface
# copy motorbike surface from resources directory
cp -f \
"$FOAM_TUTORIALS"/resources/geometry/motorBike.obj.gz \
constant/triSurface/
runApplication surfaceFeatureExtract
runApplication blockMesh
# Serial
# ------
#runApplication snappyHexMesh -overwrite
#rm -f constant/polyMesh/refinementHistory*
# - set the initial fields
# restore0Dir
#runApplication setFields
# Parallel
# --------
runApplication decomposePar -force
runParallel snappyHexMesh -overwrite
ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory
# - set the initial fields
restore0Dir -processor
runParallel setFields
#------------------------------------------------------------------------------