We study the Dean instability in curved channels using the lattice Boltzmann model for generalized metrics. For this purpose, we first improve and validate the method by measuring the critical Dean number at the transition from laminar to vortex flow for a streamwise curved rectangular channel, obtaining very good agreement with the literature values. Taking advantage of the easy implementation of arbitrary metrics within our model, we study the fluid flow through a doublecurved channel, using ellipsoidal coordinates, and study the transition to vortex flow in dependence of the two perpendicular curvature radii of the channel. We observe not only transitions to 2-cell vortex flow, but also to 4-cell and even 6-cell vortex flow, and we find that the critical Dean number at the transition to 2-cell vortex flow exhibits a minimum when the two curvature radii are approximately equal.