An improved multi-pipe junction model for engine thermodynamic and gas dynamic simulations