streamwise periodicity

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Yvan Fournier
Posts: 4245
Joined: Mon Feb 20, 2012 3:25 pm

Re: streamwise periodicity

Post by Yvan Fournier »

Hello,

The old Fortran "divmas" subroutine was the equivalent of the current cs_divergence function, so assuming the reference uses the output od that function for the "divmas" term, you could use the output of cs_divergence to compute that.

Hoping this helps (as I have not delved into the theory for that part, but only in the code's naming changes).

Best regards,

Yvan
ximeng
Posts: 35
Joined: Sun Jan 22, 2023 3:28 pm

Re: streamwise periodicity

Post by ximeng »

Hi Yvan,

Thanks for your reply. Do you have any example using cs_divergence?

I implemented it based on the general documentation from the source file, but the simulation freezes at the first step and stops with the following error:

SIGSEGV signal (forbidden memory area access) intercepted!
Call stack:
1: 0x402cb6 <cs_user_source_terms+0x756> (cs_solver)
2: 0x14d1786822c9 <covofi_+0x11f9> (libsaturne-8.0.so)
3: 0x14d17880f499 <scalai_+0x1185> (libsaturne-8.0.so)
4: 0x14d178815c1b <tridim_+0x4401> (libsaturne-8.0.so)
5: 0x14d17864e965 <caltri_+0x17fe> (libsaturne-8.0.so)
6: 0x14d179798252 <main+0x762> (libcs_solver-8.0.so)
7: 0x14d171bb329d <__libc_start_main+0xef> (libc.so.6)
8: 0x401e2a <_start+0x2a> (cs_solver)
End of stack

I’ve attached the source file and the run_solver.log for reference. Could you please suggest what might be causing the segmentation fault?

Best regards,
Ximeng
Attachments
run_solver.log
(27.34 KiB) Downloaded 11 times
cs_user_heatsourceterm_new5_cs_divergence.c
(4.74 KiB) Downloaded 9 times
Yvan Fournier
Posts: 4245
Joined: Mon Feb 20, 2012 3:25 pm

Re: streamwise periodicity

Post by Yvan Fournier »

Hello,

For this, the bet solution is probably to use a debug build (compiled with --enable-debug), and run it under a debugger to pinpoint the issue (see https://www.code-saturne.org/documentat ... _debugging).

Best regards,

Yvan
Post Reply