The molar fraction of a component i in a mixture is defined as:
where ni is the number of moles of component i.