.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/Analytic_Solutions_Shape/plot_as_sh_coussot.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_Analytic_Solutions_Shape_plot_as_sh_coussot.py: Coussot's model example =========================== This example demonstrates the final shape of simulated flow using Coussot's equation. The frontal lobe shape of the simulated flow at the final step is given by .. math:: D = - H - \ln(1 - H) where - :math:`H`: normalized fluid depth. - :math:`D`: normalized distance of the front from the origin. :math:`H` and :math:`D` are obtained with these expressions: .. math:: D = \frac{\rho g d (\sin(\theta))^2}{\tau_c \cos(\theta)} \text{ and } H = \frac{\rho g h \sin(\theta)}{\tau_c} with: - :math:`h`: fluid depth. - :math:`d`: distance of the front from the origin. - :math:`g`: gravitational acceleration. - :math:`\rho`: fluid density. - :math:`\tau_c`: threshold constraint. - :math:`\theta`: slope of the surface. Implementation --------------- .. GENERATED FROM PYTHON SOURCE LINES 34-36 First import required packages and define the context. For this example we will use a fluid with a density of :math:`\rho = 1000 kg/m^3`: and :math:`\tau_c = 50 Pa`, with a slope of :math:`\theta = 10°`: .. GENERATED FROM PYTHON SOURCE LINES 36-44 .. code-block:: Python from tilupy.analytic_sol import Coussot_shape import matplotlib.pyplot as plt case_1 = Coussot_shape(rho=1000, tau=50, theta=10) case_1.compute_rheological_test_front_morpho() plt.plot(case_1.d, case_1.h, color="black") plt.show() .. image-sg:: /auto_examples/Analytic_Solutions_Shape/images/sphx_glr_plot_as_sh_coussot_001.png :alt: plot as sh coussot :srcset: /auto_examples/Analytic_Solutions_Shape/images/sphx_glr_plot_as_sh_coussot_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 45-54 If :math:`\theta = 0°`, the equations are slightly different: .. math:: D^* = \frac{{H^*}^2}{2} with: .. math:: D^* = \frac{\rho g d}{\tau_c} \text{ and } H^* = \frac{\rho g h}{\tau_c} .. GENERATED FROM PYTHON SOURCE LINES 54-60 .. code-block:: Python case_2 = Coussot_shape(rho=1000, tau=50, theta=0, h_final=1) case_2.compute_rheological_test_front_morpho() plt.plot(case_2.d, case_2.h, color="black") plt.show() .. image-sg:: /auto_examples/Analytic_Solutions_Shape/images/sphx_glr_plot_as_sh_coussot_002.png :alt: plot as sh coussot :srcset: /auto_examples/Analytic_Solutions_Shape/images/sphx_glr_plot_as_sh_coussot_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 61-65 Original reference: Coussot, P., Proust, S., & Ancey, C., 1996, Rheological interpretation of deposits of yield stress fluids, Journal of Non-Newtonian Fluid Mechanics, v. 66(1), p. 55-70, doi:10.1016/0377-0257(96)01474-7. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.069 seconds) .. _sphx_glr_download_auto_examples_Analytic_Solutions_Shape_plot_as_sh_coussot.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_as_sh_coussot.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_as_sh_coussot.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_as_sh_coussot.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_