#!/bin/sh
# Source tutorial run and clean functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
for j in 0.01 0.001 0.0001 0.00001
do
(
cp -r TemplateCase deltaT-$j
cd deltaT-$j
sed -i s/TimeStepSize/$j/g system/controlDict
outputTime=$(echo "scale=0;1/($j*100)" | bc)
sed -i s/ProbeOutputInterval/$outputTime/g system/controlDict
runApplication blockMesh
runApplication icoFoam
)
done
# Print out the converged pressure for all time steps for visual check whether
# the solution does not depend on the time step
tail -n 1 */postProcessing/probes/0/p