Effect of temperature and pressure on solubility of solids and gases