Unified model for gas-liquid pipe flow via slug dynamics: Part 1: Model development