Water surface simulation. Energy conservation

Use the wave equation to simulate water surface

Download
Download

You are now following this Submission

Cite As

Huy (2026). Water surface simulation. Energy conservation (https://uk.mathworks.com/matlabcentral/fileexchange/46579-water-surface-simulation-energy-conservation), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.13.0

Added a video description.
Minor changes.

Download
1.12.0

Corrected algorithm for Connected Boundaries mode. Energy is now fully conserved.

Download
1.11.0

Added a Pause/Resume button. Users can add more drops to the surface in Pause mode.

Download
1.10.0

Added a Clear Plot button.

Download
1.9.0

Connected Boundaries Mode improved.

Download
1.8.0

Energy Flow now works with boundary conditions.

Download
1.7.0

Bugs fixed.

Download
1.6.0

Minor changes. Added a message box. Unhide edges in fixed boundaries .

Download
1.5.0

Code corrected.
dx, dy - spacing between one point and its diagonal neighbors is the square root of 2 => 1/dx^2 resp. 1/dy^2 = 1/2

Download
1.4.0

Conservation of Energy, potential and kinetic. Explanation in function newH=Wave() updated.

Download
1.3.0

Decrease facealpha (transparency) value to 0.95. A value of 1 makes everything much slower. Future update: energy conservation.

Download
1.2.0

Add the default color mode that uses no rendering at all. This could improve performance on low-spec PCs.

Download
1.1.0

Description updated.

Download
1.0.0

Download