The flow of a compressible fluid with slip through a cylinder with an asymmetric local constriction has been considered both numerically, as well as analytically. For the numerical work, a particle-based method whose dynamics is governed by the multiparticle collision (MPC) rule has been used together with a generalized boundary condition that allows for slip at the wall. Since it is well known that an MPC system corresponds to an ideal gas and behaves like a compressible, viscous flow on average, an approximate analytical solution has been derived from the compressible Navier–Stokes equations of motion coupled to an ideal gas equation of state using the Karman–Pohlhausen method. The constriction is assumed to have a polynomial form, and the location of maximum constriction is varied throughout the constricted portion of the cylinder. Results for centerline densities and centerline velocities have been compared for various Reynolds numbers, Mach numbers, wall slip values and flow geometries.