Neumann condition for temperature in only one direction

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
mmagain
Posts: 10
Joined: Mon Jan 15, 2024 9:20 pm

Re: Neumann condition for temperature in only one direction

Post 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 130 times
run_solver.log
(38.32 KiB) Downloaded 134 times
cs_user_boundary_conditions.c
(7.94 KiB) Downloaded 137 times
mmagain
Posts: 10
Joined: Mon Jan 15, 2024 9:20 pm

Re: Neumann condition for temperature in only one direction

Post 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
Yvan Fournier
Posts: 4157
Joined: Mon Feb 20, 2012 3:25 pm

Re: Neumann condition for temperature in only one direction

Post 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
Post Reply