Skip to content

Introduction

Simulations in Allsolve are solved based on chosen physics, or more specifically, the underlying mathematical formulations that are used to model the physics.

On this page, a general approach to formulating physics is introduced, along with the necessary mathematical identitities and theorems.

Vector calculus identities

Divergence of a curl

βˆ‡β‹…(βˆ‡Γ—A)=0\begin{align} \nabla \cdot (\nabla \times \boldsymbol{A}) = 0 \end{align}

Leibniz rule for a nabla operator

βˆ‡β‹…(ab)=βˆ‡aβ‹…b+a(βˆ‡β‹…b)\begin{align} \nabla \cdot (a \boldsymbol{b}) = \nabla a \cdot \boldsymbol{b} + a(\nabla \cdot \boldsymbol{b}) \end{align}

Divergence of a cross product

βˆ‡β‹…(aΓ—b)=(βˆ‡Γ—a)β‹…bβˆ’aβ‹…(βˆ‡Γ—b)\begin{align} \nabla \cdot (\boldsymbol{a} \times \boldsymbol{b}) = (\nabla \times \boldsymbol{a}) \cdot \boldsymbol{b} - \boldsymbol{a} \cdot (\nabla \times \boldsymbol{b}) \end{align}

Scalar triple product rule

aβ‹…(bΓ—c)=cβ‹…(aΓ—b)=bβ‹…(cΓ—a)\begin{align} \boldsymbol{a} \cdot (\boldsymbol{b} \times \boldsymbol{c}) = \boldsymbol{c} \cdot (\boldsymbol{a} \times \boldsymbol{b}) = \boldsymbol{b} \cdot (\boldsymbol{c} \times \boldsymbol{a}) \end{align}

Time derivative of a curl

βˆ‚βˆ‚t(βˆ‡Γ—A)=βˆ‡Γ—βˆ‚Aβˆ‚t\begin{align} \frac{\partial}{\partial t} (\nabla \times \boldsymbol{A}) = \nabla \times \frac{\partial \boldsymbol{A}}{\partial t} \end{align}

Per partes theorem for scalars

Let UU and VV be scalar functions and Ξ©\Omega a set with boundary Ξ“\Gamma. Then let n\boldsymbol{n} be a unit normal vector pointing outwards on Ξ“\Gamma. Now

βˆ«Ξ©β€…β€ŠUβˆ‡Vβ€…β€ŠdΞ©=βˆ«Ξ“β€…β€ŠUVnβ€…β€ŠdΞ“βˆ’βˆ«Ξ©β€…β€ŠVβˆ‡Uβ€…β€ŠdΞ©.\begin{align} \int_{\Omega}\; U\nabla V\; d \Omega = \int_{\Gamma}\; UV\boldsymbol{n}\; d \Gamma - \int_{\Omega}\; V\nabla U\; d \Omega. \end{align}

The Per partes theorem is also known as integration by parts.

Per partes theorem for vectors

Let A\boldsymbol{A} be a vector field and ff a scalar function defined on a domain Ξ©\Omega with boundary Ξ“\Gamma. Then let n\boldsymbol{n} be a unit normal vector pointing outwards on Ξ“\Gamma. Now

βˆ«Ξ©β€…β€Š(Aβ‹…βˆ‡f)β€…β€ŠdΞ©=βˆ«Ξ“β€…β€Šfβ€…β€Š(Aβ‹…n)β€…β€ŠdΞ“βˆ’βˆ«Ξ©β€…β€Šfβ€…β€Š(βˆ‡β‹…A)β€…β€ŠdΞ©.\begin{align} \int_{\Omega}\; (\boldsymbol{A} \cdot \nabla f)\; d \Omega = \int_{\Gamma}\; f\; (\boldsymbol{A} \cdot \boldsymbol{n})\; d \Gamma - \int_{\Omega}\; f\; (\nabla \cdot \boldsymbol{A})\; d \Omega. \end{align}

The Per partes theorem is also known as integration by parts.

Divergence theorem

Let Ξ©\Omega be a set with boundary Ξ“\Gamma, let n\boldsymbol{n} be a unit normal vector pointing outwards on Ξ“\Gamma and let T\boldsymbol{T} be a vector field or a second-order tensor. Now

βˆ«Ξ©βˆ‡β‹…Tβ€…β€ŠdΞ©=βˆ«Ξ“β€…β€ŠTβ‹…nβ€…β€ŠdΞ“.\begin{align} \int_{\Omega} \nabla \cdot \boldsymbol{T}\; d \Omega = \int_{\Gamma}\; \boldsymbol{T} \cdot \boldsymbol{n}\; d \Gamma. \end{align}

Strong and weak formulation

A common example of a PDE (partial differential equation) is the Poisson’s equation,

Ξ”u=fβ€…β€ŠonΒ Ξ©.\begin{align} \Delta u &= f\; \text{on}\ \Omega. \end{align}

This is the strong formulation of the equation, which refers to a precise mathematical representation of the problem with very strict requirements for a solution.

The weak formulation is an alternative mathematical representation that relaxes the requirements for a solution. The weak formulation is computationally preferable as it provides the foundation for numerical methods such as the finite element method (FEM).

To derive the weak formulation of Poisson’s equation, we start by multiplying both sides of the strong formulation with a test function uβ€²u^{\prime} and integrating over Ξ©\Omega.

βˆ«Ξ©β€…β€Š(Ξ”uuβ€²βˆ’fuβ€²)β€…β€ŠdΞ©=0\begin{align} \int_{\Omega}\; (\Delta uu^{\prime} - fu^{\prime})\; d \Omega = 0 \end{align}

Let’s apply Per partes theorem on the first term on the left hand side.

βˆ«Ξ©β€…β€ŠΞ”uβ€…β€Šuβ€²β€…β€ŠdΞ©=βˆ«Ξ©β€…β€Š(βˆ‡β‹…βˆ‡u)β€…β€Šuβ€²β€…β€ŠdΞ©=βˆ«Ξ“β€…β€Š(βˆ‡uβ‹…n)β€…β€Šuβ€²β€…β€ŠdΞ“βˆ’βˆ«Ξ©β€…β€Šβˆ‡uβ‹…βˆ‡uβ€²β€…β€ŠdΞ©\begin{align} \int_{\Omega}\; \Delta u\; u^{\prime}\; d \Omega = \int_{\Omega}\; (\nabla \cdot \nabla u)\; u^{\prime}\; d \Omega = \int_{\Gamma}\; (\nabla u \cdot \boldsymbol{n})\; u^{\prime}\; d \Gamma - \int_{\Omega}\; \nabla u \cdot \nabla u^{\prime}\; d \Omega \end{align}

Here, U=uβ€²U = u^{\prime}, V=βˆ‡uV = \nabla u and n\boldsymbol{n} is the unit normal vector. Overall we get a weak formulation of (3)(3).

βˆ«Ξ“β€…β€Š(βˆ‡uΒ β‹…n)β€…β€Šuβ€²β€…β€ŠdΞ“βˆ’βˆ«Ξ©β€…β€Š(βˆ‡uβ‹…βˆ‡uβ€²+fβ€…β€Šuβ€²)β€…β€ŠdΞ©=0\begin{align} \int_{\Gamma}\; (\nabla u\ \cdot \boldsymbol{n})\; u^{\prime}\; d \Gamma - \int_{\Omega}\; (\nabla u \cdot \nabla u^{\prime} + f\; u^{\prime})\; d \Omega = 0 \end{align}

Now, we have less strict regularity requirements for uu and ff. Certainly, we know that a solution to (3)(3) is also a solution to (7)(7) and every weak solution smooth enough is a solution to (3)(3).