Dear developer,
When I calculated the pyrolysis reaction of particles in the fluidized bed, MFiX-22.3.1 prompted “exception: float invalid operation”, but I can’t find the cause. Could you help me check it?
Thank you very much!
reactionheat_2023-02-01T155807.037782.zip (59.3 KB)
Hi @NJIFE
I see that you are running on Windows. It is always harder to debug on that platform. In the 23.1 release we expect to have better reporting for these kinds of errors.
I ran your case on Linux and here’s the stack trace:
Backtrace for this error:
#0 calc_k_g_mod_MOD_calc_default_kg
at calc_k_g.f:76
#1 calc_k_g_mod_MOD_calc_k_g
at calc_k_g.f:32
#2 transport_prop_mod_MOD_transport_prop
at transport_prop.f:65
#3 calc_coeff_mod_MOD_calc_coeff
at calc_coeff.f:344
#4 calc_coeff_mod_MOD_calc_coeff_all
at calc_coeff.f:272
#5 step_MOD_time_step_init
at time_step.f:89
#6 run_fluid
at mfix.f:184
#7 run_mfix
at mfix.f:143
#8 main_MOD_run_mfix0
at main.f:79
Line 76 in calc_k_g.f
:
K_G(IJK) = 6.02D-5*SQRT(T_G(IJK)/300.D0)
I suspect that we’re trying to take a square root of a negative value. Running the gdb
debugger (currently unavailable on Windows, sorry) confirms this:
76 K_G(IJK) = 6.02D-5*SQRT(T_G(IJK)/300.D0)
[Current thread is 1 (Thread 0x7f7f7226e6c0 (LWP 31939))]
(gdb) print ijk
$1 = 508
(gdb) print t_g(ijk)
$2 = -2926.3259365102585
(gdb)
So now we just have to figure out how we got such a temperature.
– Charles
OK,thanks a lot. I want to make two suggestions for the future version of mfix :1. It is expect to add a function to monitor the heat of chemical reaction;2. Could a function “virtual surface” be added. The virtual surface can inject particles quantitatively according to the quantity or quality of particles per second, without disturbing the fluid flow in the reactor.
Hi - thanks for the suggestions.
A monitor for heat of reaction has been suggested a few times here, it’s a good idea and we’re planning on adding it, hopefully in time for the 23.1 release (Mar/Apr).
If I understand the second suggestion correctly, I think you can implement this via a “Point source”. This might be a bit of a misnomer since they are not restricted to single points, they can be defined for extended objects (surface/box).
Thank you for your patience. However, In MFiX-DEM mode, the “point source-solid1” seems to be unavailable. I sincerely hope that this key function can be improved and expanded.
You are correct - point sources can be defined for TFM solids only, as the message in the GUI indicates. Sorry, I did not notice you are using DEM not TFM.
I reviewed the MFiX specification document and found this sentence:
At this time, only TFM solids can be defined with point sources. At some point in the future, this could be extended to PIC solids, but never DEM.
So it seems that there is an unavoidable obstacle to implementing DEM point sources. I’m not completely sure of the reason for this, will follow up if I find out more.
It might be possible to do what you want with a UDF. However, whenever adding particles to a system you have to be extremely careful to avoid overlaps.
Thanks for the feedback
– Charles
As Charles mentioned, it is complicated to inject DEM particles inside the domain as point sources because of the possible overlap with existing particles.
OK. Thank you for the guidance.
OK. Thank you for your guidance.
Additionally,I wonder if there is a correspondence between the “mass flow rate” and the “velocity" in “Point sources-fluid”. The mass flow rate can be calculated by the velocity. However, the mfix requires that both values should be filled in. It is not clear who has the higher priority. Thanks!
Mass flow rate is enforced. Velocity components are used to estimate the velocity direction, but is not strictly enforced (it depends of existing fluid/solids velocity in the cell).