PDE Prototypes

Below all available prototypes (i.e. pre-defined constructors for PDEDescription) are listed. They can be used as a point of deperature for more complex models. Also have a look in to the examples for more complex model problems.

Note

For most prototypes boundary data and right-hand side data or other modifications to the weak form of the PDE have to be added after a proto-type constructor has been called, see the examples for further assistance.

Poisson equation

The Poisson equation seeks a function $u$ such that

\[- \mu \Delta u = f\]

where $\mu$ is some diffusion coefficient and $f$ some given right-hand side data.

The (primal) weak formulation (for homogeneous Dirichlet boundary data) seeks $u$ such that

\[(\mu \nabla u,\nabla v) = (f,v) \quad \text{for all } v\in H^1_0(\Omega)\]

A vanilla PDEDescription for this weak formulation (without boundary data) can be created with the constructor below.

GradientRobustMultiPhysics.PoissonProblemFunction
function PoissonProblem(diffusion = 1.0)

Creates a PDEDescription for a Poisson problem with globally constant diffusion parameter.

Boundary and right-hand side data or other modifications have to be added afterwards.

source

Remarks:

  • dual weak formulations are also possible but are not available as a prototype currently

Incompressible Navier–Stokes equations

The Navier–Stokes equations in d dimensions seek a (vector-valued) velocity $\mathbf{u}$ and a pressure $p$ such that

\[\begin{aligned} - \mu \Delta \mathbf{u} + (\mathbf{u} \cdot \nabla) \mathbf{u} + \nabla p & = \mathbf{f}\\ \mathrm{div}(u) & = 0 \end{aligned}\]

where $\mu$ is some viscosity coefficient and $f$ some given right-hand side data.

The weak formulation (for homogeneous Dirichlet boundary data) seeks $(\mathbf{u},p)$ such that

\[\begin{aligned} (\mu \nabla \mathbf{u},\nabla \mathbf{v}) + ((u \cdot \nabla) \mathbf{u}, \mathbf{v}) + (\mathrm{div} \mathbf{v}, p) & = (\mathbf{f},\mathbf{v}) && \text{for all } \mathbf{v}\in H^1_0(\Omega)^d\\ (\mathrm{div} \mathbf{u}, q) & = 0 && \text{for all } q \in L^2_0(\Omega) \end{aligned}\]

A vanilla PDEDescription for this weak formulation (without boundary data) can be created with the constructor below.

GradientRobustMultiPhysics.IncompressibleNavierStokesProblemFunction
function IncompressibleNavierStokesProblem(
    dimension::Int = 2;
    viscosity = 1.0,
    nonlinear::Bool = false,
    newton::Bool = false,
    nopressureconstraint::Bool = false,
    pmean = 0)

Creates a PDEDescription for the incompressible (Navier-)Stokes equations of the specified dimension and globally constant viscosity parameter. If nonlinear = true the nonlinear convection term is added to the PDEDescription. If also newton = true, a Newton iteration is devised for the convection term.

source

Remarks:

  • if nonlinear == false the nonlinear convection term is not added to the equation resulting in the plain Stokes equations.
  • if nopressureconstraint == true removes the integral mean constraint on the pressure.

The Navier-Lame equations seek a displacement $\mathbf{u}$ such that

\[- \mathrm{div}( \mathbb{C} \epsilon( \mathbf{u})) = \mathbf{f}\]

where $\epsilon( \mathbf{u})$ is the symmetric part of the gradient, $\mathbb{C}$ is the stiffness tensor (according to Hooke's law) and $\mathbf{f}$ some given right-hand side data.

In 1D, it is assumed that the stiffness tensor has the form

\[\mathbb{C} \epsilon( u) = \mu \nabla u\]

where $\mu$ is the elasticity modulus. In 2D, it is assumed that the stiffness tensor has the form

\[\mathbb{C} \epsilon( u) = 2 \mu \epsilon( \mathbf{u}) + \lambda \mathrm{tr}(\epsilon( \mathbf{u}))\]

where $\mu$ and $\lambda$ are the Lame coefficients.

The (primal) weak formulation (for homogeneous Dirichlet boundary data) seeks $u$ such that

\[(\mathbb{C} \epsilon(\mathbf{u}),\epsilon(\mathbf{v})) = (\mathbf{f},\mathbf{v}) \quad \text{for all } v\in H^1_0(\Omega)^d\]

A vanilla PDEDescription for this weak formulation (without boundary data) can be created with the constructor below.

GradientRobustMultiPhysics.LinearElasticityProblemFunction
function LinearElasticityProblem(
    dimension::Int = 2;
    elasticity_modulus = 1.0,
    shear_modulus = 1.0,
    lambda = 1.0)

Creates a PDEDescription for the linear elasticity problem of the specified dimension.

If dimension == 1, only the elasticitymodulus is used as a parameter in the Hookian stiffness operator. If dimension == 2, shearmodulus and lambda are used as Lame parameters in the Hookian stiffness operator.

Boundary and right-hand side data or other modifications have to be added afterwards.

source

L2-Bestapproximation

This PDEDescription can be used to setup an L2-Bestapproximation very fast. The weak formulation simply seeks some function $u$ such that, for some given function $u_\text{exact}$, it holds $u = u_\text{exact}$ along the (specified) boundary and

\[(u,v) = (u_\text{exact},v) \quad \text{for all } v\in L^2(\Omega)\]

Of course, on the continuous level, it holds $u = u_\text{exact}$, but if the weak formulation is assembled for a finite element space one obtains a discrete L2-bestapproximation for this space.

GradientRobustMultiPhysics.L2BestapproximationProblemFunction
function L2BestapproximationProblem(
    uexact::AbstractUserDataType;
    bonus_quadorder::Int = 0,
    bestapprox_boundary_regions = [])

Creates an PDEDescription for an L2-Bestapproximation problem for the given exact function. Since this prototype already includes boundary and right-hand side data also a bonus quadrature order can be specified to steer the accuracy.

source

H1-Bestapproximation

This PDEDescription can be used to setup an H1-Bestapproximation very fast. The weak formulation simply seeks some function $u$ such that, for some given function $u_\text{exact}$, it holds $u = u_\text{exact}$ along the (specified) boundary and

\[(\nabla u,\nabla v) = (\nabla u_\text{exact}, \nabla v) \quad \text{for all } v\in H^1_0(\Omega)\]

GradientRobustMultiPhysics.H1BestapproximationProblemFunction
function H1BestapproximationProblem(
    exact_function_gradient::AbstractUserDataType,
    exact_function_boundary::AbstractUserDataType;
    bonus_quadorder::Int = 0,
    bonus_quadorder_boundary::Int = 0,
    bestapprox_boundary_regions = [])

Creates an PDEDescription for an H1-Bestapproximation problem for the given exact function (only used on the boundary) and its exact gradient (used in the right-hand side). Since this prototype already includes boundary and right-hand side data also a bonus quadrature order can be specified to steer the accuracy.

source