Page 2 of 2

Re: Neumann condition for temperature in only one direction

Posted: Sun Apr 28, 2024 11:33 pm
by mmagain
Hi Yvan,

I switched to code_saturne V8.0 for simplicity as you suggested. The code now compiles but I get a SIGSEGV. I investigated the issue but I was unable to find what was wrong. Do you have any idea what might be wrong ?

Best,

Michael

compile.log
(10.64 KiB) Downloaded 468 times
run_solver.log
(38.32 KiB) Downloaded 477 times
cs_user_boundary_conditions.c
(7.94 KiB) Downloaded 473 times

Re: Neumann condition for temperature in only one direction

Posted: Wed May 01, 2024 6:29 pm
by mmagain
Hello,

I have been able to investigate further and it's really weird. I pinpointed the problem being with trying to do operations with double and cs_real_t (I think). For example

The code runs successfully if I write

Code: Select all

double dT_loc = T_loc; //Here T_loc is defined by cs_real_t T_loc = T[face_id] which does not cause sigsegv when isolated
but when I add one line to print dT_loc or do an operation with dT_loc like shown below I get SIGSEGV...

Code: Select all

double dT_loc = T_loc; 
cs_real_t hlv = 2257.*pow(dT_loc, 2.5); //This causes SIGSEGV,
I am really lost.

Best regards,

Michael

Re: Neumann condition for temperature in only one direction

Posted: Wed May 01, 2024 6:45 pm
by Yvan Fournier
Hello,

When behavior gets really strange like this, it probably means that there is some sort of error upstream of where the crash appears.

When switching to v8.0, did you align the user-defined function ? There may be a change in the arguments (a tool such as meld can be useful for this).

Otherwise, compiling a debug build (using --enable-debug) and runnning under Valgrind may help.

Best regards,

Yvan