Water Ripples Passing through a Slit

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

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

Contributed by: Enrique Zeleny (November 2012)
Based on a program by: Paul Nylander
Open content licensed under CC BY-NC-SA


Snapshots


Details

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.

References

[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.



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send