Numerical FDM - wave equation - boundary conditions question

In summary, the conversation discusses the struggles with finding proper boundary conditions for simulating a black hole using a numerical solution of a 1+1 wave equation. The initial condition of a Gaussian wave packet moving towards infinity is used, but trouble arises when trying to center the wave packet at 0. Various boundary conditions, such as demanding the function to be equal to 0 or using a cosine function, are tried but do not produce desired results. The speaker asks for suggestions and recommendations for introductory textbooks on finite difference methods.
  • #1
irycio
97
1
Hello everyone and greetings from my internship!

It's weekend and I'm struggling with my numerical solution of a 1+1 wave equation.
Now, since I'm eventually going to simulate a black hole ( :D ) I need a one-side open grid - using advection equation as my boundary condition on the end of my grid I succceeded. M.y solution looks exactly (as far as my accuracy goes) as the analytical one if I assume that the initial condition is a gaussian wave packet moving towards +infinity.

Now, for the left side BC I was first using the simplest one - demanding that the function is equal to 0. Obviously it worked fine for the gaussian packet centered around,say 0.5, so that it was visible on my grid.

And this is where my trouble began. I than wanted to center my wave packet at 0, so that only half of it is on the grid. Now, using the same BC I ended up getting a half of a Gaussian wave packet moving towards infinity. Not a success, definitely. I than tried using absorbing BCs also at 0, as to simulate the grid infinite in both directions. I got the same result, maybe with some more random noise.

Eventually, I tried using cosine function (cos(r-t), time derivative appropriate) as my initial value. In this case I keep getting exactly same rubbish.

And hence my question is: what are the proper boundary conditions as to get the results I expect to get? Obviously, when I explicitly wrote, that f(0,t)=-sin(t), I got the proper animation, but I believe that's not the right way.

Now, to visualise what I tried to describe, there are some animations I created, which show the rubbish I keep receiving.

1. f(0,t)=0 BC
2. absorbing BCs on both sides
3. f(0,t)=sin(-t)


Big thanks in advance for all the answers. Suggestions of introductory textbooks to FDM are highly welcome as well.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
This sounds to me more like a physics question than a math question. What is the physical nature of the field that's waving, and the boundary, and how does the field behave at the boundary? Is it physically realistic to have half a wave packet cut off at the boundary? I don't think you can just pull a random BC out of your hat and expect to get physically sensible results.
 

1. What is Numerical FDM?

Numerical FDM (Finite Difference Method) is a numerical technique used to solve partial differential equations. It involves approximating the derivatives in a differential equation with finite differences, and then solving the resulting system of algebraic equations.

2. What is the wave equation?

The wave equation is a partial differential equation that describes how a wave propagates through a medium. It is typically written as ∂²u/∂t² = c²∂²u/∂x², where u represents the displacement of the wave, t represents time, x represents position, and c represents the speed of the wave.

3. What are boundary conditions?

Boundary conditions are additional equations or constraints that are used to determine a unique solution to a differential equation. They specify the behavior of the solution at the boundaries of the domain.

4. How do boundary conditions affect the solution of the wave equation?

Boundary conditions play a crucial role in determining the behavior of the solution to the wave equation. They can affect the amplitude, frequency, and speed of the wave, and they can also determine whether the solution is a standing wave or a traveling wave.

5. What are some common boundary conditions for the wave equation?

Some common boundary conditions for the wave equation include fixed boundary conditions, where the solution is always zero at the boundary, and periodic boundary conditions, where the solution repeats itself at regular intervals. Other types include free boundary conditions, where there is no constraint on the solution at the boundary, and mixed boundary conditions, where different types of boundary conditions are specified for different boundaries.

Similar threads

  • Differential Equations
Replies
9
Views
2K
  • Differential Equations
Replies
22
Views
2K
Replies
2
Views
1K
Replies
4
Views
1K
  • Differential Equations
Replies
3
Views
2K
Replies
8
Views
2K
Replies
3
Views
2K
  • Differential Equations
Replies
6
Views
2K
Replies
1
Views
1K
Replies
4
Views
782
Back
Top