iglooWithFridges

#!/bin/sh
cd “${0%/*}” || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#——————————————————————————

# settings

# flag to enable computations in parallel mode
parallel=false

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

restore0Dir

runApplication blockMesh

mkdir -p constant/triSurface

cp -f \r
“$FOAM_TUTORIALS”/resources/geometry/fridgeA.eMesh \r
constant/triSurface

if [ “$parallel” = true ]
then

runApplication decomposePar -fileHandler collated

runParallel snappyHexMesh -overwrite -fileHandler collated

## Remove any include files from the field dictionaries
( mkdir -p processors/0 && \r
cd 0 && \r
for f in *; do [ -f “$f” ] && \r
foamDictionary “$f” > “../processors/0/$f”; done \r
)

runParallel $(getApplication) -fileHandler collated

runApplication reconstructParMesh -constant

runApplication reconstructPar

else

runApplication snappyHexMesh -overwrite

runApplication $(getApplication)

fi

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

実行年月:08/01/2021