if mass is conserved at the inlet and outlet

Hello everyone,

How can I quantify if mass is conserved at the inlet and outlet of my simulation? Such as the simulation of flow past a 2D cylinder in a rectanglar domain. Thanks very much.

yours, x.f

Should I calculate the mass flow rate at the inlet and outlet for verification? How to calculate the mass flow rate in LBM form? The streamwise velocity component multiply the density, then make integral along the spanwise at the in/out-let, is it right? If some one can help me?