A packing algorithm for particles of complex shapes and a method to use the packing structure directly to predict its thermal properties are described. A novel aspect of the packing algorithm is that the particles, their movements and the packing space are all digitized. Using this approach, some major difficulties encountered by traditional packing algorithms can be avoided, for example, handling non-spherical and complex shapes, and detection of collision or overlap between the particles. The digital algorithm is capable of generating packing of particles of arbitrary shapes and sizes in a packing space or container of an arbitrary geometry. To predict effective thermal conductivity of the packing structure, an iterative finite difference method is used. The formulation is performed directly on the individual building blocks using fundamental laws of heat transfer. By performing the calculations at such a microscopic level, only the basic information about the material is needed and the influence of the microstructure on thermal properties can be assessed directly.