Integration by parts & Finite Elements

532 Views Asked by At

I am reading on the Finite Element Method and I have the following question:


For $f \in L^2(\Omega)$, $\sigma \in C^1(\Omega)$, find a finite element formulation of the problem \begin{equation} -\sum_{i=1}^{n} \frac{\partial}{\partial x_i}(\sigma(x)\frac{\partial u}{\partial x_i})=f, \quad \frac{\partial u}{\partial n}=0 \ \text{on}\ \ \partial \Omega \end{equation}


I recognize that I can write the above equation in vector form as $-\nabla \cdot (\sigma(x) \nabla u)=f$. Assuming that $V$ is a finite $C^0$ finite element space define on $\Omega$ I attempt to multiply by a test function $v\in V$ and then integrate by parts. Can someone explain to me in detail how to proceed with the following integral (I am having trouble applying the integration by parts) \begin{equation} -\int_\Omega (\nabla \cdot (\sigma \nabla u))v\ dx \end{equation}

1

There are 1 best solutions below

0
On

The typical objective of the weak formulation is that you can reduce the required regularity / differentiability / smoothness of the function $u$ you are looking for. Typically, this is done by means of integration by parts as you mentioned. The key insight of int. by parts is that you can rewrite the product rule of differentiation (slightly generalized to vector-valued functions) as \begin{align} \nabla \cdot (v \boldsymbol{f}) =& \boldsymbol{f} \cdot \nabla v + v \nabla \cdot \boldsymbol{f} \\ \Leftrightarrow v \nabla \cdot \boldsymbol{f} =& \nabla \cdot (v \boldsymbol{f}) - \boldsymbol{f} \cdot \nabla v\end{align}

Now identify $\boldsymbol{f} = \nabla u $ to rewrite

\begin{align} - \int_\Omega \Big( \nabla \cdot \big(\sigma \nabla u \big) \Big) v \mathrm dx =& - \int_\Omega \nabla \cdot \Big( v \sigma (\nabla u) \Big) - \sigma (\nabla u) \cdot (\nabla v) \mathrm d x \\ =& - \int_\Omega \nabla \cdot \Big( v \sigma (\nabla u) \Big) \mathrm d x + \int_\Omega \sigma (\nabla u) \cdot (\nabla v) \mathrm d x \\ \overset{\text{Gauss / Divergence Theorem}}{=} & - \int_{\partial\Omega}v \sigma (\nabla u) \cdot \boldsymbol{n} \mathrm d s + \int_\Omega \sigma (\nabla u) \cdot (\nabla v) \mathrm d x \end{align}

Now it is important to realize that your given Neumann boundary condition $\frac{\partial u}{\partial \boldsymbol{n} }$ is the directional derivative of $u$ in direction $\boldsymbol{n}$ and can be rewritten as $$ \frac{\partial u}{\partial \boldsymbol{n} } = \nabla u \cdot \boldsymbol{n} $$ using this makes the surface integral vanish: $$ - \int_{\partial\Omega}v \sigma (\nabla u) \cdot \boldsymbol{n} \mathrm d s = - \int_{\partial\Omega}v \sigma \underbrace{\frac{\partial u}{\partial \boldsymbol{n} }}_0 \mathrm d s = 0 $$ so you have in the end

$$- \int_\Omega \Big( \nabla \cdot \big(\sigma \nabla u \big) \Big) v \mathrm dx = \int_\Omega \sigma (\nabla u) \cdot (\nabla v) \mathrm d x$$