News for hackers. Stuff that matters.
Re:Simulating Water over Terrain by matheist on Thursday February 06, 2025 @02:13PM (#42965496)
The waves when the water is first entering the area is called numeric dispersion, it's a consequence of discretizing. It can be mitigated somewhat by smoothing the entering wall of water so that there's not a sharp discontinuity.
Re:Simulating Water over Terrain by semi-extrinsic on Thursday February 06, 2025 @03:09PM (#42966022)
I don't think so, the waves are actual shock waves which are a solution to the Riemann problem for the shallow water equations because they are nonlinear hyperbolic equations. You can find them even before you start introducing any numerical grid or discretization.

See e.g. the classic exposition by Leveque:

https://www.clawpack.org/riemann_book/html/Shallow_water.htm...

Re:Simulating Water over Terrain by matheist on Thursday February 06, 2025 @04:31PM (#42966699)
Very interesting, my mistake! I'm more familiar with acoustics and assumed it was the same phenomenon, but it looks like I jumped to a mistaken conclusion.
Re:Simulating Water over Terrain by lisyarus on Thursday February 06, 2025 @02:17PM (#42965537)
Interesting, thanks! Is it kinda like the Gibbs phenomenon?
Re:Simulating Water over Terrain by matheist on Thursday February 06, 2025 @04:58PM (#42966914)
Take a look at the other reply, which says it's actually not dispersion. My mistake!
Re:Simulating Water over Terrain by lisyarus on Thursday February 06, 2025 @09:23PM (#42968596)
Yeah I've seen it, no worries! :)
Re:Simulating Water over Terrain by Clor on Friday February 07, 2025 @03:55AM (#42970711)
I agree 100% with this comment -- you can clearly see the energy separating into its component frequencies as the solution evolves. The reason is that different frequencies of the solution propagate at different speeds. Smoothing the discontinuity would indeed reduce the high frequency components, such that the effects wouldn't appear so extreme. The shallow water equations only allow for one shock wave mode as far as I recall, it wouldn't explain why we seem to get increasingly more shocks as the solution evolves.