Float invalid operation due to negative temperature

Please select the most relevant MFiX category: | Installation | How to | Bug report | Share | for this topic.
fyp2d_dem_model_2024-11-11T163501.890050.zip (322.0 KB)

Why is there a “float invalid operation” ? And any ideas on how to solve convergence problems ?

We get better debug information on Linux:

Error: Unexpected solver message:
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
Backtrace for this error:
#0 calc_k_g_mod_MOD_calc_default_kg
        at calc_k_g.f:76
#1 calc_k_g_mod_MOD_calc_k_g
        at calc_k_g.f:32
#2 transport_prop_mod_MOD_transport_prop
        at transport_prop.f:65
#3 calc_coeff_mod_MOD_calc_coeff
        at calc_coeff.f:344
#4 calc_coeff_mod_MOD_calc_coeff_all
        at calc_coeff.f:272
#5 step_MOD_time_step_init
        at time_step.f:93
#6 run_fluid
        at mfix.f:186
#7 run_mfix
        at mfix.f:145
#8 main_MOD_run_mfix0
        at main.f:85

Using the gdb debugger:

Program terminated with signal SIGFPE, Arithmetic exception.

#0  0x00007f067f5dd82f in calc_k_g_mod::calc_default_kg ()

at mfix/src/model/calc_k_g.f:76
76	            K_G(IJK) = 6.02D-5*SQRT(T_G(IJK)/300.D0)

(gdb) print(ijk)
$1 = 159
(gdb) print(t_g(ijk))
$2 = -534.61044673739423

The temperature has gone negative in this cell.
I’m not sure why this has happened or why it was not trapped as non-physical before the SQRT call.

Thank you for your help. I’ll try to figure out why.

A few things you can try:

  1. Use Implicit Euler instead of Crank Nicholson for time integration
  2. Reducer the size of the cells in the y-direction (current aspect ratio is 10)
  3. Double check pressure for IC and BCs (currently close to 10 atm)
  4. Use ideal gas density (incompressible gas is not appropriate here)
1 Like