Calculation of volume and residence time