We present Large-Eddy Simulations (LES) of the turbulent compressible flow in a curved and an S-shape duct of square cross section. The aim is to predict the three-dimensional structures which develop inside the cooling channels of heat exchangers and which dominate the heat transfer with the heated wall. We first consider a curved duct with one curvature only and then an S-shape duct with two opposite curvatures. We observe the formation of Görtler vortices which are moved close to the convex wall by the radial pressure gradient between the two curved faces. These are associated with a secondary flow of over 20% of the streamwise velocity. We determine the influence of wall heating and consecutively consider the case of concave wall heating and of convex wall heating. Due to the secondary flow associated with the Görtler vortices, we observe an enhancement of the heat flux in the first case and an inhibition in the second case.