A new method to determine swelling pressure