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, \rho u and the energy flux is u\left(\rho E + p\right) where \rho, E and p 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 F(U) = \frac{A+D}{\Delta}A= S_R F_LS_L F_RD= S_R S_L ( U_R - U_L )\Delta = S_R - S_L where S_L \le 0 and S_R \ge 0. If |S_{L,R}| >> |u| we can have problems. This is particularly true is U_R U_L 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, u_* = \frac{ W_L u_L+ W_R u_R - \left( p_R - p_L \right) }{W_L + W_R} where W_L=\rho_L c_L and W_R =\rho_R c_R are the Lagrangian wave speeds. If u_L, u_R and u_* 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 F\left(U\right) = 0 or F\left(U\right) = F_L if u_*>0 and F\left(U\right) = F_R if u_* < 0. 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 (\gamma = 1.4). 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. 198A7043-8203-484D-9783-230478DE500B0D09AE91-DBFC-4CF9-ABFD-C4ED8778E398

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.

AE8C288A-0537-4456-96A7-C2C03834CC10 D3F25468-8495-4FBA-9E43-16D4049689D2

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

― Sheryl Sandberg

E185DA3B-C42D-4DFA-9779-3F12AC49A8AC DA15F04E-18C5-4863-BF05-396BD9428C44

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.

Advertisements