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

mkdir 1d_profil
python3 -c "import fluidfoam; fluidfoam.create1dprofil('Case1D', '.', '400', 'Y', ['U.a', 'U.b', 'alpha.a'])"


runApplication blockMesh

# Select cellSets
runApplication -s 1 topoSet

runApplication subsetMesh box -patch hole -overwrite

# Select cellSets

restore0Dir

# Use cellSets to write zoneID
runApplication setFields

funkySetFields -time 0

decomposePar

mpirun -np 6 overSedDymFoam_rbgh -parallel > log&
