Rarefied gas flow through a long rectangular channel of variable cross section