Calculating the total pressure at equilibrium