Example problem: Adaptive solution of the 2D advection diffusion equation with flux boundary conditions
In this problem we will discuss the 2D advection-diffusion problem with Neumann (flux) boundary conditions, using oomph-lib's mesh adaptation routines.
Two-dimensional advection-diffusion problem in a rectangular domain
Solve
in the rectangular domain . We split the domain boundary into two parts so that , where . On we apply the Dirichlet boundary conditions
where the function is given. On we apply the Neumann conditions
where the function is given.
As always, we validate the code by choosing the boundary data and the source functions such that
is the exact solution of the problem. The plot below shows the numerical solution for , a Peclet number of , and four different values of the "steepness parameter", and .
Animation of the adaptive solution for various values of the `steepness parameter'.
As in the example with Dirichlet boundary conditions, the unforced case is a lot more interesting. The plot below shows the result for a zero source function , Dirichlet boundary conditions determined from the "exact solution" of the forced problem for , and a prescribed flux of on .
Plot of the adaptive solution of the unforced problem.
Along , the value of is enforced by the Dirichlet boundary condition (2) and, as in the previous example, the "wind" either sweeps this value into the interior of the domain or creates a sharp boundary layer within which the solution that is "swept" along from the interior adjusts itself to the prescribed boundary value. Along , the flux boundary condition (3) imposes the normal derivative of the solution. This boundary condition is much "softer" than the Dirichlet condition and does not create boundary layers that are as sharp as the ones that develop on .