Efficient simulation of gas-liquid pipe flows with the population balance model