Arithmetic operation error occurs when a chemical reaction is initiated

Dear developers, I am conducting a simulation of chemical reactions in the DEM. I encountered a problem. The calculation could proceed normally at the beginning, but when the calculation time reached around 8.5 seconds, an error occurred, indicating “Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
Backtrace for this error:
#0 leq_bicgs_mod_MOD_leq_bicgs0
at leq_bicgs.f:404
#1 leq_bicgs_mod_MOD_leq_bicgs
at leq_bicgs.f:91
#2 solve_lin_eq_mod_MOD_solve_lin_eq
at solve_lin_eq.f:165
#3 solve_species_eq_mod_MOD_solve_species_eq
at solve_species_eq.f:192
#4 iterate_MOD_do_iteration
at iterate.f:367
#5 run_fluid
at mfix.f:187
#6 run_mfix
at mfix.f:142
#7 main_MOD_run_mfix0

at main.f:83
#8 start_thread
At /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477 ”, The error persists even after I tried recalculating, and it still occurs around this simulation time. The attachment contains the materials . Thank you for your assistance.

dem_2026-05-08T103610.780643.zip (45.5 MB)

When I tried to run this I got over 15,000 errors. Most of them are the same message, getting printed for each particle:

Also note:

$ ls ROgErr_00*
ROgErr_0021.log  ROgErr_0022.log  ROgErr_0029.log  ROgErr_0030.log

$ cat ROgErr_0021.log 
  One or more cells have reported a negative/NaN gas density (RO_g(IJK)). If
  this is a persistent issue, lower keyword UR_FAC(1).

  Simulation time:   7.5187    

    IJK:      312       I:   20  J:   63  K:    2
      RO_g: -0.90663E-01  P_g: -0.15919E+06  T_g:   934.24    

Thank you for your reply.
I encountered the problem mentioned above around 8.57 seconds later. Then, I uploaded the aforementioned compressed file generated through the built-in packaging function of MFiX. However, the generated compressed file was quite large, so I deleted some content and re-packaged and uploaded it. I’m not sure if my operation has caused any additional problems.

On my computer, when I restarted the calculation, I could continue the previous erroneous calculation, but it would terminate with the same illegal operation error after a short while. Apart from that, I didn’t see any other error messages. Regarding the “One or more cells have reported a negative/NaN gas density (RO_g(IJK)). If” mentioned by you, this is a persistent issue, lower keyword UR_FAC(1).” Could this be due to the presence of an ideal gas? Or is it caused by the excessively high reaction rate within the cells, resulting in the gas consumption exceeding the amount of gas present in the cells? What measures should I take to solve this problem?

Additionally, for some unknown reason, I am unable to load all the images on the forum, including the ones you replied with just now. Thank you again. Looking forward to your reply.

You should see the output gets flooded with this kind of message:

Warning 1000: Overconsumption of solid species occurs in the particle.
Its source term will be set to its amount in the particle.
To resolve this issue, please consider:
 a) Using stiff solver in the Chemistry pane
 b) Reducing the reaction rates
 c) Reducing the time step
Global particle ID:    2185
Species index:       3

This indicates the reaction rates are very large. Please switch to the stiff solver and verify your reaction rates are correctly implemented.

Thank you for your reply.
You mentioned this and I did notice it. During the process of debugging the code, I also adopted some methods to handle it and no similar warnings occurred anymore. However, after a certain period of calculation, approximately 8 seconds later, the problem of illegal operation would still arise.

I don’t know how to solve the problem of illegal operation at present. I also encountered similar situations when using the rigid solver. I sincerely hope to receive your reply again. Thank you.

What exactly did you do? If it still occurs with the stiff solver, then the reaction rates may still be too large. Please attach the actual setup (latest version) that crashes if you want someone to take a look.

Thank you for your reply. The relevant contents have been packed into the attachment. Looking forward to your assistance.

dem_2026-05-06T234208.852726.zip (47.0 MB)

Furthermore, I have another question. In MFiX, when the reaction rate of the particles within the unit is too fast, will the consumption of gas exceed the original total amount of reaction gas within the unit? How does MFiX handle this situation?

Hello, the case I prepared is above. I’m looking forward to your assistance.

You still have not turned the stiff solver on. Please use the stiff solver to see if it helps.