# Finite Element Method (FEM)

The finite element approach is based on the discretization of the domain into a set of finite elements, which are usually triangles or quadrilaterals in a two dimensions and tetrahedral, hexahedra, pyramids or wedges in three dimensions, and using variational principles to solve the problem by minimizing an associated error function or residual.

The unknown variables are approximated over the domain using interpolation procedure in terms of nodal values and set of known functions called shape functions. This approximation is substituted into the governing (conservation) equations in their differential form and the resulting error (residual) is minimized in an average sense using a weighted residual approach.

The variational or weighted residual formulations transforms the governing equations into an integral form called the global weak form. The weak form when applied to each finite element results in a set of discrete equations in terms of the nodal unknown which can then be solved by a number of methods.

- $L$ is a differential operator with its associated initial and boundary conditions.
- ${f}_{j}=f\left({u}_{j},\phi \right)$ is the convective flux vector.
- ${f}_{j}^{d}=f\left(\u03f5\frac{\partial \phi}{\partial {x}_{j}}\right)$ is the diffusive flux vector.
- $s$ is the contribution due to a source.

- ${N}_{i}$ is the prescribed shape (interpolation) function.
- ${\phi}_{i}$ is the unknown value of the variable $\phi $ at a discrete spatial point $i$ .

Finite element method requires transformation of the governing differential equation into an integral equation over the domain. This is accomplished through approaches such as weighted residual formulation and least squares formulation.

A few of the approaches used to convert the differential equations into their weak integral forms are discussed below.

## Weighted Residual Formulation

where $A$ , $B$ and $C$ are the differential operators with lower order derivatives than $L$ and $\text{\Omega}$ represents the domain and $\Gamma $ the boundary of the domain.

- Point Collocation: ${w}_{i}\left(x\right)=\delta \left(x,{x}_{i}\right)$ where $\delta $ is the Dirac-Delta function. This is analogous to the finite difference approach.
- Subdomain Collocation: ${w}_{i}\left(x\right)=1$ for the ${i}^{th}$ subdomain (element) and zero elsewhere. This leads to a finite volume formulation.
- Galerkin method: ${w}_{i}\left(x\right)={N}_{i}\left(x\right)$ where $N$ is a shape function assumed over an element.
- Petrov Galerkin method: ${w}_{i}\left(x\right)\ne {N}_{i}\left(x\right)$ . This represents a generalization of all methods except the Galerkin method.

## Least Squares Formulation

## Galerkin Least Squares Formulation

- $L({\phi}_{i}),{w}_{i}$ represents the Galerkin approximation.
- ${S}^{GLS}$ represents the least squares stabilization.
- $\langle ,\rangle $ represents the inner dot product of the comma separated terms.
- ${\tau}_{k}$ represents the stabilization parameter.