The interest in ice-rich planets has grown due to the large amount of exoplanet discoveries, the possible existence of a distant planet in our own solar system and the hypothetical ability of such objects to retain liquid water in the interior. Here we use a thermal evolution model that allows for liquid flow in a porous medium and solves mass and energy conservation equations under hydrostatic equilibrium for a spherical body in orbit around a central star.The equation of state takes into account the effect of pressure on porosity. Heating by long-lived radioactive isotopes is included, assuming meteoritic abundances for the rocky component. With this model, we carry out a parameter study for a range of planetary masses spanning about five orders of magnitude and rock/ice ratios between 0.1 and 0.9, at various distances from the central star (that is, various rates of irradiation). We focus on the R(M) relationship, where R is the radius and M is the mass of the planet, the bulk density as well as bulk porosity as a function of R, and also on the internal structure of the planets. The large planets become differentiated, with a dense rocky core and an ice-rich mantle.