2
$\begingroup$

I am trying to simulate the following 1-dimensional wave equation with trivial initial conditions and a inhomogeneous Dirac delta function:

$u_{tt} - c^2 u_{xx} = \delta(x - x')\delta(t - t'), \ u(0, x) = u'(0, x) = 0.$

My finite difference scheme on the grid is found by the typical central difference formulas

$u_{tt} = \frac{u_{t + dt} - 2u_t + u_{t - dt}}{dt^2}, u_{xx} = \frac{u_{x + dx} - 2u_x + u_{x - dx}}{dx^2}$,

and I am approximating the delta dirac function on the $x-t$ grid as

$\delta(x)\delta(t) = \frac{1}{dx dt} \text{ for } x = x',t=t'; \text{ 0 elsewhere}$

Unfortunately my simulations have these odd oscillations when the dirac delta function kicks in, shown in the image below of plots of $u(t,x)$ over $t$ for different values of $x$

enter image description here

The analytic solution to the equation (as calculated as a Green's function), should be a Heaviside step function without the oscillations, e.g. the blue curve should just be $5H(t-1000)$.

I have tried with finer grid sizes and timesteps and unfortunately the oscillations still remain.

Is there any standard practices in literature that can reduce these spurious artifacts? I am suspecting that this is due to the delta function, as literature on homogeneous wave equations do not seem to have this issue.

$\endgroup$
2
  • 2
    $\begingroup$ Convergence of finite difference methods assumes that the derivatives are continuous, which you are violating here. A discretization scheme based on a weak formulation, such as a finite volume method, may be more appropriate. It may also be possible to hard-code the jump condition in the derivatives instead of using a Dirac forcing term to ensure conservation $\endgroup$
    – whpowell96
    Feb 29 at 15:46
  • 3
    $\begingroup$ A simple recipe would be to replace the delta function by a smooth narrow (but resolved on the x,t grids) profile, e.g., Gaussian. In the limit of fine grid resolution you will get the correct solution. $\endgroup$ Mar 1 at 3:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.