A model for the structure of ionomers