Information Technology Reference
In-Depth Information
where
ı D AL 2
kc 0
is a dimensionless number.
˘
Exercise 7.5. Derive
an
algorithm
for
solving
(7.86)
with
Robin
boundary
conditions:
@ u
@x D h T . u u s /;
x D 0;
@ u
@x D h T . u u s /;
x D 1:
(Hint: Follow the reasoning used for incorporating Neumann boundary con-
ditions.)
˘
Exercise 7.6. Show that u .x; t / D ax C bt C c,wherea, b,andc are constants, is an
exact solution of both the diffusion equation and the numerical scheme, provided
that the boundary conditions and the source term are adjusted to fit this solution.
That is, a program should compute u i
D aix C b`t C c exactly (to machine
precision).
˘
Exercise 7.7. Suppose that we want to test a computer program that implements
non-homogeneous Dirichlet conditions of the type
u .0; t / D D 0 .t /;
u .1; t / D D 1 .t /;
and non-homogeneous Neumann conditions of the type
@
@x u .0; t / D h 0 .t /;
@
@x u .1; t / D h 1 .t / :
To this end, we want to compare the numerical solution with an exact solution of
the problem. Show that the function
u .x; t / D e at sin.b.x c//
is a solution of the diffusion equation, where a, b,andc are constants. The nice
feature of this solution is that it obeys certain time-dependent non-homogeneous
boundary values by choosing certain values of the constants a, b,andc.Usethe
freedom in choosing a, b,andc to find an exact solution of a diffusion problem
with a non-homogeneous Dirichlet condition at x D 0 and a non-homogeneous
Neumann condition at x D 1.
˘
Exercise 7.8. We consider a scaled diffusion PDE without source terms,
@t D @ 2 u
@ u
:
@x 2
 
Search WWH ::




Custom Search