Water Ripples Passing through a Slit

This Demonstration of single slit wave diffraction uses a finite differences method with Dirichlet boundary conditions.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The procedure is very simple, with surprising results, and is used to represent fluids in video games [1]. It is based on the fact that the wave equation (a second-order PDE) can be rewritten as a system of two first-order PDEs
for which a possible discretization is
An implementation with some variations can be found at [2], with an updating scheme is based on [3]: given two arrays, for the time and representing . From an element in , the sum of the four neighbors that appear in the discretization of a component in is subtracted, giving an updated value for , with the exception of positions at the walls. A CFL constant (Courant–Friedrichs–Lewy condition) is necessary to ensure stability.
[1] M. Müller. "Real Time Fluids in Games." (Nov 29, 2012) www.matthiasmueller.info/talks/gameFluids2007.pdf.
[2] P. Nylander. "Fluid Motion Simulations and Artwork." (Nov 29, 2012) www.bugman123.com/FluidMotion/index.html.
[3] H. Elias. "2D Water." (Nov 29, 2012) freespace.virgin.net/hugo.elias/graphics/x_water.htm.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2017 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+