Welcome, Guest
Username: Password: Remember me

TOPIC: Help on debugging an ice formation problem using Khione

Help on debugging an ice formation problem using Khione 8 months 3 weeks ago #44265

  • Andrea
  • Andrea's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi,

I am trying to run a case involving the formation of ice in a river with the KHIONE module, but the model always crashes with the error
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 60 RELATIVE PRECISION: NaN.
I ran telemac with the debugger, and you will be able to find the output in the file 'outardes_ice.cas_2024...sortie' (inside the zip folder Files.zip)

File Attachment:

File Name: Files.zip
File Size: 562 KB

. From the output, it seems the error lies in the CVDFTR subroutine, but I couldn't find why or how to fix it.
The river has an upstream inflow boundary condition and a downstream water level boundary condition, both varying in time (found in the file 'outardes_CFliquides.liq').
I have also implemented a tracer (for temperature) in both boundaries.

Does the error lie in the solver used, the treatment for tidal flats, or elsewhere? Any help will be greatly appreciated.
Thank you,
Andrea M.
The administrator has disabled public write access.

Help on debugging an ice formation problem using Khione 8 months 3 weeks ago #44286

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Andrea,

As told a few times in other posts, if a segmentation fault or a NaN (Not a Number) occurs, you should use a debug configuration with debug options to investigate.
See e.g. the S11.gfortran.debug configuration in the $HOMETEL/configs/systel.edf.cfg configuration file, in particular the flag fflags_debug_gfo for gfortran compiler.
fflags_debug_gfo: -g -Wall -fcheck=all -fbacktrace -fbounds-check -finit-integer=-1 -finit-real=nan -ffpe-trap=invalid,zero,overflow

It will show in which subroutine the issue/nan/segfault occurs, the first suspicious line and may help you to change something in your computation.

In your case, I have seen that you have negative depths in sources/khione/source_hydro_icover.f:
              IF( H%R(I).LT.EPS ) SP_EAU =
     &          MAX( SP_EAU, SQRT(GRAV*(EPS-H%R(I))*H%R(I)/EPS) )

which is not good.
You should better user TREATMENT OF NEGATIVE DEPTHS = 2 rather than 1 which allows negative depths (even slightly negative). You should then use SUPG OPTION = 0;0

Just after, I have seen that you use SCHEME FOR ADVECTION OF TRACERS = 1 (i.e. method of characteristics which is not conservative and shoud not be used for tracers). You can try scheme = 13 e.g. which works with tidal flats (but is quite diffusive).

Using 16 cores for only 7783 triangles in your mesh may be useless. I would be surprised that you get the best performances with so many cores.

Anyway, I would suggest you to use recommended option for the hydrodynamics part, described in the TELEMAC-2D user manual. I have not read your whole steering file carefully but you may use other not recommended options.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: Andrea

Help on debugging an ice formation problem using Khione 8 months 3 weeks ago #44291

  • Andrea
  • Andrea's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Yes, with these modifications, the code is now running with no error!
Thank you for your help Chi-Tuan!
The administrator has disabled public write access.

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.