Separation of polar and non-polar molecules in a non-uniform electric field