Stable Algorithm Based On Lax-Friedrichs Scheme for Visual Simulation of Shallow Water

  • Bandung Arry Sanjoyo Institut Teknologi Sepuluh Nopember
  • Mochamad Hariadi Institut Teknologi Sepuluh Nopember
  • Mauridhi Hery Purnomo Institut Teknologi Sepuluh Nopember
Keywords: shallow water equations, dam-break flow, Lax-Friedrichs scheme, flow visualization


Many game applications require fluid flow visualization of shallow water, especially dam-break flow. A Shallow Water Equation (SWE) is a mathematical model of shallow water flow which can be used to compute the flow depth and velocity.  We propose a stable algorithm for visualization of dam-break flow on flat and flat with bumps topography. We choose Lax-Friedrichs scheme as the numerical method for solving the SWE. Then, we investigate the consistency, stability, and convergence of the scheme. Finally, we transform the strategy into a visualization algorithm of SWE and analyze the complexity. The results of this paper are: 1) the Lax-Friedrichs scheme that is consistent and conditionally stable; furthermore, if the stability condition is satisfied, the scheme is convergent; 2) an algorithm to visualize flow depth and velocity which has complexity O(N) in each time iteration. We have applied the algorithm to flat and flat with bumps topography. According to visualization results, the numerical solution is very close to analytical solution in the case of flat topography. In the case of flat with bumps topography, the algorithm can visualize the dam-break flow and after a long time the numerical solution is very close to the analytical steady-state solution. Hence the proposed visualization algorithm is suitable for game applications containing flat with bumps environments.


Download data is not yet available.

Author Biographies

Mochamad Hariadi, Institut Teknologi Sepuluh Nopember

Informatics & Computer

Mauridhi Hery Purnomo, Institut Teknologi Sepuluh Nopember

Informatics & Computer


M.-H. Tsai, Y.-L. Chang, J.-S. Shiau, and S.-M. Wang, Exploring the effects of a serious game-based learning package for disaster prevention education: The case of Battle of Flooding Protection, Int. J. Disaster Risk Reduct., vol. 43, p. 101393, Feb. 2020, doi: 10.1016/j.ijdrr.2019.101393. DOI:

R. J. LeVeque, D. L. George, and M. J. Berger, Tsunami modelling with adaptively refined finite volume methods, Acta Numer., vol. 20, pp. 211–289, May 2011, doi: 10.1017/S0962492911000043. DOI:

M. Zuhair and S. Alam, Tsunami Impacts on Nuclear Power Plants along Western Coast of India Due to a Great Makran Earthquake: A Numerical Simulation Approach, Int. J. Geosci., vol. 08, no. 12, pp. 1417–1426, 2017, doi: 10.4236/ijg.2017.812083. DOI:

H. Altaie, Applications of a Nested Model for 2D Shallow Water equations in Tsunami Model, vol. 2, no. 3, p. 13, 2018. DOI:

N. Gouta and F. Maurel, A finite volume solver for 1D shallow-water equations applied to an actual river, Int. J. Numer. Methods Fluids, vol. 38, no. 1, pp. 1–19, Jan. 2002, doi: 10.1002/fld.201. DOI:

P. Glaister, An efficient numerical method for subcritical and supercritical open channel flows, Appl. Numer. Math., vol. 11, no. 6, pp. 497–508, Apr. 1993, doi: 10.1016/0168-9274(93)90089-A. DOI:

O. Castro-Orgaz and H. Chanson, Ritter’s dry-bed dam-break flows: positive and negative wave dynamics, Environ. Fluid Mech., vol. 17, no. 4, pp. 665–694, Aug. 2017, doi: 10.1007/s10652-017-9512-5. DOI:

E. Chaabelasri, Numerical Simulation of Dam Break Flows Using a Radial Basis Function Meshless Method with Artificial Viscosity, Model. Simul. Eng., vol. 2018, pp. 1–11, 2018, doi: 10.1155/2018/4245658. DOI:

A. Khoshkonesh, B. Nsom, S. Gohari, and H. Banejad, A comprehensive study on dam-break flow over dry and wet beds, Ocean Eng., vol. 188, p. 106279, Sep. 2019, doi: 10.1016/j.oceaneng.2019.106279. DOI:

H. P. Gunawan, Numerical simulation of shallow water equations and related models, Institut Teknologi Bandung, L’Université Paris-Est, 2015.

L. Rezzolla, Finite-difference Methods for the Solution of Partial Differential Equations, Frankfurt, 2018.

N. D. Katopodes, Finite-Difference Methods for Advection, in Free-Surface Flow, Elsevier, 2019, pp. 118–197. DOI:

S. Bi, J. Zhou, Y. Liu, and L. Song, A Finite Volume Method for Modeling Shallow Flows with Wet-Dry Fronts on Adaptive Cartesian Grids, Math. Probl. Eng., vol. 2014, Jul. 2014, doi: 10.1155/2014/209562. DOI:

R. Touma and F. Kanbar, Well-balanced central schemes for two-dimensional systems of shallow water equations with wet and dry states, Appl. Math. Model., vol. 62, pp. 728–750, Oct. 2018, doi: 10.1016/j.apm.2018.06.032. DOI:

M. D. Thanh and N. X. Thanh, Well-Balanced Numerical Schemes for Shallow Water Equations with Horizontal Temperature Gradient, Bull. Malays. Math. Sci. Soc., vol. 43, no. 1, pp. 783–807, Jan. 2020, doi: 10.1007/s40840-018-00713-5. DOI:

Michael Griebel, Thomas Dornseifer, and Tilman Neunhoeffer, Numerical Simulation in Fluid Dynamics: A Practical Introduction. Philadelphia: SIAM, 1998.

N. Foster and D. Metaxas, Modeling the motion of a hot, turbulent gas, in Proceedings of the 24th annual conference on Computer graphics and interactive techniques - SIGGRAPH ’97, Not Known, 1997, pp. 181–188, doi: 10.1145/258734.258838. DOI:

S. Nugroho and C. Citrahardhani, CFD Analysis of Nozzle Exit Position Effect in Ejector Gas Removal System in Geothermal Power Plant, Emit. Int. J. Eng. Technol., vol. 3, no. 1, Jun. 2015, doi: 10.24003/emitter.v3i1.35. DOI:

J. Stam, Stable Fluids, in Siggraph, 1999, vol. 99, pp. 121–128. DOI:

Kellomäki, T, Large-Scale Water Simulation in Games, Thesis for the degree of Doctor, Tampere University of Technology, Tampere, 2015.

A. B. Almeida and A. B. Franco, Modeling of Dam-Break Flow, in Computer Modeling of Free-Surface and Pressurized Flows, M. H. Chaudhry and L. W. Mays, Eds. Dordrecht: Springer Netherlands, 1994, pp. 343–373. DOI:

O. Delestre et al., SWASHES: a compilation of Shallow Water Analytic Solutions for Hydraulic and Environmental Studies. Wiley, Jan. 19, 2016.

A. I. Aleksyuk and V. V. Belikov, The uniqueness of the exact solution of the Riemann problem for the shallow water equations with discontinuous bottom, J. Comput. Phys., vol. 390, pp. 232–248, Aug. 2019, doi: 10.1016/ DOI:

S. Chen, B. Liao, and T. Huang, Corrected SPH methods for solving shallow-water equations, J. Hydrodyn., vol. 28, no. 3, pp. 389–399, Jun. 2016, doi: 10.1016/S1001-6058(16)60642-X. DOI:

S. K. Ray, Comparison of Numerical Schemes for Shallow Water Equation, Glob. J. Inc USA, vol. 13, no. 4, p. 20, 2013.

S. Mungkasi and I. P. Sari, Numerical solution to the shallow water equations using explicit and implicit schemes, presented at the THE 2016 Conference on Fundamental and Applied Science for Advanced Technology (CONFAST 2016): Proceeding of ConFAST 2016 Conference Series: International Conference on Physics and Applied Physics Research (ICPR 2016), International Conference on Industrial Biology (ICIBio 2016), and International Conference on Information System and Applied Mathematics (ICIAMath 2016), Yogyakarta, Indonesia, 2016, p. 020064, doi: 10.1063/1.4953989. DOI:

M. Griebel, T. Dornseifer, and T. Neunhoeffer, Numerical Simulation in Fluid Dynamics: A Practical Introduction. Philadelphia: SIAM, 1998. DOI:

J. Sainte-Marie and M.-O. Bristeau, Derivation of a non-hydrostatic shallow water model; Comparison with Saint-Venant and Boussinesq systems, Discrete Contin. Dyn. Syst. - Ser. B, vol. 10, no. 4, pp. 733–759, Aug. 2008, doi: 10.3934/dcdsb.2008.10.733. DOI:

Robert F. Dressler, Hydraulic resistance effect upon the dam-break functions., Journal of Research of the National Bureau of Standards, vol. 49, no. 3, pp. 217– 225, Sep. 1952. DOI:

J. J. Stoker, Water Waves The Mathematical Theory With Applications. Interscience Publishers, Inc., 1957.

How to Cite
Arry Sanjoyo, B., Hariadi, M., & Purnomo, M. H. (2020). Stable Algorithm Based On Lax-Friedrichs Scheme for Visual Simulation of Shallow Water. EMITTER International Journal of Engineering Technology, 8(1), 19-34.