Numerical methods in fluid mechanics: Difference between revisions

Content deleted Content added
No edit summary
m Finite difference method: clean up spacing around commas and other punctuation fixes, replaced: ,i → , i
 
(9 intermediate revisions by 9 users not shown)
Line 1:
[[File:Car CFD.jpg|frameless|right|CFD analysis]]
 
[[Fluid motion]] is governed by the [[Navier–Stokes equations]], a set of coupled and nonlinear
partial differential equations derived from the basic laws of conservation of [[mass]], [[momentum]]
Line 13 ⟶ 11:
==Finite difference method==
Finite difference replace the infinitesimal limiting process of derivative calculation:
:<math> \lim_{\Delta x \to 0}f'(nx) = \frac {f(x+\Delta x)-f(x)}{\Delta x} </math>
 
with a finite limiting process, i.e.
 
:<math> f'(x) =\frac {f(x+\Delta x) - f(x)}{\Delta x} + O(\Delta x) </math>
 
The term <math>O(_x\Delta x)</math> gives an indication of the magnitude of the error as a function of the mesh spacing. In this instance, the error is halfedhalved if the grid spacing, _x is halved, and we say that this is a first order method. Most FDM used in practice are at least second order accurate except in very special circumstances. Finite Difference method is still the most popular numerical method for solution of PDEs because of their simplicity, efficiency and low computational cost. Their major drawback is in their geometric inflexibility which complicates their applications to general complex domains. These can be alleviated by the use of either mapping techniques and/or masking to fit the computational mesh to the computational ___domain.
 
==Finite element method==
Line 32 ⟶ 30:
==Computational cost==
The [[CPU]] time to solve the system of equations differs substantially from method to method. Finite differences are usually the cheapest on a per grid point basis followed by the finite element method and spectral method. However, a per grid point basis comparison is a little like comparing apple and oranges. Spectral methods deliver more accuracy on a per grid point basis than either [[Finite element method|FEM]] or [[Finite difference method|FDM]]. The comparison is more meaningful if the question is recast as ”what is the computational cost to achieve a given error tolerance?”. The problem becomes one of defining the error measure which is a complicated task in general situations.
 
==Application of finite differences to [[ordinary differential equation]]s==
Let us consider the problem of solving the following [[partial differential equation]]:
 
: <math> u_t + cu_x = \nu u_{xx},\qquad 0\le x\le L </math>
 
The two independent variables are ''t'' for time and ''x'' for space. Because of the periodicity, it is sensible to expand the unknown function in a Fourier series:
 
:<math> u= \sum_{k=-\infty}^{\infty} \hat u_n (t) e^{ik_n x} </math>
 
The Fourier functions form what is called an orthonormal basis. The Fourier series can be differentiated term by term to get an expression for the derivatives of u.
The governing equation for the Fourier amplitude is
 
:<math> \frac { d \hat u}{dt}=-(ick + vk^2)\hat u </math>
The solution to this simple ODE is:
 
:<math> u= \hat u_0 e ^{kt} </math>
 
==Forward Euler approximation==
:<math> \frac {u^{n+1} -u^n}{\Delta t } \approx \kappa u^n </math>
 
Equation is an explicit approximation to the original differential equation since no information about the unknown function at the future time (''n''&nbsp;+&nbsp;1)<sub>''t''</sub> has been used on the right hand side of the equation. In order to derive the error committed in the approximation we rely again on [[Taylor series]].
 
==Backward difference==
Line 59 ⟶ 40:
 
==References==
'''Sources'''
 
# Zalesak, S. T., 2005. The design of flux-corrected transport algorithms for structured grids. In: Kuzmin, D., Löhner, R., Turek, S. (Eds.), Flux-Corrected Transport. Springer
# Zalesak, S. T., 1979. Fully multidimensional flux-corrected transport algorithms for fluids. Journal of Computational Physics.
# Leonard, B. P., MacVean, M. K., Lock, A. P., 1995. The flux integral method for [[Convection–diffusion equation|multi-dimensional convection]] and diffusion. Applied Mathematical Modelling.
# Shchepetkin, A. F., McWilliams, J. C., 1998. Quasi-monotone advection schemes based on explicit locally adaptive [[dissipation]]. MontlhyMonthly Weather Review
# Jiang, C.-S., Shu, C.-W., 1996. Efficient implementation of weighed eno schemes. Journal of Computational Physics
# Finlayson, B. A., 1972. The Method of Weighed Residuals and Variational Principles. Academic Press.
Line 71 ⟶ 52:
# Butcher, J. C., 1987. The Numerical Analysis of [[Ordinary Differential Equations]]. John Wiley and Sons Inc., NY.
# Boris, J. P., Book, D. L., 1973. Flux corrected transport, i: Shasta, a fluid transport algorithm that works. Journal of Computational Physics
 
'''Citations'''
{{Reflist}}
 
[[Category:Computational fluid dynamics]]