How to Simulate an Open Boundary in a 1D Wave Equation Solver?

emirs
Messages
3
Reaction score
0
I am trying to write a solver for a 1D wave equation in MATLAB, and I have run into interesting problem that I just can't find a way out of.

I start with the wave equation, and then discretize it, to arrive at the following,

U{n+1}(j)=a*(U{n}(j+1)-2*U{n}(j)+U{n}(j-1))+2*U{n}(j)-U{n-1}(j) (for (j=1...end-1))

I'm trying to simulate an open end string (perturbate it in the middle for example, and I want the wave to disappear on the border)

Usually it is done (correct me if I'm wrong) with applying zero gradient boundary condition, which in my case is:
U{n}(end+1)=U{n}(end-1)
and leads to:
U{n+1}(end)=a*(-2*U{n}(end)+2*U{n}(end-1))+2*U{n}(end)-U{n-1}(end);

Unfortunately this condition creates a partial reflection from the end which is supposed to be free.

Please help

Regards
 
Physics news on Phys.org
Anyone?
 
Well, there ARE partial reflections from a free end, I think...the energy cannot transfer into the surrounding air with perfect efficiency.

But to eliminate as much reflection as possible, you should look up "absorbing boundary conditions". These are a bit tricky to implement and it may take a fair bit of reading to get them right.
 
Thank you, it is what I was looking for. You hae put me on the right track.
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top