An activity coefficient is a factor used in thermodynamics to account for deviations from ideal behaviour in a mixture of chemical substances.
It's common to define an activity coefficient for liquid mixtures that can't be described by an equation of state.
Examples of commonly used activity coefficient models are:
Activity coefficient gamma is defined by equation:
f_i_liquid=x_i*gamma_i(p,T,x)*f_i_liquid(p,T)
Chemical and engineering thermodynamics, Stanley I. Sander, 3:rd edition, page 401.
Chemical Engineering Thermodynamics, Pradeep Ahuja, page 453
function activityCoefficient_pTN input Modelica.SIunits.Pressure p "Pressure"; input Modelica.SIunits.Temperature T "Modelica.SIunits.Temperature"; input Modelica.SIunits.AmountOfSubstance[nC] N_1ph "Molar substance for the specified phase"; output Real gamma[nC](each unit = "1") "Activity coefficients for specified phase"; end activityCoefficient_pTN;