Thermodynamic analysis of chalk-brine-oil interactions