Appropriate setting of an hybrid turbulence model and initialization of the almax variable

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
finzeo
Posts: 55
Joined: Fri Sep 09, 2022 4:23 pm

Appropriate setting of an hybrid turbulence model and initialization of the almax variable

Post by finzeo »

Hi,

I have recently been experimenting with the use of hybrid turbulence models (focusing on DDES, using the k-omega model as a basis). I suspect I may not be setting it completely correctly. The graph of the hybrid_blend variable is somewhat strange in my opinion, and I also notice that the almax variable is automatically initialized as the cube root of the domain volume (despite me setting another value).

To set the model, I use the source files cs_user_parameters.c and cs_user_initialization.c (I attach them). I also show details of the graph of the hybrid_blend variable (I note that it does not vary smoothly in space, and that the jump in the first cells from the wall could be large enough to bring inaccuracy).

Thanks in advance.
Attachments
cs_user_initialization.c
(3.42 KiB) Downloaded 137 times
cs_user_parameters.c
(50.82 KiB) Downloaded 139 times
images.zip
(360.02 KiB) Downloaded 143 times
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Appropriate setting of an hybrid turbulence model and initialization of the almax variable

Post by Yvan Fournier »

Hello,

Where do you set the value of almax that is overwritten ? In cs_user_parameters.c ? Depending on whether you do this too early or not, it might be a bug. The cube root of the volume is indeed the default value.

For the rest, I'll suggest to Jean-François to take a look at this.

Best regards,

Yvan
finzeo
Posts: 55
Joined: Fri Sep 09, 2022 4:23 pm

Re: Appropriate setting of an hybrid turbulence model and initialization of the almax variable

Post by finzeo »

Yvan Fournier wrote: Sun Oct 01, 2023 6:47 pm Hello,

Where do you set the value of almax that is overwritten ? In cs_user_parameters.c ? Depending on whether you do this too early or not, it might be a bug. The cube root of the volume is indeed the default value.

For the rest, I'll suggest to Jean-François to take a look at this.

Best regards,

Yvan
Thank you Yvan,

First, I set the desired almax value (=2.47648095) in the GUI only. Seeing in run_solver.log that the default value (cube root of the domain volume, 4.24 in this case) was not modified, then I set the same desired value both in the GUI and in cs_user_parameters.c, but it did not make a change in the log either.
Thanks also for what you can get about the analysis of the value of the blending factor.
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Appropriate setting of an hybrid turbulence model and initialization of the almax variable

Post by Yvan Fournier »

Hello,

I just fixed the almax issue in the Git "master" and "v8.0" branches (synced to GitHub).

Best regards,

Yvan
finzeo
Posts: 55
Joined: Fri Sep 09, 2022 4:23 pm

Re: Appropriate setting of an hybrid turbulence model and initialization of the almax variable

Post by finzeo »

Thank you Yvan
Post Reply