User:EML4500.f08.JAMAMA/FE/smith

ɥ$$ \ne \quad $$

http://meta.wikimedia.org/wiki/Help:Formula

=7.3: Newton's Law of Colling=

Given
Data Set G2DM2.0/D1

$$ \Omega = Domain \quad $$

$$ K=I, f(x,t)=0$$

$$ \frac {\partial u}{\partial t} = 0, ~g=2, ~h=3$$

$$ H=.5 ~u_\infty =.1$$

$$ \partial \Omega = \Gamma_g \bigcup \Gamma_h \bigcup \Gamma_H $$

and, The Partial Differential Equation is:

Find
1) The weak form for heat conduction in 2-D with boundary convection. 2) Develop semi-discrete equations (ODEs). Give detailed expression of all quantities. 3) Solve G2DM2.0/D1 using 2D LIBF till $$\displaystyle 10^{-6} $$ accuracy at the center. Plot solution in 3D with contour.

1.The Weak Form for heat conduction in 2D with boundary convection
From the PDE (Eqn 6.10.1) the weak form can be written as,



Using integration by parts,



Substituting into the integral we obtain,


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


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

\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{\frac{\partial }{\partial {{x}_{i}}}\left( w{{K}_{ij}}\frac{\partial u}{\partial {{x}_{j}}} \right)}d\text{ }\!\!\Omega\!\!\text{ }-\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{\frac{\partial w}{\partial {{x}_{i}}}\left( {{K}_{ij}}\frac{\partial u}{\partial {{x}_{j}}} \right)}d\text{ }\!\!\Omega\!\!\text{ +}\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{wf\left( x,t \right)}d\text{ }\!\!\Omega\!\!\text{ }-\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{w\rho c\frac{\partial u}{\partial t}}d\text{ }\!\!\Omega\!\!\text{ }=0 $$ $$
 *  $$ \displaystyle (Eq. 6.10.3)
 * }

Applying the Gauss Theorem on the first term gives,


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

\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}w{{K}_{ij}}\frac{\partial u}{\partial{{x}_{j}}}{{n}_{i}}d\text{ }\!\!\Gamma\!\!\text{ }-\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{\frac{\partial w}{\partial {{x}_{i}}}\left( {{K}_{ij}}\frac{\partial u}{\partial {{x}_{j}}} \right)}d\text{ }\!\!\Omega\!\!\text{ +}\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{wf\left( x,t \right)}d\text{ }\!\!\Omega\!\!\text{ }-\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{w\rho c\frac{\partial u}{\partial t}}d\text{ }\!\!\Omega\!\!\text{ }=0 $$ $$
 * style="width:95%" |$$
 * style="width:95%" |$$
 *  $$ \displaystyle (Eq. 6.10.4)
 * }

The Heat Flux is given by,


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

q_{i}=-K_{ij}\frac{\partial u}{\partial x_{j}} $$ $$
 * style="width:95%" |$$
 * style="width:95%" |$$
 *  $$ \displaystyle
 * }

Substituting the heat flux and rearranging the terms in Eq. 6.10.4 gives,


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

\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{-w{{q}_{i}}{n}_{i}}d\text{ }\!\!\Gamma\!\!\text{ }-\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{\frac{\partial w}{\partial {{x}_{i}}}\left( {{K}_{ij}}\frac{\partial u}{\partial {{x}_{j}}} \right)}d\text{ }\!\!\Omega\!\!\text{ +}\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{wf\left( x,t \right)}d\text{ }\!\!\Omega\!\!\text{ }-\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{w\rho c\frac{\partial u}{\partial t}}d\text{ }\!\!\Omega\!\!\text{ }=0 $$ $$
 * style="width:95%" |$$
 * style="width:95%" |$$
 *  $$ \displaystyle (Eq. 6.10.5)
 * }

The first term can be rewritten as,


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

\int\limits_{\Gamma }{-w{{q}_{i}}{{n}_{i}}d\Gamma =}\int\limits_{-w{{q}_{i}}{{n}_{i}}d{{\Gamma }_{g}}}-\int\limits_{-w{{q}_{i}}{{n}_{i}}d{{\Gamma }_{h}}}-\int\limits_{-w{{q}_{i}}{{n}_{i}}d{{\Gamma }_{H}}} $$ $$
 * style="width:95%" |$$
 * style="width:95%" |$$
 *  $$ \displaystyle
 * }

Select $$ \quad w $$ such that $$\quad w=0 $$ on $$\quad {{\Gamma }_{g}}$$

Organizing, Eq. 6.10.5 then becomes the following weak form


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

\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{w\rho c\frac{\partial u}{\partial t}d\text{ }\!\!\Omega\!\!\text{ +}}\int\limits_{\text{ }\!\!\Omega\!\!\text{ }}{\frac{\partial w}{\partial {{x}_{i}}}\left( {{K}_{ij}}\frac{\partial u}{\partial {{x}_{j}}} \right)d\text{ }\!\!\Omega\!\!\text{ }}+\int\limits_{wHu}d{{\text{ }\!\!\Gamma\!\!\text{ }}_{H}}=-\int\limits_{whd{{\text{ }\!\!\Gamma\!\!\text{ }}_{h}}}+\int\limits_{wH{{u}_{\infty }}d{{\text{ }\!\!\Gamma\!\!\text{ }}_{H}}}+\int\limits_{\Omega }{wf\left( x,t \right)d\text{ }\!\!\Omega\!\!\text{ }},$$ $$ $$ \quad \forall w $$ such that $$\displaystyle w=0 \quad on \quad {{\Gamma }_{g}} $$
 * style="width:95%" |$$
 * style="width:95%" |$$
 *  $$ \displaystyle (Eq.6.10.6)
 * }

2) Develop Semidiscrete Equations (ODE's)
Let $$ u=[ N]{{u}_{e}}\quad $$ and $$ \quad w=[ N ]{{w}_{e}},$$ where $$\displaystyle [N] $$ is the Lagrange polynomial and $${u}_{e}~ and ~ {w}_{e} $$ are the nodal values of $$ u \quad $$ and $$w \quad $$ respectively. Now, take the derivative of basis functions with respect to x1 and x2

Substituting the Langrangian form into the weak form (Eq 6.10.6), yields the semi-dicrete form:

From Eq. 6.10.8, we can obtain the Heat Source vector, Conductivity matrix, and Capacitance Matrix.

The heat source vector is $$\tilde{f}(w)= -\int\limits_{h{{[N]}^{T}}d{{\Gamma }_{h}}}+\int\limits_{H{{[N]}^{T}}{{u}_{\infty }}d{{\Gamma }_{h}}}+\int\limits_{\Omega }{{{[N]}^{T}}f(x,t)d\Omega } $$

The Conducitivity matrix is $$\tilde{k}(w,u)= \int\limits_{\Omega }{{{[B]}^{T}}[B]d\Omega }+\int\limits_{H{{[N]}^{T}}[N]d{{\Gamma }_{h}}} $$

The Capacitance Matrix is $$\tilde{m}(w,u)= \int\limits_{\Omega }{\rho c{{[N]}^{T}}[N]\frac{\partial u}{\partial t}d\Omega } $$

3.Solve G2DM2.0/D1 Using 2D LIBF till $$10^{-6}$$ accuracy at center. Plot Solution in 3D w/Contour.
To solve the problem using LIBF, divide the x-axis and Y-axis into 2 parts 2D LIBF


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

$$ N_I (x,y) = L_{i,m}(x).L_{j,n}(y) \quad Where \ I = i+(j-1)m $$
 * style="width:95%" |
 * style="width:95%" |
 *  $$ \displaystyle                                                                     $$
 * }

Where,

<span id="(1)">
 * {| style="width:100%" border="0"

$$ L_{i,m}(x) = \prod_{k=1\neq i}^{m}\frac{x-x_k}{x_i - x_k} $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }<span id="(1)">
 * {| style="width:100%" border="0"

$$ L_{j,n}(x) = \prod_{k=1\neq j}^{m}\frac{y-y_k}{y_j - y_k} $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

Consider a case of 9 nodes as shown below



The trial solution is

The trial solution must satisfy the essential boundary condition. Throughout boundary $$ \Gamma_g, \quad $$ the temperature should be a constant 2. Thus $$ d_1, d_2, d_3, d_6, d_9 =2. \quad $$ The matlab code used is shown and explained below