.. _convection-difusion: Stabilized convection-difusion ============================== Convection diffusion equation ----------------------------- Find approximate solution to following linear PDE .. math:: u_t + \mathbf{b}\cdot\nabla{u} - \operatorname{div}(K \nabla u) &= f \quad\text{ in }\Omega\times[0, T], \\ u &= u_\mathrm{D} \quad\text{ in }\Gamma\times[0, T], \\ u &= u_0 \quad\text{ on }\Omega\times{0} \\ using :math:`\theta`-scheme discretization in time and arbitrary FE discretization in space with data * :math:`\Omega = [0, 1]^2` * :math:`T = 10` * :math:`K = \frac{1}{\mathrm{Pe}}` * :math:`\mathbf{b} = \left( -(y-\tfrac{1}{2}), x-\tfrac{1}{2}\right)` * :math:`f = \vec{0}` * :math:`u_0(\mathbf{x}) = \left( 1 - 25 \operatorname{dist}\left(\mathbf{x}, \left[\frac{1}{4}, \frac{1}{4}\right]\right) \right) \chi_{ B_{1/5}\left(\left[\frac{1}{4}, \frac{1}{4}\right]\right) }` * :math:`u_\mathrm{D} = 0` where :math:`\chi_X` is a characteristic function of set :math:`X`, :math:`B_R(\mathbf{z})` is a ball of radius :math:`R` and center :math:`\mathbf{z}` and :math:`\operatorname{dist}(\mathbf{p},\mathbf{q})` is Euclidian distance between points :math:`\mathbf{p}`, :math:`\mathbf{q}`. .. only:: solution Reference solution ------------------ * simple straight-forward Galerkin FEM .. literalinclude:: test_no.py * with SUPG stabilization .. literalinclude:: test_supg.py * with IP (interior penalty) approximation .. literalinclude:: test_ip.py * solved in GLS (Galerkin least squares) formulation .. literalinclude:: test_gls.py