Fluid Mechanics
Contents
[hide]introduction
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all the involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the Main Page for more details about related work.
Long story short, we want to solve \begin{equation} \frac{\partial \mathbf{v}}{\partial t}+(\mathbf{v}\nabla )\cdot \mathbf{v}=-\frac{1}{\rho }\nabla p+\mu {{\nabla }^{2}}\mathbf{v}+\mathbf{f} \label{NavierStokes} \end{equation}
\frac{\partial \left( \rho \mathbf{v} \right)}{\partial t}+\nabla \cdot \left( \rho \mathbf{vv} \right)=\frac{\partial \left( \rho \mathbf{v} \right)}{\partial t}+(\rho \mathbf{v}\nabla )\cdot \mathbf{v}
Note that in general the \nabla \cdot \left( \rho \mathbf{vv} \right) stands for tensor product \nabla \cdot \left( \rho {{\mathbf{v}}^{T}}\mathbf{v} \right)=\left[ \begin{matrix} {{v}_{1}}{{v}_{1}} & ... & {{v}_{1}}{{v}_{n}} \\ ... & ... & ... \\ {{v}_{n}}{{v}_{1}} & ... & {{v}_{n}}{{v}_{n}} \\ \end{matrix} \right]
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.
Solutions algorithms
Artificial compressibility method
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity \frac{\partial \mathbf{v}}{\partial t}+(\mathbf{v}\nabla )\cdot \mathbf{v}=-\frac{1}{\rho }\nabla P+\mu {{\nabla }^{2}}\mathbf{v}+\mathbf{f}
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM) are introduced into the flow field as a mean to distribute the pressure within the domain. In a true incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the pressure field. Upon rearranging Equation yields \frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \mathbf{v}=0
Explicit/Implicit pressure calculation
Applying divergence on \ref{NavierStokes} yields \nabla \cdot \frac{\partial \mathbf{v}}{\partial t}+\nabla \cdot (\mathbf{v}\nabla )\cdot \mathbf{v}=-\frac{1}{\rho }{{\nabla }^{2}}P+\nabla \cdot \mu {{\nabla }^{2}}\mathbf{v}+\nabla \cdot \mathbf{f}
And since \nabla \cdot \mathbf{v}=0 and we can change order in \nabla \cdot \nabla^2 and \nabla^2 \cdot \nabla quation simplifies to \frac{1}{\rho }{{\nabla }^{2}}P=\nabla \cdot \mathbf{f}-\nabla \cdot (\mathbf{v}\nabla )\cdot \mathbf{v}
Note that using tangential boundary vector gives equivalent BCs \frac{\partial P}{\partial \hat{t}}=\left( \mu {{\nabla }^{2}}\mathbf{v}+\mathbf{f}-\frac{\partial \mathbf{v}}{\partial t}-(\mathbf{v}\nabla )\cdot \mathbf{v} \right)\cdot \mathbf{\hat{t}}
\frac{\partial P}{\partial \hat{n}}=\left( \mu {{\nabla }^{2}}\mathbf{v}+\mathbf{f} \right)\cdot \mathbf{\hat{n}}
So the procedure is:
• Compute Navier Stokes either explicitly either implicitly
• Solve pressure equations with computed velocities
• March in time
Basic boundary conditions Wall: \mathbf{v}=0, \frac{\partial P}{\partial \hat{n}}=\left( \nabla \cdot \left( \mu \nabla \mathbf{v} \right)+\mathbf{f} \right)\cdot \hat{n}
Above system can be linearized (advection term) and solver either explicitly or implicitly.
Further reading: 5. W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994) 11. J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat. Comput. 5(1), 56 (1984)
Explicit Pressure correction calculation
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly \frac{{{\mathbf{v}}_{2}}-{{\mathbf{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{P}_{1}}-({{\mathbf{v}}_{1}}\nabla )\cdot {{\mathbf{v}}_{1}}+\mu {{\nabla }^{2}}{{\mathbf{v}}_{1}}+\mathbf{f}
\nabla \cdot ({{\mathbf{v}}^{iter}}+{{\mathbf{v}}^{corr}})=0\,\,\,\,\,\,\,\to \,\,\,\,\,\,\nabla \cdot {{\mathbf{v}}^{iter}}=-\nabla \cdot {{\mathbf{v}}^{corr}}
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation are constant. {{\mathbf{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{P}^{corr}}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
Boundary condition can be obtained by mulitplying the equation with a normal vector \frac{\Delta t}{\rho }\frac{\partial {{P}^{corr}}}{\partial n}\,=\mathbf{\hat{n}}{{\mathbf{v}}^{corr}}\,\,\,
CBS Algorithm
With the explicit temporal discretization problems is formulated as \mathbf{\hat{v}}={{\mathbf{v}}_{0}}+\Delta t\left( -\nabla {{P}_{0}}+\frac{1}{\operatorname{Re}}{{\nabla }^{2}}{{\mathbf{v}}_{0}}-\nabla \cdot ({{\mathbf{v}}_{0}}{{\mathbf{v}}_{0}}) \right)
The relaxation parameter should be set between 1-10, lower number more stable solution.
And also dimensional form
P={{P}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \mathbf{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{P}_{0}},
Where C is speed of sound [m/s]