|
- The convection equation in one space dimension reads
(d/dt)u + a (d/dx)u = 0,
where we consider the region x > 0, t > 0 and a constant
convection parameter a.
With any smooth real function h obviously
u(x,t) = h(x-a*t)
is a solution. The characteristics of this equation are
x-a*t = const
that means lines in the (x,t) plane of the form
t = (1/a)*x +const
The solution u is constant along these lines.
We assume that the convection parameter a satisfies a > 0,
hence transport goes ''from left to right''.
In order to have a well posed problem we choose as initial values
u(x,0) = h(x) and u(0,t) = h(-a*t).
- As region we use [0,xend] × [0,tend] .
- We solve this problem here using finite difference methods.
A necessary condition for the convergence of these methods is the
so called Courant-Friedrichs-Levy condition, shortly CFL, which requires that
for any computed grid point the interval(s) along the boundary, from
which the value of the computed u depends (the ''numerical dependency region'')
contains the intersection of the characteristic through that grid point with the
initial line (either on the x or the t axis) (the ''analytical
dependency region'')
-
The timestep which we will use is computed as
δt = tend/m
and the space-grid as
δx = xend/n
-
We take 2n grid points for the initial values on the x-axis.
- Convection equations (which can have a much more general form, for example
with a dependent on x,t,u), describe transport phenomena.
In the case we consider here this is quite obvious: the initial value is shifted along
the characteristics without any alteration.
a > 0 has the meaning of transport speed here.
- The three methods which we present here (Friedrichs-, Lax-Wendroff- and
upwind) are difference methods. Friedrichs and upwind are consistent of order one
and Lax-Wendroff of order two (and convergent with this order, if CFL
is satisfied)
- The formulas are:
ui,j+1 = (1/2)*(ui+1,j+ui-1,j)
+a*δt/(2*δx)*(ui+1,j-ui-1,j) Friedrichs
ui,j+1 = ui,j+
a*δt/δx*(ui,j-ui-1,j) Upwind
ui,j+1 = ui,j+a*δt/(2*δx)*(ui+1,j-ui-1,j)
+(1/2)*(a*δt/δx)2(ui+1,j -2*ui,j+ui-1,j) Lax Wendroff
Here i denotes the x- and j the t-grid.
- These methods approximate the solution on a grid (i*δx,j*δt) .
- CFL can be expressed here as
a*(δt/δx) <= 1.
- Because of the quite special solution behaviour you have the chance to produce a discretization error
zero here.
|