a b s t r a c tWe address the problem of two-dimensional heat conduction in a solid slab embedded with a periodic array of isothermal pipes of general cross-section. The objective of this work is two-fold: to develop a numerical procedure through which we can obtain the shape factor associated with a given configuration and, to develop a numerical shape optimization algorithm through which we can compute shapes that extremize the transport rate. The shape factor is obtained by first transforming the periodic array of pipes into a periodic array of strips using the generalized Schwarz-Christoffel transformation and, subsequently, by developing an integral equation of the first kind for the temperature gradient using the boundary element method. The integral equation is solved both numerically and analytically/asymptotically with excellent agreement between the results. The shape optimization problems, which are formulated with respect to the parameters of the generalized Schwarz-Christoffel transformation, are solved numerically to compute the shape that maximizes the cross-sectional area and the shape that minimizes the perimeter of the cross-section, given the shape factor and the distance between two consecutive pipes. It is inferred that the problems are adjoint to the transport rate minimization and transport rate maximization problems, respectively. The optimal shapes are computed numerically and validated with available analytical and numerical results for a single pipe. Furthermore, motivated by the analytical result, we propose a parametric set of equations that describe well the optimal shapes. The versatility of the Laplace equation suggests that similar formulations have applications in continuum mechanics, electricity, hydraulics and drug reduction.