  Shape optimization of an active and a passive drag-reducing device on a
two-dimensional D-shaped bluff body is performed. The two devices are: Coanda
actuator, and randomly-shaped trailing-edge flap. The optimization sequence is
performed by coupling the genetic algorithm software DAKOTA to the mesh
generator Pointwise and to the CFD solver OpenFOAM. For the the active device
the cost functional is the power ratio, whereas for the passive device it is
the drag coefficient. The optimization leads to total power savings of $\approx
70\%$ for the optimal Coanda actuator, and a 40\% drag reduction for the
optimal flap. This reduction is mainly achieved through streamlining the base
flow and suppressing the vortex shedding. The addition of either an active or a
passive device creates two additional smaller recirculation regions in the base
cavity that shifts the larger recirculation region away from the body and
increases the base pressure. The results are validated against more refined
URANS simulations for selected cases.
