34 lines
816 B
Bash
Executable file
34 lines
816 B
Bash
Executable file
#!/usr/bin/env sh
|
|
echo START
|
|
export inp="of"
|
|
read -p "Output: " out
|
|
|
|
cp -r --reflink $inp $out
|
|
pushd $out
|
|
source /opt/OpenFOAM/OpenFOAM-9/etc/bashrc
|
|
mkdir log
|
|
echo Generating mesh
|
|
blockMesh > log/blockMesh.log
|
|
echo Refining mesh
|
|
snappyHexMesh -overwrite > log/snappyHexMesh.log
|
|
cp -r 0.org 0
|
|
echo Setting initial fields
|
|
setFields > log/setFields.log
|
|
|
|
popd
|
|
echo Converting swash output to initial condition
|
|
python -m processing.sws_ola -o $out
|
|
echo Converting swash output to boundary condition
|
|
python -m processing.sws_wavedict_paddle -o $out
|
|
pushd $out
|
|
|
|
echo Generating parallel cases
|
|
decomposePar > log/decomposePar.log
|
|
echo Running model
|
|
mpirun -np 4 olaFlow -parallel > log/olaFlow.log
|
|
echo Merging parallel cases
|
|
reconstructPar > log/reconstructPar.log
|
|
#echo Removing parallel cases
|
|
#rm -r processor*
|
|
|
|
echo END
|