An algorithm has been developed for the calculation of the size of the effective structural or skeletal elements which make up the solid phase of an unconsolidated or consolidated porous block. It is based on a previously presented algorithm, but it has now been validated on unconsolidated samples and tested on consolidated samples. It also includes a virtual reality representation of the structures. First, a network model named Pore-Cor is made to reproduce the percolation behaviour of the experimental sample, by matching its simulated percolation characteristics to an experimental mercury intrusion curve. The algorithm then grows skeletal elements between the cubic pores and cylindrical throats of the void network model until they touch up to four of the adjacent void features. The size distributions of the simulated solid elements are compared with each other and with experimentally determined particle size distributions, using a Mann-Whitney test. The algorithm was shown to simulate skeletal elements with the correct trends in size distribution for two different sand samples, provided the sand packed itself optimally under the applied mercury pressure. It was also applied to two samples of variously compressed calcium carbonate powder, having fine and coarse particle size distributions respectively. The simulation demonstrated that on compressing the powder at the minimum force, the skeletal elements differed from the constituent particle sizes, as expected. The average size of the skeletal elements increased as the compression force was increased on Transp Porous Med (2007) 66:403-419 the calcium carbonate powders. The results suggest that the method could be useful as a tool for probing the effect of compaction on aggregation or sintering, and for studying other effects such as cementation in geological samples, where other more direct techniques cannot be applied.