0
$\begingroup$

This question is a continuation of one of my other questions. I've been trying to show that collocated (non-staggered) grids can suffer from negative group speeds in the linearized shallow water system. I do this by solving the equations for a simple, right-traveling wave crest, so that any left-traveling component can be identified as having negative group-speed. For my initial conditions I use a Gaussian wave profile with initial velocities $u_0(x) = h_0(x)\sqrt{g/h_0(x)}$.

My wave indeed moves in the right direction, but I have trouble with the interpretation. To the left of the crest, a trough appears with a small bump in the middle. This trough moves to the left. I see the same thing on a staggered grid. I can't spot a clear difference between the staggered and the non-staggered grid and I can't see negative group speed.

Is this trough normal? How can I identify the negative group speeds?

snapshot from the non-staggered grid solution

EDIT: A comment suggests that I split the wave up into modes and calculate the speed of the modes separately. I'm not really familiar with such decompositions in practice, so I used the discrete fourier transform from this post. I use $2\pi$freqs as the wavenumbers, but I'm not sure if that's correct? If I then use this function on a snapshot of the wave and plug my "wavenumbers" into the formula for the group speed (according to the discretization scheme), I get the following:

groupspeeds

I like this because the group speeds on the staggered grid are non-negative. Does this look right? Also, since I'm using the formula for the group speed, does that not make this exercise a circular reasoning? Because even when the numerical solution is exactly the same on both grids, my computation of the group speeds would still get me a different result on both grids.

$\endgroup$
3
  • 1
    $\begingroup$ You need to decompose your wave into individual modes, and compute the speed for each mode separately. In linear models, the modes are typically sine or cosine waves. $\endgroup$ Dec 17, 2021 at 17:57
  • $\begingroup$ @WolfgangBangerth I thought about your suggestion. See the edit I made to my post. $\endgroup$ Dec 17, 2021 at 22:40
  • 3
    $\begingroup$ I think you may have a bug in your implementation. If you refine in space and time, does the left-going part tend to zero? It should, rather quickly. Aside from a bug, the peft-going part is likely to be the result of using a multistep time discretization. You can avoid it by writing the wave equation in first-order form and applying a Runge-Kutta method in time. $\endgroup$ Dec 18, 2021 at 10:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.