Cannot get no-slip velocity on the walls using a coarse mesh

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Cannot get no-slip velocity on the walls using a coarse mesh

Post by Ruonan »

Hello everyone,

Please could you help me with this problem?

I want to simulate a sealed rotor-stator cavity flow case. The boundary conditions are shown in the graph. When I use a mesh with very thin elements near wall boundaries, the results are fine. But when I use a coarse mesh without thin elements near the wall, with all other settings remain the same, I found the results changed a lot. It seems all the walls are not ‘no slip’. For example, on the rotating disc, I suppose the fluid velocity should be the same as the disc, while in the results, the velocity changed from almost 0 (in the beginning) to 60% of the rotating disc speed (when the solution converged).

Please find the mesh and results attached below. Though it ran for only 5 time steps, we can see the boundary conditions implemented which I suppose were not correct.

Did I do something wrong? Why I cannot get the no-slip boundary condition on all walls after changing to a coarse mesh?

I used k-omega SST turbulence model, and I found there seems nothing to do with wall functions. Because I tried 5 different wall function types (including no wall function), but the results are similar.

By the way, the reason I want to use a mesh without thin boundary layer elements is: I want to use it to do wall modelled LES using the default wall model (1-scale model log law) in Saturne.

Thank you very much!

Best regards,
Ruonan

Image
Attachments
Severac.cgns
(6.4 MiB) Downloaded 187 times
settings and results.zip
(3.62 MiB) Downloaded 187 times
Yvan Fournier
Posts: 4220
Joined: Mon Feb 20, 2012 3:25 pm

Re: Cannot get no-slip velocity on the walls using a coarse mesh

Post by Yvan Fournier »

Hello,

For no-slip conditions, in cs_user_boundary_conditions.f90, you should use a Dirichlet condition (icodcl(ifac,iu) = 1, and a zero value for rcodcl(ifac,iu,1), or a fixed "sliding wall" value if the wall is moving.

You code seems OK, but I recommend also setting values for the iu component, not just iv and iw. Both for icodcl and rcodcl (I am not sure, but the iv and iw values might be overwritten by the iu value for icodcl, as all components must have the same boundary condition type on a given face (though they can of course have different Dirichlet values).

Also, what you are visualizing is probably the mean cell value, not the actuall boundary value. So if your mesh is course, the influence of the other neighboring cells may be dominant and you might not "see" the prescribed value's effect (in any case, no-slip conditions only make sense with a y+ value close to 1 (or lower), so with a coarse mesh, I am not sure how you can interpret values, unless the flow is also very low-Reynolds (you can visualize the boundary y+ value when postprocessing on the boundary mesh, to see where you are).

Best regards,

Yvan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Cannot get no-slip velocity on the walls using a coarse mesh

Post by Ruonan »

Hello Yvan,

Thanks for your reply. I tried to specify "iu" in cs_user_boundary_conditions.f90, but faced more problems:

I add "icodcl(ifac,iu) = 1, rcodcl(ifac,iu,1) = 0.0d0" for rotating walls "ROTOR or HUB" in the subroutine. These two lines were commented in previous calculations. Then I can get the no-slip boundary conditions on ROTOR and HUB (please see the non-dimensional tangential velocity contour below), which is good.
tangential velocity on walls.png
But I got wrong wall distance values like this: seems ROTOR and HUB are no longer walls.
wrong wall distance values.png
While the wall distance values should be like this:
wall distance values should be.png
Also, the pressure and velocity values in cavity have huge differences compare to experimental data.

I can remember in this forum someone said before: "The rcodcl(ifac,ivar,1) are to be specified only if the velocity is not equal to zero." So I didn't specify "iu" in previous calculations.

So here is the problem: if I don't specify iu, I can get reasonable pressure and velocity values in most parts, but very near-wall regions and on the wall values are wrong; if I specify iu, I can get reasonable no-slip velocity values on the wall, but the wall distance, pressure and velocity values far from wall all seem unreasonable. And I suppose wall distance value is the easiest to check. I suppose if wall distance values are wrong, the solution couldn't be correct.

I am quite confused. The results with "iu" specified are attached. Could you please give me some advice?

Many thanks,
Ruonan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Cannot get no-slip velocity on the walls using a coarse mesh

Post by Ruonan »

Here are the results. Best regards, Ruonan
Attachments
20210221.zip
(5.33 MiB) Downloaded 181 times
Post Reply