# Homework 4

Chris Nkinthorn

Finite Element Methods

## Problem 1

**Prompt:** In section 2.3 of the text (pg. 60-64) the strong form and weak form of the equations for linear heat conduction are given. Using a Galerkin based method of weighted residuals, show the construction of the given weak form starting from the strong form, stated as:

Given $f : \Omega \rightarrow \mathbb{R}, q : \Gamm&#x61;*{o} \rightarrow \mathbb{R} \text { and } h : \Gamma*{h} \rightarrow \mathbb{R}, \text { find } u : \overline{\Omega} \rightarrow \mathbb{R}$ such that

$$
\begin{align}
q\_{i, i}&=f \quad \text { in } \Omega &\quad \text { (Heat Equation) }
\label{eqnHeat}
\\
u
&=
g \quad \text { on } \Gamma\_{g}
\quad &\text { (Essential Boundaries) } \\
-q\_{i} n\_{i}
&=
h \quad \text { on } \Gamma\_{h}
\quad &\text { (Natural Boundaries) }
\end{align}
$$

With the functions from candidate spaces: $u \in \delta$ and $w \in \mathcal{V}$.

$$
\begin{align}
\delta
&=
{u\big|u \in H^1(\Omega), u(\Gamma) = g }\\
\mathcal{V}
&={w\big|w= H^1(\Omega), w(\Gamma) = 0}
\end{align}
$$

Beginning with the Heat Equation $\[\ref{eqnHeat}]$, we cannot solve in the strong form presented. Instead, we minimize a weighting function $w$ in the domain $\Omega$, where the closure of $\Omega$ is $\Gamma$. Distributing the weight function to produce two integral terms. Solving the first term using integration by parts (IBP) produces

$$
\begin{align}
0
&=
\int\_{\Omega}
\overbrace{w\left(q\_{i, i}-f\right) }^\text{distribute}
d \Omega
========

\overbrace{\int\_{\Omega} wq\_{i, i} d \Omega }^\text{weaken w/ IBP}

* \int\_{\Omega} w f d \Omega \\
  &=
*

\overbrace{\int\_{\Omega} w\_{, i} q\_{i} d \Omega
\+
\int\_{\Gamma\_h} w
\underbrace{q\_{i} n\_{i}}*\text{BC}
d \Gamma
}^\text{from IBP}-
\int*{\Omega} w f d \Omega \label{eqnLambda}\\

&=-\int\_{\Omega} w\_{, i} q\_{i} d \Omega-\int\_{\Gamma\_{h}} w h d \Gamma-\int\_{\Omega} w f d \Omega
\end{align}
$$

Algebraic rearrangement with knowns on the right and the unknown on the left:

$$
\boxed{
-\int\_{\Omega} w\_{, i} q\_{i} d \Omega
========================================

\int\_{\Gamma\_{h}} w h d \Gamma
+\int\_{\Omega} w f d \Omega
}
\label{eqn2BC}
$$

## Problem 2

$\textcolor{red}{\texttt{To Be Graded }}$ Exercise 1 on page 68 of the text book. This exercise is a multidimensional analog of the the one contained in Sec. 1.8. Let

$$
\Gamma\_{\mathrm{int}}
\=\left( \bigcup\_{e = 1}^{n\_{el}}\Gamma^e\right)
-\Gamma \quad \quad \text { (interior element boundaries) }
$$

One side of $\Gamm&#x61;*{int}$ is arbitrarily designated to be the “+ side” and the other is the “- side”. Let $n^+$ and $n^-$ be unit normals to $\Gamma*{int}$, with the relationship:

$$
\left\[q\_{n}\right] =\left(q\_{i}^{+}-q\_{i}^{-}\right) n\_{i}^{+}
\=q\_{i}^{+} n\_{i}^{+}+q\_{i}^{-} n\_{i}^{-} ;\quad
n\_i^+ = -n\_i^-
\label{eqnJump}
$$

Consider the weak formulation$\[\ref{eqn2BC}]$ and assume that $w$ and $u$ are smooth on the element interiors but may experience discontinuities in gradient across element boundaries. Restating $\[\ref{eqn2BC}]$, the equation is made homogenous by moving the left hand side (LHS) term to the right hand side (RHS) of the equation.

$$
-\int\_{\Omega} w\_{, i} q\_{i} d \Omega
========================================

\int\_{\Gamma\_{h}} w h d \Gamma
+\int\_{\Omega} w f d \Omega
\\
0 =
\int\_{\Omega} w\_{, i} q\_{i} d \Omega
\+
\int\_{\Gamma\_{h}} w h d \Gamma
+\int\_{\Omega} w f d \Omega
\\
0 =
\overbrace{
\underbrace{\int\_{\Omega} w\_{, i} q\_{i} d \Omega}*\text{IBP}
\+
\int*{\Omega} w f d \Omega
}^\text{collect same domain}
\+
\int\_{\Gamma\_{h}} w h d \Gamma
\\
$$

where IBP was

$$
\int\_\Omega w\left(q\_{i,i}\right)d\Omega+\int\_\Omega w\_{,i}q\_i
d\Omega
\= \int\_\Gamma wh d\Gamma
$$

so substitution into

$$
0 =

* \int\_\Omega wq\_{i,i}d\Omega + \int\_\Omega wf d\Omega
  -\int\_\Gamma whd\Gamma

- \int\_{\Gamma\_h} whd\Gamma

\\

0 =

\int\_\Omega wq\_{i,i}d\Omega - \int\_\Omega wf d\Omega
+\int\_\Gamma whd\Gamma

* \int\_{\Gamma\_h} whd\Gamma
  $$

This statement is local, so on the global mesh is the sum of all elements from $1$ to $n\_{el}$:

$$
0 =

\sum\_{e=1}^{n\_{el}}
\left{
\int\_{\Omega^e}
\left(
\overbrace{w q\_{i,i} - w f}^{\text{factor the }w}
\right)d\Omega
+\int\_\Gamma whd\Gamma

* \int\_{\Gamma\_h} whd\Gamma
  \right}
  \\

\= \underbrace{\sum\_{e=1}^{n\_{el}}
\int\_{\Omega^e}
w\left(
q\_{i,i} - f
\right)d\Omega}*\text{keep this term}
\+
\underbrace{\sum*{e=1}^{n\_{el}}
\int\_\Gamma}\_\text{union} whd\Gamma
-------------------------------------

\underbrace{\sum\_{e=1}^{n\_{el}}\int\_{\Gamma\_h}}\_\text{fixed # BC} whd\Gamma

\\
$$

The normal flux relationship of Eqn $\[\ref{eqnJump}]$ is applied into the middle term. Decomposing the $\Gamma = \cancelto{0}{\Gamma\_g} + \Gamma\_h$, produces

$$
\boxed{
0=\sum\_{e=1}^{n\_{e l}} \int\_{\Omega^{e}} w\left(q\_{i, i}-f\right) d \Omega-\int\_{\Gamma\_{h}} w\left(q\_{n}+h\right) d \Gamma+\int\_{\Gamma\_{i n t}} w\left\[q\_{n}\right] d \Gamma
}
$$

## Problem 3

Exercise 1 on page 71 of the text book

Let

$$
\underset{n\_{e n} \times 1}{\underbrace{{\bf d}^{e}}}=\left{d\_{a}^{e}\right}=\left{\begin{array}{c}{d\_{1}^{e}} \ {d\_{2}^{e}} \ {\vdots} \ {d\_{n\_{e n}}^{e}}\end{array}\right}
$$

where

$$
d\_{a}^{e}=u^{h}\left(x\_{a}^{e}\right)
$$

${\bf d}^e$ is the element temperature vector. Show that the heat flux vector at point $x \in \Omega^e$ can be calculated from the formulation

$$
q(x)=-D(x) B(x) d^{e}=-D(x) \sum\_{a=1}^{n\_{en}} B\_{a} d\_{a}^{e}
$$

Not sure how this expression was constructed, to move the $B$ matrix as a summation of element nodes. It looks like collocation because of evaluation at specific locations but I’m not sure how to prove it.

## Problem 4

Exercise 2 on page 71 of the textbook, Consider the strong statement where the replacement on $\Gamma\_h$ is

$$
\lambda u-q\_{i} n\_{i}=h \quad \text { on } \Gamma\_{h}
$$

where $\lambda\geq0$ is a function of $x \in\Gamma\_h$. To generalize, continue from $\[\ref{eqnLambda}]$, where the additional term creates:

## $$

\int\_{\Omega} w\_{, i} q\_{i} d \Omega
\+
\int\_{\Gamma\_h} w
\overbrace{q\_{i} n\_{i}}^{\text{new }h}
d \Gamma
--------

\int\_{\Omega} w f d \Omega

\=
-\int\_{\Omega} w\_{, i} q\_{i} d \Omega
-\int\_{\Gamma\_{h}} w \left(h - \lambda u\right) d \Gamma
-\int\_{\Omega} w f d \Omega

\\

\=
-\int\_{\Omega} w\_{, i} q\_{i} d \Omega
-\int\_{\Gamma\_{h}} w h  d \Gamma
+\int\_{\Gamma\_{h}} w  \lambda u d \Gamma
-\int\_{\Omega} w f d \Omega
$$

Assuming that the original weak form expression was also positive definite, then the additional contribution to $k\_{ab}^e$ is based purely on $\lambda$. To prove that $\bf K$ is positive definite, then we would need to show that $\bf c^T\cdot K \cdot c \geq 0$ and $0$ only when $\bf c$ is the 0 vector, $\bf 0 $.
