Calculating Mass Flux in LAMMPS

Hi All,

My simulation domain (image attached) is a cuboid with liquid particles at
the center and ambient gas on either side. I am trying to calculate the
mass flux of particles (both liquid and ambient) crossing a particular
cross-section in the domain. Any suggestions on how this can be achieved in
LAMMPS? Was thinking of using the create chunk command along with fix
ave/chunk. Any input would be appreciated.

Also, I am planning on using the dump information of the particles to write
a stand alone post-processing code for particle tracking and flux
computations. Are there any known algorithms that I can refer to, for the
same?

Will be hoping to get a response. Thanks in advance.

Regards,
Suman

simulation_box_final.PNG