User:Eml5526.s11.team6.kurth/HW5

=Problem 5.8: Solving Data Set G1DM1.0/D1 Using Linear Lagrangian Element Basis Functions and Uniform Discretization=

Boundary Conditions
The Essential Boundary condition as applied on the boundary $$\Gamma_g = [1]$$, is

The Natural Boundary condition as applied on the boundary $$\Gamma_h = [0]$$, is

Descritization
Here we want to use Uniform Descritization such that Element nodes are equidistant with number of elements as $$ nel = 4, 6, 8, ..$$

Find
1. Explain how Linear Lagrangian Element Basis Function (LLEBF) are used as Costraint Breaking Solution. 2. Plot all LLEBF used for $$ nel =4 $$. 3. Use matlab to numerically integrate and find the solution for $$n_{el}$$ = 2,4,6,8... until the error evaluated at x=0.5 converges to the order of $$10^{-6}$$ 4. Plot for Exact solution $$ u (x)$$ and Approximate solution $$ u^h (x) $$. 5. Convergence - Plot of error vs. number of nodes (n).

Linear Lagrangian Element Basis Functions as a Constraint Breaking Solution
Linear Lagrangian element basis functions assume the value of the Kronecker Delta at nodes, i.e,

For this case, where $$\displaystyle \Gamma_g = 1$$, define the terminating node, $$\displaystyle x_n = 1$$ so that all except the last of the LLEBF will be equal to zero when evaluated at this point while simultaneously the final basis function, $$ b_n$$ will be equal to unity, i.e.

This breaks the constraints of the weighting coefficients $$\displaystyle \{c_i,\;\;i = 0,2,...,n-1\}$$ and as such any arbitrary set may be chosen, as simply selecting $$\displaystyle c_n = 0$$ will satisfy the homogeneous essential boundary condition.

Solution of the System
In the element sense the basis functions are composed of linear Lagrange equations of the form

Now creating the element shape function matrix for this linear 2-node element:

Now, substituting $$\displaystyle l^e = x_2^e-x_1^e\;$$ into $$ \displaystyle (Eq.5.8.8)$$

The element shape function derivative matrix for these elements is

Now constructing the element stiffness matrix

The element force matrix is

Finally the global stiffness and force matrices are assembled via equations (5.13) and (5.14) (F&B p. 96)

where $$\displaystyle L^e$$ is the element dependent scatter operator.

Plot for Exact solution $$ u (x)$$ and Approximate solution $$ u^h (x) $$ along x
It can be observed from the Figure 5.8.2 (Using 4 nodes) and Figure 5.8.3 (Using 6 nodes) that the exact solution is nearly linear and can be very well approximated by the LLEBFs considered with least 4 number of nodes and obviously also when the number of nodes is increased to 6. This is as the approximated solution $$ u^h (x) $$ very closely imitates the curve for the exact solution $$ u (x)$$.



Convergence - Plot of error vs. number of nodes (n)
Even with (n = 4), sufficiently low number of elements, the system gives considerable convergence to an order of to 10^-3. We need more elements for it to further converge to the order of of 10^-6. Figure 5.7.4 depicts the error as a function of the number of elements.