1+1 Radial wave equation- numerical. BC near origin

In summary, the person is seeking help for a problem with the 1+1 radial wave equation using finite difference. They have shifted their grid and applied advection boundary conditions, but are now having trouble with the boundary conditions near r=0. They have tried to solve it using a five point stencil and have also split the equation into two first-order equations in time. However, when comparing their results with the analytical solution, they have found that their code is only first-order accurate. They suspect that the issue may be with the absorbing boundary condition they are using, but are unsure of what they are doing wrong.
  • #1
irycio
97
1

Homework Statement


Well, I'm not sure if this is a correct subforum to post my problem, but to me it does seem to me as an academic problem. One I can not solve, apparently.

Well, anyway. I'm solving the 1+1 radial wave equation using finite difference. I shifted my grid, so that the origin (r=0) is not one of it's points. I also applied advection boundary condition to prevent reflections.

Now, the problem I have left are the boundary conditions near r=0. Since I'm using five point stencil to approximate spatial derivative, I need to apply them to 2 first points.
I assumed, that since my initial conditions (f(r,t=0)=10.0*exp(-100* r^2)) are symmetric (actually I'm trying to receive an analytic solution f(r,t)=(r-t)/r * 10.0*exp(-100* (r-t)^2), so the initial time derivative is appropriate), so should be the solution (otherwise it would depend on the angles, and I don't want it to).

Hence whenever my five point stencil calls for a non-existent point, I replace it with it's mirror, that lies within my grid.

And so unfortunately that doesn't work as expected. All in all, the "real" solution can be <0 for a given r and t, whereas my solution remains >0 (well, actually at some points the value is equal to, say -0,008, but then around it there are points with value of, say, 0,005, so that it's I believe just some random noise).


Since I checked my code couple of times, checked the initial conditions, I believe the problem lies within the BCs. And so, any help will be much appreciated!
 
Technology news on Phys.org
  • #2
Wrong order of convergence while using method of lines

Hi!
Still fighting with radial wave equation :/. I've split it into 2 first order equations in time and am using method of lines to integrate it with RK4 as my time integrator, which is O(h^4). My spatial derivatives are are approximated using 3 point stencil (2nd derivative, O(h^2)) and 2 point centered scheme (1st derivative, present in radial wave eq., O(h^2) as well)). Now, I was comparing my results with analytical solution to check the convergence and eventually it seems that my code is only of a first order accuracy :( - half the step size, double the accuracy. Now, the only place I'm using the method of firs order is the absorbing boundary condition at one of the ends. I used the advection equation there and to avoid complications I used the simplest scheme to approximate a spatial derivative there. However, I start with a gaussian wave packet far from that boundary, so at least at the beginning it shouldn't make any difference.

The question hence is - what can I be doing wrong??
 

1. What is the "1+1 Radial wave equation- numerical"?

The "1+1 Radial wave equation- numerical" is a mathematical model that describes the behavior of waves in a spherical coordinate system. It is used to study physical phenomena such as sound waves, electromagnetic waves, and quantum mechanics.

2. What does the equation represent?

The equation represents the radial component of a wave in a spherical coordinate system. It takes into account factors such as the wave's amplitude, frequency, and direction of propagation.

3. How is the equation solved numerically?

The equation is solved numerically by using computational methods such as finite difference or finite element methods. These techniques involve dividing the problem into smaller, discrete elements and solving for each element to approximate the solution of the entire equation.

4. What are the boundary conditions near the origin?

The boundary conditions near the origin refer to the values of the wave equation at the center of the spherical coordinate system. These conditions are important in determining the behavior of the wave and are usually specified as part of the problem being studied.

5. What are some applications of the "1+1 Radial wave equation- numerical"?

The "1+1 Radial wave equation- numerical" has many applications in various fields, including acoustics, electromagnetics, and quantum mechanics. It is used to study the behavior of waves in spherical objects, such as acoustic waves in a spherical room or electromagnetic waves around a spherical antenna.

Similar threads

  • Programming and Computer Science
Replies
4
Views
4K
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
Replies
6
Views
2K
  • Differential Equations
Replies
3
Views
1K
Replies
0
Views
453
  • Programming and Computer Science
Replies
13
Views
3K
  • Programming and Computer Science
Replies
4
Views
2K
Replies
9
Views
771
  • Programming and Computer Science
Replies
5
Views
3K
  • Programming and Computer Science
Replies
1
Views
1K
Back
Top