# Couette flow in lierature

Hello everyone,

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.

So I use plugin like this:

[soln-plugin-integrate]
nsteps = 100000
file = couette.csv

rho_exact=(1.4/(1.4-1))2p/(21005300+0.727070y(1-y))

int-E=sqrt((0.5rho(uu+vv)-0.5*%(rho_exact)s*(uu+vv))(0.5rho*(uu+vv)-0.5*%(rho_exact)s*(uu+vv)))

In my thinking, ‘p’ in rho_exact is not pc, and u, v in E_exact is not 70, 0. as shown above.

But the results are strange. Am I right?

Thanks very much

In what way are they strange? It might help to understand what is going wrong.

The L2 norm error of E might increase.

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.

Am I right?

Thanks

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?

I want to achieve the L2 error of energy in the above paper.

You mean the exact energy should use exact velocity and pressure. such like:

rho_exact= (1.4/(1.4-1)) ×2×Pc/(2×1005× 300+0.72×70× 70 ×y×(1-y)),
energy_exact E = 0.5×rho_exact×(Uw×Uw+0×0).

But the L2 error result are large (several hundred) and incremental. Do you know what’s wrong with it ?

What is the error on the velocity profile?

Ok. What is the error in the velocity profile? If that’s wrong that won’t be helping.

Velocity file is right.

What you want is:

``````[soln-plugin-integrate]
E_num = ...
E_exact = ...
int-err2 = pow(%(E_num)s - %(E_exact)s, 2)
``````

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.

Regards, Freddie.

Yes, I know.

I set
E_num=2.5×p+0.5×rho×(u×u+v×v)

E_exact=2.5×Pc+0.5×rho_exact×(Uw*Uw+0)
where rho_exact= (1.4/(1.4-1)) ×2×Pc/(2×1005× 300+0.72×70× 70 ×y×(1-y)), But it doesn’t work.

And the ini file is one of the three examples.

I’m sorry to bother you again. Am I right? If it is wrong, could you give me some more details?

No. Your `E_exact` is wrong as it takes `u = Uw`, missing the factor of `phi`.

Regards, Freddie.

It is still wrong, the pressure in rho_exact is Pc or numerical quantity p?

Thanks

After making the relevant substitutions this works fine for me:

``````[soln-plugin-integrate]
nsteps = 1000
file = couette.csv

rho_ex = gamma / (gamma - 1) * 2*Pc/((2*cp*Tw + Pr*Uw*Uw*y*(1-y)))
E_ex = Pc / (gamma - 1) + 0.5*(%(rho_ex)s) * pow(Uw*y, 2)
E_num = p / (gamma - 1) + 0.5*rho*(u*u + v*v)

int-err2 = pow((%(E_ex)s) - (%(E_num)s), 2)
``````
1 Like

I’ve been using the Roe, so the results are always wrong. Then I changed to rusanov, it works. Why does this happen?

If I want to use Roe to test the viscous case accuracy, could you guide me through it?

Thanks a lot.

I see that you have written this plugin for the density of the Euler vortex, but the mod() function is not allowed in ini. file.

[soln-plugin-integrate]
nsteps = 50
file = integral.csv
The mod function isn’t supported, I added in a PR but as `%` does the same thing we didn’t add it.