  We consider the shape optimization of an object in Navier--Stokes flow by
employing a combined phase field and porous medium approach, along with
additional perimeter regularization. By considering integral control and state
constraints, we extend the results of earlier works concerning the existence of
optimal shapes and the derivation of first order optimality conditions. The
control variable is a phase field function that prescribes the shape and
topology of the object, while the state variables are the velocity and the
pressure of the fluid. In our analysis, we cover a multitude of constraints
which include constraints on the center of mass, the volume of the fluid
region, and the drag of the object. Finally, we present numerical results of
the optimization problem that is solved using the variable metric projection
type (VMPT) method proposed by Blank and Rupprecht, where we consider one
example of topology optimization without constraints and one example of
maximizing the lift of the object with a state constraint, as well as a
comparison with earlier results for the drag minimization.
