text:
User:Eml5526.s11.team6.deshpande/hwk6

= Problem 6.7 Rules of Matrix algebra=

Solution
Hence, Therefore, Now, Hence, from eq. (6.7.6) and eq. (6.7.11)

Now, Using eq. (6.7.8), we can write Verified using | Wolfram Alpha

Hence, from eq.(6.7.14) and eq.(6.7.15) we can say that

Syntax for Wolfram Alpha:

Multiplication of two matrices:

{{1, 1, 1}, {2, -1, 3}, {3, 2, 6}}*{{1, 3, 5}, {1, -4, 1}, {2, 5, 8}}

Transpose of those multiplied matrices:

transpose[{{1, 1, 1}, {2, -1, 3}, {3, 2, 6}}*{{1, 3, 5}, {1, -4, 1}, {2, 5, 8}}]

Inverse of the above:

invert{transpose[{{1, 1, 1}, {2, -1, 3}, {3, 2, 6}}*{{1, 3, 5}, {1, -4, 1}, {2, 5, 8}}]}

Take inverse of A and then transpose it:

transpose[invert{{1, 1, 1}, {2, -1, 3}, {3, 2, 6}}]

Take transpose of A and then invert it:

invert{transpose[{{1, 1, 1}, {2, -1, 3}, {3, 2, 6}}]}

=Problem 6.8=

Solution
Nodes and weights for the 5-point Gauss–Legendre formula according to | NIST Handbook are as follows:

For the table given in the problem statement, the calculated value of each term is as follows

In Fish and Belytschko's book on page 89 The position of Gauss points and corresponding weights are as follows

Hence, from the above tables we can conclude that the table given in problem statement (from [[media:fe1.s11.mtg36.djvu|Mtg 36 (a,x)]]) is reasonably accurate when compared to the above tables from NIST handbook and Fish and Belytschko's book on page 89.

2.Use Gauss quadrature to obtain exact values of the following integrals. Verify by analytical integration:
(c) Write a MATLAB code that utilizes function gauss.m and performs Gauss integration. Check your manual calculations against the MATLAB code.

Solution
a) We have $$2n_{gp}-1\ge 2 \Rightarrow \quad take \quad n_{gp}=2$$

Hence, $$(W_1,{\xi}_1) ,\quad (W_2,{\xi}_2)$$ can be calculated as follows:

Now, a=0, b=4

Hence,

Hence, the integral becomes,

Analytically, the integration can be calculated as follows:

We get the value of Gauss integration from MATLAB code as 25.33333 which is same as we got in eq. (6.8.7) by Gauss quadrature and also same as eq.(6.8.8) by Analytical integration.

b) The given integral is

We have

$$2n_{gp}-1\ge 4 \Rightarrow \quad take \quad n_{gp}=3$$

Hence, from the table of $$ {W_i,x_i}$$ in the first part of this problem we get,

Hence integral becomes,

Analytically, the integration can be calculated as follows:

We get the value of Gauss integration from MATLAB code as 1.7333 which is same as we got in eq. (6.8.11) by Gauss quadrature and also same as eq.(6.8.12) by Analytical integration.

3.Use three point Gauss Quadrature to evaluate the following integrals. Compare to the analytical itegral.
(c) Write a MATLAB code that utilizes function gauss.m and performs Gauss integration. Check your manual calculations against the MATLAB code.

Solution
We have

$$ \quad n_{gp}=3$$

Hence, from the table of $$ {W_i,x_i}$$ in the first part of this problem we get,

Hence, the integral becomes,

a)

We get the same results by integrating this function with Wolfram Alpha. Hence it is same as the analytical solution of the integral.

We get the value of Gauss integration from MATLAB code as 0 which is same as we got in eq. (6.8.16) by Gauss quadrature and also same as by Analytical integration in Wolfram Alpha.

b)

We have

$$ \quad n_{gp}=3$$

Hence, from the table of $$ {W_i,x_i}$$ in the first part of this problem we get,

Hence, the integral becomes,

We get the result by integrating this function with Wolfram Alpha as I=1 which is different than which is calculated with three point qudrature as I=1.5299 (eq.6.8.18).

We get the value of Gauss integration from MATLAB code as 1.53 which is same as we got in eq. (6.8.18) by Gauss quadrature but it is different than Analytical integration in Wolfram Alpha.

4. Effect on accuracy of integration due to change in number of points in Gauss Quadrature
The integral $$\displaystyle \int\limits_{-1}^{1}{\left( 3{{\xi }^{3}}+2 \right)d\xi }$$ can be integrated exactly using two-point Gauss quadrature. How is the accuracy affected if

a. one-point quadrature is employed;

b. three-point quadrature is employed.

Check your calculations against MATLAB code.

Solution
a.

We have

$$ \quad n_{gp}=1$$

Hence, from the table of $$ {W_i,x_i}$$ in the first part of this problem we get,

Hence, the integral becomes

b.

We have

$$ \quad n_{gp}=3$$

Hence, from the table of $$ {W_i,x_i}$$ in the first part of this problem we get,

Hence, the integral becomes,

We get the value of Gauss integration from MATLAB code as 4 for both n=1 and n=3 which is same as we got in eq. (6.8.20)of part (a) and (eq.6.8.22) of part (b) by Gauss quadrature and also it is same as Analytical integration in Wolfram Alpha.

Hence, the accuracy of the given integral is not affected for one point Gauss Quadrature and for three point Gauss Quadrature.

title: User:Eml5526.s11.team6.deshpande/hwk6


text: File:Tm7 pb 8 6 temp 4.jpg

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: File:Tm7 pb 8 6 temp 4.jpg


text: File:HWK6 P9.jpg

title: File:HWK6 P9.jpg


text: File:Tm7 pb 8 6 flux 4.jpg

title: File:Tm7 pb 8 6 flux 4.jpg


text: File:Tm7 pb 8 6 temp 16.jpg

title: File:Tm7 pb 8 6 temp 16.jpg


text: File:Tm7 pb 8 6 flux 16.jpg

title: File:Tm7 pb 8 6 flux 16.jpg


text: File:Tm7 pb 8 6 temp 64.jpg

title: File:Tm7 pb 8 6 temp 64.jpg


text: File:Tm7 pb 8 6 flux 64.jpg

title: File:Tm7 pb 8 6 flux 64.jpg


text: File:Fe1.s11.team6.kurth.hw6.prob2.fig2.jpeg


text:
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.

title: User:Yongtao-Li/HW6.6


text:
User:EML4500.f08.JAMAMA/FE/JAN

= 7.1 LLEBF 2D =

Given BCs for 2D
$$ \Omega = \bar \omega = \Box $$ (bi-unit square)

Stiffness matrix $$ \mathbf{\kappa} = \mathbf{I} $$

Where $$ \mathbf{I} \ $$ is identity matrix, namely $$ \mathbf{I}_{nxn} =

\begin{bmatrix} 1 & 0 & \cdots & 0 & 0      \\ 0 & 1 & \cdots & 0 & 0      \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & 1 & 0      \\ 0 & 0 & \cdots & 0 & 1 \end{bmatrix}_{nxn}

$$

Forcing functions

$$ f = 1 \ $$

Transien response

$$ \frac{\partial u}{\partial t} = 0 \ $$

Essential BC

$$ g = 2 \ $$ on $$ \partial \Omega \ $$

Natural BC

None

Find Temperature at (0,0) and other inside nodes
Knowing the

$$ div(\mathbf{\kappa} \ grad(u)) + f = \rho c \frac{\partial u}{\partial t} \ $$

1) Find steady state displacement and plot.

2) Find transient displacement and plot

$$ u(x,t=0) = xy \ $$

a)

$$ f(x,t) = 0; x \in \Omega and t > 0 \ $$

$$ g(x,t) = 2; \Gamma_g \in \partial \Omega \ $$

b)

$$ f(x,t) = 1; x \in \Omega and t > 0 \ $$

$$ g(x,t) = 2; \Gamma_g \in \partial \Omega \ $$

1)
In general by Prof. Vu Quoc's

$$ \tilde{m}(w,u) + \tilde{k}(w,u) = \tilde{f}(w,u) \ $$

$$ \tilde{m}(w,u) = \int_\Omega w \rho c \frac{\partial u}{\partial t} d \Omega \ $$

$$ \tilde{k}(w,u) = \int_{\Omega^e} \triangledown{w} \kappa(x, y) \triangledown{u} d \Omega \ $$

$$ \tilde{f}(w) = - \int_{\Gamma_h}w h d \Gamma_h + \int_\Omega w f d \Omega \ $$

$$ K_{ij}^e = \int_{\Omega^e} \triangledown{b^e_i}'(x, y) \kappa(x, y) \triangledown{b^e_j}'(x, y) d \omega_x \ $$

, where $$ x = x^e \ $$, where $$x^e \ $$ represents local node.

For linear 2D case with boundary being square

Bases, $$ b_i \ $$ are defined to be $$ L_{[I,J]} (x, y) = N^e_{[I,J]} (x, y) \ $$

where $$ N^e_{[I,J]}(x, y) = N_I^e(x)N_J^e(y) \ $$ and $$ I, J \ $$ corresponds to numbering of nodes on element scale.

also noting that it's a rectangular shape, such that the distance from x: 1-to-2 = 1-to-3 and node 1 = node 4 in 'x' coordiantes, y: 1-to-4 = 1-to-3 and node 1 = node 2 in 'x' coordinates, we substitute $$ y^e_4 $$ for $$ y^e_3 \ $$ and $$ y^e_1 $$ for $$ y^e_2 \ $$ and the same for other coordinates

$$ N^e_{[1,1]} (x, y) = \frac{x^e-x^e_2}{x^e_1 - x^e_2} \frac{y^e-y^e_4}{y^e_1 - y^e_4} = \frac{1}{A^e}(x-x^e_2)(y - y^e_4) = b_1^e (x,y) \ $$

$$ N^e_{[2,1]} (x, y) = \frac{x^e-x^e_1}{x^e_2 - x^e_1} \frac{y^e-y^e_4}{y^e_1 - y^e_4} = -\frac{1}{A^e}(x-x^e_1)(y - y^e_4) = b_2^e(x,y)\ $$

$$ N^e_{[2,2]} (x, y) = \frac{x^e-x^e_1}{x^e_2 - x^e_1} \frac{y^e-y^e_1}{y^e_4 - y^e_1} = \frac{1}{A^e}(x-x^e_1)(y - y^e_1) = b_3^e (x,y) \ $$

$$ N^e_{[1,2]} (x, y) = \frac{x^e-x^e_2}{x^e_1 - x^e_2} \frac{y^e-y^e_1}{y^e_4 - y^e_1} = -\frac{1}{A^e}(x-x^e_2)(y - y^e_1) = b_4^e (x,y) \ $$

Next we will convert the square element to same size parent element of bi-unit square

$$ x^e = x_1^e N_1^e(\xi) + x_2^e N_2^e(\xi) = x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2}, \xi \in [-1 +1] \ $$

$$ y^e = y_1^e N_1^e(\eta) + y_4^e N_4^e(\eta) = y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2}, \eta \in [-1 +1] \ $$

Then by noting wich side/value of 'x' will be greater in defined rectangular shown

Therefore, we convert element coordinates to parent coordinates

$$ N^e_{[1,1]} (\xi, \eta) = \frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2}-x^e_2)(y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} - y^e_4) \  $$

$$ N^e_{[1,1]} (\xi, \eta) = \frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + [ \frac{1+\xi}{2}- 1 ] x^e_2)(y_1^e \frac{1-\eta}{2} + [ \frac{1+\eta}{2} - 1 ] ) y^e_4)= b^e_1(\xi, \eta) \ $$

$$ N^e_{[2,1]} (x, y) = -\frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2} - x^e_1)(y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} - y^e_4) \ $$

$$ N^e_{[2,1]} (\xi,\eta) =  -\frac{1}{A^e}( [\frac{1-\xi}{2}- 1]x^e_1 + x_2^e \frac{1+\xi}{2})(y_1^e \frac{1-\eta}{2} +  [\frac{1+\eta}{2} - 1] y^e_4) = b_2^e(\xi, \eta)\ $$

$$ N^e_{[2,2]} (\xi, \eta) =  \frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2}-x^e_1)(y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} - y^e_1)  \ $$

$$ N^e_{[2,2]} (\xi, \eta) =  \frac{1}{A^e}( [\frac{1-\xi}{2}- 1]x^e_1 + x_2^e \frac{1+\xi}{2})([\frac{1-\eta}{2} -1]y^e_1 + y_4^e \frac{1+\eta}{2} ) = b_3^e (\xi, \eta) \ $$

$$ N^e_{[1,2]} (\xi, \eta) =  -\frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2}-x^e_2)(y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} - y^e_1) \ $$

$$ N^e_{[1,2]} (\xi, \eta) =  -\frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + [\frac{1+\xi}{2}- 1]x^e_2)( [\frac{1-\eta}{2}-1]y^e_1 + y_4^e \frac{1+\eta}{2}) = b_4^e (\xi, \eta) \ $$

Jacobian Matrix:

$$ \mathbf{J}^e =

\begin{bmatrix} \frac{\partial x}{\partial \xi} &  \frac{\partial y}{\partial \xi}    \\ \\ \frac{\partial x}{\partial \eta} &  \frac{\partial y}{\partial \eta} \end{bmatrix}

$$

taking the $$ x^e \ $$ and $$ y^e \ $$ values from the definition of parent element and substituting into Jacobian matrix we get:

$$ \mathbf{J}^e =

\begin{bmatrix} \frac{\partial x}{\partial \xi} &  \frac{\partial y}{\partial \xi}    \\ \\ \frac{\partial x}{\partial \eta} &  \frac{\partial y}{\partial \eta} \end{bmatrix} =

\begin{bmatrix} \frac{1}{2} (x_2^e - x_1^e) & 0    \\ \\ 0 &  \frac{1}{2} (y_4^e - y_1^e) \end{bmatrix}

$$

From given

$$ d \omega_x = det(\mathbf{J}^e) d \omega_\xi = d \omega_x = \frac{1}{2} (x_2^e - x_1^e)*\frac{1}{2} (y_4^e - y_1^e) d \omega_\xi \ $$

or

$$ d \omega_\xi = \frac{ d \omega_x}{det(\mathbf{J}^e)} = d \omega_\xi = \frac{ d \omega_x}{\frac{1}{2} (x_2^e - x_1^e)*\frac{1}{2} (y_4^e - y_1^e)} $$

With this last information we have a completely defined stiffness element matrix $$ K^e \ $$. Also note that since we have, 4 degrees of freedom in 1 element node, we do expect the gram matrix $$ \Gamma \ $$ to be 4x4, therefore, $$ \kappa_{4x4} \ $$

$$ K_{ij}^e = \int_{\Omega^e} \triangledown{b^e_i}'(x, y) \kappa(x, y) \triangledown{b^e_j}'(x, y) d \omega_x \ $$

$$ K_{ij}^e = \int_{-1}^{+1}

\begin{bmatrix} \triangledown{b^e_1} \triangledown{b^e_1} & \triangledown{b^e_1} \triangledown{b^e_2} & \triangledown{b^e_1} \triangledown{b^e_3} & \triangledown{b^e_1} \triangledown{b^e_4}      \\ & \triangledown{b^e_2} \triangledown{b^e_2} & \triangledown{b^e_2} \triangledown{b^e_3} & \triangledown{b^e_2}\triangledown{b^e_4}      \\ & &  \triangledown{b^e_3} \triangledown{b^e_3} & \triangledown{b^e_3} \triangledown{b^e_4}      \\ symetry & &   & \triangledown{b^e_4} \triangledown{b^e_4} \end{bmatrix}

\begin{bmatrix} 1 & 0 & 0 & 0      \\ 0 & 1 &  0 & 0      \\ 0 & 0 &  1 & 0      \\ 0 & 0 &  0 & 1      \end{bmatrix}

\left ( d \frac{1}{2} (x_2^e - x_1^e)*\frac{1}{2} (y_4^e - y_1^e) d \omega_\xi \right ) \ $$

note, to save some space in typing the formula (else it stretched out of the page), the independent variables for $$ b_i^e (\xi, \eta) \ $$ were avoided

for the initial square of length of '1', we divided into 4 smaller squares each 0.5 length, the element nodes stiffness matrix came out to be:

K(:,:,1) = [ 1/24, -1/96, -1/48, -1/96] [ -1/96,  1/24, -1/96, -1/48] [ -1/48, -1/96,  1/24, -1/96] [ -1/96, -1/48, -1/96,  1/24] K(:,:,2) = [ 1/24, -1/96, -1/48, -1/96] [ -1/96,  1/24, -1/96, -1/48] [ -1/48, -1/96,  1/24, -1/96] [ -1/96, -1/48, -1/96,  1/24]

this answer shows 2 elements stiffness matrices located along 'x' axes. Noting that because of the symmetry of each elements, the equivalent spacing of each node in elements, and because the material matrix $$ \kappa \ $$ is identity matrix, all stiffness element matrices will be the same. The only differ in element stiffness matrix will occur when we will change the number of stiffness.

,where

$$ b^e_1(\xi, \eta) = \frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + [ \frac{1+\xi}{2}- 1 ] x^e_2)(y_1^e \frac{1-\eta}{2} + [ \frac{1+\eta}{2} - 1 ] ) y^e_4) \ $$

$$ b_2^e(\xi, \eta) =  -\frac{1}{A^e}( [\frac{1-\xi}{2}- 1]x^e_1 + x_2^e \frac{1+\xi}{2})(y_1^e \frac{1-\eta}{2} +  [\frac{1+\eta}{2} - 1] y^e_4)  \ $$

$$ b_3^e (\xi, \eta)  =  \frac{1}{A^e}( [\frac{1-\xi}{2}- 1]x^e_1 + x_2^e \frac{1+\xi}{2})([\frac{1-\eta}{2} -1]y^e_1 + y_4^e \frac{1+\eta}{2} ) \ $$

$$  b_4^e (\xi, \eta) =  -\frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + [\frac{1+\xi}{2}- 1]x^e_2)( [\frac{1-\eta}{2}-1]y^e_1 + y_4^e \frac{1+\eta}{2})  \ $$

force
From prof. Vu Quoc's notes for

$$ f^e(w) = - \int_{\Gamma_h} wh d {\Gamma_h} + \int_\omega wf d \omega \ $$

$$ f^e(w) = - \int_{\Gamma_h} wh d {\Gamma_h} + \int_\omega w1 d \omega \ $$

converting to local coordinates

$$ f^e(w) = - \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

2* \left ( \frac{1}{4} A_e \ d\omega_\xi \right ) + \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

\left( \frac{1}{4} A_e \ d\omega_\xi \right ) =

- \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

\left( \frac{1}{4} A_e \ d\omega_\xi \right ) \ $$

F(:,:,1) = [ 1/16,  1/16] [ -1/16,  1/16] [ -1/16, -1/16] [  1/16, -1/16] F(:,:,2) = [ 1/16,  1/16] [ -1/16,  1/16] [ -1/16, -1/16] [  1/16, -1/16]

Global Matrix creation
Then we constructed the Global stiffness matrix by the process of superimposing the local stiffness coefficients. Matlab output below shows the process of superimposing the elements to global stiffness matrix.

The matlab code for global matrix construction was written with respect to this element naming system, and then it was extended to encompass other numbers of elements

Original element matrices

K(:,:,1) = [ 1/24, -1/96, -1/48, -1/96] [ -1/96,  1/24, -1/96, -1/48] [ -1/48, -1/96,  1/24, -1/96] [ -1/96, -1/48, -1/96,  1/24]

K(:,:,2) = [ 1/24, -1/96, -1/48, -1/96] [ -1/96,  1/24, -1/96, -1/48] [ -1/48, -1/96,  1/24, -1/96] [ -1/96, -1/48, -1/96,  1/24] Superpositions to global matrix

KGlobal = 1/24         -1/96           0             -1/96          -1/48           0              0              0              0             -1/96           1/12          -1/96          -1/48          -1/48          -1/48           0              0              0              0             -1/96           1/24           0             -1/48          -1/96           0              0              0             -1/96          -1/48           0              1/12          -1/48           0             -1/96          -1/48           0             -1/48          -1/48          -1/48          -1/48           1/6           -1/48          -1/48          -1/48          -1/48           0             -1/48          -1/96           0             -1/48           1/12           0             -1/48          -1/96           0              0              0             -1/96          -1/48           0              1/24          -1/96           0              0              0              0             -1/48          -1/48          -1/48          -1/96           1/12          -1/96           0              0              0              0             -1/48          -1/96           0             -1/96           1/24

FGlobal = 1/8           0             -1/8            1/4            0             -1/4            1/8            0             -1/8

Boundary Conditions
Noting that essential BCs were specified to be on all sides of the 2x2 square. It would mean (viewing from the above global node figure) all nodes around node 5 will be tagged as essential BC.

Since we can either eliminate the nodes form Global Stiffness matrix to construct another one with Temperature ('u' function) as unknown or just '0' the node values in Global Stiffness matrix and then do inverse and multiply by Force matrix to find other non-constrained dofs.

We wrote a matlab code that automatically constrains the associate nodes and puts their contribution to force function.

Here how code applies BC's

KGlobal = 1/24         -1/96           0             -1/96          -1/48           0              0              0              0             -1/96           1/12          -1/96          -1/48          -1/48          -1/48           0              0              0              0             -1/96           1/24           0             -1/48          -1/96           0              0              0             -1/96          -1/48           0              1/12          -1/48           0             -1/96          -1/48           0             -1/48          -1/48          -1/48          -1/48           1/6           -1/48          -1/48          -1/48          -1/48           0             -1/48          -1/96           0             -1/48           1/12           0             -1/48          -1/96           0              0              0             -1/96          -1/48           0              1/24          -1/96           0              0              0              0             -1/48          -1/48          -1/48          -1/96           1/12          -1/96           0              0              0              0             -1/48          -1/96           0             -1/96           1/24

Kchange = 0             0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              1/6            0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0              0

FGlobal = -1/16          0              1/16          -1/8            0              1/8           -1/16           0              1/16

Fchange = -7/48         -7/48           0             -1/6            1/3            1/12          -7/48          -7/48           0

Then the matrices were reduced to the ones of the importance ( Global K matrix after the BCs where applied was isolated so no 0s would be present and attributing F function value(s) where picked by code as well)

KchangeF = 1/6

FchangeF = 1/3

Finally Temperature at unknown nodes was found by using this formula

$$ u = K^{-1}F \ $$

u = 2

Also output for 4x4 element free node values came out to be:

dcalc = 2             2              2              2

as you may see, only 1 node, in this example was present, so only 1 numerical value was generated.

Discussion
Note 1 important aspect of this output. That is, with forcing function changed to 1, the output of free degrees of freedom is still '2' as if no forcing function was present to begin with. I guess it might be explainable that because of constrained boundary conditions at all 4 ends, in order to keep the temperature constant at all 4 ends while heat was generated, the generated heat had to be instantaneously dissipated though the boundaries of the area, so that boundary temperature would stay unchanged.

As in matrix/numeral explanation, it should be noted, that because essential boundary condition is applied over all 4 sides, it has integration limits (working boundary range) as all element boundary. Therefore, with intorduction with heat source, force instead of being modified, was only scaled (remember force equation):

for f = 0 (HW 6.6)

$$ f^e(w) = - \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

2* \left ( \frac{1}{4} A_e \ d\omega_\xi \right ) \ $$

for f= 1 (HW 7.1)

$$ f^e(w) = - \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

2* \left ( \frac{1}{4} A_e \ d\omega_\xi \right ) + \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

\left( \frac{1}{4} A_e \ d\omega_\xi \right ) =

- \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

\left( \frac{1}{4} A_e \ d\omega_\xi \right ) \ $$

you may see that force term is a scale only term. Moreover, notice the force global term

For 4 element at f = 0: FGlobal = 1/8           0             -1/8            1/4        0            -1/4            1/8            0             -1/8

Fchange = 5/24          7/48          -1/16           7/24         -1/3           -5/24           5/24           7/48          -1/16

For 4 element at f = 1:

FGlobal =

-1/16          0              1/16          -1/8            0             1/8           -1/16           0              1/16

Fchange =

-7/48         -7/48           0             -1/6           -1/3            1/12          -7/48          -7/48           0

For 9 element at f = 1

FGlobal =

-1/36          0              0              1/36          -1/18           0        0            1/18          -1/18           0        0            1/18          -1/36           0              0              1/36

Fchange =

-7/108        -7/108         -7/108          0            -11/108         5/54           5/54           1/108         -5/54         5/54           5/54           1/54          -7/108         -7/108         -7/108          0

, where boxed answer shows free nodes.

Note that force matrix DOES differ, but note that because of the similarity of force functions (scalar multiples of each other, namely, caused because forcing function is a constant and essential boundary condition acts on the same area as forcing function), the global force matrix, since it contained '0's on initial force function, will contain '0's on any other force function, as long as forcing function is scalar and essential B.C is the same as whole element B.C. Therefore, with same used stiffness matrix 'K' the adjusted force matrix with initial values of '0' on free nodes, always came out to be the same for specific number of elements with differing scalar value of forcing function.

As a result, for free node displacements, we observed the constant value of '2'.

--Eml5526.s11.team5.JA 20:51, 6 April 2011 (UTC)

2)
a)

In general by Prof. Vu Quoc's

$$ \tilde{m}(w,u) + \tilde{k}(w,u) = \tilde{f}(w,u) \ $$

$$ \tilde{m}(w,u) = \int_\Omega w \rho c \frac{\partial u}{\partial t} d \Omega \ $$

$$ \tilde{k}(w,u) = \int_{\Omega^e} \triangledown{w} \kappa(x, y) \triangledown{u} d \Omega \ $$

$$ \tilde{f}(w) = - \int_{\Gamma_h}w h d \Gamma_h + \int_\Omega w f d \Omega \ $$

$$ K_{ij}^e = \int_{\Omega^e} \triangledown{b^e_i}'(x, y) \kappa(x, y) \triangledown{b^e_j}'(x, y) d \omega_x \ $$

, where $$ x = x^e \ $$, where $$x^e \ $$ represents local node.

For linear 2D case with boundary being square

Bases, $$ b_i \ $$ are defined to be $$ L_{[I,J]} (x, y) = N^e_{[I,J]} (x, y) \ $$

where $$ N^e_{[I,J]}(x, y) = N_I^e(x)N_J^e(y) \ $$ and $$ I, J \ $$ corresponds to numbering of nodes on element scale.

also noting that it's a rectangular shape, such that the distance from x: 1-to-2 = 1-to-3 and node 1 = node 4 in 'x' coordiantes, y: 1-to-4 = 1-to-3 and node 1 = node 2 in 'x' coordinates, we substitute $$ y^e_4 $$ for $$ y^e_3 \ $$ and $$ y^e_1 $$ for $$ y^e_2 \ $$ and the same for other coordinates

$$ N^e_{[1,1]} (x, y) = \frac{x^e-x^e_2}{x^e_1 - x^e_2} \frac{y^e-y^e_4}{y^e_1 - y^e_4} = \frac{1}{A^e}(x-x^e_2)(y - y^e_4) = b_1^e (x,y) \ $$

$$ N^e_{[2,1]} (x, y) = \frac{x^e-x^e_1}{x^e_2 - x^e_1} \frac{y^e-y^e_4}{y^e_1 - y^e_4} = -\frac{1}{A^e}(x-x^e_1)(y - y^e_4) = b_2^e(x,y)\ $$

$$ N^e_{[2,2]} (x, y) = \frac{x^e-x^e_1}{x^e_2 - x^e_1} \frac{y^e-y^e_1}{y^e_4 - y^e_1} = \frac{1}{A^e}(x-x^e_1)(y - y^e_1) = b_3^e (x,y) \ $$

$$ N^e_{[1,2]} (x, y) = \frac{x^e-x^e_2}{x^e_1 - x^e_2} \frac{y^e-y^e_1}{y^e_4 - y^e_1} = -\frac{1}{A^e}(x-x^e_2)(y - y^e_1) = b_4^e (x,y) \ $$

Next we will convert the square element to same size parent element of bi-unit square

$$ x^e = x_1^e N_1^e(\xi) + x_2^e N_2^e(\xi) = x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2}, \xi \in [-1 +1] \ $$

$$ y^e = y_1^e N_1^e(\eta) + y_4^e N_4^e(\eta) = y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2}, \eta \in [-1 +1] \ $$

Then by noting wich side/value of 'x' will be greater in defined rectangular shown

Therefore, we convert element coordinates to parent coordinates

$$ N^e_{[1,1]} (\xi, \eta) = \frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2}-x^e_2)(y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} - y^e_4) \  $$

$$ N^e_{[1,1]} (\xi, \eta) = \frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + [ \frac{1+\xi}{2}- 1 ] x^e_2)(y_1^e \frac{1-\eta}{2} + [ \frac{1+\eta}{2} - 1 ] ) y^e_4)= b^e_1(\xi, \eta) \ $$

$$ N^e_{[2,1]} (x, y) = -\frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2} - x^e_1)(y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} - y^e_4) \ $$

$$ N^e_{[2,1]} (\xi,\eta) =  -\frac{1}{A^e}( [\frac{1-\xi}{2}- 1]x^e_1 + x_2^e \frac{1+\xi}{2})(y_1^e \frac{1-\eta}{2} +  [\frac{1+\eta}{2} - 1] y^e_4) = b_2^e(\xi, \eta)\ $$

$$ N^e_{[2,2]} (\xi, \eta) =  \frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2}-x^e_1)(y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} - y^e_1)  \ $$

$$ N^e_{[2,2]} (\xi, \eta) =  \frac{1}{A^e}( [\frac{1-\xi}{2}- 1]x^e_1 + x_2^e \frac{1+\xi}{2})([\frac{1-\eta}{2} -1]y^e_1 + y_4^e \frac{1+\eta}{2} ) = b_3^e (\xi, \eta) \ $$

$$ N^e_{[1,2]} (\xi, \eta) =  -\frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2}-x^e_2)(y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} - y^e_1) \ $$

$$ N^e_{[1,2]} (\xi, \eta) =  -\frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + [\frac{1+\xi}{2}- 1]x^e_2)( [\frac{1-\eta}{2}-1]y^e_1 + y_4^e \frac{1+\eta}{2}) = b_4^e (\xi, \eta) \ $$

Jacobian Matrix:

$$ \mathbf{J}^e =

\begin{bmatrix} \frac{\partial x}{\partial \xi} &  \frac{\partial y}{\partial \xi}    \\ \\ \frac{\partial x}{\partial \eta} &  \frac{\partial y}{\partial \eta} \end{bmatrix}

$$

taking the $$ x^e \ $$ and $$ y^e \ $$ values from the definition of parent element and substituting into Jacobian matrix we get:

$$ \mathbf{J}^e =

\begin{bmatrix} \frac{\partial x}{\partial \xi} &  \frac{\partial y}{\partial \xi}    \\ \\ \frac{\partial x}{\partial \eta} &  \frac{\partial y}{\partial \eta} \end{bmatrix} =

\begin{bmatrix} \frac{1}{2} (x_2^e - x_1^e) & 0    \\ \\ 0 &  \frac{1}{2} (y_4^e - y_1^e) \end{bmatrix}

$$

From given

$$ d \omega_x = det(\mathbf{J}^e) d \omega_\xi = d \omega_x = \frac{1}{2} (x_2^e - x_1^e)*\frac{1}{2} (y_4^e - y_1^e) d \omega_\xi \ $$

or

$$ d \omega_\xi = \frac{ d \omega_x}{det(\mathbf{J}^e)} = d \omega_\xi = \frac{ d \omega_x}{\frac{1}{2} (x_2^e - x_1^e)*\frac{1}{2} (y_4^e - y_1^e)} $$

With this last information we have a completely defined stiffness element matrix $$ K^e \ $$. Also note that since we have, 4 degrees of freedom in 1 element node, we do expect the gram matrix $$ \Gamma \ $$ to be 4x4, therefore, $$ \kappa_{4x4} \ $$

$$ K_{ij}^e = \int_{\Omega^e} \triangledown{b^e_i}'(x, y) \kappa(x, y) \triangledown{b^e_j}'(x, y) d \omega_x \ $$

$$ K_{ij}^e = \int_{-1}^{+1}

\begin{bmatrix} \triangledown{b^e_1} \triangledown{b^e_1} & \triangledown{b^e_1} \triangledown{b^e_2} & \triangledown{b^e_1} \triangledown{b^e_3} & \triangledown{b^e_1} \triangledown{b^e_4}      \\ & \triangledown{b^e_2} \triangledown{b^e_2} & \triangledown{b^e_2} \triangledown{b^e_3} & \triangledown{b^e_2}\triangledown{b^e_4}      \\ & &  \triangledown{b^e_3} \triangledown{b^e_3} & \triangledown{b^e_3} \triangledown{b^e_4}      \\ symetry & &   & \triangledown{b^e_4} \triangledown{b^e_4} \end{bmatrix}

\begin{bmatrix} 1 & 0 & 0 & 0      \\ 0 & 1 &  0 & 0      \\ 0 & 0 &  1 & 0      \\ 0 & 0 &  0 & 1      \end{bmatrix}

\left ( d \frac{1}{2} (x_2^e - x_1^e)*\frac{1}{2} (y_4^e - y_1^e) d \omega_\xi \right ) \ $$

note, to save some space in typing the formula (else it stretched out of the page), the independent variables for $$ b_i^e (\xi, \eta) \ $$ were avoided

for the initial square of length of '1', we divided into 4 smaller squares each 0.5 length, the element nodes stiffness matrix came out to be:

K(:,:,1) = [ 1/24, -1/96, -1/48, -1/96] [ -1/96,  1/24, -1/96, -1/48] [ -1/48, -1/96,  1/24, -1/96] [ -1/96, -1/48, -1/96,  1/24] K(:,:,2) = [ 1/24, -1/96, -1/48, -1/96] [ -1/96,  1/24, -1/96, -1/48] [ -1/48, -1/96,  1/24, -1/96] [ -1/96, -1/48, -1/96,  1/24]

this answer shows 2 elements stiffness matrices located along 'x' axes. Noting that because of the symmetry of each elements, the equivalent spacing of each node in elements, and because the material matrix $$ \kappa \ $$ is identity matrix, all stiffness element matrices will be the same. The only differ in element stiffness matrix will occur when we will change the number of stiffness.

,where

$$ b^e_1(\xi, \eta) = \frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + [ \frac{1+\xi}{2}- 1 ] x^e_2)(y_1^e \frac{1-\eta}{2} + [ \frac{1+\eta}{2} - 1 ] ) y^e_4) \ $$

$$ b_2^e(\xi, \eta) =  -\frac{1}{A^e}( [\frac{1-\xi}{2}- 1]x^e_1 + x_2^e \frac{1+\xi}{2})(y_1^e \frac{1-\eta}{2} +  [\frac{1+\eta}{2} - 1] y^e_4)  \ $$

$$ b_3^e (\xi, \eta)  =  \frac{1}{A^e}( [\frac{1-\xi}{2}- 1]x^e_1 + x_2^e \frac{1+\xi}{2})([\frac{1-\eta}{2} -1]y^e_1 + y_4^e \frac{1+\eta}{2} ) \ $$

$$  b_4^e (\xi, \eta) =  -\frac{1}{A^e}(x_1^e \frac{1-\xi}{2} + [\frac{1+\xi}{2}- 1]x^e_2)( [\frac{1-\eta}{2}-1]y^e_1 + y_4^e \frac{1+\eta}{2})  \ $$

force
From prof. Vu Quoc's notes for

$$ f^e(w) = - \int_{\Gamma_h} wh d {\Gamma_h} + \int_\omega wf d \omega \ $$

$$ f^e(w) = - \int_{\Gamma_h} wh d {\Gamma_h} + \int_\omega w0 d \omega = - \int_{\Gamma_h} wh d {\Gamma_h} \ $$

converting to local coordinates

$$ f^e(w) = - \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

2* \left ( \frac{1}{4} A_e \ d\omega_\xi \right ) \ $$

F(:,:,1) = [ 1/16,  1/16] [ -1/16,  1/16] [ -1/16, -1/16] [  1/16, -1/16] F(:,:,2) = [ 1/16,  1/16] [ -1/16,  1/16] [ -1/16, -1/16] [  1/16, -1/16]

Transient Term
$$ \tilde{m}(w,u) = \int_\Omega w \rho c \frac{\partial u}{\partial t} d \Omega = \int_\Omega w xy \frac{\partial u}{\partial t} d \Omega =

\int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

\left( x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2} \right ) \left( y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} \right ) \frac{\partial u}{\partial t} \left( \frac{1}{4} A_e \ d\omega_\xi \right ) \ $$

Overall Equation
$$ \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

\left( x_1^e \frac{1-\xi}{2} + x_2^e \frac{1+\xi}{2} \right ) \left( y_1^e \frac{1-\eta}{2} + y_4^e \frac{1+\eta}{2} \right ) \frac{\partial u}{\partial t} \left( \frac{1}{4} A_e \ d\omega_\xi \right ) + \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1} \triangledown{b^e_1} & \triangledown{b^e_1} \triangledown{b^e_2} & \triangledown{b^e_1} \triangledown{b^e_3} & \triangledown{b^e_1} \triangledown{b^e_4}      \\ & \triangledown{b^e_2} \triangledown{b^e_2} & \triangledown{b^e_2} \triangledown{b^e_3} & \triangledown{b^e_2}\triangledown{b^e_4}      \\ & &  \triangledown{b^e_3} \triangledown{b^e_3} & \triangledown{b^e_3} \triangledown{b^e_4}      \\ symetry & &   & \triangledown{b^e_4} \triangledown{b^e_4} \end{bmatrix}

\begin{bmatrix} 1 & 0 & 0 & 0      \\ 0 & 1 &  0 & 0      \\ 0 & 0 &  1 & 0      \\ 0 & 0 &  0 & 1      \end{bmatrix}

\left ( d \frac{1}{2} (x_2^e - x_1^e)*\frac{1}{2} (y_4^e - y_1^e) d \omega_\xi \right ) = - \int_{\omega_\xi}

\begin{bmatrix} \triangledown{b^e_1}      \\ \triangledown{b^e_2}    \\ \triangledown{b^e_3}     \\ \triangledown{b^e_4} \end{bmatrix}

2* \left ( \frac{1}{4} A_e \ d\omega_\xi \right ) \ $$

title: User:EML4500.f08.JAMAMA/FE/JAN


text:
User:Eml5526.s11.team6.joglekar/hwk6

=Problem 6.4=

Given
The vector field is given as follows -

$$\displaystyle (Eq. 6.4.2-1) $$ on the domain shown in figure--

Verify the divergence theorem.The curved boundary of the domain is a parabola.

To Find
To verify the Divergence theorem for the given vector field and the given domain as per Figure 6.4.2-1 We need to prove that : $$\int\limits_{\Omega }{\overline{\nabla }.}\overline{q}d\Omega =\oint\limits_{\Gamma }{\overline{q}.\overline{n}}d\Gamma $$ $$\displaystyle (Eq. 6.4.2-2) $$

Solution
We have, $${{q}_{x}}=3x^2y+y^3 $$  and secondly  $${{q}_{y}}=3x+y^3$$ as the given vector field over the domain given by Figure 6.4.2-1 Now we can write - $$\overline{\nabla }.\overline{q}=\frac{\partial {{q}_{x}}}{\partial x}+\frac{\partial {{q}_{y}}}{\partial y}=6xy+3y^2$$ Integrating over the given domain, we get LHS for $$ Eq.6.4.2-2 $$ as -

$$\int\limits_{\Omega }{\overline{\nabla }.}\overline{q}d\Omega = $$ $$\int\limits_{-2}^{2} \left[ {\int\limits_{0}^{4-x^2}{\left (6xy+3y^2 \right) }}dy \right] dx= \int\limits_{-2}^{2}{\left[ 3x(4-x^2)^2 + (4-x^2)^3 \right]}dx =117.029 $$

Verifying with| Wolfram Alpha

Thus : $$\displaystyle (Eq. 6.4.2-3) $$

To find RHS:

I)The computed boundary integral on the straight line AB is

$$\displaystyle \int\limits_{AB }{\overline{q }.}\overline{n}^{(1)}d\Gamma= \int\limits_{AB } \left ( \right )(-j)d\Gamma = \int\limits_{-2}^{2}-3xdx=0 $$

where $$ \overline n^{(1)}=-\overline j, d\Gamma=dx, y=0   on   AB $$

II)The integral is also calculated on the curved portion which is parabola with the same boundaries AB.

$$\displaystyle \int\limits_{AB }{\overline{q }.}\overline{n}^{(2)}d\Gamma= \int\limits_{AB } \left ( \right ) \left[ \begin{array}{c} {n_x \ } \\ {n_y \ } \end{array} \right] ds $$

where $$\displaystyle d \Gamma =ds  $$

Since normal vector is on the curved surface, we consider a small portion ds of the curve and then find outward normal to that portion of the curve. From the figure, it can be seen that outward normal is given as

$$ n=\left[ \begin{array}{c} {cos \theta \ } \\ {sin \theta \ } \end{array} \right]=\left[ \begin{array}{c} \frac{dy}{ds} \\ \frac{-dx}{ds} \end{array} \right] $$

Substituting the value of normal vector in the equation,we get,

$$ \int\limits_{AB } \left ( \right )ds $$

$$I= \int\limits_{AB } \left ((3x^2y+y^3)dy + (3x+y^3)(-dx) \right )$$

From the equation of parabola, $$ \displaystyle dy=-2xdx \quad and \quad y=4-x^2 $$

$$I= \int\limits_{AB } \left ((3x^2y+y^3)(-2xdx) + (3x+y^3)(-dx) \right )$$

$$ \displaystyle I=117.029 $$

Verifying with| Wolfram Alpha

$$\displaystyle (Eq. 6.4.2-3) $$

Thus divergence theorem is verified.

=Problem 6.9 Reproduction of problems solved in the FB=

Given
Consider the heat conduction problem given below modeled with 16 quadrilateral finite elements as shown in figure 6.9.1_1. The coordinates are given in meters. The conductivity is isotropic and $$ \displaystyle 5W^{0}C^{-1}.$$ The temperature T=0 is prescribed along edges AB and AD. The heat fluxes $$ \overline q =0 \quad and \quad \overline q=20 W m^{-1}$$ are prescribed on edges BC and CD,respectively.A constant heat source $$ \displaystyle s= 6Wm^{-1}$$ is applied over the plate.

To Find
Solve this problem using finite element code and get the temperature distribution and heat flux at the element Gauss points.

Solution
The codes used to solve this problem can be downloaded from the following site.

Codes

The program is written in MATLAB using several files for distinct operations of the analysis. In the main program file, these subfiles are recalled to plot the final result.

The problem can also be analysed using other softwares such as Abaqus. Following figure shows the temperature distribution in the element calculated using Abaqus.

title: User:Eml5526.s11.team6.joglekar/hwk6


title: File:Eml5526.s11.team6.HW6.6.fig1.png


text: File:FB 6.2.PNG

title: File:FB 6.2.PNG


title: File:Eml5526.s11.team6.HW6.6.fig2.png


title: File:Eml5526.s11.team6.HW6.6.fig3.png


title: File:Eml5526.s11.team6.HW6.6.fig4.png


title: File:Eml5526.s11.team6.HW6.6.fig5.png


title: File:Eml5526.s11.team6.HW6.6.fig6.png


text: File:Hw oab.svg

title: File:Hw oab.svg


text:
User:Eml5526.s11.t1.ab/HW6

=Problem 2:Weak Form Using Quadratic Lagrangian elemental Basis Function With Uniform Discretization.=

Given
General 1-D Model 1 Data set 1. The Partial Differential equation for this data set is,

Find
1)For $$\displaystyle n_{el}=2$$ Compute $$\underline{\tilde{K}}$$ Using Equation 1 On page 30-5. Display $$\underline{\tilde{K}},e=1,2$$

2)Compute $$K^{e}$$, $$L^{e}$$ for $$e=1,2$$

3)Compute $$\underline{\tilde{K}}^{e}=\underline{\tilde{L}}^{e}\underline{K}^{e}\underline{L}^{e}, for e=1,2$$ & Compare to 1

4)Plot all QLEBF for $$n_{el}=3$$.

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

Solution
Lets Obtain the Weak form first of all as follow

Performing Integration by parts technique we get

Solving this we get,

As we do not know $$ \frac{du}{dx}\left ( 1\right )$$ we choose $$w\left ( 1 \right )=0$$ and moreover $$u^{h}\left(1 \right )=4$$. To use quadratic Lagrangian elemental basis function we divide the dominium in elements, on each element we apply the weak form by using quadratic Lagrangian Polynomial. For that we need 3 nodes per element. Each element with global nodes i,i+1,i+2 will have 3 local nodes 1,2,3. Lets call $$x_{1},x_{2},x_{3}$$the co-ordinates at node 1,2,3 respectively.

To use natural co-ordinate $$\epsilon$$ instead of Co-ordinate $$x$$ we use the equation 4 on page 30-3 for that we know the natural co-ordinates of the nodes are -1,0,1 & local nodes 1,2,3 respectively. Using Lagrange Polynomial to map between two Co-ordinate system we have:

substituting the above values in the $$\displaystyle (6.2.7)$$ we get,

In this way we have found a shape function, and the later equation can be written as follow,

In the same way we can interpolate the function $$u$$ & $$w$$, therefore,

The Derivative of function $$u$$ with respect to $$\epsilon$$ is given by, In the same way, If we place the Node 2 at the midpoint of the element we can write the relation between the two co-ordinates as Taking the derivative on both sides we get, The derivative of $$u$$ & $$w$$ with respect to $$x$$ are calculated by using chain rule which is as below, Replacing all the terms in weak form as a function of $$\epsilon$$ we obtain This can be further simplified as

From the later Equation we can get the Stiffness Matrix of one element as follows,

and the force vector of the element will be,

From the later Equation we can get the Stiffness Matrix of one element as follows,

There will be additional following factor,

From the later Equation we can get the Stiffness Matrix of one element as follows,

Now only count for degree of freedom at x=1.

1) For $$\displaystyle n_{el}=2$$ Compute $$\underline{\tilde{K}}$$ Using Equation 1 On page 30-5. Display $$\underline{\tilde{K}},e=1,2$$.
Now according to the Lagrange Interpolation we have following equation,

Also,

Replacing in the weak form above we get, The last term is taken only for the last element. Further the stiffness matrix is

Performing the integration for the cone shown below for one element we obtain, Hence the global stiffness matrix will be,

2) Compute $$K^{e}$$, $$L^{e}$$ for $$e=1,2$$.
$$K^{e}$$ is already calculated above. For $$L^{e}$$ As the element has 3 degrees of freedom & the total number of degrees of freedom is 5 The L matrix will be of size $$3\times5$$. Therefore,

3) Compute $$\underline{\tilde{K}}^{e}=\underline{\tilde{L}}^{e}\underline{K}^{e}\underline{L}^{e}, for e=1,2$$ & Compare to 1.
Now, Solving the above matrix we get,

For element 2 we have,

Solving the above matrix we get,

Hence Combining equations $$\displaystyle (6.2.17)$$ & $$\displaystyle (6.2.18)$$ we get global stiffness matrix as follows,

Eventually Comparing $$\displaystyle (6.2.15)$$ with $$\displaystyle (6.2.19)$$ we found that the Stiffness matrices are identical.

4) Plot all QLEBF for $$n_{el}=3$$.
The Quadratic Lagrange Elemental basis Function is plotted using the following MATLAB code for $$\displaystyle n_{el}=3$$.

Appendix
 Matlab Code:

The plot is as follow.

5) Plot $$\displaystyle \tilde{u_{n}}^{h}$$ vs $$\displaystyle u$$ and [$$\tilde{u_{n}}^{h}\left ( 0.5\right )-u\left (0.5\right )$$] vs $$\tilde{n}$$.
These Two plots are plotted as below Using the mentioned MATLAB code.

Appendix
 Matlab Code:

===Comment: From the above plot we can observe that the solution converges at nel=16. The Convergence of $$10^{-6}$$ was difficult to achieve therefore the convergence criteria was modified to $$E=\left(u_{0.5}^{i}- u_{0.5}^{i-1}\right )$$.===

=Problem 10: Newtons Law of Colling=

Given
The partial Differential Equation is

1.Develop Weak form similar to (3)-(6) page 34-3.
The weak form will be as below,

Lets calculate the derivative of the following factor, Therefore, Replacing in the integral we obtain, Applying the Gauss Theorem on the first term we obtain, We can recognize that the Heat Flux is Given by, Eventually We have,

Organizing We get, Simplifying we get, For the Case when Conductivity if the Identity Matrix, we have following equations, Also We can Write as,

2) Develop Semidiscrete Equations (ODE's) similar to (3) page 23-3. Give Detailed Description for all the quantities.
Performing the Discretization on the Dominium we have,

Where N is the vector of the Interpolation (Lagrange Polynomial) and $$\displaystyle u_{e},w_{e}$$ are the Nodal Values of u & w Respectively. The Derivative With respect to $$\displaystyle x_{1}$$, $$\displaystyle x_{2}$$ are Replacing on the Semi Discrete Weak form we obtain, From the Last Equation we can Obtain the Conductivity Matrix, the Heat source vector and the Capacitance matrix. The Conductivity Matrix is Given by

Further the Capacitance Matrix is Given by,

And the Heat Source is

3.Solve G2DM2.0/D1 Using 2D LIBF (similar to HW 6.6) till $$10^{-6}$$ accuracy at center. Plot Solution in 3D w/Contour.
To solve G2DM2.0/D1 Following Routine was developed. The following figure shows the result for 16 points.

To solve the problem using LIBF we will devide the x-axis and Y-axis in 2 parts initially. In that way the Approximated solution by LIBF is given by:

We Have developed a MATLAB code to plot this routine. The MATLAB code is as follows

Appendix
 Matlab Code:

The Plot for the Routine Developed along with the intended 3-D contour is as below.

title: User:Eml5526.s11.t1.ab/HW6


title: File:Fe1.s11.team2.HW6.5.1.png


text:
User:Alethia

To find the truth, one must find a question.

Educational Background:

AAS : Electronics Eng - Telecommunications

Trade School : Licensed Electrician

title: User:Alethia


text: File:Fe1.s11.team6.kurth.hw6.prob2.fig3.jpg


text: File:Fe1.s11.team6.kurth.hw6.prob2.fig4.jpg.jpeg


text:
File:BodySSV.jpg

Licensing
for school project

title: File:BodySSV.jpg


text:
File:Versteviging.jpg

Licensing
for school project

title: File:Versteviging.jpg


text:
File:Kogelgewricht.jpg

Licensing
for school project

title: File:Kogelgewricht.jpg


text:
File:Schakeldoos.jpg

Licensing
for school project

title: File:Schakeldoos.jpg


text:
File:Schakeling.jpg

Licensing
for school project

title: File:Schakeling.jpg


text:
File:Vering.jpg

Licensing
for school project

title: File:Vering.jpg


title: File:Nm1.s11.team5.reiss.hw68.png


title: File:Eml5526.s11.team6.hw6.1.1.jpg


title: File:Nm1.s11.team5.HW6.P9.fig1.png


title: File:Eml5526.s11.team6.hw6.1.2.jpg


text:
User:Yewande

Background Paper 'Group Game'

The acronym BRIC is derived from Jim O’Neill’s, Chairman of Goldman Sachs Global Assets Management, document entitled ‘Building Better Global Economic BRICS’. In this paper he explores the rapid socio-economic rise of: Brazil, Russia, India and China; all seemingly in competition to exert their regional dominance through trade and politics. It was from this hierarchy of international states that the idea to develop a game based on socio-economic gain came about. What remains a vital factor in winning the game is the necessary need for multilateral trade, as is with global situation. Although each BRIC nation is rich in its specific natural or social resource; becoming a highly advanced country is founded on a level of interdependence. Each player will receive one of the four developing states card: Brazil, Russia, India or China detailing a specific key attribute e.g.: Brazil-Natural resources. At the beginning of the game each player will start with 200 points. The points received are used to negotiate trading resources needed in achieving infrastructure objectives. Once the required resources have been reached they are deposited into the bank, in return, the corresponding infrastructure piece is received. In developing this game out initial inspiration was drawn from the property-developing game Monopoly. Just as is with Monopoly there is the possibility to trade, bribe or manipulate a player(s) in order to obstruct the goal(s) of another. For example, should a player choose to over-price a commodity then other players have the opportunity to under-cut the market price. It was not until later in the module that it became apparent that our trading process strongly resembled Catan, in that trading natural resources was fundamental to reaching one’s objective. Where BRIC differs from Catan is in returning the resources back to their states after achieving the matching infrastructure piece. As with Catan the mechanics of the game focus in trade; where the players exchange their natural resource for an agreed upon price. For every infrastructural improvement gained the state becomes stronger, an essential factor in order to protect themselves from chance cars. Upon understanding the basic mechanisms integral to BRIC very little play-testing was initially required. Nonetheless, it soon became apparent that the numerial aspect would prove difficult in over-coming. By limiting the number of points, natural resources and requirements for infrastructure objectives it simplified the mathematical process, by working within a defined boundary.

Reflective Analysis Paper

Introduction: Game theorists in representation of games tend to seek to abstract the essential features from structurally similar but otherwise different conflict situations (Zagare, 1984: 12) This reflective analysis aims to give an insight on the different games partly based on my experience and perspective and further more drawing out the different theoretical approaches that apply to the games as well their history. Having played a few games such as Monopoly, War on terror, Game of war, Vietnam, the settlers of Catan, kingmaker and Modern society, War on terror and Monopoly tend to be interesting and engaging games, especially Monopoly which is fast and easy to comprehend. While others such as Vietnam, Game of war tend to lean towards the more difficult side. However, I will be focusing my attention on the four which I found challenging, interesting and how they should either be improved or not.

First and foremost, the game I would address is Monopoly, which was the very first game that was played. This game was created by Elizabeth J. Maggie Phillips with the hope of demonstrating the effects of land monopolism and the use of land tax, which she eventually achieved with time. One of the major reasons why Monopoly has been branded a major success is because it has been developed over the years. The game solely derives to point out the difference and hindrance it causes to put power into the hands of people, which would thereby result in a negative outcome. The game is supposed to help in explaining Henry George's theory of 'single tax' that held the rights of individuals to their own property. Monopoly was initially called 'the landlord’s game', this was meant to show that the idea of rent would only benefit the landlord, which is a way of depriving the tenant. The game was published in 1906 and has been a teaching tool amongst students who also helped in the improvement of the game as well as academics and professors. Phillips developed the game over the years however it was not until Charles Darrow became a success and regardless of opposition and competition, an important feature to all the various types of Monopoly is the struggle (Salen, 2006:3). As I recall, Monopoly tends to be one of the many and most popular games such as ludo, snake and ladder, chess which have been in existence for many years. Monopoly is easy and straightforward with all the guidelines and information supplied mostly on the cards and then on the board. These actually makes it fast to grasp the key elements of the game which is trading, however one can easily get carried away by greed especially if they have acquired so much money. Monopoly could be seen as a realistic game as it depicts real life in terms of capitalism. As stated earlier, the game engages the players through the use of trading, which is basically the buying and selling of properties as well stations and so on. It is a never ending game even when the players already know who is going to win; the will to give up is almost difficult. I classify monopoly as one of the best games as it is easy to follow without little or no difficulty even though it works on abstract. Although the positive outweighs the negatives, the main point of the game is to play wisely and avoid the act of being too greedy which hinders the chance of winning. People tend to focus on the rules of the game instead of what they represent and therefore forget the main aim of the game. The rules of the game are easy to adhere to and are simple, clear and concise. However this could be criticised by some as overly complex especially by the parker brothers.

Another game I would explore is the War on Terror, which is an abstract in its game play. This game was first created in 2003 by Andy Tompkins and Andrew Sheerin however in 2006 they collaborated with terror bull games, the game was produced and published. This game involves a lot of strategic thinking and it was inspired by the invasion of Iraq. The September 11, 2001 and the various wars in Afghanistan could be said to usher in a boom of sales for commercial market due to the creation of games resulting from the invasions and wars (Stahl, 2006:118). The focal point of the game is to be able to dominate the world without thinking of the consequences, it is said to be similar to monopoly and the settlers of catan. The approaches on War on terror have been described as a mixture of both European and American because of the player interactions and strategies. It has also been said to be one of the realistic simulations around. War on Terror is a very colourful and beautifully decorated game. The board had various maps which are quite interesting as well as confusing, just like the game of war, it involves strategic thinking although not as intense cause this is actually a more relaxed and fun game. Furthermore, there is too much information on the guidelines of the game and the rules are not quite easy to follow. It could become boring too easily as there many so many decisions to take and things to do at each turn of a player that others lose interest at a rapid pace. The game seemed somewhat complicated because with so many pieces and objects, it was not easy to comprehend what was going and who was buying or trading what. It depicts real life situations which could be said to be familiar to terrorist situations that some countries under go but in the game, its very easy to become a terrorist just by having a spin at the axis of evil spinner thereby making one wear the balaclava. This evil spinner was on e of the reason why the game was confiscated by the police, it is still not widely accepted as the game received a high range of criticism and was even deemed offensive to some. It did not receive a lot of support until 2008 when it was allowed into the imperial war museum amongst others.

The Game of War was created by Guy Debord, as a representation of the works of Prussian military general Carl von Clausewitz. Guy Debord is a French Marxist theorist and founding member of the ‘Situationalist International’. War, and the form which we give it, proceeds from ideas, feelings, and circumstances’ (Clausewitz, 2006:401)), the Game of War intends to incarcerate the realism of the battlefield on the game board by constructing an artificial reality; this had the opposite effect of limiting the player’s sense of self. The game is too tense and serious, it is no fun to play and there is no room for socialising as the main key points the players have to focus on is attack and defence. It has too many techniques and the calculations are not easy to understand, this game is not advised for those not good in mathematical equations. It is only for the intellectual mind, however the arrangement and setting on the board is good though it looks quite technical and advanced. It is a game that involves a lot of strategic thinking and keeps one on their toes and this could cause pressure, it is nerve racking. One of the major disadvantage is that there is also no room for private discussions in which the opponents are able to talk about and carry out their plans, they are thereby succumbed to writing on a piece of paper and passing it round in order for the other members of the team to become fully engaged. On a more positive note, a player is able to buy terrorists in order to protect its empire against any form of attack. However, terrorists could attack one even after trading with them; the use of blackmail depicts real life such as in the case of Al-Quaeda and the US. The game teaches the players about deals with terrorist as they are not to be trusted. Regardless of a pact they promise to keep, they would still turn around and attack. Strategic thinking is also an advantage of the game. The colours should be more distinct as the board and some of the pieces are of the same colour. The pieces should be more colourful thereby making it easy to identify and also a bit more pleasant to look at. The rules should also be broken down into simpler forms so there would be a fair advantage and chance given to everyone intellectual or not. Unlike monopoly which involves luck, this does not and the principles are realistic while the pieces are abstract. Furthermore, the game is solely based on war and teaches how one needs to be able to protect and defend their country most especially in times of war. In conclusion, the game of war is a very political game, makes one think critically, which is also one of the numerous tactics politics revolves around especially if it has to be implemented successfully. Politics is mainly about gaining power and using that power to exert control on others; this is another dynamic role of the game of war.

The term Kingmaker originated from the activities of Richard Neville, the 16th of Earl of Warwick during the wars of roses in England between 1455 and 1487. It was a civil war between families in rivalry for the rightful candidate to the throne. Kingmaker could be referred to a person or a group of people with influence be it in politics or royalty. The basic concept of Kingmaker is the tendency of one’s units to wander off on their own, a concept inapplicable in a military simulation (Corbeil, 1999:92). Andrew McNeil’s created the game Kingmaker and in this game, the person with the most prestigious points emerges as the victor. These prestigious points are earned in two ways either by supporting a candidate house and the actions of the player’s house. However, since the player’s royal family is not a possible candidate for the throne, the player must give his possessions to the right candidate who is viable. ‘We can only speak of war as a cultural function so long as it is waged within a sphere whose members regard each other as equals or antagonist with equal rights (Salen, 2006:71). Kingmaker involves strategy and conflict conducted on different levels through battle, diplomacy and politics, attempts to eradicate other player's factions, and gain control of one or more members of the two rival royal families, the House of Lancaster and the House of York. In the game Kingmaker, Parliament is the means by which a player who controls the King consolidates and strengthens his faction, which makes politics an important factor of the game. In the 15th century England, parliament existed and could be summoned under specific circumstances in the game. The game is very challenging and it could be said to be a contest of diplomacy. The association of a number of weaker players working together, as well as threats, promises and agreements can easily bring down a very strong player with a positive outcome without the use of force. It is very simple and during the game more power is distributed evenly, and this unavoidably gives more players a chance of making their mark. War’s technological and rhetorical trajectory in the 20th century can be thought of as a long process of integration of the home front and battlefield (Stahl, 2006: 117).

References

Clausewitz, Carl von. (2006). On War. Palgrave, MacMillan.

Corbeil, P. (1999), Simulation Gaming. Simulation & Gaming. Vol 30 (1) pp 93-95.

Salen, Katie; Zimmerman, Eric. (2006). The Game Design Reader: A Rules of Play Anthology. Massachusetts. MIT Press.

The Guardian. “Hard times turn to gaming, but not everyone will be a winner”  Accessed: 07/04/2011

Stahl. R. (2006), “Have you played war on terror”. Critical Studies in media communication. Vol 23. No 2. Pp 112-130

Zagare. Frank, (1984). Game Theory: Concepts and Applications, Sage University Paper,

title: User:Yewande


text:
User:Egm6321.f10.team2.oztekin/Newwwwwwww

=Problem 6.10:Heat problem with new boundary condition=

Given
Governing equation was derived in meeting 32-4.
 * $$\displaystyle Q_{1}$$:Heat flow into w throgh $$\displaystyle \partial w$$
 * $$\displaystyle Q_{2}$$:Heat generated in w by heat source.
 * $$\displaystyle Q_{3}$$:Heat in w due to change in term u.

 * {| style="width:100%" border="0"

$$  \displaystyle Q_{1}=-\int_{\partial w}\mathbf{q}\mathbf{n}d(\partial w)=\int_{w}div\mathbf{q}dw $$     (10.1)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle Q_{2}=\int_{w}f(\mathbf{x},t)dw $$     (10.2)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle Q_{3}=\int_{w}\rho c\frac{\partial u}{\partial t}dw $$     (10.3)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle Q_{1}+Q_{2}=Q_{3} $$     (10.4)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \mathbf{q}=-\mathbf{K}grad(u) $$     (10.5)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle div(\mathbf{K}grad(u))+f=\rho c\frac{\partial u}{\partial t} $$ (10.6)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Boundry Conditions

 * {| style="width:100%" border="0"

$$  \displaystyle u(\mathbf{x},t)]_{\Gamma _{g}}=g(\mathbf{x},t) $$     (10.7)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle (q.n)]_{\Gamma _{h}}=h(\mathbf{x},t) $$     (10.8)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle (q.n)]_{\Gamma _{H}}=H(u-u_{\infty }) $$     (10.9)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

WRF

 * {| style="width:100%" border="0"

$$  \displaystyle \int_{\Omega }w[div(Kgrad(u))+f-\rho c\frac{\partial u}{\partial t}]d\Omega =0 $$     (10.10)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle\begin{align} K=  & \int_{\Omega }wdiv(Kgrad(u))d\Omega =\frac{\partial }{\partial x_{i}}(K_{ij}\frac{\partial u}{\partial x_{j}})\\ & \int_{\Omega }n_{i}wK_{ij}\frac{\partial u}{\partial x_{j}}d(\partial\Omega)-\int_{\Omega }\frac{\partial w}{\partial x_{i}}K_{ij}\frac{\partial u}{\partial x_{j}}d(\Omega) \end{align} $$     (10.11)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle K=-\int_{\Gamma _{g}}wnqd\Gamma _{g}-\int_{\Gamma _{h}}wnqd\Gamma _{h}-\int_{\Gamma _{H}}wnqd\Gamma _{H}+\int_{\Omega }div(w).K.div(u)d\Omega $$     (10.12)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

We deliberately chose w i.e. i vanishes on essential boundry. So the first term vanishes too. In the first term we have unknown flux that we can not deal with right now. But other fluxes are defined.We can write our continuous form of components as:

 * {| style="width:100%" border="0"

$$  \displaystyle \tilde{m}(w,u)=\int_{\Omega}w\rho c\frac{\partial u}{\partial t}d\Omega $$     (10.13)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \tilde{k} (w,u)=\int_{\Omega}div(w)Kdiv(u)d\Omega $$     (10.14)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \tilde{f}(w,u)=\int_{\Omega}wfd\Omega-\int_{\Gamma_{h}}whd\Gamma_{h}-\int_{\Gamma_{H}}wH(u-u_{\infty })d\Gamma_{H} $$     (10.15)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

!Note this time f depeneds on both w and u.

Discrete WF

 * {| style="width:100%" border="0"

$$  \displaystyle w^{app}=\sum_{I=1}^{n}N(x,y)_{I}w_{I} $$     (10.16)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle u^{app}=\sum_{J=1}^{n}N(x,y)_{J}d_{J} $$     (10.17)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle div(u)=div(N(x,y)_{I})d_{I}=B(x,y)_{I}d_{I} $$     (10.18)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \tilde{m}(w,u)+\tilde{k}(w,u)=\tilde{f}(w,u) $$     (10.19) Now lets substitute everything in the equation above.
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \sum_{I=1}^{n}w^{T}\left [\sum_{J=1}^{n}\left \{ \int_{\Omega }\rho cN_{I}N_{J}d_{I}^{s}d\Omega+\int_{\Omega}B_{I}KB_{J}d_{I}d\Omega -\int_{\Omega}N_{I}fd\Omega+\int_{\Gamma_{h}}N_{I}hd\Gamma_{h}+\int_{\Omega}N_{I}N_{J}(\Gamma_{H})H(d(\Gamma_{H})-d_{\infty })\right \} \right ]=0 $$     (10.20)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \tilde{\mathbf{d}}=\begin{bmatrix} \bar{de}\\ df
 * style="width:95%" |
 * style="width:95%" |

\end{bmatrix} $$     (10.21)
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \tilde{\mathbf{w}}=\begin{bmatrix} 0\\ wf
 * style="width:95%" |
 * style="width:95%" |

\end{bmatrix} $$     (10.22)
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \tilde{\mathbf{K}}=\begin{bmatrix} K_{E} &K_{EF} \\ K_{EF}^{T} & K_{F} \end{bmatrix} $$     (10.23)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle\begin{align} & K_{E}=\int_{\Omega }B_{1}.K.B_{1}d\Omega&\\ & K_{EF}=\int_{\Omega }B_{1}.K.B_{J}d\Omega& j=2,n\\ & K_{FF}=\int_{\Omega }B_{I}.K.B_{J}d\Omega& i,j=2,n
 * style="width:95%" |
 * style="width:95%" |

\end{align} $$     (10.24)
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \tilde{\mathbf{M}}=\begin{bmatrix} M_{E} &M_{EF} \\ M_{EF}^{T} & M_{F} \end{bmatrix} $$     (10.25)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle\begin{align} & M_{E}=\int_{\Omega }N_{1}\rho cN_{1}d\Omega&\\ & M_{EF}=\int_{\Omega }N_{1}\rho cN_{J}d\Omega& j=2,n\\ & M_{FF}=\int_{\Omega }N_{I}\rho cN_{J}d\Omega& i,j=2,n
 * style="width:95%" |
 * style="width:95%" |

\end{align} $$     (10.26)
 *

 * }


text:
SPIR608 Political Simulations and Gaming/2011/Clash Of The Titans

Russian-speaking students (aka "First-Class Students") designed this game for the Political Simulations and Gaming module (SPIR608)

Clash of the Titans is designed and created by Pavel Kogut, Tatsiana Rudzko and Ronald Gulami

Plot & description
For the first time in history a position of the world president is open. In one week, humanity will have its living secular God. In the run-up to elections, candidates take extra care safeguarding their reputation while jumping at every opportunity to tar that of their rivals. International media have already dubbed this struggle ‘ Clash of the Titans ’. Five candidates will come face to face as they struggle for power and world domination. Mr Lukashenko (Belarus), Mr Putin (Russia), Mr Chavez (Venezuela), Mr Berlusconi (Italy) and Mr Sarkozy (France) have only seven days to prove that one of them is the best candidate for the job.

Each night, a candidate launches negative public relations campaign (black PR) against one of his rivals. The following morning a victim of black PR is announced. Candidates begin to debate, defend and accuse as they seek to identify the client. At the end of each day, players vote for candidates they suspect to be behind media headlines. Careful! Vote incorrectly and your reputation will plummet; vote correctly and it will rise. At the end of seventh day, a winner is announced. Candidate with the best reputation gets the job.

Roles

 * Candidates represent five personalities competing for the job: Lukashenko, Putin, Chavez, Berlusconi and Sarkozy. Each candidate is dealt two cards in the beginning of the game: a personality card and a special conditions card (see Cards section for more details). At the end of the week, a candidate with the best reputation wins the election and becomes the world’s president.

 * Client is a candidate who launches black PR campaign against one of his rivals. At night, client needs to choose a victim and make his choice known to narrator. During the day, a client should defend his innocence, least he becomes a suspect.

 * Suspect is a candidate who receives the most votes at the end of each day.

 * Victim is a target of black PR. A candidate accused of corruption, for example, becomes a victim of black PR. Victim receives (-1) to his reputation in the beginning of each day.

 * Narrator is a person leading the game. Narrator announces the beginning of night and day cycles, deals cards to players and keeps track of reputation points.

Media Headlines

The game features seven events that correspond to different days of the week. Headlines were chosen on the basis of their association with a particular candidate (see table for more information). Events are there to amuse players as they move from one day to another and do not imply connection between a headline and a victim.

Day and Night Cycles
Players go through day and night cycles (seven in total) as the game progresses. When night falls, narrator asks candidates to ‘go to sleep’ by closing their eyes and tilting their heads downward. It is important that all players comply with this request to avoid peeking and cheating. Further, narrator asks Client to ‘wake up’ and choose a victim. Client is determined by a chance card that says “You are The Client.” Finally, client is asked to ‘go back to sleep.’

Tension builds up as game moves from night to day. Day cycle commences when narrator asks players to ‘wake up’. Narrator announces a victim of black PR and moderates an ensuing debate about a potential suspect. After a suspect is voted, narrator summarizes reputation points of each candidate and deals chance cards to determine a client of the next night.

Cards
Each player receives a personality and special conditions card in the beginning of the game. Personality card will determine the player’s candidate (Lukashenko, Putin, Chavez, Berlusconi, or Sarkozy) and reputation conditionality e.g. Berlusconi > Sarkozy. Special conditions card outlines two further requirements for candidates to earn (+5) points at the end of seventh day. In addition to personality and special conditions cards, players will get to draw a chance card prior to commencement of night cycle. Chance card determines a client and it is drawn randomly each time.

Reputation points
‘Clash of the Titans’ uses a points system that operates the logic of ‘carrot and stick'. Players are rewarded when they make right choices and vice versa. A rundown of points distribution is detailed below.

All candidates start with (+5) reputation points in the beginning of the game.

Candidates, if after voting a client is exposed, receive (+1) if they voted correctly and (-1) if they voted incorrectly. The same distribution of points holds true when client escapes suspicion.

Client receives (+2) if he escapes suspicion and (-2) if he is found guilty.

Suspect receives (-1) when client is not exposed.

Victim receives (-1) point as soon as the news are announced each day. If victim votes for a suspect that later turns out to be guilty (client), victim receives (+2) points. If victim votes for an innocent suspect, yet a client is exposed, victim still receives (+1) to make up for the lost reputation. Conversely, if client avoids suspicion, victim receives (+1) if it voted for him and (-1) if it voted for someone else.

Tie
A tie occurs when:
 * a) two candidates receive two votes each after voting and when
 * b) two candidates share the same number of reputation points at the end of the game.

In the first case, narrator resolves a tie by asking a player, who voted for neither of two candidates, to recast his vote. In the second case, narrator asks contestants “why do you think you are the best for this job?” and lets the team decide the winner.

Secret mail
This add-on is optional and its value-added needs to be further game-tested. The idea of secret mail is to let candidates communicate with their rivals via secret messages. In these messages, candidates are encouraged to ask favours e.g. not to vote for them on certain days, or to vote together against the strongest candidate on the next day in order to fulfil requirements outlined in special conditions cards. Candidates can reciprocate and ‘promise’ to return a favour. Of course, these agreements are not compulsory and are not binding. Promises are made to be broken, especially if doing so serves your interests. Before night falls, all candidates are offered to write no more than two secret messages to any two candidates and leave them on the table face down. At night, narrator collects and delivers secret messages to recipients face up before calling a client to ‘wake up.’ If client received a message, he can decide whether to take it into account when choosing a victim. When day starts, the rest will be able to read their messages and act accordingly. Secret mail aims to bring a sense of clandestine negotiations to the table. If anything, it is designed to confuse, alienate and encourage players to think in zero-sum terms.

Influence
It is difficult to acknowledge just one game that influenced ‘Clash of the Titans.’ Three most prominent ones that immediately come to mind are ‘ Mafia’ ‘Origins of World War II’ and ‘Vietnam 1955.’ People who are familiar with ‘ Mafia’ or ‘Werewolf’ will immediately notice similar engine used in ‘Clash of the Titans’ especially with regard to ‘day and night’ cycle. However, unlike ‘ Mafia’ where each round two players are eliminated, ‘Clash of the Titans’ keeps the same number of players by substituting elimination with punishment. This way, players participate in the game from start to finish without fear of elimination in the first few rounds. In addition, political factors used in ‘Origins of World War II’ were transformed into reputation points in ‘Clash of the Titans’ as well as the use of special conditions to gain extra reputation points. Finally, ‘Vietnam 1955’ showed that with real-life scenarios it is possible to enliven the game so that everyone can enjoy it. Agreeing with Shakespeare that ‘life is a stage and we are the actors,’ a role-playing game is supposed to uncover our hidden passions for acting.

Game mechanics
‘Clash of the Titans’ is an imperfect information game that features an informed minority and a uniformed majority. While some information is communal e.g. reputation conditionality, some is individual e.g. one’s role as a client, or special conditions for additional reputation points. Because of information imbalance, ‘Clash of the Titans’ uses the following game mechanics: voting, acting, role-playing, memory and variable player powers to narrow the information gap between an informed minority and a uniformed majority. Voting is used by players to identify a client of black PR whereas acting is used during the day to defend their innocence and avoid suspicion. Memory is necessary to remember conditions for extra reputation points and reputation conditionality. Variable player powers are used in the game to create tension and provide different means to achieve victory. For example, client has an information advantage and an incentive to remain uncovered. Victim, suspect and other candidates do not enjoy the same information advantage as client yet they are united by a desire to avoid suspicion. Role-playing is at the heart of ‘Clash of the Titans’ because players are assigned roles throughout the game be it a candidate, a client, a victim, a suspect or a president.

Improvement after play-testing

The prototype saw few changes after the first play-testing, mainly:

 * 1) An improved table to record players’ identities, roles, votes and points
 * 2) A reputation pentagram to model rivalry and create tension
 * 3) Separate condition cards to avoid repetition when new game is played
 * 4) Special tablets to give players a 3-D feel of their reputation (similar to political factors in ‘Origins of World War II’)

Final caveat
‘Clash of the Titans’ is still a work-in-progress. Reputation point system requires further play-testing, especially with regards to points given and taken when client is/not exposed. Another under-tested area is reputation conditionality. It may prove difficult for players to meet all conditions to gain extra reputation points and hence a reduction to two requirements may be necessary. Likewise, ‘secret mail’ option needs to be game-tested several times before a verdict on its usefulness can be reached. When all aspects of the game are streamlined, it can potentially lend itself to becoming a commercially viable product.


text:
User:Eml5526.s11.team04.premchand/HW6

= Problem 6.6 = Result obtained by ABAQUS

= Problem 6.7 - Matrix Algebra =

Problem Statement
Recall matrix algebra: (1) $$(\mathbf{A}\mathbf{B})^{T}=\boldsymbol{B}^{T}\boldsymbol{A}^{T}$$ (2) $$(\boldsymbol{A}^{-1})^{T}=(\boldsymbol{A}^{T})^{-1}=\boldsymbol{A}^{-T}$$ Given the matrices: $$ \boldsymbol{A}=\begin{bmatrix} 1 & 1 & 1\\ 2 & -1 & 3\\ 3 & 2 & 6 \end{bmatrix} $$ $$ \boldsymbol{B}=\begin{bmatrix} 1 & 3 & 5\\ 1 & -4 & 1\\ 2 & 5 & 8 \end{bmatrix} $$ Verify the matrix algebra properties shown above (properties 1 and 2). Find and explain the syntax of Wolframalpha

Solution
Condition 1

(1a) is equal to (1b), this proves that $$(\mathbf{A}\mathbf{B})^{T}=\boldsymbol{B}^{T}\boldsymbol{A}^{T}$$

The wolfram alpha calculation for $$(\mathbf{A}\mathbf{B})^{T}$$ is given in the following pdf file

Click on the pdf file to see the second page.

The wolfram alpha calculation for $$\boldsymbol{B}^{T}\boldsymbol{A}^{T}$$ is given in the following pdf file

Click on the pdf file to see the second page.

The Wolfram alpha results match with the manually calculated results of condition 1 of problem statement.This validates the proof.

Condition 2

(2a) is equal to (2b).This proves that $$(\boldsymbol{A}^{-1})^{T}=(\boldsymbol{A}^{T})^{-1}=\boldsymbol{A}^{-T}$$

The wolfram alpha calculation for $$(\boldsymbol{A}^{-1})^{T}$$ is given in the following pdf file

The wolfram alpha calculation for $$(\boldsymbol{A}^{T})^{-1}$$ is given in the following pdf file

Click on the pdf file to see the second page.

The Wolfram alpha results match with the manually calculated results of condition 2 of problem statement.This validates the proof.

= Problem 6.9 - F&B Ex 8.3, Ex 8.4, and Problem 8.6 =

Problem Statement
Problem 1: The heat conduction problem in Example 8.1 ( Fish and Belytschko ) is modeled with 16 quadrilateral finite elements.The problem is solved manually using the finite element code given in Section 12.5

Solution
1.) The problem is solved using the MATLAB code given in section 12.5 of companion site of the text book Fish and Belytschko.On running the code we receive the following post process result plots for temperature and flux figs (a),(b). Fluxes are calculated by looping over the number of elements.For the four node quadrilateral there are four Gauss points as shown in fig (c).

2.) Reproduce Example 8.4 (page 205) from Fish and Belytschko. 3.) Complete problem 8.6 (page 212) from Fish Belytschko.

title: User:Eml5526.s11.team04.premchand/HW6


text:
User:Eml5526.s11.team3.akj/Homework 6

=Problem 6.1 Using Quadratic Lagrange Element Basis Functions to Obtain Trial and Exact Solution of Torsion Bar=

Given: Data set G1DM1.0/D1b defined on Lecture 26-2
Strong form for the Torsion Bar

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},x_{2},x_{3},x_{4} and 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(1.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. 1.13 and Eq. 1.14 are same as that obtained in part 3 i.e Eq. 1.22 and Eq. 1.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}$$

=Problem 6.5 Using 2DLIBF to Obtain Trial and Exact Solution for heat problem with boundaries enclosed by a bi-unit square=

Given: Data set G2DM1.0/D1 defined on Lecture 35-4
Strong form for the heat problem is given by Lecture 33-2

where $$\boldsymbol{\kappa}\left( {x,t} \right) = \mathbf{I} $$ $$\qquad\text{and}\quad $$   $$f\left( {x,t} \right) = 0 $$   and $$\frac{\partial u}{\partial t}\left( {x,t} \right) = 0 $$

so we get

Essential boundary conditions, Natural boundary conditions,

Find
1. Use 2DLIBF with n=m=2,4,6,8... to solve G2DM1.0/D1 for $$u^{h}$$ until accuracy of $$10^{-6}$$ at centre (x,y)=(0,0)

1) Finding Exact solution
The solution for the PDE $$\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}=0$$ will be of the form

$$u(x,y)=c_{1}xy+c_{2}x+c_{3}y+c_{4}$$ where,  $$c_{1},c_{2},c_{3} and c_{4}$$  are constants.

The essential BC is specified through out the boundary of the square hence u=2 for the points on the 4 vertices of the square. i.e for (-1,-1);(-1,1);(1,-1) and (1,1) we have u=2, substituting for these four points into the equation for u above and solving them simultaneously we get  $$c_{1}=0$$ ,  $$c_{2}=0$$  ,  $$c_{3}=0$$  and  $$c_{4}=2$$ hence the exact solution of the PDE is given by

Hence, the trial solution of the governing equation is

2) Finding Approximate solution
2DLIBF are given by

$$L_{i,m}$$ is the Lagrange basis function along x and $$L_{i,m}$$ is the Lagrange basis function along y given by

The LIBF be defined by a function

consider the case of n=m=3 the number of nodes is 9

The trial solution is
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

u_{p}^{h}(x)={{d}_{1}}*N_{1}+{{d}_{2}}N_{2}+{{d}_{3}}N_{3}+\cdots +{{d}_{9}}N_{9},_ – ^ – j=0,1,2,\cdots ,9

$$
 * }

Since the trial solution must satisfy the essential boundary condition,, we should have  $${{d}_{1}}=2,{{d}_{2}}=2,{{d}_{3}}=2,{{d}_{4}}=2,{{d}_{6}}=2,{{d}_{7}}=2,{{d}_{8}}=2,{{d}_{9}}=2$$. , because it is specified that through out the boundary the temperature is 2 i.e for all the nodes on the boundary temperature is 2

In order to solve for the rest coefficient $${{d}_{j}},_ – ^ – j=1,2,\cdots $$, we construct the Conductance matrix, Heat Source matrix and Capacitance matrix as follow:
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

\tilde{\kappa}(\omega,u)=\int_{\Omega}\bigtriangledown \omega\boldsymbol{\kappa }\bigtriangledown ud\Omega

$$
 * }
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

\tilde{f}(\omega)=-\int_{\Gamma _{h}}\omega h d\Gamma _{h}+\int_{\Omega}\omega f d\Omega $$
 * }

 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

\tilde{m}(\omega,u)=\int_{\Omega}\rho c\omega \frac{\partial u}{\partial t} d\Omega $$
 * }

Substituting Eq 6.1 and 6.3 into the above Equation we get,

 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

\tilde{\kappa}(\omega,u)=\int_{\Omega}\bigtriangledown \omega\bigtriangledown ud\Omega

$$
 * }
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

\tilde{f}(\omega)=0 $$
 * }

 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

\tilde{m}(\omega,u)=0 $$
 * }

Using Matlab to construct above two matrices until satisfying the convergence criterion, we finally have
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{K}_{FF}}= \begin{bmatrix} 0.6222 & -0.2000  & -0.0333 &  -0.2000 &  -0.3556  &  0.1111 & -0.0333  &  0.1111 &  -0.0222 \\   -0.2000 &  1.9556  & -0.2000 &  -0.3556 &  -1.0667  & -0.3556 &   0.1111 &        0&    0.1111\\   -0.0333 &  -0.2000 &   0.6222&    0.1111&   -0.3556 &  -0.2000&   -0.0222&    0.1111&   -0.0333\\   -0.2000 &  -0.3556 &   0.1111&    1.9556&   -1.0667 &        0&   -0.2000&   -0.3556&    0.1111\\   -0.3556 &  -1.0667 &  -0.3556&   -1.0667&    5.6889 &  -1.0667&   -0.3556&   -1.0667&   -0.3556\\    0.1111 &  -0.3556 &  -0.2000&         0&   -1.0667 &   1.9556&    0.1111&   -0.3556&   -0.2000\\   -0.0333 &   0.1111 &  -0.0222&  -0.2000 &  -0.3556  &  0.1111 &   0.6222 &  -0.2000 &  -0.0333\\    0.1111 &        0 &   0.1111&   -0.3556&   -1.0667 &  -0.3556&   -0.2000&    1.9556&   -0.2000\\   -0.0222 &   0.1111 &  -0.0333&    0.1111&   -0.3556 &  -0.2000&   -0.0333&   -0.2000&    0.6222\\

\end{bmatrix}

$$
 * }

 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{F}_{F\times 1}}=\begin{bmatrix} 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0 \end{bmatrix}

$$ By the equation that $$ Kd=F  $$, we can solve the rest of $$d$$ as
 * }
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{d}_{F\times 1}}=\begin{bmatrix} 2\\ 2\\ 2\\ 2\\ 2\\ 2\\ 2\\ 2\\ 2 \end{bmatrix}

$$
 * }

Hence, the trial solution of the governing equation is
 * {| style="width:100%" border="0"

$$\displaystyle \begin{align} &U_{F}^{h}(x)= 0.5*x*y*(x - 1)*(y - 1) - 1.0*x*(1.0*x + 1.0)*(1.0*y + 1.0)*(y - 1)\\ & \quad - 1.0*y*(1.0*x + 1.0)*(1.0*y + 1.0)*(x - 1) - 1.0*x*(1.0*y + 1.0)*(x - 1)*(y - 1)\\& \quad - 1.0*y*(1.0*x + 1.0)*(x - 1)*(y - 1) + 2.0*(1.0*x + 1.0)*(1.0*y + 1.0)*(x - 1)*(y - 1)\\& \quad + 0.5*x*y*(1.0*x + 1.0)*(1.0*y + 1.0) + 0.5*x*y*(1.0*x + 1.0)*(y - 1)\\& \quad + 0.5*x*y*(1.0*y + 1.0)*(x - 1) \\ \end{align}
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

$$
 * }

It is found that the exact and actual solution are exactly matching for n=m=3, the plot of exact and trial solution is as shown below

title: User:Eml5526.s11.team3.akj/Homework 6