#!/bin/sh
# Creates a 2D axisymmetrical geometry in the form of a 3D wedge with a small angle
# Compatible with OpenFOAM v1912+

# Run from this directory
cd ${0%/*} || exit 1   
# Remove actual mesh   
rm -r constant/polyMesh
# Produce a mesh based on cyl_multi.geo
gmsh -3 cyl_multi.geo -o cyl_multi.msh
# Convert the mesh produced by gmsh into an OpenFOAM mesh
gmshToFoam cyl_multi.msh
# Check that the mesh does not contain errors
checkMesh
# Automatically rename wall and wedge patches
python3 rename_boundaries.py
