Here’s a comparison of the box method, the plane method from the 25.1 release, and the modified flowrate_des.f90 that Jeff uploaded earlier today. The data is a bit noisy but you can see that the new code tracks the rate as computed by the box method more closely.
The modified plane method is within 0.2% of the box method. Note that we can not expect perfect agreement. Particle count in the box is effectively the integral of the flow rate across the plane. The box method is a true average rate over the time interval, since we’re comparing the box occupancy at the start and end of the interval, while the plane method is just an instantaneous average computed at discrete timesteps, so it is subject to some fluctuations. For comparison the discrepancy with the unmodified plane method is 7%.
I think you should be able to use the plane method with the modifed flowrate_des.f90, or the box method if applicable. The new flowrate_des.f90 will be in the next MFiX bugfix release, which should be coming out fairly soon. In the meanwhile, you can copy this file to your project directory and build a custom solver if you want to use the new code.
Finally, here’s another version of that same plot with some light smoothing applied to the data (moving window average) which makes the correlation between the modified plane and box rates more apparent:
You should not rename the file, copy it as flowrate_des.f90 (no extra .txt) into you project directory. I used 25.1, but I believe it should also work with 24.4 (I didn’t test though). Then you need to build the solver and run using the “project solver”, not the “default solver”:
This can be used in any Mfix DEM simulation for monitoring mass flow rate through plane. By definition a mass flow rate can only be computed through a plane, not a box. You can indirectly deduce the flow rate by looking at the rate of change of the number of particles in a box, like you did, but this is using a different monitor (the sum monitor).
As commented earlier, the plane method is more flexible but the box method (comparing box occupancy at start and end of a time interval) will give you a more accurate average flow rate over the given interval, since the plane method is an instantaneous estimate taken at discrete times, and therefore subject to fluctuations, while the box occupancy is the true continuous-time integral of the flow rate across the boundary of the box.