User:Yongtao-Li/HW6.6

=Problem 6.6 Solve G2DM1.0/D1 using 2D LLEBF(Linear Lagrange Element Basis Function)=

Given
For G2Dm1.0/D1, the PDE can be reduced to where $$\left[ \right]$$ is an identify matrix.

The essential boundary condition is $$g = 2\ \ \ \ on\ \ \ \ \partial \Omega $$.

Find
1) Solve G2DM1.0/D1 using 2D LLEBF until accuracy $${10^{ - 6}}$$ at center (x,y)=(0,0) and verify results with any FE codes with detailed documentation.

2) Use distorted quadrilateral meshes, and compare results with uniform meshes.

Solution
1) For Eq.6.6.1, we can write the weak form

And then we choose Linear Lagrange basis function for each element

After substituting Eq.6.6.3 into Eq.6.6.2 in which Linear Lagrange basis function are both trial function and weight function, we integrate over the whole domain to get stiffness matrix and achieve final results using the following Matlab codes









From the above results we can find out that whatever how many elements we use, we can get a uniform temperature distribution finally. The reason for we can get the exact solution easily is that this static problem has quite easy uniform boundary conditions and therefore we can foresee the final results that the whole area will finally get same temperature as the environment.

The exactly same results can be obtained using codes from the book of Fish and Belytschko with some modify.

2)

We also can modify the mesh2d.m to use distorted elements and the same result in 1) can be achieved.





What is the difference between our own codes and F&B codes?
a) We use direct integrate over the whole domain instead of using Gauss integration. The basis function is given in Eq.6.6.2 and it's much easier to find out the methodology behind codes and the link between weak form (Eq.6.6.1)and the codes. Therefore our codes can illustrate how to use LLEBF and why LLEBF can be used as CBS.

b) We also use some codes from F&B codes but our codes are more general which can increase used elements just by change the n value in input_file_16ele.m. We also change the post-process that can plot 3D results with contour which is the requirement in the lecture.

Why the codes can have exact solution even with four elements?
We think it's a static problem and the boundary condition is so easy that we can even foresee the results before we calculate. It is obvious that we can have uniform temperature distribution which is identical with the environment. The essence of the codes is to solve Laplace equations with boundary conditions and the LLEBF can guarantee exact results on every nodes.