40 lines
1.2 KiB
Bash
Executable File
40 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # run from this directory
|
|
|
|
# Source tutorial run functions
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
# Get the number of processors to run on from system/decomposeParDict
|
|
nProc=`grep numberOfSubdomains system/decomposeParDict \
|
|
| sed s/"numberOfSubdomains *\(.*\);"/"\1"/`
|
|
|
|
runApplication surfaceFeatureExtract constant/triSurface/flange.obj flange -includedAngle 155
|
|
|
|
# Create tight-fitting background mesh
|
|
runApplication blockMesh
|
|
runApplication topoSet -dict system/topoSetDict-background
|
|
mv log.topoSet log.topoSet.background
|
|
runApplication subsetMesh background -patch walls -overwrite
|
|
|
|
runApplication decomposePar
|
|
|
|
# Backup initial background mesh on each processor
|
|
for dir in processor*
|
|
do
|
|
if [[ -d $dir ]]
|
|
then
|
|
cp -r $dir/constant/polyMesh $dir/constant/polyMesh_background
|
|
fi
|
|
done
|
|
|
|
runParallel cvMesh $nProc
|
|
|
|
runApplication reconstructParMesh -constant -mergeTol 1e-6
|
|
|
|
runApplication topoSet -dict system/topoSetDict-slices
|
|
mv log.topoSet log.topoSet.slices
|
|
runApplication writeCellCentres -constant
|
|
runParallel checkMesh $nProc -constant -allGeometry -allTopology
|
|
|
|
# ----------------------------------------------------------------- end-of-file
|