Better never means better for everyone… It always means worse, for some.

― Margaret Atwood

A couple of days ago I went through the HLL flux function –Riemann solver, and a small improvement (** https://wjrider.wordpress.com/2014/11/24/the-power-of-simple-questions-the-hll-flux/**). Today I’ll report on another improvement, that doesn’t appear to improve much at all, but its worth considering. This is work in progress and right now its not yielding anything too exciting.

Never confuse movement with action.

― Ernest Hemingway

Again, I’ll focus on the HLL flux and attack the issue of the final flux function’s sign preservation. The first thing to address is the propriety of the entire idea. There is a nice (short) paper on a closely related topic [Linde]. The bottom line is that the initial data may have a certain sign convention, and the dynamics induced in the Riemann problem can change that. So before deciding how to apply the Riemann solver and whether that application is appropriate one needs to realize the impact of the internal structure.

The problem I noted that under some conditions the dissipation in the flux can change the sign of the computed flux (when the velocity is much less than the sound speed, and the change in the equations variables is large enough). If you look at the fluxes in the mass or energy equation, they are the product of the velocity multiplying a positive definite quantity. The mass flux is the velocity multiplying the density, and the energy flux is where , and are the density, total energy and the pressure. If the velocity always has a sign in the Riemann solution, the resulting flux inherits that sign convention.

The HLL flux is ; –; ; where and . If we can have problems. This is particularly true is – is large.

Without deviation from the norm, progress is not possible.

― Frank Zappa

To attack the issue of whether the sign change is a problem and might be unphysical, I look at the dynamics within the Riemann solution. This can be easily computed using the linearized solution to the Lagrangian Riemann solution, where and are the Lagrangian wave speeds. If , and all have the same sign, the flux will have that sign. Given this background I test the HLL flux for compatibility with the established sign convention. If the sign convention is violated I do one of a couple of things: set or if and if . Then I test it.

Restlessness is discontent — and discontent is the first necessity of progress. Show me a thoroughly satisfied man — and I will show you a failure.

― Thomas A. Edison

The issue definitely shows up a lot in computations. I set up a challenging problem where the density is constant in the initial data, and there is a million-to-one pressure jump. This produces a shock and contact discontinuity moving to the right. The density jump is nearly six because the shock is so strong (). The HLL tends to smear the contact very strongly, and this is where the flux sign convention is violated.

We can see that an exact Riemann solver gives a sharp contact (the structure on the left side of the density peak). We also show the energy profile, which is also impacted by the idiosyncrasy discussed today.

With HLL we get a smeared out contact, especially to the left. None of the changes to HLL flux discussed above really make much of a difference either.

But knowing that things could be worse should not stop us from trying to make them better.

― Sheryl Sandberg

To do better is better than to be perfect.

― Toba Beta

[Linde] Linde, Timur, and Philip Roe. “On a mistaken notion of “proper upwinding”.” *Journal of Computational Physics* 142, no. 2 (1998): 611-614.