All steps of mesh generation introduced in previous sections can be done using the following script, e.g. run-1-mesh:
#!/bin/bash
# check environment
if [[ $(echo $WM_PROJECT_VERSION | cut -c1-3) != "2.3" ]]; then
echo "You need OpenFOAM 2.3 to build the mesh."
exit 0
fi
cd meshFactory
# partial meshes
for region in spiral rotor drafttube; do
cd mesh-$region
echo
echo "Create mesh for region \"$region\""
./buildMesh || exit -1
rm -rf ../../constant/$region/polyMesh
cp -R final/polyMesh ../../constant/$region/
cd ..
done
echo