Text this: An implicit formulation for calculating final conditions in drainage maneuvers in pressurized water installations