Numerical methods in fluid mechanics: Difference between revisions

Content deleted Content added
Bot: Removing Commons:File:Car CFD.jpg (en). It was deleted on Commons by Didym (Copyright violation; see Commons:Commons:Licensing).
Line 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==