User:Eml5526.s11.team7.jb/72exact

Solution
(1)Construct the Basis Functions

For the 1D case the LIBF Basis function can be written:

\displaystyle

{L_{i,m}}(x) = \prod\limits_{\begin{array}{ccccccccccccccc} {k = 1} \\ {k \ne i} \end{array}}^m {\frac}

$$

It is extended to the the 2D case as:

\displaystyle

{N_I}(x,y) = {L_{i,m}}(x) \cdot {L_{j,n}}(y)

$$

where



\displaystyle

I = i + (j - 1)m

$$

Here are two examples of basis functions, N(x):

(A) n=4, I=1



(B)n=4, I=7



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

(2)Generate the Matrix Equations

\displaystyle

m(w,u) + k(w,u) = f(w,u)

$$

\displaystyle

m(w,u) = \int\limits_\Omega {w\rho \frac} d\Omega =0

$$

\displaystyle

k(w,u) = \int\limits_\Omega {T\nabla w\nabla u} d\Omega

$$

\displaystyle

f(w,u) = - \int_{\Gamma h} {whd{\Gamma _h}}  + \int\limits_\Omega  {wf} d\Omega= \int\limits_\Omega  {wf} d\Omega

$$



\displaystyle

Kd = F

$$

\displaystyle

{K_{ij}} = \int_ T{(\nabla N_I^e)(\nabla N_J^e)d{w^e}}

$$ Since $$\displaystyle T$$ is a constant it can be pulled out of the integral.

\displaystyle

{K_{ij}} = T\int_ {(\nabla N_I^e)(\nabla N_J^e)d{w^e}}

$$ Considering the essential boundary condition is the outline of the biunit, one special treatment is needed. Reconstruct $${K_f}$$ and $${F_f}$$, so that we can solve for matrix d. Firstly, considering

\displaystyle

{L_{i,m}}({x_j}) = {\delta _{i,m}} = \left\{ {\begin{array}{ccccccccccccccc} {1,forj = i} \\ {0,forj \ne i} \end{array}} \right.

$$ For all $${d_i}$$ belonging to the nodes on the essential boundary condition, we can get the value directly:

\displaystyle

{d_i} = 0,where(i \in \Gamma_g)

$$ For the unknown or free coefficients$${d_F}$$, which are located in the middle area of the biunit and number is $${(n - 2)^2}$$, we need to construct $${K_F}$$ and $${F_F}$$ to solve for the free coefficients.

\displaystyle

{K_F}{d_F} = {F_F}

$$ Note: The dimension of $$\displaystyle {K_F}$$ is $$\displaystyle {n^2} \times {(n - 2)^2}$$, the dimension of $$\displaystyle {d_F}$$ is $$\displaystyle {(n - 2)^2} \times 1$$ , the dimension of $$\displaystyle {F_F}$$ is $$\displaystyle {n^2} \times 1$$

(3)Reunion matrix $$d$$

In this step, update the unknown $${d_i}$$ in the $${d}$$ with $${d_f}$$, so we get the complete matrix $${d}$$. So the trial solution is :



\displaystyle

{u^h} = \sum\limits_{i = 1}^ {{d_i} \times {N_i}(x,y)}

$$

Then plot $${u^h}$$:

For three different cases: m=n=2, m=n=4, m=n=6, we get the same trial solution, $${u^h=2}$$, shown below:



Since the exact solution is quite difficult to determine the estimate the error can be instead taken as a function of convergence. The number of nodes in the x and y directions $$\displaystyle n$$ and $$\displaystyle m$$ are increased until the change in $$\displaystyle {u^h}$$ decreases below $$\displaystyle 10^{-6}$$. A plot of this estimated error versus number of nodes is shown below.

Comments:

Although it's too complicated to find exact solution via math way, we still can find exact solution though physic analysis. Firstly, because $$\frac = 0$$, the temperature field is static. Secondly, because $$f=0$$, there is no heat exchange between this biunit and the environment. So the total amount of heat in this biunit does not change.

Besides， K matrix is identity matrix, so the biunit is isotropic material, so the temperature is equal everywhere in the biunit. Considering the essential boundary condition is $${g=2}$$, we can get the conclusion that, the exact solution is $${u(x,y)=2}$$

Find Exact solution
The PDE can be re-written as:
 * $$T\left [\frac{\partial^2 u}{\partial x^2} +\frac{\partial^2 u}{\partial y^2}\right ]+f(\mathbf{x})=0$$
 * $$4\left [\frac{\partial^2 u}{\partial x^2} +\frac{\partial^2 u}{\partial y^2}\right ]+1=0$$

Note that this is a form of the Laplace Equation. This second order linear PDE can be solved using the following input with WolframAlpha: LaplaceEquation =4*D[u[x, y], {x, 2}] + 4*D[u[x, y], {y, 2}] +1 == 0; DSolve[LaplaceEquation, u[x, y], {x, y}]

Which yields a solution of the form:


 * $$u(x, y) = c_1[y+i x]+c_2[y-i x]-\frac{x^2}{8}$$

where, $$c_{1} and c_{2}$$  are constants. The essential boundary condition is prescribed across the entire boundary of the biunit square. This boundary conditions can be applied to solve for the constants as follows:


 * $$u(-1, -1) =0, \; \; \; u(-1, 1) =0, \; \; \;u(1, -1) =0, \; \; \;u(1, 1) =0$$

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