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

Click For Summary

Discussion Overview

The discussion revolves around numerically solving a partial differential equation (PDE) that includes a Dirac delta function as a boundary condition. Participants explore various numerical methods and approximations suitable for handling the delta function in the context of PDEs.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • The original PDE involves a Dirac delta function boundary condition, which presents challenges for numerical integration.
  • One participant suggests approximating the delta function with a step function, noting that the size of the approximation parameter ε should relate to the numerical integration step size.
  • Another participant agrees with the step function approximation but emphasizes the need to maintain the integral property of the delta function, proposing a specific form for f(x) that preserves this property.
  • There is mention of different numerical methods, such as finite difference methods, spectral methods, and finite element methods, and the need for consistency in the representation of the delta function across these methods.

Areas of Agreement / Disagreement

Participants generally agree on the need to approximate the delta function for numerical integration, but there are differing views on the specific methods and representations to use, indicating that the discussion remains unresolved.

Contextual Notes

Limitations include the dependence on the choice of numerical method and the specific form of the delta function approximation, which may affect the accuracy of the solution.

Only a Mirage
Messages
57
Reaction score
0
I have a PDE of the following form:

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) \\<br /> \lim_{t\to s^+} f(t,x,y) = \delta (x-y)

Here k and c are real numbers and g, h 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
You can approximate the delta function by a step function: \delta(x)= 0 if x&lt; -\epsilon, = 1 if -\epsilon&lt; x&lt; \epsilon, = 0 if x&gt; \epsilon for small \epsilon. How small \epsilon must be depends upon how small you are taking the step size in your numerical integration.
 
  • Like
Likes   Reactions: 1 person
HallsofIvy said:
You can approximate the delta function by a step function: \delta(x)= 0 if x&lt; -\epsilon, = 1 if -\epsilon&lt; x&lt; \epsilon, = 0 if x&gt; \epsilon for small \epsilon. How small \epsilon 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
 
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 \int \delta(x) dx =1. So you should use
f(x) =\frac{ 1}{2\epsilon} for -\epsilon &lt; x &lt; \epsilon

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 f_i =\int w(x)\delta(x) \alpha_i(x) dx where \alpha_i(x) is your i-th basis function, w(x) is a weighting function, and f(x) =\sum_i f_i \alpha_i(x).
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K