Navier-Stokes
Algorithm for solving the 2D and 3D time-dependant Navier-Stokes equations using the characteritics method
Problem
Solve:
\[\left\{
\begin{align*}
\rho\frac{\partial\mathbf{u}}{\partial t} + \rho(\mathbf{u}\cdot\nabla\mathbf{u})-\Delta\mathbf{u} + \nabla p &= 0\\
\nabla\cdot\mathbf{u} &= 0
\end{align*}
\right.\]
\[\rho\frac{\partial\mathbf{u}}{\partial t}\mathbf{v} + \rho(\mathbf{u}\cdot\nabla\mathbf{u})\mathbf{v} - \mu\int_{\Omega}{\nabla\mathbf{u}:\nabla\mathbf{v} - p\nabla\cdot\mathbf{v}} - \int_{\partial\Omega}{\left(\nu\frac{\partial\mathbf{u}}{\partial\mathbf{n}}-p\mathbf{n}\right)\cdot\mathbf{v}} = \int_{\Omega}{\mathbf{f}\cdot\mathbf{v}}\]
\[\int_{\Omega}{\nabla\cdot\mathbf{u}q} = 0\]
Stabilisation term (if Neumann condition):
\[\int_{\Omega}{\varepsilon p q}\]
Using the characteristics method, the discretized weak form reads as follow:
\[\frac{\rho}{dt}(\mathbf{u}^{n+1} - \mathbf{u}^n\circ\mathbf{X}^n)\mathbf{v}
- \mu\int_{\Omega}{\nabla\mathbf{u}:\nabla\mathbf{v}
- p\nabla\cdot\mathbf{v}}
- \int_{\partial\Omega}{\left(\nu\frac{\partial\mathbf{u}}{\partial\mathbf{n}}-p\mathbf{n}\right)\cdot\mathbf{v}}
= \int_{\Omega}{\mathbf{f}\cdot\mathbf{v}}\]
Algorithms
2D
Result - velocity (top) and pressure (bottom) |
|
|
Authors
Author: Simon Garnotel
From the documentation