How to add particles at runtime in a 2D simulate

Hello everyone, I just simulate a single particle impact some particle layer, and the automatic particle generation will not set the particle in the middle, so I try to add particles at runtime.I study the method in Customize adding particles at runtime.

But In my question is 2D, so when I use the same code, the solver report that the distance between wall and particle center equal to zero, I think the problem come from code “usr3_des.f” line 77-78, because I must appoint the position where particle emission.

If there are any other method can I achieve the function I want,my project is attached.
vgas3.5_2023-06-16T144309.071081.zip (75.7 KB)

The program operation results are as follows:

Welcome to MFiX - https://mfix.netl.doe.gov
MFiX-GUI version 23.1
Ready
Loading V15.5.mfx from D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U
Solver: MFiX-DEM
Reading mesh boundary: D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\VGAS3.5_boundary.vtk
Reading mesh stats: D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\MESH_STATS.LOG
Loaded V15.5.mfx
Mesh file VGAS3.5.msh not found
Solver: SMS Mesher
Previous MFiX run is resumable.  Reset job to edit model
Ready
Starting D:\Anaconda\envs\mfix-23.1\Scripts\mfixsolver.exe -f D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\mesh_afjqx6q0.mfx.tmp
Using d3.dll
Using D:/Anaconda/envs/mfix-23.1/lib/site-packages/mfix_solver/mfixsolver.so
 MFiX (23.1-0    ) simulation on host: DESKTOP-8MNC2MM
 Run name: VGAS3.5               Time: 14:24                    Date:  6-16-2023
 Project version: 142
Message from open_files.f:360
This is a rectangular geometry simulation.
Mesh generation will be performed.
No mesh file will be written, only the [RUN_NAME]_boundary.vtk file will be written.
 MESH STATISTICS:
 NUMBER OF CELLS          =     3000
 NUMBER OF STANDARD CELLS =     3000 (100.00 % of Total)
 NUMBER OF CUT CELLS      =        0 (  0.00 % of Total)
 NUMBER OF FLUID CELLS    =     3000 (100.00 % of Total)
 NUMBER OF BLOCKED CELLS  =        0 (  0.00 % of Total)
  WRITING VTU FILE : VGAS3.5_MESH.vtu .
...
 WROTE BOUNDARY IN VTK FILE : VGAS3.5_boundary.vtk
 PRE_PROCESSING COMPLETE.
Mesh accepted
ppo = False
Reading mesh stats: D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\MESH_STATS.LOG
Solver: MFiX-DEM
Reading mesh boundary: D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\VGAS3.5_boundary.vtk
project_version = '143'
Saving D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\V15.5.mfx
Starting D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\mfixsolver.bat -s -f D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\V15.5.mfx
MFiX running: elapsed time 0:00:00
(mfix-23.1) D:/MFIX/23.06.09_Single_injection/Vgas25.5/V15.5_4layer_U>call python -m mfix_solver.pymfix -d "D:/MFIX/23.06.09_Single_injection/Vgas25.5/V15.5_4layer_U" -s -f D:/MFIX/23.06.09_Single_injection/Vgas25.5/V15.5_4layer_U/V15.5.mfx
Using d3.dll
Using D:/MFIX/23.06.09_Single_injection/Vgas25.5/V15.5_4layer_U/mfixsolver.so
 MFiX (23.1      ) simulation on host: DESKTOP-8MNC2MM
 Run name: VGAS3.5               Time: 14:33                    Date:  6-16-2023
 Project version: 143
Message from open_files.f:360
This is a rectangular geometry simulation.
Mesh generation will be performed.
No mesh file will be written, only the [RUN_NAME]_boundary.vtk file will be written.
Message from check_data/check_solids_dem.f:741
At time =   0.000000E+00 sec., setting DEM solids time step, DTSOLID (sec) =   0.121854E-07
Message from check_data/check_geometry.f:191
DES grid size:
DESGRIDSEARCH_IMAX =       60
DESGRIDSEARCH_JMAX =       50
DESGRIDSEARCH_KMAX =        1
DES MPI send/recv buffer:     0.8 MB
 o   8192. Ghost particles/MB
 o   3855. Particles/MB
 o  11916. Neighbor pairs/MB
Pre-Processing geometry for DES.
DES geometry pre-processing complete.
 MESH STATISTICS:
 NUMBER OF CELLS          =     3000
 NUMBER OF STANDARD CELLS =     3000 (100.00 % of Total)
 NUMBER OF CUT CELLS      =        0 (  0.00 % of Total)
 NUMBER OF FLUID CELLS    =     3000 (100.00 % of Total)
 NUMBER OF BLOCKED CELLS  =        0 (  0.00 % of Total)
  WRITING VTU FILE : VGAS3.5_MESH.vtu .
... WROTE BOUNDARY IN VTK FILE : VGAS3.5_boundary.vtk
 PRE_PROCESSING COMPLETE.
Initial DES Particle array size: 480
Message from set_bc0.f:549
   Compressible: IJK_P_g remaining undefined.
Message from des/read_particle_input.f:107
Reading DEM particle input file version: 2.0
Detecting number of columns from the first line in the data.
Expected number of columns =  3
Detected number of columns =  3
The following filters are applied to particle data:
    Phase  1: EXCLUDE particles belonging to Phase  1
No filter is applied.
Message from des/read_particle_input.f:584
Number of particles read from particle_input.dat  =       480
Number of particles left after filtering the data =       480
Beginning DEM settling period: 0 steps.
DEM settling period complete.
  For mass inlet BC:   4
    No. particles injected per solids time step =  1.44288359E-05
    No. particles injected per second =       1184
    PI_FACTOR =  6.93056641E+04 PI_COUNT =     1
    start DES_MI_TIME =  8.44514198E-04
 t=    0.000000 Wrote .RES; DES.RES;
  WRITING VTP FILE : BACKGROUND_IC_0000.vtp .
.... VTP file not written (zero particles in vtk region).
  WRITING VTU FILE : BACKGROUND_IC_1_0000.vtu .
..  WRITING VTP FILE : BACKGROUND_IC_2_0000.vtp .
.... Time =      0.00000  Dt =  0.10000E-05
  Nit     P0        U0        V0     Max res
    1   5.1E-10   7.9E-05    0.        U0
    2   8.8E-02   5.9E-02   2.2E-07    P0
Previous MFiX run is resumable.  Reset job to edit model
    3   5.1E-02   3.2E-02   1.2E-07    P0
    4   2.9E-02   1.7E-02   6.3E-08    P0
    5   1.6E-02   9.2E-03   3.4E-08    P0
    6   9.3E-03   4.9E-03   1.8E-08    P0
    7   5.3E-03   2.6E-03   1.0E-08    P0
    8   3.1E-03   1.4E-03   5.5E-09    P0
    9   1.8E-03   7.7E-04   3.1E-09    P0
   10   1.0E-03   4.2E-04   1.7E-09    P0
   11   5.9E-04   2.3E-04   9.5E-10    P0
   12   3.4E-04   1.3E-04   5.3E-10    P0
   13   2.0E-04   7.0E-05   3.0E-10    P0
   14   1.2E-04   3.9E-05   1.7E-10    P0
   15   6.7E-05   2.2E-05   9.5E-11    P0
   16   3.9E-05   1.2E-05   5.4E-11    P0
   17   2.3E-05   6.7E-06   3.1E-11    P0
   18   1.3E-05   3.8E-06   1.7E-11    P0
   19   7.8E-06   2.1E-06   9.9E-12    P0
 t=     0.0000 Dt= 0.1000E-05 NIT= 19 Sm=  0.0000    CPU=      0.s
   Mass imbalance%(0,MMAX): -0.2188E-06
Timestep walltime, fluid solver:    0.134 s
DEM NITs: 83   Total PIP: 480
  WRITING VTP FILE : BACKGROUND_IC_0001.vtp .
.... VTP file not written (zero particles in vtk region).
  WRITING VTP FILE : BACKGROUND_IC_2_0001.vtp .
.... ==================================> INJECTING NEW PARTICLE <======================================
    NITs/SEC = 1541.
Timestep walltime, DEM solver:      0.054 s
  Time (s)    DT (s)  CV  NIT Max Residual    Fluid       DEM       NITs      PIP        Elapsed      Left
      0.0000  0.10E-05  C  19 P0=0.78E-05     0.13s       0.05s         83         480    0.19s       0.00s
  WRITING VTU FILE : BACKGROUND_IC_1_0001.vtu .
.. Time =      0.00000  Dt =  0.10000E-05
  Nit     P0        U0        V0     Max res
    1   6.0E-10   0.3       1.5E-06    U0
    2   0.3       6.6E-02   6.7E-07    P0
    3   0.2       3.4E-02   3.7E-07    P0
    4   9.2E-02   1.8E-02   2.1E-07    P0
    5   5.3E-02   9.9E-03   1.1E-07    P0
    6   3.0E-02   5.5E-03   6.4E-08    P0
    7   1.8E-02   3.0E-03   3.6E-08    P0
    8   1.0E-02   1.7E-03   2.0E-08    P0
    9   5.9E-03   9.3E-04   1.1E-08    P0
   10   3.4E-03   5.2E-04   6.3E-09    P0
   11   2.0E-03   2.9E-04   3.5E-09    P0
   12   1.2E-03   1.6E-04   2.0E-09    P0
   13   7.1E-04   8.9E-05   1.1E-09    P0
   14   4.2E-04   5.0E-05   6.2E-10    P0
   15   2.5E-04   2.8E-05   3.5E-10    P0
   16   1.5E-04   1.5E-05   1.9E-10    P0
   17   9.2E-05   8.6E-06   1.1E-10    P0
   18   5.6E-05   4.8E-06   6.3E-11    P0
   19   3.4E-05   2.7E-06   3.6E-11    P0
   20   2.0E-05   1.5E-06   2.1E-11    P0
   21   1.2E-05   8.7E-07   1.3E-11    P0
   22   7.5E-06   4.9E-07   7.4E-12    P0
Timestep walltime, fluid solver:    0.104 s
DEM NITs: 83   Total PIP: 481
Error from des/calc_collision_wall_mod.f:253
Error: solver crash!
The MFiX solver has terminated unexpectedly
Error information:
**float divide by zero in __calc_collision_wall_MOD_calc_dem_force_with_wall_stl**
  at des/calc_collision_wall_mod.f:253
Reading mesh stats: D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\MESH_STATS.LOG
Reading mesh boundary: D:\MFIX\23.06.09_Single_injection\Vgas25.5\V15.5_4layer_U\VGAS3.5_boundary.vtk

Code for error location line 253:

Where do you want to inject particles from? Right now your setup injects the particle at x=y=z=0 and the particle moves in the x-direction. If yo uwant to inject them from the side, just use a boundary condition.

thank you, I want to inject the particle at x=xmax,y=ymax, I just set the PIJK(LS,), but do not set the DES_POS_NEW(LS,), I want to know what the difference between the two variables.