User:Eml5526.s11.team7.jb/prob66

Problem Description
Solve the general 2-D model with data set 1 (G2DM1.0/D1) using 2-D Linear Lagrangian element basis function (LLEBF) by increasing the number of elements until an accuracy of $$\displaystyle 10^{-6}$$ is reached at the center $$\displaystyle (x,y)=(0,0)$$.

Integrate $$\displaystyle \mathbf{k^{e}}$$ in parent coordinates $$\left \{ \xi_{i} \right \}$$. Find $$\displaystyle \mu$$ to integrate $$\displaystyle \mathbf{k^{e}}$$ exactly with Gauss-Legendre quadrature (GLQ)

Given
For G2DM1.0/D1, the governing partial differential equation (PDE) and given conditions are,


 * $$\displaystyle \frac{\partial}{\partial x_{i}} \left[ \boldsymbol{\kappa_{ij}} \frac{\partial u}{\partial x_{j}} \right ] + f = \rho c \frac{\partial u}{\partial t} $$


 * where
 * The domain $$\displaystyle \Omega = \overline{\omega}$$ is a biunit square


 * $$\displaystyle \boldsymbol{\kappa_{ij}}=\boldsymbol{I}$$


 * $$\displaystyle f = 0$$


 * $$\displaystyle \bar{m} \frac{\partial u}{\partial t } = 0 $$ (static case)

So the PDE simplifies to:
 * $$\displaystyle \frac{\partial}{\partial x_{i}} \left[ \boldsymbol{I} \frac{\partial u}{\partial x_{j}} \right ] = 0$$

The natural boundary condition is not prescribed and the essential boundary condition is defined below:


 * $$\displaystyle g=2$$ on $$\displaystyle \partial u$$

Generating LLEBF
The 2-d Lagrangian interpolation function can be formed as follows
 * $$\displaystyle N_{I}^{e}(x,y)=L_{i,m}^{e}(x)\cdot L_{i,m}^{e}(y)$$

where
 * $$\displaystyle I=i+(j-1)m$$

For linear basis functions there are two nodes per element in along each dimension $$\displaystyle n=m=2$$. So for each element there are four nodes and four corresponding basis functions.
 * $$\displaystyle N_{1}^{e}(x,y)=L_{1,2}^{e}(x)\cdot L_{1,2}^{e}(y)=\frac{(x-x_{2})(y-y_{2})}{(x_{1}-x_{2})(y_{1}-y_{2})}$$
 * $$\displaystyle N_{2}^{e}(x,y)=L_{2,2}^{e}(x)\cdot L_{1,2}^{e}(y)=\frac{(x-x_{1})(y-y_{2})}{(x_{2}-x_{1})(y_{1}-y_{2})}$$
 * $$\displaystyle N_{3}^{e}(x,y)=L_{1,2}^{e}(x)\cdot L_{2,2}^{e}(y)=\frac{(x-x_{2})(y-y_{1})}{(x_{1}-x_{2})(y_{2}-y_{1})}$$
 * $$\displaystyle N_{4}^{e}(x,y)=L_{2,2}^{e}(x)\cdot L_{2,2}^{e}(y)=\frac{(x-x_{1})(y-y_{1})}{(x_{2}-x_{1})(y_{2}-y_{1})}$$

For example if one element is used the basis function for the first element on that element is as follows:
 * $$\displaystyle N_{1}^{1}(x,y)=\frac{(x-1)(y-1)}{(-1-1)(-1-1)}$$

One can see from the plot of this basis function that it is equal to one at (-1,-1) and equal to zero at all other nodal points and thereby satisfies the CBS:



The following matlab code was adapted from Problem 6.5 to solve the (G2DM1.0/D1) using 2-D LLEBF.



The exact solution is found simply by analyzing the data given in the problem. One can see the temperature field does not change with time as given by $$\displaystyle \frac = 0$$. There is no internal heat generation as given by $$\displaystyle f=0$$. Lastly the conductance matrix is equal to the identity matrix meaning that the material is isotropic. The temperature is given around the entire domain as 2 (essential boundary condition) and no flux is applied (natural boundary condition). So the biunit square is isotropic, has temperature two around its entire border with no flux, internal heat generation, or change in temperature. The only possible conclusion is that the exact solution is $$\displaystyle {u(x,y)=2}$$.

So the temperature at the center $${u(0,0)=2}$$. The approximate solution yielded $${u^h(0,0)=2}$$. We find the error to be zero using only one element.


 * $$\displaystyle \tilde{k}(w,u)=\int_{\Omega^{}}^{.} \nabla w \boldsymbol{\kappa}\nabla u d\Omega$$
 * $$\displaystyle \tilde{m}(w,u)=\int_{\Omega^{e}}^{.} w\rho c\frac{\partial u}{\partial t}d\Omega=0$$
 * $$\displaystyle \tilde{f}(w)=-\int_{\Gamma_{h}^{e}} whd\Gamma_{h}^{e}+\int_{\Omega}  wfd\Omega=0$$


 * $$\displaystyle \tilde{k}_{ij}^{e}=\int_{\omega^{e}}^{.} \nabla(N_{I}^{e}) \boldsymbol{\kappa}\nabla(N_{J}^{e})d\omega^{e}$$


 * $$\displaystyle \tilde{k}_{ij}^{e}=\int_{\omega^{e}}^{.} \left [\boldsymbol{J}^{e*-T}\nabla_\xi N_{I}^{e}(\xi))\right ] \boldsymbol{\kappa}(\xi) \left [\boldsymbol{J}^{e*-T}\nabla_\xi N_{J}^{e}(\xi))   \right ] |\boldsymbol{J}| d\omega^{e}$$