Biomedical Engineering Reference
In-Depth Information
% to the total coefficient matrix q
% and the load array rhs
q(ii,ii) = q(ii,ii) + qe;
rhs(ii)
= rhs(ii)
+ rhse;
end
(iv) Solution of the set of equations taking into account the boundary conditions.
(v) Post-processing based on the solution, for instance by computing associated quanti-
ties such as heat fluxes or stresses.
14.9
Example
As an example consider the diffusion problem with the following parameter set-
ting. We consider the domain
:0
≤
x
≤
1, with prescribed essential boundary
conditions at
x
=
0 and
x
=
1. These conditions are:
u
(0)
=
0 and
u
(1)
=
0. There
are no natural boundary conditions. The material constant satisfies:
c
=
1 and the
source term:
f
=
1.
is divided into five elements of equal length. Fig.
14.9
shows
the solution. The left part displays the computed solution
u
(solid line) as well as
the exact solution (dashed line). Remarkably, in this one-dimensional case with
The domain
0.14
0.5
0.4
0.12
0.3
0.1
0.2
0.1
0.08
u
p
0
0.06
-0.1
-0.2
0.04
-0.3
0.02
-0.4
0
-0.5
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
1
x
x
Figure 14.9
Five element solution. Left: (solid line) approximate solution
u
h
(
x
), (dashed line) exact solution
u
(
x
).
Right: (solid line) approximate flux
p
h
(
x
), (dashed line) exact flux
p
(
x
).