Floating Point Error - TFM - STL geometry

Hi developers,

I’m trying to model isothermal solid-gas flows in a pipe using MFiX-TFM. The geometry is based on an STL file. The direction of flow of both solid and gas, and gravity is in the same direction. The velocities and volume fractions of the solid-gas phase are specified at inlet. A pressure outlet is assigned and slip/no-slip walls on the remaining faces of the STL geometry. The pipe is initially packed with solid particles packing fraction of 0.6. After executing the solver, I obtained the following error: Program received signal SIGFPE: Floating-point exception -erroneous arithmetic error, etc… I attach the .stl and .mfx files for your perusal.

Thank you very much for your kind assistance and time.

Inlet.stl (99.5 KB)
NoSlipWalls.stl (4.1 MB)
Outlet.stl (97.5 KB)
SlipWalls.stl (4.1 MB)
test2.mfx (10.3 KB)

Thanks for the thorough bug report. This problem is 100% reproducible, we are investigating.

– Charles

#0  drag_gs_mod::drag_syam_obrien (ldga=1.5865650569174686e+19, epg=0.40000000000000002, mug=1.8e-05, rog=1, vrel=2014753155392531.2, dpm=0.00035)
    at /home/cgw/mambaforge/envs/mfix-22.2.1/share/mfix/src/model/drag_gs.f:504
504	      lDgA = 0.75D0*Mug*EPg*C_DSXRE_DV(RE/V_RM)/(V_RM*DPM*DPM)
(gdb) p v_rm
$5 = 0
(gdb) p vrel
$6 = 2014753155392531.2

Line 504 is where we divide by v_rm (twice in fact), and this is the immediate cause of the floating-point error, since v_rm is zero.

But I’m not sure why this is happening. The value of vrel looks suspicious.
Here’s where vrel is computed

! Calculate velocity components at i, j, k
            UGC = AVG_X_E(U_G(IMJK),U_G(IJK),I)
            VGC = AVG_Y_N(V_G(IJMK),V_G(IJK))
            WGC = AVG_Z_T(W_G(IJKM),W_G(IJK))

            USCM = AVG_X_E(U_S(IMJK,M),U_S(IJK,M),I)
            VSCM = AVG_Y_N(V_S(IJMK,M),V_S(IJK,M))
            WSCM = AVG_Z_T(W_S(IJKM,M),W_S(IJK,M))

! magnitude of gas-solids relative velocity
            VREL = SQRT((UGC-USCM)**2 + (VGC-VSCM)**2 + (WGC-WSCM)**2)

Back in the debugger,

$23 = 0
(gdb) p v_g(ijk)
$24 = -745660110275410
(gdb) p w_g(ijk)
$25 = -2157698105234337
(gdb) p ijk
$26 = 9221

First, I think your normals are pointing in the wrong direction. Second, you should use plane BCs for the inlet and outlet, this will give you a much better mesh (don’t use STLs for the inlet and outlet, use plane regions at z=zmin and z=zmax). Please see 3.21. SMS meshing workflow, cyclone, Discrete Element Model (DEM) — MFiX 22.2 documentation for an example.

1 Like

Thank you very much Charles and Jeff for your detailed response. The information you provided is very helpful. I’ll try and rectify the issue by following your advice/suggestions. I’ll keep you posted. Thanks.

Hi all,

I’ve made some modifications to the simulation (just to recap - I’m simulating solid-gas flows in a pipe - both phases moving in the same direction under the action of gravity). I’m now considering a simple geometry in the form of a rectangular cuboid and using plane boundary conditions (B.C.s) for the inlet and outlet, as Jeff suggested. No STLs are used in the new case. So basically, top and bottom have inlet velocity and pressure outlet B.C.s, and all other faces have no-slip wall B.C. The initial condition of the box (packed bed) is: 55% solids volume fraction. With the B.C., the inlet has solids volume fraction 55% moving at 0.05 m/s. Domain dimensions = 152mm x 40mm x 20mm. Solid phase properties i.e. 350 micron particle diameter and 2600 kg/m^2 density.

Note that I used the 3D TFM square fluid bed as a starting point and modified the simulation settings accordingly. For one second simulation it takes very long time to reach convergence. Simulation diverges later on (simulation diverges/stalled message). I’m not too sure what is causing the problem.

What do you think?

Setup file attached.
Testing3.mfx (12.7 KB)

Also, note that simulation was run multithreaded using DMP option - 40 cores.

Thank you very much for your kind assistance and time.