A splitting method adapted to the simulation of mixed flows in pipes with a compressible two-layer model