Page 98 - Process Modelling and Simulation With Finite Element Methods
P. 98
Partial Differential Equations and the Finite Element Method 85
Therefore the solution to (2.28) is
7c 7c
u(x) = -0.554579x(- - x) - 1.1 1256x2(- - x) (2.42)
4 4
If we go one step further by assuming N = 3, then we get 3 algebraic equations
with three unknowns; cl,cz and c3. The resulting matrix equation is
0.1216 0.0477 0.0228 c1 -0.120
0.0477 0.0328 0.0200 c2 = -0.630 (2.43)
0.0228 0.0200 0.0139 11 c, I 1 - 0.35 1
The solution for (2.43) is
C, = -0.588 C, = -0.838 c3 = -0.349
Therefore the new solution for (2.28) becomes
7c 7c 7c
u(x) = -0.588x(- - x) - 0.838x2(- - x) - 0.349x3(- - x) (2.44)
4 4 4
Figure 2.8 shows the plots of (2.42) and (2.44) together with the analytic
solution (2.29). As we can clearly see, the approximate algebraic solutions can
achieve good agreement with the exact solution if more terms of the series are
included.
If you worked the example, by now you have a clear idea of the weak
formulation of a solution. In next section we discuss the implementation of the
boundary conditions in FEMLAB.
2.1.4 Boundary conditions
As described for the canonical case above, one should note that the stiffness
matrix K is equivalent to Neumann boundary conditions. As we saw in Chapter
One, pure Neumann conditions lead to a singular stiffness matrix, which
FEMLAB could not directly treat, since it resulted in the addition of an arbitrary
and large constant to the solution found by projection methods on to the
eigensystem of the stiffness matrix. One of the vagaries of FEM is the treatment
of boundary conditions.
We could propose to treat boundary conditions much as is done with finite
difference methods. The appropriate lines of the matrix equation are replaced by
direct constraints on the unknowns uI so that the order of the matrix is
preserved. This has the unpleasant effect of breaking the sparsity of the stiffness