Take the 2-minute tour ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

As is discused on this post, taking some assumptions, the water surface can be simulated by a discrete aproximation of a grid of heights using this formula

enter image description here

Where:

HT is the new height grid

HT-1 is the grid mapped in the previous step of the simulation

N is a damping factor

The 2D simulation works pretty well. I want now to move to 3D, but I'm concerned about the bundary limit conditions.

Unless I'm missing something, the document doesn't explain how to calculate the height on the limits, where there is no x+1 or x-1.

I could mirror the point on the other site as if the boundaries were mirrors, but I'm not sure.

The following image depicts what's described above

enter image description here

share|improve this question
    
The following depicts what is described above –  rraallvv Nov 23 '12 at 0:05
add comment

1 Answer 1

up vote 1 down vote accepted

It depends on how you want your simulation to behave.

You seem to be describing what's called Periodic boundary conditions.

You might want to extrapolate and use those values in the place of your unknown values.

share|improve this answer
    
As described here, Periodic Boundary Conditions woud cause a particle to pass through the boundaries an reapear on the oposite side, moving in the same direction. I would rather want that particle, or wave in my case, to be reflected back, as a result the wave would move in the opposite direction –  rraallvv Nov 22 '12 at 23:38
    
I added an image as a comment to the question –  rraallvv Nov 23 '12 at 0:06
    
Reflection from a SOFT boundary here is what you want. You need to solve so the derivative is zero at the boundaries. Try to set your x+1 and x-1 to x. If that's not good enough, you need to re-discretize for the boundaries. –  Roberto Mizzoni Nov 24 '12 at 9:01
    
Thanks, ti realy helped me to clarify. It's as if the area below the curve remains a constant, so when the wave reaches the boundary it increases its magnitude. In which case, a good aproximation could be to make x-1 = x on the left boundary and x+1 = x on the right one, but not both, as the wave peak would be very high. –  rraallvv Nov 24 '12 at 18:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.