|
- The Helmholtz equation is the classical example of an elliptic
partial differential equation in two space dimensions. It reads
Δ u + λ × u = f, Δ=(d/dx)2+(d/dy)2
λ=0 includes the Poisson equation. We consider here only
an axis parallel rectangle as region for (x,y):
(x,y) in [a,b]x[c,d] and λ
<= 0.
Under these restrictions the equation has an unique solution, given properly
defined boundary conditions. For continuous
f and continuous boundary conditions u is continuous on the
closed rectangle and two times continuously differentiable on the open one.
Observe that the second derivatives need not be continuous on the closed rectangle.
- Elliptic partial differential equations describe a physical system in steady state.
You might imagine of u as the deformation of a thin membrane
under external load f and under the influence of its own mass.
- On the boundary of [a,b]x[c,d] where must be given boundary conditions
in order to get a well posed problem. These might be prescriptions of the function
value (so called Dirichlet data), prescriptions of the directional derivative
in the direction normal to the boundary (von Neumann conditions) or a proper
linear combination of these (Robin conditions). Robin conditions are not implemented here.
- The problem is solved here using the standard finite difference method with
the standard discretization of the second order partial derivatives resulting in
the so called 5 point star:
(1/δx**2)*(ui-1,j-2*ui,j+ui+1,j)+
(1/δy**2)*(ui,j-1-2*ui,j+ui,j+1)+λ*ui,j
=fi,j
- The rectangle [a,b]x[c,d] becomes discretized by a finite grid
(xi,yj), i=0,....,n, j=0,...,m
with equidistant values xi and yj, the values 0 and n
resp. m corresponding to the boundaries. ui,j in the equation above
is an approximate value for the true solution at (xi,yj).
The difference equation is solved for 1 <=i <= n-1, 1 <= j < m-1.
- The discretization error of this method is second order in δx, δy
(measured in the max norm) provided the solution u is four times differentiable on the
closed rectangle. Weaker smoothness allows weaker error estimates only.
The discrete system is a linear system of equations which is solved here by a special routine.
- the computational routine used is hwscrt from netlib/fishpack.
|
|
- There are two predefined cases with known exact solution (on the unit square) and hence
known discretization error and you also have the possibility to define a
problem of your own.
- In the first predefined case the solution is
C4 in the closed rectangle and hence the convergence is of order O(h2)
with h=max(δx,δy).
Here λ =0 and we have Dirichlet data on all of the boundary. (We first choose
a function as a solution and derive the data from this)
- In the second case u is C3 in the interior of
the rectangle only, and only C2 on the boundary. Hence convergence is remarkably weaker here.
Again we have λ =0 but von Neumann data for x=0 and y=0
and Dirichlet data for x=b and y=d.
- If you want to specify a problem of your own, then you must give
- The function f(x,y). You define it as a formula in the language
FORTRAN.
- The specification of the type of boundary value for each of the four
boundary parts of the rectangle: either Dirichlet or von Neumann.
This can be done individually for each of the four edges.
- The formulas for the functions defining the boundary values.
attention: you specify the partial derivative on the boundary for
von Neumann data, hence (d/dx)u at x=a, not the outer normal!
and similar for y.
- The parameter λ. Important : we allow only λ <= 0 !.
- The parameters a,b,c,d defining the rectangle.
- The parameters n and m defining the gridsizes.
- Since you will get a 3D plot of the computed u you must specify your view point via the rotation
angle for the x-axis and the u-axis.
|