#!/bin/sh

# create the intial time folder
blockMesh
cp -r 0_org 0

#map the fields
mapFields -sourceTime 10 initial_1D_profile/1DSedim/
mv 0/pointDisplacement.unmapped 0/pointDisplacement

# Select cellSets for the different zones
topoSet
setFields

# Decompose the case in order to run in parallel 
decomposePar

# Run sedFoam
mpirun -np 10 --oversubscribe overSedDymFoam_rbgh  -parallel > log.out&
echo "The simulation is executed in background, with output to log.out"

#  Postprocessing
echo "-------------------------------------------------------------------"
echo "To generate the postprocessing files you need to execute ./makeFiles"
echo "Then go to ../Py and run the python3 script plotRestingSphere.py"


