Hello, everyone
I want to use pic module to simulate the gasification process of sludge and biomass. The solver was built successfully, but a strange floating-point exception error occurred when I run MFIX simulation. I didn’t know if it is caused by mesh quality, because this error did not occur before I switched to a cylindrical boiler.
I am not able to reproduce the same error you showed but I got an error due to re-indexing. Please turn off re-indexing. I am not sure what you are trying to do in usr1.f (you are accessing particle and cell data outside of a particle or cell loop and what you compute is not used anywhere), and it crashes immediately in debug mode.
#0 drag_gs_mod_MOD_drag_syam_obrien
at drag_gs.f:515
#1 des_drag_gp_mod_MOD_des_drag_gp
at des/drag_gp_des.f:229
...
Program terminated with signal SIGFPE, Arithmetic exception.
#0 drag_gs_mod::drag_syam_obrien (ldga=2.1348523916463698e+18,
epg=0.022340574725662081, mug=1.8e-05, rog=2.0115915930129507e+17,
vrel=0.00099583386699245375, dpm=0.00050000000000000001)
at /home/cgw/mambaforge/envs/mfix-git/share/mfix/src/model/drag_gs.f:515
515 lDgA = 0.75D0*Mug*EPg*C_DSXRE_DV(RE/V_RM)/(V_RM*DPM*DPM)
(gdb) p V_RM
$1 = 0
(gdb) p A
$2 = 1.4630210456148707e-07
(gdb) p RE
$3 = 5564475096887769
(gdb) p BB
$4 = <optimized out>
(gdb) p drag_c1*EPg**1.28D0
$5 = 0.0061649668266085915
We’re dividing by V_RM which is 0. Looking where this is computed:
477 ! Variables which are function of EP_g
478 DOUBLE PRECISION :: A, BB
479 ! Ratio of settling velocity of a multiparticle system to
480 ! that of a single particle
481 DOUBLE PRECISION :: V_rm
482 ! Reynolds number
483 DOUBLE PRECISION :: RE
484 !-----------------------------------------------
485
486 IF(Mug > ZERO) THEN
487 RE = DPM*VREL*ROg/Mug
488 ELSE
489 RE = LARGE_NUMBER
490 ENDIF
491
492 IF (RE == ZERO) THEN
493 lDgA = ZERO
494 RETURN
495 ENDIF
496
497 ! Calculate V_rm
498 A = EPg**4.14D0
499 IF (EPg <= 0.85D0) THEN
500 BB = drag_c1*EPg**1.28D0
501 ELSE
502 BB = EPg**drag_d1
503 ENDIF
504
505 V_RM=HALF*(A-0.06D0*RE+&
506 SQRT((3.6D-3)*RE*RE+0.12D0*RE*(2.D0*BB-A)+A*A) )
The Reynolds number 5564475096887769 is suspiciously large. And the computation of V_RM at 505 is perfectly balanced to come out to 0:
@jeff.dietiker
Thanks for your answer,I want to calculate the Sherwood number, Prandtl Number, Reynolds Number, Nusselt Number and the heat transfer coefficient in usr1.f, which might be used to further modify my reaction model in the future. I rewrote usr.f by referring to the tutorial shared by MFIX, mfix-22.4.3\share\mfix\templates\tutorials\pic\silane_pyrolysis_3d
Could that be the cause of the error?
@cgw
Hello Charles, thanks for your suggestion, I just replied to @jeff.dietiker about usr1.f. And I calculated the Reynolds number in usr1.f. I’m not sure if it is the reason caused the error.