Compositional three-phase relative permeability and capillary pressure models using Gibbs free energy