DES_RATES Run Problem (Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.)

,

Hi Ahmet

Thanks for providing a detailed problem report. The stack trace is long, but the important part is the first 5 or 6 stack frames, once you get below run_mfix and into the PyObject stuff there’s nothing of interest - I should probably hide that part in the output. And the first couple of ??? lines which are junk.

The important line is

 #3 0x7f5b9d54d1ac in usr_rates_des_
at /home/akececi/mfix/silane_pyrolysis_pic_3d_0201/usr_rates_des.f:317

(Those file names should be clickable, and go to the relevant line in the editor … I’ll work on that).

Line 317 in your usr_rates_des.f reads

DES_RATES(moisture_release_1) = 6105.92107819465d0 * ROP_s(IJK,1) * X_s(IJK,1,COALMOISTURE_1) *  rate_limit(X_s(IJK,1,COALMOISTURE_1)) * exp (-10668.847726726d0 / min(T_s(IJK,1), 2500d0))

That’s a long line, I suggest breaking things up a little. But I see that you are dividing:

/ min(T_s(IJK,1), 2500d0)

My immediate suspicion is a zero-division - if T_s reaches zero, there’s nothing there to prevent that, since 0 < 2500

To confirm this you could try to use a debugger to look at the core file, or just use a simple print statement. I added this right before line 317 and it confirmed my suspicion, you are attempting to divide by 0

    write (*,*) "T=", T_s(IJK,1)

prints

    T=   0.0000000000000000 

in the console, right before failing.

We could improve the debugging facilities in MFiX, but this is the general approach I use.

- Charles
2 Likes