What youβll learn
Formulations : Understand the difference between a strong and a weak formulation, and why weak formulations are useful for simulations.
Theorems and identities : Get familiar with the identities and theorems which are used to derive formulations.
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} β β
( β Γ A ) = 0 β β
Leibniz rule for a nabla operator
β β
( a b ) = β a β
b + a ( β β
b ) \begin{align}
\nabla \cdot (a \boldsymbol{b})
= \nabla a \cdot \boldsymbol{b}
+ a(\nabla \cdot \boldsymbol{b})
\end{align} β β
( a b ) = β a β
b + a ( β β
b ) β β
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} β β
( a Γ b ) = ( β Γ a ) β
b β a β
( β Γ b ) β β
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} a β
( b Γ c ) = c β
( a Γ b ) = b β
( c Γ a ) β β
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} β t β β ( β Γ A ) = β Γ β t β A β β β
Per partes theorem for scalars
Let U U U and V V V be scalar functions and Ξ© \Omega Ξ© a set with boundary Ξ \Gamma Ξ .
Then let n \boldsymbol{n} n be a unit normal vector pointing outwards on Ξ \Gamma Ξ .
Now
β« Ξ© β
β U β V β
β d Ξ© = β« Ξ β
β U V n β
β 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} β« Ξ© β U β V d Ξ© = β« Ξ β U V n d Ξ β β« Ξ© β V β U d Ξ©. β β
The Per partes theorem is also known as integration by parts .
Per partes theorem for vectors
Let A \boldsymbol{A} A be a vector field and f f f a scalar function defined on a domain Ξ© \Omega Ξ© with boundary Ξ \Gamma Ξ .
Then let n \boldsymbol{n} 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} β« Ξ© β ( A β
β f ) d Ξ© = β« Ξ β f ( A β
n ) d Ξ β β« Ξ© β f ( β β
A ) d Ξ©. β β
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} n be a unit normal vector pointing outwards on Ξ \Gamma Ξ and let T \boldsymbol{T} 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} β« Ξ© β β β
T d Ξ© = β« Ξ β T β
n d Ξ. β β
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} Ξ u β = f on Β Ξ©. β β
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} u β² and integrating over Ξ© \Omega Ξ© .
β« Ξ© β
β ( Ξ u u β² β f u β² ) β
β d Ξ© = 0 \begin{align}
\int_{\Omega}\; (\Delta uu^{\prime} - fu^{\prime})\; d \Omega
= 0
\end{align} β« Ξ© β ( Ξ u u β² β f u β² ) d Ξ© = 0 β β
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} β« Ξ© β Ξ u u β² d Ξ© = β« Ξ© β ( β β
β u ) u β² d Ξ© = β« Ξ β ( β u β
n ) u β² d Ξ β β« Ξ© β β u β
β u β² d Ξ© β β
Here, U = u β² U = u^{\prime} U = u β² , V = β u V = \nabla u V = β u and n \boldsymbol{n} n is the unit normal vector.
Overall we get a weak formulation of ( 3 ) (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} β« Ξ β ( β u Β β
n ) u β² d Ξ β β« Ξ© β ( β u β
β u β² + f u β² ) d Ξ© = 0 β β
Now, we have less strict regularity requirements for u u u and f f f .
Certainly, we know that a solution to ( 3 ) (3) ( 3 ) is also a solution to ( 7 ) (7) ( 7 ) and every weak solution smooth enough is a solution to ( 3 ) (3) ( 3 ) .