Theoretical analysis of ternary gas mixture separation in an internally staged permeator