The formulation of scaled particle theory (SPT) is presented for a quite general model of fluids confined in a random porous media, i.e., a multicomponent hard sphere (HS) fluid in a multicomponent hard sphere or a multicomponent overlapping hard sphere (OHS) matrix. The analytical expressions for pressure, Helmholtz free energy, and chemical potential are derived. The thermodynamic consistency of the proposed theory is established.
I provided the code here based on SPT2 for computing the chemical potential of hard sphere fluid confined by porous media.
Reference: W. Chen, S.L. Zhao, M. Holovko, X. S. Chen,and W. Dong, J. Phys. Chem. B accepted