An error about using solve_k_epsilon

BUG REPORTType of issueSolver crash

Error: Solver crash! The MFiX solver has terminated unexpectedly Error information: float divide by zero in __solve_k_epsilon_eq_mod_MOD_source_k_epsilon_bc at solve_k_epsilon_eq.f:375

B_M(IJK,M) =-((0.09D+0)**0.75K_Turb_G(IJK)**1.5)/& (0.42D+0DELH_Scalar(IJK))

The calculated value of the denominator should never be zero, and what does 0*DELH_Scalar(IJK) mean?It appears that this value is always equal to 0.

Hi @ma3498944 and welcome to the MFiX forum. Thanks for the bug report.

First off -

The expression 0.42D+0 is a Fortran double-precision constant - the D signifies double, and the +0 is the exponent. This is just 0.42. And the code has:
0.42D+0 * DELH_Scalar(IJK)
so DELH_Scalar is not being multiplied by 0, it’s being multiplied by 0.42.

In modern Fortran it is not necessary to write 0.42D+0, one can just write 0.42 but older versions of Fortran would carry out computations in single-precision unless double-precision constants were used, so many authors prefer to continue to write constants in this way.

Second -

please go to the main menu in MFiX and select “Submit bug report”, this will generate a ZIP file which you can upload here, and we can look further into the problem.

I can’t thank you enough for your help! Thanks to you, my problem has been solved!

Hi, @ma3498944 , May I know how you solved the problem ?
I have changed the
B_M(IJK,M) =-((0.09D+0)**0.75K_Turb_G(IJK)**1.5)/&
(0.42D+0 * DELH_Scalar(IJK))
B_M(IJK,M) =-((0.09D+0)**0.75
(0.42 * DELH_Scalar(IJK)),
but it still shows the error.

Yes, I resolved the issue. I shrunk the fluid domain a bit and the problem disappeared.

Note that 0.42D+0 and 0.42 are the same thing. This is a Fortran notation for exponential-notation with double precision.

Thank you very much for your suggestions.