User:Eml5526.s11.team3.sahin/Homework 6

=Problem 6.2 Using Quadratic Lagrange Element Basis Functions to Obtain Trial and Exact Solution with Data Set G1DM1.0/D1=

Given: Data set G1DM1.0/D1 defined on [[media:fe1.s11.mtg9.djvu|Mtg 9 (e)]]
Strong form

where $${a_2}\left( x \right){\text{ =  2 + 3x}}$$  $$\qquad\text{and}\quad $$   $$f\left( {x,t} \right) = 5x $$  so we get Essential boundary conditions, Natural boundary conditions,

Find
1. For nel=2 compute  $$\tilde{\mathbf{K}}=\sum_{e=1}^{2}\tilde{\mathbf{K^{e}}}$$   with   $$\tilde{\mathbf{K^{e}}}$$   by Lecture 30-5 display  $$\tilde{\mathbf{K^{e}}}, e=1,2 $$

2. Compute $$\mathbf{k^{e}}$$ ,  $$\mathbf{L^{e}}$$  for e=1,2

3. Compute $$ \tilde{K}^{e}=L^{eT}K^{e}L^{e}$$ for e=1,2 and compare with 1)

4. Plot all QLEBF for nel=3

5. Plot $$ u_{\tilde{n}}^{h}  \ vs\   u$$ and $$ u_{\tilde{n}}^{h}\left(0.5 \right)-u\left(0.5 \right)\ vs\ \tilde{n}$$

1) Compute $$\tilde{\mathbf{K}}$$  for nel=2
$$\tilde{\mathbf{K^{e}}}$$ can be written as

(Refer Lecture 30-5)

the above figure shows a torsion bar with 2 elements, $$\omega _{1}$$  and  $$\omega _{2}$$  ,since we are considering a QLEBF, number of elements per node is 3. The nodes are marked in the above figure as points  $$x_{1}, \quad x_{2},\quad x_{3},\quad x_{4}\quad  and \quad x_{5}$$  since the length of the bar is 1, and we have taken equidistant element nodes, the nodes are located at (0, 0.25, 0.5, 0.75, 1) respectively.

Since there are 3 nodes per element there will be three basis functions per element corresponding to each of the nodes.

The basis functions for the 1st element can be written as

The basis functions for the 2nd element can be written as

From Eq(2.6) $$\tilde{\mathbf{K}}\mathbf{_{11}^{1}}=\int_{x_{1}}^{x_{3}}{b_{1}^{1}}'(x)a_{2}(x){b_{1}^{1}}'(x)dx$$

Substituting all the terms and integrating we get $$\tilde{\mathbf{K}}\mathbf{_{11}^{1}}=10.833$$

Similarly the other terms in the  $$\tilde{\mathbf{K}}\mathbf{_{ij}^{1}}$$  can be found out and using MATLAB (MATLAB code attached)

Similarly

Commment
Note the order of $$\tilde{\mathbf{K}}\mathbf{^{e}}$$  is  $$\tilde{n} X \tilde{n}$$  where  $$\tilde{n} $$  is the total number of degrees of freedom,  $$\tilde{n}=n_{E}+n_{F} $$ , (  $$n_{E} $$  no. of prescribed dofs on ess. bc and  $$n_{F} $$  no. of free dofs) in this case for nel=2  $$n_{E}=2 $$  and  $$n_{F}=3 $$  , hence the order of  $$\tilde{\mathbf{K}}\mathbf{^{e}}=5 X 5$$

2) Compute $$\mathbf{k^{e}},\mathbf{L^{e}}$$  for e=1,2
In this case order of $$\mathbf{k^{e}}$$  is 3 X 3 and order of  $$\tilde{\mathbf{K}}\mathbf{^{e}}$$  is 5 X 5 hence for the matrix multiplication to be possible the order of  $$\mathbf{L^{e}}$$  is 3 X 5

Hence for e=1,2

$$\mathbf{k^{e}}$$ can be calculated from Eq 1.6 similar to  $$\tilde{\mathbf{K}}\mathbf{^{e}}$$  but the order of  $$\mathbf{k^{e}}$$  is 3 X 3 hence for element 1

Similarly for element 2

$$\mathbf{L^{1}}$$ for the 1st element is given by

for element 2 $$\mathbf{L^{2}}$$  is given by

3) Compute $$\tilde{\mathbf{K}}\mathbf{^{e}}$$  for e=1,2
for element 1

For element 2

The $$\tilde{\mathbf{K}}\mathbf{^{1}}$$  and  $$\tilde{\mathbf{K}}\mathbf{^{2}}$$  matrix obtained from part 1) i.e from Eq. 2.13 and Eq. 2.14 are same as that obtained in part 3 i.e Eq. 2.22 and Eq. 2.23

5)Plot $$ u_{\tilde{n}}^{h} \ vs\   u$$ and $$ u_{\tilde{n}}^{h}\left(0.5 \right)-u\left(0.5 \right)\ vs\ \tilde{n}$$