Docsity

Assignment 4 - Scientific Computing II - Spring 2005 | AMSC 661, Assignments of Mathematics

Toggle sidebar
bg1
Your Homework Assignment
CMSC/AMSC 661 Spring 2005
Waves, Part 1
Due May 10
In this homework, we model forced vibrations of a stretched string or mem-
brane. We use a hyperbolic PDE solver, a Helmholtz solver, eigenvalues and
eigenfunctions, and Fourier transforms.
The Problem
Suppose we take a membrane – for example, a flat piece of balloon material,
or the skin of a drum, or a valve in a heart.
Now apply a force to the membrane, so that the membrane vibrates. Our goal
is to be able to predict the shape of the membrane as a function of time.
The Model
The model for this problem is the wave equation
utt −c2∆u=f
where (x, u(x, t)) gives the coordinates of the membrane at time t,andf(x, t)
defines the force exerted on the membrane at xat time t.
The constant cis the speed of propagation of waves in the medium.
In order to make the solution unique, we specify initial conditions u(x, 0) and
ut(x, 0) and boundary conditions u(0,t)=u(1,t) = 0. The boundary condi-
tions say that the membrane’s position is fixed along the boundary.
Sometimes the solution to the wave equation can be computed through the
Helmholtz equation.
Problem 1. (No points. Exercise only, to get ready for Problem 2, but it
may show up on a quiz.) Consider the problem
utt −c2∆u=e−iωtf(x)
with initial conditions u(x, 0) = ut(x, 0) = 0 for x∈Ω. Assume that the
solution is of the form u=e−iωt z(x). Substitute this solution into the
equation to obtain a problem of the form of the Helmholtz equation
−∆z−κ2z=g
with zgiven on the boundary of Ω. How are gand κdefined?
1
pf2

Partial preview of the text

Download Assignment 4 - Scientific Computing II - Spring 2005 | AMSC 661 and more Assignments Mathematics in PDF only on Docsity!

Your Homework Assignment CMSC/AMSC 661 Spring 2005 Waves, Part 1 Due May 10

In this homework, we model forced vibrations of a stretched string or mem- brane. We use a hyperbolic PDE solver, a Helmholtz solver, eigenvalues and eigenfunctions, and Fourier transforms.

The Problem

Suppose we take a membrane – for example, a flat piece of balloon material, or the skin of a drum, or a valve in a heart.

Now apply a force to the membrane, so that the membrane vibrates. Our goal is to be able to predict the shape of the membrane as a function of time.

The Model

The model for this problem is the wave equation

utt −^ c^2 ∆u^ =^ f

where (x, u(x, t)) gives the coordinates of the membrane at time t, and f (x, t) defines the force exerted on the membrane at x at time t.

The constant c is the speed of propagation of waves in the medium.

In order to make the solution unique, we specify initial conditions u(x, 0) and ut(x, 0) and boundary conditions u(0, t) = u(1, t) = 0. The boundary condi- tions say that the membrane’s position is fixed along the boundary.

Sometimes the solution to the wave equation can be computed through the Helmholtz equation.

Problem 1. (No points. Exercise only, to get ready for Problem 2, but it may show up on a quiz.) Consider the problem

utt − c^2 ∆u = e−iωtf (x)

with initial conditions u(x, 0) = ut(x, 0) = 0 for x ∈ Ω. Assume that the solution is of the form u = e−iωtz(x). Substitute this solution into the equation to obtain a problem of the form of the Helmholtz equation

−∆z − κ^2 z = g

with z given on the boundary of Ω. How are g and κ defined?

Problem 2. (20) (Fast solvers) Consider the Helmholtz equation

−∆z − κ^2 z = g

in a 2-dimensional region Ω with z = 0 on the boundary of Ω. Let Ω be the unit square, and discretize using (second-order accurate) finite differences, obtaining a matrix equation

Az = g

where z and g contain values of z and g at the mesh points. Write a well-documented Matlab function z = helmsolve(kappa,g) that uses the method in the “Notes on Fast Poisson Solvers” to solve this linear system, where g is a two-dimensional array of values g(xk, yj ), k, j = 1,... , n, where xk = k/(n + 1), yj = j/(n + 1). The output array z should contain the values of the computed solution at the mesh points (xk, yj ), k, j = 1,... , n.

The Matlab routines dst and idst will be useful.

For debugging, it may be useful to generate the 2-dimensional Laplacian matrix A of size n^2 × n^2 :

A1 = spdiags([-ones(n,1),2*ones(n,1),-ones(n,1)],-1:1,n,n); en = speye(n); A = kron(A1,en) + kron(en,A1);

h = 1/(n+1); A = A/(h*h);

But do not include this code in your submission.

Submission instructions: Submit your Matlab file as a plain-text email attachment. I will grade your submission by

  • Looking at the code, to see that the algorithm is efficient, correct and well documented.
  • Running your code on some test problems.

Therefore, make sure that your inputs and outputs match the specifications exactly.