An analysis on the penalty and Nitsche's methods for the Stokes–Darcy system with a curved interface