Groundwater Module - Neumann Boundary Condition Issue

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Farsh
Posts: 2
Joined: Tue May 13, 2025 11:02 am

Groundwater Module - Neumann Boundary Condition Issue

Post by Farsh »

Hi all,

I'm using CS v8.0.4.

I have set up a horizontal column to simulate the groundwater flow within it. No gravity, wall boundary condition on the sides, Dirichlet BC on both ends. Hydraulic heads on boundaries and the domain are set in a way to visualise the flow. (Setup0.xml)
setup0.xml
(7.21 KiB) Downloaded 185 times
Changing the boundary on one end to Neumann type with 0 flux. (Setup1.xml)
setup1.xml
(7.15 KiB) Downloaded 185 times
However, proceeding from this, changing the flux from 0 to any value raises this error. (Setup2.xml)
setup2.xml
(7.15 KiB) Downloaded 185 times

Code: Select all

/home/qwe/code_saturne/src/alge/cs_multigrid.c:4711: Fatal error.


algebraic multigrid [Hydraulic head]: divergence after 1 cycles:
  initial residual:         inf; current residual:         inf


Call stack:
   1: 0x7e4969fb9b0b <cs_multigrid_error_post_and_abort+0x11b> (libsaturne-8.0.so)
   2: 0x7e4969fcb9fe <cs_sles_solve+0x2de>            (libsaturne-8.0.so)
   3: 0x7e4969fccd95 <cs_sles_solve_native+0x4b5>     (libsaturne-8.0.so)
   4: 0x7e496a33fdf1 <__cs_c_bindings_MOD_sles_solve_native+0x133> (libsaturne-8.0.so)
   5: 0x7e496a2696b5 <richards_+0x33d8>               (libsaturne-8.0.so)
   6: 0x7e4969c9b260 <tridim_+0x2be3>                 (libsaturne-8.0.so)
   7: 0x7e4969ac92b3 <caltri_+0x17c0>                 (libsaturne-8.0.so)
   8: 0x7e496aaded88 <main+0x788>                     (libcs_solver-8.0.so)
   9: 0x7e4969832083 <__libc_start_main+0xf3>         (libc.so.6)
  10: 0x5ff0f9f4508e <_start+0x2e>                    (cs_solver)
End of stack

I have tried different values, either positive or negative, from the smallest to the larger values. I have even checked the mass flux (if it means water flux on the boundaries) from previous examples, trying to get a better grasp of the flux value, yet none of these worked.

I was wondering if there is something I am missing, knowing this might be a physical inconsistency rather.

Or if anyone knows of any other way I could apply Neumann BC for the groundwater module.


Best,
Farshid
Yvan Fournier
Posts: 4226
Joined: Mon Feb 20, 2012 3:25 pm

Re: Groundwater Module - Neumann Boundary Condition Issue

Post by Yvan Fournier »

Hello,

Do you also have some user-defined functions ?

Checking with a colleague developing this, your Van Genuchten ks value seems a bit high (in clay, it would be closer to 1e-2 or lower).

Also, the groundwater module used in the v8.0 GUI is obsolete, and replaced by the CDO-based module in v9.0. (In v8.0, both were available, with most work on the new module, but the GUI settings still used for the older module). The CDO-based groundwater module is a bit less user-friendly (currently available only through the GUI, or at least requiring a combination of GUI and user-defined sources settings), but is the module being worked on and still supported. So I definetely would suggest using that module instead, as is may be a bit more complex but more robust (the main reason for switching from classical 2-point finite volume schemes to the CDO-based ones being robustness on tetrahedral or other irregular meshes).

Best regards,

Yvan
Post Reply