How to get mass or volume flux at a given inlet/outlet?

For a given inlet or outlet?
How do I monitor the mass-flux or the volume-flux?

I know how to get average volume fraction and total mass-flow rate in the outlet, however, if I calculate flux by dividing by the Area of the outlet (this area would be different from the actual simulated meshed-area) and so flux would be different.

Any solution on this?