Back to Home
The Roe-Averaged Density
 The Roe flux (Roe's Approximate Riemann Solver; P. L. Roe, JCP 1981) is perhaps the most popular method for computing the numerical flux for the Euler equations. But there is a question as to whether it is implemented correctly. In particular, averaging for the density can be a source of confusion. Here is one possible explanation for the average density. Let ${\bf U}_L$ and ${\bf U}_R$ be the conservative variables on the left and right states. Then, the Roe flux over the two states can be computed as follows. First compute the Roe-averaged velocity, total enthalpy, and the speed of sound: $\hat{u}= \frac{\sqrt{\rho_L} \, {u}_L + \sqrt{\rho_R} \, {u}_R}{ \sqrt{\rho_L} + \sqrt{\rho_R} }, \quad \hat{H}= \frac{\sqrt{\rho_L} \, H_L + \sqrt{\rho_R} \, H_R}{ \sqrt{\rho_L} + \sqrt{\rho_R} }, \quad \hat{a}^2 = (\gamma-1)\left[ \hat{H} - \frac{1}{2} \hat{u}^2\right].$ Then, evaluate the eigenvalues and the right-eigenvectors of the Jacobian matrix, $\hat{\lambda}_k$ and $\hat{\bf r}_k$, by the above Roe-averaged quantities. Compute also the left and right fluxes: ${\bf F}_L = {\bf F}({\bf U}_L), \quad \quad {\bf F}_R = {\bf F}({\bf U}_R).$ Note that no averaging is necessary for the density up to this point. We are now almost ready to compute the Roe flux: ${\bf \Phi}_{Roe} = \frac{1}{2} \left( {\bf F}_L + {\bf F}_R \right ) - \frac{1}{2}\sum_{all \, k} |\hat{\lambda}_k| \Delta \hat{w}_k \hat{\bf r}_k. \quad \quad \quad (1)$ Yes, 'almost', that is because we have not defined the wave strengths, $\Delta \hat{w}_k$. There are two ways to compute them. 1. Without Density:  The wave strengths can be computed by $\Delta \hat{w}_1 = \frac{1}{2 \hat{a}} \left[ (\hat{u}+\hat{a}) \Delta u_1 - \Delta u_2 - \hat{a}\Delta \hat{w}_2 \right],$ $\Delta \hat{w}_2=\frac{\gamma-1}{\hat{a}^2}\left[ (\hat{H}-\hat{u}^2)\Delta u_1 + \hat{u} \Delta u_2 - \Delta u_3 \right],$ $\Delta \hat{w}_3 = \Delta u_1 - (\Delta \hat{w}_1+\Delta \hat{w}_2),$ where $\Delta {\bf U} = {\bf U}_R-{\bf U}_L = [\Delta u_1, \Delta u_2, \Delta u_3 ]^t$. These expressions have been derived by solving $\Delta {\bf U} = \sum_{k=1}^{3} \Delta \hat{w}_k \hat{{\bf r}}_k, \quad \quad \quad (2)$ so that the projection of the jump in ${\bf U}$ onto the space of the right-eigenvectors is exact. This exactness is very important. 2. With Density:   The wave strengths can be computed also as follows. $\Delta \hat{w}_1 = \frac{1}{2\hat{a}^2}\left[ \Delta p - \hat{\rho} \hat{a} \Delta u \right],$ $\Delta \hat{w}_2 = \Delta \rho -\frac{\Delta p}{\hat{a}^2},$ $\Delta \hat{w}_3 = \frac{1}{2\hat{a}^2}\left[ \Delta p + \hat{\rho} \hat{a} \Delta u \right],$ where it is very important to define the average density as $\hat{\rho} = \sqrt{\rho_L \rho_R}.$ In fact, these expressions can be derived from the exact projection condition (2) [see Godlewski and Raviart ]. Therefore, these wave strengths are exactly the same as those in 1. In particular, the average density defined as above, which may be called the Roe-averaged density, is the only choice that guarantees the exact projection. No other averaging is allowed. If other average is used for the density, the exact projection is violated, and consequently the Roe flux cannot be fully upwind (with respect to the linearized waves). Why is that?   The Roe flux in the form of Equation (1) comes from averaging two expressions for the interface flux: one from the left state across the left-moving waves, and the other from the right state across the right-moving waves, ${\bf \Phi}^{l} = {\bf F}_L + \sum_{\hat{\lambda}_k < 0} \hat{\lambda}_k \Delta \hat{w}_k \hat{\bf r}_k, \quad {\bf \Phi}^{r} = {\bf F}_R - \sum_{\hat{\lambda}_k > 0} \hat{\lambda}_k \Delta \hat{w}_k \hat{\bf r}_k.$ It is important to note that these two expressions are NOT identically equal. Consider the difference of the two, ${\bf \Phi}^{r} - {\bf \Phi}^{l} = \Delta {\bf F} - \sum_{all \, k} \hat{\lambda}_k \Delta \hat{w}_k \hat{\bf r}_k= \Delta {\bf F} - \hat{\bf A} \sum_{all \, k} \Delta \hat{w}_k \hat{\bf r}_k.$ If the projection is exact, then ${\bf \Phi}^{r} - {\bf \Phi}^{l} = \Delta {\bf F} - \hat{\bf A}\Delta {\bf U},$ and it vanishes if the Jacobian is evaluated by the Roe-averages. That is, the two expressions are equal if the projection is exact and the Roe-averages are used to linearize the Euler equations. The exact projection is critical to keeping the equality. To see what goes wrong if the two expressions are not equal, suppose all waves are right-moving so that ${\bf \Phi}^{l} = {\bf F}_L, \quad {\bf \Phi}^{r} = {\bf F}_R - \sum_{all \, k} \hat{\lambda}_k \Delta \hat{w}_k \hat{\bf r}_k.$ Then, the Roe flux that is the average of the two will not be fully upwind, ${\bf \Phi}_{Roe} = \frac{{\bf \Phi}^{l} + {\bf \Phi}^{r}}{2} \ne {\bf F}_L,$ unless   ${\bf \Phi}^{r} ={\bf \Phi}^{l} = {\bf F}_L$. Consequently, it won't be able to recognize a single discontinuity unless implemented right. "Is it a serious problem?" I hope not. What about an entropy fix? It may destroy everything (the exact projection as well as $\Delta {\bf F} = \hat{\bf A}\Delta {\bf U}$). But it should because the need arises from a flaw in the linearized Riemann solver approach. by Hiroaki Nishikawa, March 3, 2011. Back to Home Copyright 1994- by Hiroaki Nishikawa. All rights reserved.