A BC outlet act as an inlet for the DEM partiicles

Hi,guys;I see the code as follows. I want to set the number of particles at the outlet to the number of particles at the inlet in the DEM simulation, so that the number of particles in the bed is the same. How should I set this? If the code is changed, where can the code of import and export particles be found? Thanks.
image

This is an ill-defined boundary condition. There is no guarantee there are enough particles near the outlet to satisfy this constraint.