Mass flow rate calculation issue for pure granular flow

The simulation is pure granular flow of solid particles.

I am calculating the mass flow rate at the plane shown below using mass flow rate monitoring in Mfix dem.

I got average mass flow rate of 0.001002kg/s at steady state from 0.2s to 0.8s.

In paraview, I created the same plane and I counted the particles at 0.8s by counting the particle IDs. Basically I removed the duplicate particleIDs and counted the remaining. I got 5785 number of particleIDs which passed through the plane upto 0.8s. The total mass calculated for these number of particles is 0.000595kg. Then mass flow rate is calculated and is found as 0.000744kg/s. The calculated mass flow rate by counting the number of particles passed through this plane has significant difference from the average mass flow rate monitoring at steady state.

I wonder which is the accurate method to calculate mass flow rate and why there is significant difference?

Also, I created a region and counted the particles in the region using sum monitoring. I got 6234 number of particles at 0.8s which has total mass of 0.00064kg. This gives mass flow rate of 0.0008kg/s.

Still there is a mismatch in this method too.

You need a velocity to compute the mass flow rate. If you are dividing by the simulation time, this is wrong.

I didn’t understand. How to validate with the plane monitoring method for the mass flow rate? Please provide details.

Please attach your project files here. Thanks.

To get a mass flow rate, you need to estimate the number of particles that cross the plane during a small time interval. The monitor looks at particles near the plane and estimate how far they will travel over a DT. This is where you need the particle velocity (magnitude and direction). Some particles will cross the plane in one direction and other may cross the plane in the opposite direction. Other particles may travel away from the plane. I don’t understand how you compute the mass flow rate in Paraview, but if you only look at particles that intersect the plane, this is not correct (a static bed would give a non-zero mass flow rate because there are particles intersecting the plane).

test_mfr - Copy.zip (35.7 MB)

This is the simulation case.
I have used plane monitoring method to calculate mass flow rate.

If this is wrong, then kindly help me out to calculate the mass flow rate appropriately.

Also please let me know how to get the mass flow rate from velocity.

You are injecting 0.0009 kg/s from the top BC. The monitor seems to show a mass flow rate that is similar (slightly below 0.001 kg/s) until the bed fills up. It is normal to see fluctuations. I don’t see an issue with the monitor. I don’t know how to extract the mass flow rate from Paraview, you can reach out to them if you don’t want to use monitors.

In mfix, using plane method I got average mass flow rate of 0.001kg/s.

How to calculate mass flow rate using box region in mfix and compare with the plane method? It gives the sum for particle count and mass at every instant.

Please find the below .csv file for box region
BOX5.csv (8.4 KB)

I would use Python. Here’s an interactive data exploration session.

Note that in Python, -1 as an array index means “the last element of an array”.
So if a is an array then a[1:] - a[:-1] subtracts an array starting from first second element from an array starting from the second element (zero-based). In order to subtract arrays, they must be the same length, which is why the -1 is needed. This computes successive differences, i.e. the array whose elements are a[1]-a[0], a[2]-a[1], ...

$ python
>>> import pandas as pd
>>> df = pd.read_csv("BOX5.csv", skiprows=2)
>>> df.columns
Index(['Time', 'pmass', 'pcount '], dtype='object')
>>> times = df['Time'].to_numpy()
>>> mass = df['pmass'].to_numpy()
>>> rate = (mass[1:]-mass[:-1]) / (times[1:]-times[:-1])
>>> rate
array([ 0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
        0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
        4.7338691e-04,  8.9531869e-04,  9.0560980e-04,  8.9531870e-04,
        8.8502770e-04,  9.0560970e-04,  9.0560980e-04,  8.8502770e-04,
        8.9531870e-04,  8.8502770e-04,  8.7473670e-04,  9.0560990e-04,
        8.8502800e-04,  8.8502700e-04,  9.5706500e-04,  9.1590100e-04,
        8.9531900e-04,  8.8502700e-04,  8.7473700e-04,  9.0561000e-04,
...
>>> from matplotlib import pyplot as plt
>>> plt.plot(times[:-1], rate)
>>> plt.show()

Furthermore,

>>> times[20]
np.float64(0.2)
>>> times[80]
np.float64(0.8)
>>> (mass[80]-mass[20]) / 0.6
np.float64(0.0008973769166666667)

This shows an average of 0.000897 for the period from 0.2 to 0.8s.
Where is the number 0.001002 coming from?

okay.
So, with the box region method the average is 0.000897 and for the plane monitoring method its 0.001002. Both methods are for the period from 0.2 to 0.8s. There is mismatch.

How did you obtain the 0.001002?

This is the excel plot for plane that was monitored for mass flow rate. I just took the average of the mass flow rate for the period from 0.2 to 0.8s.

I ran a simpler case where I turned off the inlet after 0.1 seconds so the box doesn’t fill up and interfere with the flow rate at the mid plane. I get a flow rate close to 0.009 kg/s while particles are crossing the plane.

There is a little bias because particles accelerate while crossing the plane. I am looking at minimizing the bias and will report later.

@sroy27 Can you share your raw data for the plane monitor?

flowrate_des.f90 (6.4 KB)

Please try with the attached. Copy to you project directory, rebuild the solver and run with the project solver. This is based on 25.1 release. I ran you case with the original code and the modified (attached) code. I didn’t get exactly the same as you with the original code, but the attached code looks a bit better than the original code. If you want to compare with the inlet flow rate, I am not sure if you can go till time=0.8s since the bed fills up.

Original code:

Attached code:

So which one should I consider for calculating average mass flow rate plane monitoring method or box region method?

Box seems more foolproof to me. Can you please share the CSV file for the plane region monitor?

PLANE_0.csv (5.7 KB)

I attached the .csv file for the plane

Below are the images for plane and box region


The box method only works if you have walls everywhere except the plane where you want to compute the flow rate. You should expect fluctuations about the mean, and some variations if you change the output frequency and average window.