Porosity variation and swelling of styrene-divinylbenzene copolymers