Non-equilibrium thermodynamics of separation effects through membrane processes