Pressure swing adsorption is a common method for purifying hydrogen in a refinery by removing other hydrocarbon gases.