Species mass fraction issues mfix-21.2 and newer version

I have been trying to port some simulation setups from mfix-21.1.4 to newer versions, the latest attempt being for mfix-22.1. Each time I run my cases using newer mfix versions (starting with mfix-21.2) I get a floating-point exception. In most cases, I have successfully run these cases with mfix-21.1.4 without the floating-point exception. Using gdb, I have traced this error to my usr_properties.f module. There, I define an array to collect the mass fraction of all the species and subsequently use the sum as a denominator in an equation. For some reason, the sum of the mass fraction of all the species returns zero and generates the floating-point exception.

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

Program received signal SIGFPE: floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0  0x2B013949CC67
#1  0x2B013949BE60
#2  0x2B0139F303FF
#0  0x2B5DCB865C67
#1  0x2B5DCB864E60
#2  0x2B5DCC2F93FF
#0  0x2AEFB77D4C67
#1  0x2AEFB77D3E60
#2  0x2AEFB82683FF
#0  0x2BA61297AC67
#1  0x2BA612979E60
#2  0x2BA61340E3FF
#3  0x407C65 in usr_prop_mug_ at usr_properties.f:72
#3  0x407C65 in usr_prop_mug_ at usr_properties.f:72
#3  0x407C65 in usr_prop_mug_ at usr_properties.f:72
#3  0x407C65 in usr_prop_mug_ at usr_properties.f:72
#4  0x492AC4 in __usr_prop_MOD_calc_usr_prop at usr_prop_mod.f:158
#4  0x492AC4 in __usr_prop_MOD_calc_usr_prop at usr_prop_mod.f:158
#4  0x492AC4 in __usr_prop_MOD_calc_usr_prop at usr_prop_mod.f:158
#4  0x492AC4 in __usr_prop_MOD_calc_usr_prop at usr_prop_mod.f:158
#5  0x6698E2 in __calc_mu_g_mod_MOD_calc_mu_g at calc_mu_g.f:39
#6  0x5D60E4 in __transport_prop_mod_MOD_transport_prop at transport_prop.f:64 (discriminator 1)
#7  0x499EEF in __calc_coeff_mod_MOD_calc_coeff at calc_coeff.f:344
#8  0x524C20 in __iterate_MOD_do_iteration at iterate.f:241
#5  0x6698E2 in __calc_mu_g_mod_MOD_calc_mu_g at calc_mu_g.f:39
#6  0x5D60E4 in __transport_prop_mod_MOD_transport_prop at transport_prop.f:64 (discriminator 1)
#5  0x6698E2 in __calc_mu_g_mod_MOD_calc_mu_g at calc_mu_g.f:39
#6  0x5D60E4 in __transport_prop_mod_MOD_transport_prop at transport_prop.f:64 (discriminator 1)
#5  0x6698E2 in __calc_mu_g_mod_MOD_calc_mu_g at calc_mu_g.f:39
#6  0x5D60E4 in __transport_prop_mod_MOD_transport_prop at transport_prop.f:64 (discriminator 1)
#7  0x499EEF in __calc_coeff_mod_MOD_calc_coeff at calc_coeff.f:344
#7  0x499EEF in __calc_coeff_mod_MOD_calc_coeff at calc_coeff.f:344
#9  0x4854B6 in run_fluid at mfix.f:188
#10  0x485BCD in MAIN__ at mfix.f:298
#8  0x524C20 in __iterate_MOD_do_iteration at iterate.f:241
#8  0x524C20 in __iterate_MOD_do_iteration at iterate.f:241
#7  0x499EEF in __calc_coeff_mod_MOD_calc_coeff at calc_coeff.f:344
#9  0x4854B6 in run_fluid at mfix.f:188
#10  0x485BCD in MAIN__ at mfix.f:298
#8  0x524C20 in __iterate_MOD_do_iteration at iterate.f:241
#9  0x4854B6 in run_fluid at mfix.f:188
#10  0x485BCD in MAIN__ at mfix.f:298
#9  0x4854B6 in run_fluid at mfix.f:188
#10  0x485BCD in MAIN__ at mfix.f:298

Hi Oluwafemu. We have not seen this particular problem before. Please attach your project files (“Submit bug report”) if you want us to look into this.
Thanks.

1 Like

Thank you, Charles. I have not been able to replicate the same error in the setups I ran to submit :grinning: However, a couple of other floating-point exceptions were raised in my last two setups.

Attached are the project files for your reference. Each project was tested with mfix-22.1 and contains a stderr.txt file showing the exception message and a mfixsolver.out file showing the log of the run.
test-mfix-22.1-first.zip (528.9 KB)
test-mfix-22.1-second.zip (4.2 MB)

I should note that both setup ran seamlessly in mfix-21.1.4.

Hi Oluwafemi -

I have been running “test-mfix-22.1-first” since yesterday, and haven’t seen a crash or FPE.

Note that even though the simulation sped up a bit after a few hours (see plot above), the estimated time until completion is still over 100 days, so unless you parallelize this or change something, I don’t think you will get it to run until completion. How long did it run for you before you saw the FPE?

Also note the “12 warnings”:

After a while these mass fraction warnings start to pop up.

mfix - WARNING - The sum of mass fractions is not equal to one.

Note that your example case has a very large number of reactions (97)- more than I have ever seen in an MFiX simulation. The maximum number allowed is 100 but this is not typical usage, and you are pushing MFiX to its limits here, and I’m not too surprised if you’re running into trouble. One thing to do is try running with reactions disabled and see if the FPE persists. If you can possibly simplify the model of the chemistry, that would be helpful.

I have not run test-mfix-22.1-second, I’ll try that one next.

– Charles