in decomposeParDict. This default number of processors may be overridden by the new "-np" option to runParallel which must be specified before the application name e.g.: runParallel -np 4 pisoFoam
49 lines
1.0 KiB
Bash
Executable File
49 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
|
|
# Source tutorial run functions
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
runRefineMesh ()
|
|
{
|
|
echo "Running refineMesh on $PWD"
|
|
refineMesh -dict system/refineMeshDict -overwrite > log.refineMesh 2>&1
|
|
}
|
|
|
|
# copy DTC hull surface from resources folder
|
|
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
|
|
|
runApplication surfaceFeatureExtract
|
|
|
|
runApplication blockMesh
|
|
|
|
i=1
|
|
if [ -f log.topoSet.6 ] ; then
|
|
i=7
|
|
fi
|
|
while [ "$i" -lt 7 ] ; do
|
|
cp system/topoSetDict.${i} system/topoSetDict
|
|
runApplication topoSet
|
|
runRefineMesh
|
|
mv log.topoSet log.topoSet.$i
|
|
mv log.refineMesh log.refineMesh.$i
|
|
i=$(expr $i + 1)
|
|
done
|
|
|
|
runApplication snappyHexMesh -overwrite
|
|
|
|
\rm -rf 0
|
|
\cp -r 0.org 0
|
|
|
|
runApplication setFields
|
|
|
|
runApplication decomposePar
|
|
|
|
runParallel renumberMesh -overwrite
|
|
|
|
runParallel $(getApplication)
|
|
|
|
runApplication reconstructPar
|
|
|
|
# ----------------------------------------------------------------- end-of-file
|