  The Immersed Boundary Method (IBM) is a popular numerical approach to impose
boundary conditions without relying on body-fitted grids, thus reducing the
costly effort of mesh generation. To obtain enhanced accuracy, IBM can be
combined with high-order methods (e.g., discontinuous Galerkin). For this
combination to be effective, an analysis of the numerical errors is essential.
In this work, we apply, for the first time, a modified equation analysis to the
combination of IBM (based on volume penalization) and high-order methods (based
on nodal discontinuous Galerkin methods) to analyze a priori numerical errors
and obtain practical guidelines on the selection of IBM parameters. The
analysis is performed on a linear advection-diffusion equation with Dirichlet
boundary conditions. Three ways to penalize the immerse boundary are
considered, the first penalizes the solution inside the IBM region (classic
approach), whilst the second and third penalize the first and second
derivatives of the solution. We find optimal combinations of the penalization
parameters, including the first and second penalizing derivatives, resulting in
minimum errors. We validate the theoretical analysis with numerical experiments
for one- and two-dimensional advection-diffusion equations.
