# How can exponential fitting be used with the finite element method?

Restricted to one dimensional problem, is it possible to dynamically adapt the finite element method (FEM) discretisation based on the local value of the Péclet number ($P_e$) for advection-diffusion problems?

For advection-diffusion problems central discretisation becomes unstable when $P_e>2$, that is, when the problem becomes advection dominated.

A common way to solve this problem for the finite volume method (FVM) is with exponential fitting. For example, when solving the advection-diffusion equation the diffusion term is discretised with a central difference stencil, $$d(x)u_{xx} \approx \boldsymbol{D}_2\boldsymbol{u}(u_{j-1}, u_j, u_{j+1})$$

The advection term is discretised as a weighted sum of a central difference and a upwind stencil, $$a(x)u_x \approx \kappa \boldsymbol{D}_1\boldsymbol{u}(u_{j-1}, u_j, u_{j+1}) + (1-\kappa) \boldsymbol{U}_1 \boldsymbol{u}(u_j, u_{j-1})$$

NB There are much easier ways to incude exponential fitting with the FVM, the above illustrates the concept. To see how it is done in practice I refer you to my notes, http://danieljfarrell.github.io/FVM/advection_diffusion.html#adaptive-upwinding-exponential-fitting.

This nice feature about exponential fitting is that it chooses the value of $\kappa$ such that the discretisation weights in favour of the stable upwind stencil when $P_e$ is large and in favour or the higher accuracy central stencil when $P_e$ is small. This is done locally based on the value of $P_e$. It also has the nice property of preserving monotonicity of the solution (at least in 1D) which is a nice feature for physical simulations (conservation laws).

How can exponential fitting be introduced with the FEM in 1D? Does the approach also preserve monotonicity as with the FVM?