Computational modeling of microstructures