- #1
person123
- 328
- 52
- TL;DR Summary
- My simulation of water waves using the shallow water equations predicts decreasing wave height as depth decreases.
I'm creating a simulation of the shallow water wave equation in MATLAB. I'm using the equations:
$$\frac{\partial v}{\partial t}=-g\frac{\partial \eta}{\partial x}$$
$$\frac{\partial h}{\partial t}=-h\frac{\partial v}{\partial x}$$
Iteratively updating the velocity from neighboring heights and then the height from neighboring velocities.
It's able to modeling traveling waves traveling at ##c=\sqrt{gh}## as well as reflection, superposition of waves, and (in 2D) diffraction and refraction. However, when the depth decreases over the distances, it predicts the wave height decreases instead of increases. In the attached video, for example, the water depth decreases linearly from a maximum to ##0## with increasing ##x##.
Is this decrease in wave height predicted with the shallow water equations, or do you think this is an issue with my model? Thanks!
$$\frac{\partial v}{\partial t}=-g\frac{\partial \eta}{\partial x}$$
$$\frac{\partial h}{\partial t}=-h\frac{\partial v}{\partial x}$$
Iteratively updating the velocity from neighboring heights and then the height from neighboring velocities.
It's able to modeling traveling waves traveling at ##c=\sqrt{gh}## as well as reflection, superposition of waves, and (in 2D) diffraction and refraction. However, when the depth decreases over the distances, it predicts the wave height decreases instead of increases. In the attached video, for example, the water depth decreases linearly from a maximum to ##0## with increasing ##x##.
Is this decrease in wave height predicted with the shallow water equations, or do you think this is an issue with my model? Thanks!