In this work, an in house topology optimization (TO) solver is developed to optimize a conjugate heat transfer problem: realizing more complex and efficient coolant systems by minimizing pressure losses and maximizing the heat transfer. The TO method consists in an idealized sedimentation process in which a design variable, in this case impermeability, is iteratively updated across the domain. The optimal solution is the solidified region uniquely defined by the final distribution of impermeability. Due to the geometrical complexity of the optimal solutions obtained, this design method is not always suitable for classic manufacturing methods (molding, stamping....) On the contrary, it can be thought as an approach to better and fully exploit the flexibility offered by additive manufacturing (AM), still often used on old and less efficient design techniques. In the present article, the proposed method is developed using a Lagrangian optimization approach to minimize stagnation pressure dissipation while maximizing heat transfer between fluid and solid region. An impermeability dependent thermal conductivity is included and a smoother operator is adopted to bound thermal diffusivity gradients across solid and fluid. Simulations are performed on a straight squared duct domain. The variability of the results is shown on the basis of different weights of the objective functions. The solver builds automatically three-dimensional structures enhancing the heat transfer level between the walls and the flow through the generation of pairs of counter rotating vortices. This is consistent to solution proposed in literature like v-shaped ribs, even if the geometry generated is more complex and more efficient. It is possible to define the desired level of heat transfer and losses and obtain the closest optimal solution. It is the first time that a conjugate heat transfer optimization problem, with these constraints, has been tackled with this approach for three-dimensional geometries.