Page 1 of 1
y+ calculation on rough walls
Posted: Wed Jul 09, 2025 11:10 am
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
Re: y+ calculation on rough walls
Posted: Wed Jul 09, 2025 9:22 pm
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
Re: y+ calculation on rough walls
Posted: Thu Jul 10, 2025 12:37 pm
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
Re: y+ calculation on rough walls
Posted: Fri Jul 11, 2025 10:46 am
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
Re: y+ calculation on rough walls
Posted: Sat Jul 12, 2025 4:43 am
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
Re: y+ calculation on rough walls
Posted: Mon Jul 21, 2025 11:06 am
by MaximeO
Hello,
Thank you both for your responses.
Yvan, I'm indeed in a high-Reynolds case study.
As I understand it, the

calculated by code_saturne on a rough surface has to be higher than a

value around 2, which I think allow to ensure that the calculation point at the center of the wall-adjacent cell is in the fluid domain and not "inside" the roughness of the wall, hence this mathematical aspect.
However, I didn't found this "smooth-rough" wall law, is it available in the v8.0 ?
Sean, it may be a bit naive but I simply extract the wall shear stress data calculated by code_saturne, I don't really know how it is calculated, but I clearly agree that the mesh refinement should play a role in this calculation.
I also have smooth walls in my calculation domain, and the normalised profiles on these walls seem pretty good overall.
Best regards,
Maxime