y+ calculation on rough walls

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
MaximeO
Posts: 4
Joined: Wed Jul 02, 2025 9:37 am

y+ calculation on rough walls

Post by MaximeO »

Hello,

Does anyone knows how exactly is calculated the y+ on a rough wall (on code_saturne v8.0) ?

I have searched in the theory guide (https://www.code-saturne.org/documentat ... theory.pdf p.58-60) but the rough wall part doesn't really answer this question.

The thing is, when I'm looking at my results, the y+ computed by code_saturne doesn't correspond to the y+ I have calculated with the theoretical formula and the computed wall shear-stress, and there is a huge difference ( on code_saturne while I calculated ), but I may be missing a point here ?

Best regards,
Maxime
Yvan Fournier
Posts: 4236
Joined: Mon Feb 20, 2012 3:25 pm

Re: y+ calculation on rough walls

Post by Yvan Fournier »

Hello,

This is probably computed in src/base/clptrg.f90. So it may be interesting to check/log/print the intermediate values used in its computation.

I'm not sure about the theory part, as there is both a legacy rough wall model, and a new one (continuous "smooth/rough" model). The newer model should be mostly equivalent to the old one in rough wall regions, but some details might change.

Best regards,

Yvan
MaximeO
Posts: 4
Joined: Wed Jul 02, 2025 9:37 am

Re: y+ calculation on rough walls

Post by MaximeO »

Hello Yvan,

Thank you for your response.

I've checked the clptrg file, and apparently for rough walls it is computed as : (where is the distance from the centre of the wall-adjacent cell to the wall, and is the aerodynamic roughness length). This explain why I had such a low constant value of y+ along my coputational domain.

So now my question is : when we use wall functions, we need in theory to respect a y+ value of at least 20-30 to ensure having the second cell in the log-region. But as I said, the y+ computed by code_saturne is way smaller than the theoretical one (). So which one should I refer to ? This computed y+ isn't it finally just here for coding purposes and don't have any real physical meaning ?

Best regards,

Maxime
Yvan Fournier
Posts: 4236
Joined: Mon Feb 20, 2012 3:25 pm

Re: y+ calculation on rough walls

Post by Yvan Fournier »

Hello,

As far as I know, in the case of smooth walls, the y+ 20-30 rule applies to high-Reynolds wall laws. For low-Reynolds or "all-y+" wall laws, smaller y+ values are allowed.

I am not too sure about rough wall laws and would need to check with a colleague, but since they also include some specific modeling, chances are pretty high that indeed the y+ value has a "mathematical" role only.

It may also be interesting in your case to check results with the "smooth-rough" wall law (which, if I am not mistaken, is handled as a smooth wall in clptur.f90, with a user-provided boundary roughness field).

Best regards,

Yvan
StandardRANSUser001
Posts: 48
Joined: Tue Apr 09, 2024 3:26 am

Re: y+ calculation on rough walls

Post by StandardRANSUser001 »

Hi Maxime,

When you say theoretical y+ value, how are you calculating your wall-shear stress?

As you know, the methodology of the velocity gradient calculation on the wall will make a difference to your wall-shear stress term, that is then used in your wall friction velocity ($\overline{u}_tau$) calculation. Because you have a coarse mesh near the wall, perhaps this is related to your gradient calculation and/or cell spacing?

Just as a sanity check, but it is also worth ensuring that you are using a time-averaged velocity calculation for the calculation of your gradient term.

I have been using the y+ value on a smooth walled channel flow recently, and I was happy with the results, as the velocity profiles (normalised in "viscous + units") collapsed onto the "law of the wall".

Perhaps it would be a good exercise to verify and/or validate your initial calculations with your roughness assumption, to make sure that these profiles collapse onto the law of the wall in the logarithmic layer of the boundary layer.

Best Regards,
Sean Hanrahan
Post Reply