Boundary Problems

I am trying to study what happens to a wave as it passes different boundaries.

This is the working wave equation defined on a plane

Ω = Rectangle[{0, 0}, {10, 10}];
uifWave = NDSolveValue[{Derivative[2, 0, 0][u][t, x, y] -
Inactive[Laplacian][u[t, x, y], {x, y}] == Piecewise[{{1, t == 0.001},
{0, t > 0.001}}] Sin[x - t], u[0, x, y] == Sin[x], u[t, 10, y] == 0,
u[t, 0, y] == 0, Derivative[1, 0, 0][u][0, x, y] == -Cos[x]},
u, {t, 0, 10 π}, {x, y} ∈ Ω] // Quiet;
framesWEQ = Table[Plot3D[uifWave[t, x, y], {x, y} ∈ uifWave["ElementMesh"],
PlotRange -> {-2.5, 2.5}], {t, 0, 10 π, 10 π/50}];
Manipulate[framesWEQ[[i]], {{i, 16, "time"}, 1, Length[framesWEQ], 1},
SaveDefinitions -> True]


The problem is that

1. I want this wave to hit a spherical wall (which I will manipulate its radius later) and see what happens to the wave but I don't really know how to introduce this sphere to be one of the boundary conditions....... I tried making a region union between my first rectangle and that sphere but it returned an error. I also tried instead of the sphere to make it with a circle on the plane but with no luck either. I am sure what I want is do-able but I am new to Mathematica and I lack the knowledge and expertise.

This is what I want which I did using Graphics

DiscretizeGraphics[Graphics3D[{Sphere[{5, 0, 0}, 5],
BSplineSurface[Table[{i, j, 0}, {i, 0, 10}, {j, 0, 20}]]}]];


1. I want the wave, when it passes the other end of the boundary at the left, to not be reflected and just move out of the boundary. I tried doing this by not putting boundary conditions for the left end before (not in this code), but all I got is a free boundary, which still reflects the wave.

I know I probably am asking for simple things that can easily be done, so I apologize for my lack of knowledge and I thank you in advance.

• Because the sphere is a 3D object, the computation will need to be performed in 3D. Alternatively, perform the computation in 2D but replace the sphere by a circle. Wave-transmitting boundary conditions have been studied in some detail. Check the literature. Best wishes. – bbgodfrey Mar 4 '16 at 5:00

The computational region in 2D can be obtained by

Ω1 = Rectangle[{0, 0}, {10, 10}]; Ω2 = Disk[{10, 5}, 5];

Ω = RegionUnion[Ω1, Ω2]; RegionPlot[%, AspectRatio -> 2/3, ImageSize -> 400]


or

Ω = RegionDifference[Ω1, Ω2]; RegionPlot[%, AspectRatio -> 1, ImageSize -> 800/3]


depending on what you have in mind.

1D wave-transmitting boundary conditions typically take the form

D[u[x, y, t], t] - D[u[x, y, t], x]]


evaluated at the boundary. Applying this to a backward-going wave give

D[Exp[I k (x + t)], t] - D[Exp[I k (x + t)], x]
(* 0 *)


as desired. 2D wave-transmitting boundary conditions are far more complicated and remain a subject of research. Google "wave-transmitting boundary" and related topics.

Solution for Second Case

As requested in a comment below, a solution for the second region is,

uifWave = NDSolveValue[{Derivative[2, 0, 0][u][t, x, y] -
Inactive[Laplacian][u[t, x, y], {x, y}] == 0, u[0, x, y] == 0,
(D[u[t, x, y], t] /. t -> 0) == 0, u[t, 0, y] == If[0 < t < 1, 1, 0],
DirichletCondition[u[t, x, y] == 0, x > 5 && 0.01 < y < 9.99]},
u, {t, 0, 20}, {x, y} ∈ Ω];


which for t = 8 shows a unit pulse reflected from the disk and propagating back to the left.

Plot3D[uifWave[8, x, y], {x, y} ∈ Ω, AxesLabel -> {x, y, u}] // Quiet


• yes, but how would you solve this pde on the 2nd region ? – Asser Mar 6 '16 at 5:28
• @Asser Solving the wave equation in the second region is unstable, because the triangular zoning is so fine at the far right. Set Ω1 = Rectangle[{0, 0}, {9, 10}] to solve this problem. To say more, I need to better understand what problem you are trying to solve. If you wish to launch a wave from the left and reflect it, the boundary and initial conditions need to be changed. – bbgodfrey Mar 6 '16 at 14:14
• yes, that's exactly what I want to do....is it possible ? – Asser Mar 7 '16 at 15:24
• @Asser Absolutely. Do you wish to launch a pulse (broad in frequency, narrow in time) or a quasi-continuous wave (narrow in frequency, broad in time) from the left boundary? In any case, I recommend starting with u[x, y, 0] = 0 to avoid inconsistencies between the initial and boundary conditions. – bbgodfrey Mar 7 '16 at 15:52
• Originally it's a wave, and to study it's behavior more closely I want to be taking a pulse over the span of time and see what happens when it hits the semi circle boundary. – Asser Mar 8 '16 at 0:55