How to numerically solve a PDE with delta function boundary condition?

In summary, the conversation discusses solving a PDE with a delta function boundary condition numerically. It is suggested to approximate the delta function with a step function or by projecting it onto basis functions for spectral or finite element methods. The size of the approximation depends on the step size used in the numerical integration. However, it is important to ensure that the integral of the delta function remains equal to 1.
  • #1
Only a Mirage
59
0
I have a PDE of the following form:

[tex] f_t(t,x,y) = k f + g(x,y) f_x(t,x,y) + h(x,y) f_y(t,x,y) + c f_{yy}(t,x,y) \\
\lim_{t\to s^+} f(t,x,y) = \delta (x-y)[/tex]

Here [itex]k[/itex] and [itex]c [/itex] are real numbers and [itex]g, h[/itex] are (infinitely) smooth real-valued functions. I have been trying to learn how to do this numerically (was going to use MATLAB's pdepe function which uses a finite difference method, I believe), but I have no clue what to do regarding the boundary condition.

How does one numerically integrate a PDE with dirac delta boundary condition?
 
Last edited:
Physics news on Phys.org
  • #2
You can approximate the delta function by a step function: [itex]\delta(x)= 0[/itex] if [itex]x< -\epsilon[/itex], = 1 if [itex]-\epsilon< x< \epsilon[/itex], = 0 if [itex]x> \epsilon[/itex] for small [itex]\epsilon[/itex]. How small [itex]\epsilon[/itex] must be depends upon how small you are taking the step size in your numerical integration.
 
  • Like
Likes 1 person
  • #3
HallsofIvy said:
You can approximate the delta function by a step function: [itex]\delta(x)= 0[/itex] if [itex]x< -\epsilon[/itex], = 1 if [itex]-\epsilon< x< \epsilon[/itex], = 0 if [itex]x> \epsilon[/itex] for small [itex]\epsilon[/itex]. How small [itex]\epsilon[/itex] must be depends upon how small you are taking the step size in your numerical integration.

Oh okay, that makes sense. So that seems to solve that problem. Now I just need to find some software to do this in since apparently with the Matlab toolboxes I have I can only solve 1-dimensional PDEs
 
  • #4
There are a couple of different ways to represent a delta function initial condition numerically, but the representation should be consistent with the numerical method that you are using to solve the PDE.

For instance using a step function as Hallsofivy suggested for finite difference methods. However there is an error.
You want to preserve the integral [itex]\int \delta(x) dx =1[/itex]. So you should use
[itex]f(x) =\frac{ 1}{2\epsilon}[/itex] for [itex]-\epsilon < x < \epsilon[/itex]

If you're using spectral methods or finite element methods you should project the delta function onto each of your basis functions. The projection will look like [itex]f_i =\int w(x)\delta(x) \alpha_i(x) dx[/itex] where [itex] \alpha_i(x)[/itex] is your i-th basis function, [itex] w(x)[/itex] is a weighting function, and [itex]f(x) =\sum_i f_i \alpha_i(x)[/itex].
 
  • #5


There are a few different approaches one could take to numerically solve a PDE with a delta function boundary condition. One option is to discretize the domain of the PDE and use a finite difference method, such as the one implemented in MATLAB's pdepe function. In this approach, the delta function boundary condition can be approximated by a very narrow and tall spike at the corresponding boundary point. This spike can then be represented by a large value at that point, while the rest of the boundary values remain unchanged.

Another approach is to use a finite element method, which is also commonly used for solving PDEs numerically. In this method, the domain is divided into smaller subdomains, and the PDE is approximated by a set of basis functions within each subdomain. The delta function boundary condition can be incorporated by appropriately choosing the basis functions at the boundary point where the delta function is located.

It is also possible to use a spectral method, where the solution is approximated by a combination of trigonometric or polynomial functions. In this approach, the delta function boundary condition can be incorporated by considering the Fourier or Chebyshev coefficients of the solution at the boundary point.

Regardless of the numerical method chosen, it is important to ensure that the boundary conditions are properly incorporated into the discretization scheme. In the case of a delta function boundary condition, special attention should be paid to accurately representing the sharp spike at the boundary point. Additionally, the numerical solution should be checked for stability and convergence to ensure that it accurately captures the behavior of the PDE with the delta function boundary condition.
 

1. How do I incorporate a delta function boundary condition into a numerical PDE solver?

To incorporate a delta function boundary condition into a numerical PDE solver, you will need to discretize the domain and boundary conditions. Then, you can use the finite difference method or finite element method to solve the PDE numerically. The delta function boundary condition can be represented as a point source or as a Dirac delta function at the boundary point. This can be incorporated into the discretized equations as a boundary condition.

2. What is the significance of using a delta function in a boundary condition for a PDE?

A delta function in a boundary condition for a PDE represents a localized source or sink of a certain quantity at a specific point on the boundary. This can model various physical phenomena, such as a heat source or sink at a specific location, or a fluid flow entering or leaving a domain at a particular point. Using a delta function in the boundary condition allows for more flexibility and accuracy in modeling these types of scenarios.

3. Can a delta function boundary condition be used for any type of PDE?

Yes, a delta function boundary condition can be used for various types of PDEs, such as diffusion equations, wave equations, and Navier-Stokes equations. However, the specific form and implementation of the delta function may vary depending on the type of PDE being solved. It is important to carefully consider the physical interpretation and implications of using a delta function boundary condition in each specific case.

4. Are there any limitations to using a delta function boundary condition in a numerical PDE solver?

One limitation of using a delta function boundary condition in a numerical PDE solver is that it may introduce numerical instability. This can occur if the delta function is not properly discretized or if the numerical method used is not stable for the given problem. Additionally, using a delta function boundary condition may also increase the computational complexity and time required to solve the PDE.

5. Are there alternative methods to incorporating a delta function boundary condition in a PDE solver?

Yes, there are alternative methods to incorporating a delta function boundary condition in a PDE solver. One method is to use a smoothed or regularized version of the delta function, such as the Gaussian or Lorentzian function. This can help to mitigate numerical instability and improve computational efficiency. Another method is to use an analytical solution for the delta function boundary condition, if one is available for the specific PDE being solved.

Similar threads

Replies
4
Views
1K
  • Differential Equations
Replies
5
Views
2K
Replies
1
Views
1K
  • Differential Equations
Replies
13
Views
2K
Replies
2
Views
1K
  • Differential Equations
Replies
8
Views
3K
Replies
7
Views
2K
  • Math POTW for University Students
Replies
1
Views
430
  • Differential Equations
Replies
1
Views
2K
Replies
8
Views
2K
Back
Top