diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf316de3..457686ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -265,6 +265,7 @@ set( PATTERN_FILES
Patterns/KardarParisiZhang1986/erosion.vti
Patterns/KardarParisiZhang1986/uniform_snowfall.vti
Patterns/KardarParisiZhang1986/drainage_erosion.vti
+ Patterns/shallow_water_equations.vti
)
set( HELP_FILES
diff --git a/Help/changes.html b/Help/changes.html
index d88b64e7..854a66ca 100644
--- a/Help/changes.html
+++ b/Help/changes.html
@@ -19,6 +19,7 @@
Changes
New patterns:
diff --git a/Patterns/shallow_water_equations.vti b/Patterns/shallow_water_equations.vti
new file mode 100644
index 00000000..bc619e2a
--- /dev/null
+++ b/Patterns/shallow_water_equations.vti
@@ -0,0 +1,143 @@
+
+
+
+
+ The shallow water equations:
+
+ da/dt = - depth * (db/dx + dc/dy)<br>
+ db/dt = - g * da/dx - k * b<br>
+ dc/dt = - g * da/dy - k * c<br>
+
+ where:
+
+ a is the height of water surface<br>
+ b is the x-component of the water velocity<br>
+ c is the y-component of the water velocity<br>
+ d is the base height<br>
+ g is the force of gravity<br>
+ k is the viscosity
+
+
+
+ 0.01
+
+
+ 9.8
+
+
+ 0.03
+
+
+ delta_a = - max(0, a - d) * (x_gradient_b + y_gradient_c);
+ delta_b = - g * x_gradient_a - k * b;
+ delta_c = - g * y_gradient_a - k * c;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CAAAAACAAAAAAAAANAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA=eJztwQEBAAAAgJD+r+4ICgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYgAA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