A bug in the GUI

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

A bug in the GUI

Post by Ruonan »

Dear developers,

Please I want to report a bug I faced but fixed when setting temperature boundary conditions in GUI.

My test case is about heat transfer in a rotating cavity. I was trying to specify a temperature profile T=f(r) on a wall. When I set it in the GUI "Boundary conditions-Thermal-temperature-Type-Prescribed value (user law)", I cannot get correct results (Tplus, Input_thermal_flux, Dimensionless_heat_flux) compare to experimental data.

But when I specify this temperature profile in the user subroutine "cs_user_boundary_conditions.f90", the heat transfer values turned to be reasonable.

Note that when I use the Prescribed value (instead of the user law) to set a constant temperature value, the results are ok. So I suppose this is a bug when using the "GUI user law" to set temperature boundary conditions, as shown in the figure attached.
A bug.png
Best regards,
Ruonan
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: A bug in the GUI

Post by Yvan Fournier »

Hello,

Thanks for the info. This option is probably rarely used, so a bug could have remained undetected for a while.

Just in case, if you still have the non-working XML file with the temperature BC formula and the working cs_user_boundary_conditions.c and can post them, that would help us analyze and fix the bug.

Best regards,

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

Re: A bug in the GUI

Post by Ruonan »

Hi Yvan,

Thanks for your reply. Please find the .XML file and the subroutine attached here.

Two walls named "DISC_UPSTREAM" and "DISC_DOWNSTREAM" are specified with a temperature formula. When using the .XML file, although we can get correct temperature values as specified on these two walls, the "Tplus, Input_thermal_flux, Dimensionless_heat_flux" values are not correct. But when using the subroutine, the results turned to be correct.

Thanks for the help to fix the bug!

Best regards,
Ruonan
Attachments
cs_user_boundary_conditions.f90
(22.29 KiB) Downloaded 100 times
positive temperature profile one degree.xml
(13.18 KiB) Downloaded 108 times
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: A bug in the GUI

Post by Ruonan »

Hello Yvan,

I tested with the latest version from GitHub, the bug has been fixed. Thank you!

Best regards,
Ruonan
Post Reply