Constant Shear Stress boundary condition

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

Constant Shear Stress boundary condition

Post by MaximeO »

Hello,

I'm currently working on Atmospheric Boundary Layer simulation on code_saturne v8.0, and especially on horizontal homogenity (i.e. conservation of speed and turbulence profiles along an empty computational domain).

Based on some articles that I found, it is recommanded to apply a constant shear stress at the top of my domain. It seems that we can make it thanks to user functions, but I'm not used to this at all.
Do you know which user function I need to use and how I can apply this kind of condition (in terms of coding) ?

Best regards,

Maxime
StandardRANSUser001
Posts: 47
Joined: Tue Apr 09, 2024 3:26 am

Re: Constant Shear Stress boundary condition

Post by StandardRANSUser001 »

Hi Maxime,

Perhaps to get started, perhaps you could consider a sliding wall boundary condition? I am sure that it isn't exactly waht you want, but you could examine the shear-stresses on the wall after the calculation, to verify whether you have the basics correctly accounted for.

Example: https://www.code-saturne.org/cms/web/si ... tyFlow.pdf

The programmable boundary conditions are available here:
https://www.code-saturne.org/documentat ... _8cpp.html
https://www.code-saturne.org/documentat ... mples.html

Hopefully this is helpful! :)

Best regards,
Sean Hanrahan
MaximeO
Posts: 2
Joined: Wed Jul 02, 2025 9:37 am

Re: Constant Shear Stress boundary condition

Post by MaximeO »

Hi Sean,

Thank you for your response.

I have already tested the sliding wall condition, which indeed modified the value of the calculated wall shear stress compared to my initial calculation, but the main issue still remained : it wasn't constant along my calculation domain. I suppose it is because the calculated shear stress is deduced from the velocity and turbulent viscosity profiles which were not constant along the domain too.

Thank you also for the links, I will check that further. I will try to find others exmples that could be helpfull for my case study.

I was also wondering if the use of a momentum source term in the near-wall cells could be a good idea, with something like : to obtain a constant shear stress along the X axis. I will make some tests and tell you if it worked.

Best regards,
Maxime
Post Reply