Simulating the 2D wave equation with varying speed

In summary, the 2D wave equation is a mathematical model that describes wave propagation in two-dimensional space, taking into account varying speed. In a scientific context, it is simulated using numerical methods and has various real-world applications, including earthquake prediction and structural design. The speed of a wave affects its behavior, and while simulating the 2D wave equation can provide valuable insights, there are limitations such as assumptions and errors introduced by numerical methods.
  • #1
rewolf
1
0
As a computer scientist and applied math guy, I've recently taken interest in learning to simulate fluids. I've done simple wave equation and KDV simulations before, but after reading the paper
"Rapid, Stable Fluid Dynamics for Computer Graphics" by Kass and Miller 1990.
I thought I'd like to try varying the depth of the water and see its effects.

The paper imposes assumptions on the shallow water equations such that the wave equation is derived:
[tex]h_{tt}=dg\nabla^2h[/tex]
where g is the gravity and [tex]d=d(x,z)[/tex] is the depth of the water and [tex]h(x,z,t)=ground+d[/tex] is the water surface height as the sum of ground height and depth.

I have a single initial gaussian disturbance, and the boundaries are reflective.

As a first attempt, I tried a simple explicit finite difference scheme. I calculated stability, and am pretty sure that my parameters lead to stable behaviour. if i set d(x,z) to a constant, the simulation appears as expected. If however i let d(x,z) be a continous,smooth surface the results are incorrect. The gaussian propogates outwards as a circular wave BUT the region inside the circle just sinks and sinks and sinks, instead of returning to the equilibrium waterlevel.
I am struggling to see why this is so. The paper seems to think this works (although they use an implicit discretization).

This surely cannot be a stability issue as all possible values of d for my given ocean floor, yield stable coefficients.

It has nothing to do with the shape of the ocean floor either, because the same happens when the floor is flat.

Each iteration, for each mesh point, [tex]d = h - ground[/tex] is calculated, and it seems that once depth starts decreasing, it doesn't want to stop. :(

If anyone can shed any light on this matter i'd appreciate it a lot !

Here are two images of the equation working (when d(x,z)=const - ground(x,z) )
http://img191.imageshack.us/img191/2551/wavesim2.th.jpg
http://img59.imageshack.us/img59/3576/wavesim1.th.jpg


The following two, are examples of when it doesn't work, ie. d(x,z,t) = h(x,z,t) - ground(x,z)
http://img641.imageshack.us/img641/6181/wavesim4.th.jpg
http://img199.imageshack.us/img199/2434/wavesim3.th.jpg
 
Last edited by a moderator:
Physics news on Phys.org
  • #2


Hello,

I am also a computer scientist and applied math expert, so I understand your interest in simulating fluids. After reading the paper you mentioned and looking at your simulations, I have a few suggestions that may help you solve the issue you are facing.

Firstly, it is important to note that the paper you referenced is from 1990 and may not take into account all aspects of fluid dynamics. It would be beneficial to look at more recent research and papers in this field to see if there are any new developments or techniques that could improve your simulation.

Secondly, it seems like the issue may lie in how you are calculating the depth of the water (d) at each time step. In the paper, they mention using an implicit discretization, which may be more accurate and stable in this case. It would be worth trying an implicit discretization to see if it improves the results.

Additionally, it may be helpful to check your boundary conditions and make sure they are properly implemented. Reflective boundaries should not cause the sinking behavior you are seeing, so there may be an error in how you are handling them.

Lastly, it may be useful to try different initial conditions and see if the issue persists. It is possible that the initial gaussian disturbance is causing an unstable behavior in the simulation.

I hope these suggestions help you in solving the issue you are facing. Good luck with your simulation!
 

Related to Simulating the 2D wave equation with varying speed

1. What is the 2D wave equation and how does it relate to varying speed?

The 2D wave equation is a mathematical model that describes the propagation of waves in a two-dimensional space. It takes into account the speed of the wave as well as the medium through which it is traveling. Varying speed refers to the phenomenon where the speed of the wave changes as it moves through different materials or environments.

2. How is the 2D wave equation simulated in a scientific context?

In a scientific context, the 2D wave equation is simulated using numerical methods such as finite difference methods or finite element methods. These methods involve breaking down the wave equation into smaller, discrete steps and solving for the wave at each step. This allows for the simulation of the wave's behavior in different scenarios, such as varying speed.

3. What are some real-world applications of simulating the 2D wave equation with varying speed?

There are many real-world applications for simulating the 2D wave equation with varying speed. Some examples include earthquake prediction and modeling, predicting the behavior of ocean waves, and understanding the propagation of sound waves in different environments. It can also be used in designing structures such as bridges or buildings to withstand the effects of different types of waves.

4. How does the speed of a wave affect its behavior?

The speed of a wave is a crucial factor in determining its behavior. In general, higher wave speeds result in shorter wavelengths and higher frequencies. This means that the wave will move more quickly through a medium and will have a greater impact on the surrounding environment. Additionally, changes in wave speed can lead to phenomena such as refraction and diffraction, where the wave bends or spreads out as it travels through different materials.

5. What are the limitations of simulating the 2D wave equation with varying speed?

While simulating the 2D wave equation with varying speed can provide valuable insights and predictions, there are some limitations to these simulations. One limitation is the assumption of a linear relationship between the wave speed and the medium, which may not always hold true in real-world scenarios. Additionally, numerical methods used for simulations may introduce errors or approximations that could affect the accuracy of the results.

Similar threads

Replies
1
Views
1K
  • Differential Equations
Replies
1
Views
1K
Replies
5
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
53K
  • Atomic and Condensed Matter
Replies
1
Views
1K
Replies
4
Views
5K
  • Advanced Physics Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
7
Views
2K
  • Biology and Chemistry Homework Help
Replies
1
Views
1K
Back
Top