I want to reproduce the results of couette case in the paper, PyFR: An open source framework for solving advection-diffusion type problems on streaming architectures using the flux reconstruction approach.

E=p/(gamma-1)+0.5rho(uu+vv)

The initial condition:
γ = 1.4, Pr= 0.72, µ = 0.417, cp = 1005 J K−1, H = 1 m, Tw = 300 K, pc = 1 × 105 Pa, and vw = 69.445 m s−1.

And the exact rho= (1.4/(1.4-1)) ×2×p/(2×1005× 300+0.72×70× 70 ×y×(1-y)), ‘p’ is not initial pressure.
energy E = 0.5×rho_exact×(u×u+v×v), and u,v are not initial value.

If I’m not mistaken Pc is the center-line pressure. Have you plotted the exact rho and made sure that it is in fact a solution to Navier–Stokes? It shouldn’t be too hard to verify for the mass equation.

pc is initial pressure. The solution is right. I am just not sure if the ‘p’ in exact density is initial pressure pc? and u and v in exact energy is initial velocity? when I compute L2 error.

I think the pressure gradient normal to the wall should be zero and if your source term is correct to balance the the viscous loss, I think the pressure should be constant.

For the exact terms, you should use the exact analytical profile. So for the energy, you will need the exact velocity profile (which should just be a parabola), which you can then sub in.

However, what are you trying to achieve? Is this really the best case to be using?

where E_num is the energy computed using numerical quantities (rho, u, v, and p) and E_exact is computed from Eq (34)-(36). Then the error is given by taking the square root of the computed value.

The Roe scheme is known to have quite high dissipation at low Mach number, I suspect that is what is happening here. HLLC might be better, or there are some low mach Roe schemes that might be a bit better. (Such as the L2 Roe scheme which is easiest to implement in a one dimensionalised way).

The mod function isn’t supported, I added in a PR but as % does the same thing we didn’t add it.