Symmetric Gauss-Seidel: error (divergence) solving for TempK

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
hyder4
Posts: 22
Joined: Tue Apr 04, 2023 12:06 am

Symmetric Gauss-Seidel: error (divergence) solving for TempK

Post by hyder4 »

Hi,
I am using Code_saturne version 7.1.2. and trying to solve 2D convergent nozzle. I met with the following error.

{
Symmetric Gauss-Seidel: error (divergence) solving for TempK


Call stack:
1: 0x14e241e721da <cs_sles_it_error_post_and_abort+0x8a> (libsaturne-7.1.so)
2: 0x14e241e67322 <cs_sles_solve+0x2d2> (libsaturne-7.1.so)
3: 0x14e241e683ab <cs_sles_solve_native+0x3db> (libsaturne-7.1.so)
4: 0x14e241a615d5 <cs_equation_iterative_solve_scalar+0xc15> (libsaturne-7.1.so)
5: 0x14e241a1e943 <covofi_+0x4d11> (libsaturne-7.1.so)
6: 0x14e241b6db72 <scalai_+0x8ff> (libsaturne-7.1.so)
7: 0x14e241b78c95 <tridim_+0x4581> (libsaturne-7.1.so)
8: 0x14e2419e7ff1 <caltri_+0x1c8b> (libsaturne-7.1.so)
9: 0x14e242af1ec3 <main+0x6f3> (libcs_solver-7.1.so)
10: 0x14e2404084a3 <__libc_start_main+0xf3> (libc.so.6)
11: 0x40194e <_start+0x2e> (cs_solver)
End of stack
}
It occurred when I use pressure gradient in source_terms.c user subroutine.
I also tried to run it on 7.3.0 version and it gave me the same error.
I have attached the subroutine and log file.
Thanks.

Kind regards,
Hyder.
Attachments
cs_user_source_terms-base.c
(6.32 KiB) Downloaded 37 times
run_solver.log
(23.91 KiB) Downloaded 38 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Symmetric Gauss-Seidel: error (divergence) solving for TempK

Post by Yvan Fournier »

Hello,

Using only explicit source terms can lead to instability.

It might be interesting to test by removing only the ST on enthalpy (since that is the variable which diverges first), and if that removes the isse, restore it but multiplying by a factor < 1... Then see up to which factor (i.e. source term strength the computation is OK). If that is the issue, using a ramp in time to add the source term gradually or smaller time steps (at start) might work.

Best regards,

Yvan
hyder4
Posts: 22
Joined: Tue Apr 04, 2023 12:06 am

Re: Symmetric Gauss-Seidel: error (divergence) solving for TempK

Post by hyder4 »

Hello,
I used the ideal gas equation to define pressure gradient in terms of density and temperature to get an implicit source term, this solved the problem.
Thanks.
Best,
Hyder.
Post Reply