- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide a bit more context? The Dirac Delta function is mathematically speaking
a bit of an odd object, even though there is a sound theory for it and its kin.For a programming
language that deals with finite (and finite-precision) numbers and characters, such a function
can not be expressed directly. That is not to say that the concept and the associated operations
are impossible to express, but you willhave to provide some information on what you want todo.
Regards,
Arjen
a bit of an odd object, even though there is a sound theory for it and its kin.For a programming
language that deals with finite (and finite-precision) numbers and characters, such a function
can not be expressed directly. That is not to say that the concept and the associated operations
are impossible to express, but you willhave to provide some information on what you want todo.
Regards,
Arjen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your prompt reply.
I'm solving the 2D Helmholtz problem on a Cartesian plane. u''(x,y)+q*u(x,y)=f(x,y)
Above governing equation, f(x,y) is external or internal source and Dirac Delta Function.
I want to compare analytical solution with numerical solution.
I have analytical solution.
To obtain numerical solution, Dirac Delta Funtion code is needed.
I know the function can not be expressed directly.
So, in detail, my question is how is the approximated expression of Dirac Delta Function.
Thank you in advance
Soogeun Kim
I'm solving the 2D Helmholtz problem on a Cartesian plane. u''(x,y)+q*u(x,y)=f(x,y)
Above governing equation, f(x,y) is external or internal source and Dirac Delta Function.
I want to compare analytical solution with numerical solution.
I have analytical solution.
To obtain numerical solution, Dirac Delta Funtion code is needed.
I know the function can not be expressed directly.
So, in detail, my question is how is the approximated expression of Dirac Delta Function.
Thank you in advance
Soogeun Kim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should use a step function with the smallest support possible. How you do that depends
on thenumerical method you are using, but if you use finite differences, it would be a source
term in a single node of the grid. For finite volumes, similarly, but then thephysical meaning
is easier to explain: you integrate the function over the single volume, so in fact you spread
it out over that volume, as that is the smallest entity.
Regards,
Arjen
on thenumerical method you are using, but if you use finite differences, it would be a source
term in a single node of the grid. For finite volumes, similarly, but then thephysical meaning
is easier to explain: you integrate the function over the single volume, so in fact you spread
it out over that volume, as that is the smallest entity.
Regards,
Arjen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Dirac Delta function only really has meaning when integrated over a region containing the point at which the delta function does not vanish. Dirac's calls it an 'improper function'.
In which case the delta-function provides a factor of unity to apply to whatever value its accompanying (multiplying) function(s) has/have at that, and only at that, point. If the region considered omits the point at which the delta function does not vanish, then the delta-function provides a factor of zero.
So I guess you need to define a function that takes as its arguments lower and an upper bounds defining the 1-D range you are considering and a 1-D co-ordinate for the point at which the delta-function does not vanish.
The function should then return zero or unity according to whether the point is within the range specified.
Clearly if it returns a value of zero, there will then be no need to compute the value of the functions it multiplies at the point considered. This can be generalised to 2-D and more-D versions.
The simplest implementation would appear to be
FUNCTION DIRAC(X,XMIN,XMAX)
! Assumes XMIN<=XMAX...
DIRAC=0.0D+00
if(X.LT.XMIN.OR.X.GT.XMAX) DIRAC=1.0D+00
RETURN
END
In which case the delta-function provides a factor of unity to apply to whatever value its accompanying (multiplying) function(s) has/have at that, and only at that, point. If the region considered omits the point at which the delta function does not vanish, then the delta-function provides a factor of zero.
So I guess you need to define a function that takes as its arguments lower and an upper bounds defining the 1-D range you are considering and a 1-D co-ordinate for the point at which the delta-function does not vanish.
The function should then return zero or unity according to whether the point is within the range specified.
Clearly if it returns a value of zero, there will then be no need to compute the value of the functions it multiplies at the point considered. This can be generalised to 2-D and more-D versions.
The simplest implementation would appear to be
FUNCTION DIRAC(X,XMIN,XMAX)
! Assumes XMIN<=XMAX...
DIRAC=0.0D+00
if(X.LT.XMIN.OR.X.GT.XMAX) DIRAC=1.0D+00
RETURN
END

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page