18.303 Final Exam Solutions, Fall 2010

advertisement
18.303 Final Exam Solutions, Fall 2010
Problem 1: Derivatives and differences (30 points)
´L
(a) Let’s choose the usual inner produce hu, vi = 0 ūv. We want to move  from one side to the other of the inner
product by integrating by parts, and will choose the boundary conditions to make the boundary terms zero.
Integrating by parts and choosing the boundary conditions as we go along, we obtain:
ˆ
ˆ
L
000
hu, Âvi = ūv 0000 = ūv
|0 − ū0 v 000
ˆ
L
= −
ū0
v 00 |0 + ū00 v 00
ˆ
L
=
ū00
v 0 |0 − ū000 v 0
ˆ
L
= −
ū000v|0 + ū0000 v
= hÂu, vi,
where in the first line we cancelled the boundary term by choosing u|0,L = 0 , and in the second line we cancelled
the boundary term by choosing u0 |0,L = 0 . Since v and u have the same boundary conditions, this automatically
zeroes the boundary terms in the next two lines as well.
Note that it is not correct to simply choose u|0,L = 0 and say that we can use the Hermitian property of
d2
00
dx2 from class twice. The problem is that u does not satisfy the same boundary conditions as u, so you can’t
d2
d2 00
00
use the result from class to say that hu, dx2 v i = h dx
2 u, v i.
(b) We will just do center differences four times. As in class, taking a center-difference of um yields u0m+1/2 , i.e. on a
staggered grid. This will now happen four times, alternating between half-integer and integer grids to maintain
the centering:
um+1 − um
u0m+1/2 ≈
,
∆x
u0m+1/2 − u0m−1/2
um+1 − 2um + um−1
u00m ≈
=
,
∆x
∆x2
u00m+1 − u00m
um+2 − 3um+1 + 3um − um−1
u000
=
,
≈
m+1/2
∆x
∆x3
u0000
m ≈
000
u000
m+1/2 − um−1/2
∆x
=
um+2 − 4um+1 + 6um − 4um−1 + um−2
.
∆x4
Problem 2: No more scalars (30 points)
(a) We want exponentially decaying solutions, so we want  to be negative-semidefinite (with zero eigenvalues
corresponding to nonzero limiting values). This means we want hu, Âui ≤ 0 for all u, and hence:
ˆ
hu, Âui = hu, ∇ × c∇ × ui = h∇ × u, c∇ × ui =
c|∇ × u|2 ≤ 0,
Ω
where we have used the self-adjoint property of ∇× to move it to the other side of the inner product. For this
to be true for all u, we clearly require c ≤ 0 everywhere (except at isolated points, but we never worry about
those).
(b) We know from class that hv, ui is conserved for any v ∈ N (Â∗ ) = N (Â) [since we can move ∇× from right-to-left
twice to obtain Â∗ = Â], so the only question is what is v and what does this mean?
To start with, for simplicity take c < 0 (i.e. c 6= 0). From the hint, ∇φ for any φ is the nullspace of ∇×,
so this is clearly in the nullspace of Â. The converse is also true, since  is of the form (∇×)∗ c(∇×). In
particular (re-iterating the proof from class for A = B ∗ B), if v ∈ N (Â) then Âv = 0 =⇒ 0 = hv, Âvi =
1
´
c|∇ × v|2 =⇒ ∇ × v = 0, and so v = ∇φ for some φ. Therefore h∇φ, ui is conserved for any test function φ.
We can simplify this further: integrating by parts, we obtain hφ, ∇ · ui is conserved for any φ, which means that
∇ · u is conserved. (This is also easy to show directly: ∂∇·u
∂t = ∇ · (Âu) = 0 since the divergence of a curl is zero.
Now, suppose we include the case where c = 0 in some region R (not just a set of zero measure). In that
case, there are additional functions in the nullspace: any v such that ∇ × v is nonzero only in R. These give an
additional conservation law that is not quite so simple to write down, but I didn’t actually expect you to notice
this case.
Problem 3: Guided waves (30 points)
2
Consider the scalar wave equation ∇2 u = ∂∂t2u in two dimensions for x ∈ [0, L] and y ∈ (−∞, ∞), with the Neumann
boundary conditions ∂u
∂x x=0,L = 0. That is, Ω is a width-L strip extending infinitely in the y direction, with Neumann
boundaries.
(a) If we look for separable eigenfunctions u(x, y, t) = uk (x)ei(ky−ωt) , what equation and what boundary conditions
does uk satisfy?
(b) Starting with the boundary conditions,
since
k
are simply Neumann on uk : ∂u
=
0.
∂x x=0,L
∂u
∂x
=
∂uk i(ky−ωt)
∂x e
= 0 implies
∂uk
∂x
= 0, the boundary conditions
The equation works out exactly as in class:
∂2
uk ei(ky−ωt) = −ω 2 uk ei(ky−ωt)
∂t2
= (u00k − k 2 uk )ei(ky−ωt) ,
∇2 [uk ei(ky−ωt) ] =
yielding: u00k = −(ω 2 − k 2 )uk .
(c) Since this equation is of the same form as one we have seen many times in class (u00 = −u · number), we know
immediately that the solutions are sines/cosines/exponentials. To satisfy the Neumann boundary conditions,
much like in one of the psets, the solutions must be cosines:
nπx uk,n (x) = cos
L
for n = 0, 1, 2, 3, . . . (of course, uk could be multiplied by any constant too). Note that n = 0 is a valid
solution! The corresponding eigenfunctions are obtained by plugging this into the eigenequation, obtaining
ω 2 − k 2 = (nπ/L)2 , i.e.
p
ωn (k) = ± k 2 + (nπ/L)2
for n = 0, 1, 2, 3, . . ..
k
(d) To obtain a wavepacket solution that propagates without spreading, we must have a group velocity ∂ω
∂k that
is constant (independent of k). This is not true of ωn (k) from the previous part for n > 0, similar to class.
However, for n = 0 we obtain ω = ±|k|, a straight line, and in this case the group velocity is a constant (±1)
and so wavepackets will indeed propagate without spreading if we make them out of the n = 0 modes.
Problem 4: Timestepping and stability (30 points)
(a) Since the coefficients are constant and the domain is infinite, we can look for von-Neumann solutions unm = λn eikm
∂ ∗
∂
and check whether |λ| ≤ 1 for all k. (Note that the original PDE is a wave equation, since ( ∂x
) = ∂x
, so there
are no legitimate exponentially growing solutions.) Plugging this in, and dividing both sides by λn eikm , we
obtain:
λ−1
eik − e−ik
eik − e−ik
= −c αλ
+ (1 − α)
∆t
2∆x
2∆x
i sin(k)
= −c [αλ + (1 − α)]
,
∆x
2
using the fact that eik − e−ik = 2i sin(k). Solving for λ, we find:
λ(k) =
∆t
1 − ic(1 − α) ∆x
sin k
.
∆t
1 + icα ∆x sin k
1−i#
1+i#
If α = 0.5, then this is of the form λ =
unconditionally stable.
∆t
for # = ic 21 ∆x
sin k, giving |λ| = 1 and so the scheme is
(b) In general,
2
2
|λ| =
2
∆t
1 + c2 (1 − α)2 ∆x
2 sin k
2
2
∆t
1 + c2 α2 ∆x
2 sin k
,
and this is ≤ 1, i.e. the numerator is ≤ the denominator, if 1 − α ≤ α, and so it is unconditionally stable for
1 ≥ α ≥ 1/2.
(c) For α < 1/2, the numerator of |λ|2 above is > the denominator, regardless of k or ∆t (> 0), and so it is always
unstable.
Problem 5: Green’s functions (30 points)
(a) We use the trick from class and homework: write u = u0 + b, where u0 |dΩ = 0, to turn it back to an ordinary
Dirichlet problem for u0 : Âu0 = f − Âb. This satisfies the ordinary G0 Green’s function integral, with the new
right-hand side f − Âb:
ˆ
u0 (x) =
G0 (x, x0 ) f − Âb 0 dn x0 ,
x
Ω
ˆ
and thus
ˆ
G0 (x, x0 )f (x0 )dn x0 −
u(x) = u0 + b = b(x) +
Ω
G0 (x, x0 )Â0 b(x0 )dn x0 ,
Ω
0
0
where by  here I mean the operator  acting on the x coordinate.
(b) Here, letting Â0 = ∇02 , the b term from above integrates by parts to:
‹
ˆ
((0 ˆ
0 ((
0 (0 (
(
G
(x,
x
)∇
b(x
)
·
dA +
∇0 G0 (x, x0 ) · ∇0 b(x0 )
−
G0 (x, x0 )∇02 b(x0 ) = −
0 (
(
(
(
(
Ω
‹ dΩ
ˆ Ω
0
0
0
0
=
∇ G0 (x, x )b(x ) · dA −
∇02 G0 (x, x0 ) b(x0 ),
dΩ
Ω
where in the first line we have used the fact that G0 (x, x0 ) = G0 (x0 , x) = 0 for x0 ∈ dΩ by the given boundary
conditions (using reciprocity to swap x and x0 ). Also, from reciprocity
and the definition of G0 , we have
´
∇02 G0 (x, x0 ) = ∇02 G0 (x0 , x) = δ(x0 − x). Inserting this into the last Ω integral, the delta function integrates to
give −b(x) to cancel the +b(x) term in u(x) above, leaving:
ˆ
‹
0
0 n 0
u(x) =
G0 (x, x )f (x )d x +
∇0 G0 (x, x0 )b(x0 ) · dA0 ,
Ω
dΩ
which looks eactly like the zero-boundary-condition solution plus an additional set of “source” terms from the
boundary. (In fact, from class, the ∇G0 source terms correspond to “dipole” sources on the boundaries.)
3
Download