This notebook implements PROTEUS to develop a numerical solution to a problem first studied by Ubbink (1997), who used a level-set model for free surface flows. The problem consists of a 0.292m x 1.146m (height x width) column of water, initially at rest. A small obstacle (0.024m x 0.048m) is placed in the middle of the tank base. Under the action of gravity the water column interacts with the obstacle and collapses to a wall. The computational domain is a 2D rectangular box with dimensions 0.584m x 0.584m. The top of the domain is left open to the atmosphere, with the rest of boundaries acting as free slip walls. In the following figure, a sketch of the dambreak initial conditions is shown.
This case tests the ability of PROTEUS to simulate the free-surface evolution and during the interaction of the dambreak front with the obstacle. The results of the simulations can be visually compared with the data in the following references. For more details, see runfiles or references.
The parun launcher is used to execute the split-operator module, in this case dambreak_Ubbink_so.py. Various arguments may also be implemented to define various runtime options. All available options are listed when executing parun -h in the command line. Common command-line options are as follows:
| Option | Description |
|---|---|
| -v | Print logging information to standard output |
| -O PETSCOPTIONSFILE | Text file of options to pass to Petsc library |
| -D DATADIR | Set data directory for output storage |
| -l LOGLEVEL | Store runtime information at the log level, 0 = none, 10 = everything |
| -b BATCHFILENAME | Text file of auxiliary commands to execute along with main program |
| -G gatherArchive | Collect data files into single file at end of simulation (will require more computational resources on large runs) |
| -H hotStart | Use the last step in the archive as the initial condition and continue appending to the archive |
Additionally, to run the case on more than one core, implement mpiexec -n <number of cores> before the use of parun on the command line.
In [1]:
!mpiexec -np 2 parun dambreak_Ubbink_so.py -l 5 -C "refinement=8" -O ../../../inputTemplates/petsc.options.superlu_dist
In [3]:
import helpers
helpers.CreateFig()
In [5]:
!rm -f dambreakUbbink.mp4; avconv -i phi%4d.png -vcodec libx264 dambreakUbbink.mp4 -loglevel quiet
In [6]:
from IPython.core.display import HTML
data_uri_mp4 = open("dambreakUbbink.mp4", "rb").read().encode("base64").replace("\n", "")
video_tag = """<video controls>
<source type ="video/mp4" src="data:video/mp4;base64,{mp4}"/>
Your browser does not support the video tag
</video>""".format(mp4=data_uri_mp4)
HTML(data=video_tag)
Out[6]:
In [ ]: