Coupling conditions for isothermal gas flow and applications to valves. (April 2018)