Simple FEM demo
The effect of mesh Peclet number is demonstrated in the following simple 1D FEM sol’n of advection-diffustion equation. The sol’n is written in Mathematica.
with as the source function. Here we assume constant advection velocity and diffusion coefficient .
Variational form:
with
, ,
Assuming equal grid size in the interval and linear shape function, it can be shown the linear equations for node value is
Notice that LHS is the central difference of and , but the RHS is weighted average of source.
The mathmatica code and result can be found here.
The output shows the oscillation introduced by large Peclet number. Essentially it is caused by unsymmetry of the equation, induced by advection velocity terms. I’ll try to revisit this phenomenon later.