The determination of boundary conditions for the Euler equations of gas dynamics in a pipe with partially open pipe ends is considered. The boundary problem is formulated in terms of the exact solution of the Riemann problem and of the St. Venant equation for quasi-steady flow so that a pressure-driven calculation of boundary conditions is defined. The resulting set of equations is solved by a Newton scheme. The proposed algorithm is able to solve for all inflow and outflow situations including choked and supersonic flow.Received: August 7, 2002; revised: November 11, 2002