.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples_simulations/example_bump.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_simulations_example_bump.py: ================================================================================ Bump ================================================================================ In this example the classic test of the bump for the Saint-Venant system is illustrated. Comparison between 2D numerical solution and 1D analytical solution is carried out for three flow regimes. .. note:: 1D analytical solutions are given in: https://hal.archives-ouvertes.fr/hal-00628246/document at section 3.1, paragraph "Bumps". .. GENERATED FROM PYTHON SOURCE LINES 14-27 .. code-block:: default import os, sys import argparse import numpy as np import matplotlib.pylab as plt import freshkiss3d as fk import freshkiss3d.extra.plots as fk_plt parser = argparse.ArgumentParser() parser.add_argument('--nographics', action='store_true') args = parser.parse_args() #sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 28-46 Flow regimes: -------------------- From the properties of the single layer St Venant system (strict hyperbolicity) we can deduce a classification of flows based on a criticality condition. Let's first define the Froude number: .. math:: \text{Fr} = \dfrac{|u|}{\sqrt{gh}} The flow can be either subcritical or supercritical (Fr<1 and Fr>1 respectively). For a given discharge another usefull quantity is the critical height defined by : .. math:: h_c = \left( \dfrac{q}{\sqrt{g}} \right)^{2/3} The flow is subcritical and supercritical for h>h_c and h` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_bump.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_