1 LES of Turbulent Flows: Lecture 4 (ME EN 796 8) Prof. Rob Stoll Department of Mechanical Engineering University of Utah Spring 11
Fourier Transforms Fourier Transforms are a common tool in fluid dynamics (see Pope, Appendix D G, Stull handouts online) Some uses: Analysis of turbulent flow Numerical simulauons of N S equauons Analysis of numerical schemes (modified wavenumbers) consider a periodic funcuon f(x) (could also be f(t)) on a domain of length The Fourier representauon of this funcuon (or a general signal) is: ( ) = ˆ f x = f e ix f ˆ = * where is the wavenumber (frequency if f(t)) are the Fourier coefficients which in general are complex
3 Fourier Transforms why pic e ix? answer: orthogonality a big advantage of orthogonality is independence between Fourier modes e ix is independent of e ix just lie we have with Cartesian coordinates where i,j, are all independent of each other. what are we actually doing? recall from Euler s formula that ( )x dx = if if = e i e ix = cos(x) isin(x) the Fourier transform decomposes a signal (space or Ume) into sine and cosine wave components of different amplitudes and wave numbers (or frequencies).
4 Fourier Transforms Fourier Transform example (from Stull, 88 see example: FourierTransDemo.m) Real cosine component Real sine component Sum of waves
5 Fourier Transforms The Fourier representauon given by is a representauon of a series as a funcuon of sine and cosine waves. It taes f(x) and transforms it into wave space Fourier Transform pair: consider a periodic funcuon on a domain of f = F{ f ( x) } 1 ( ) = F ˆ f x The forwards transform moves us into Fourier (or wave) space and the bacwards transform moves us from wave space bac to real space. An alternauve form of the Fourier transform (using Euler s) is: { f } 1 = ˆ = f x * f ( x)e ix dx forward transform = f e ix bacwards transform ( ) = a + a cos( x) b sin( x) =1 Where a and b are now the real and imaginary components of f, respecuvely *
6 Locality in real and wave space It is important to note that something that is non local in physical (real) space can be very local in Fourier space and something that is local in physical space can be non local in Fourier space. Example 1: ( ) = cos x = 1 + cosx f x Fourier modes are : a =1/, a =1/ all other a, b = (a wave, very non local in physical space) f ½ Example : ( ) = δ ( x) the Dirac delta function (very non local in physical space) f x f ˆ = 1 δ ( x)e ix dx recall by definition δ ( x - a) f x =1 for any value f ˆ = 1 ( )dx = f a ( ) 1/ f 1 1
7 Fourier Transform ProperUes 1. If f(x) is real then: ˆ f = ˆ f * (Complex conjugate). Parseval s Theorem: 1 f ( x) f * x = ( )dx = f ˆ ˆ = f * 3. The Fourier representadon is the best possible representadon for f(x) in the sense that the error: N e = f x c e ix = N dx is minimum when c = ˆ f
8 Discrete Fourier Transform Consider the periodic funcuon f j on the domain x L j= j=1 j=3 j=n with x j =jh and h = L/N Discrete Fourier RepresentaUon: f j = N 1 Periodicity implies that f =f N we have: nown: f j at N points unnown: at values (N of them) f ˆ Using discrete orthogonality: ˆ f = f ˆ e i L x j bacwards (inverse) transform = N 1 N N 1 f j e j = i L x j forward transform
9 Discrete Fourier Transform Discrete Fourier Transform (DFT) example and more explanauon found in handouts secuon of website under Stull_DFT.pdf or Pope appendix F and in example: FourierTransDemo.m ImplementaUon of DFT by brute force O(N ) operauons In pracuce we almost always use a Fast Fourier Transform (FFT) O(N*log N) Almost all FFT rouunes (e.g., Matlab, FFTW, Intel, Numerical Recipes, etc.) save their data with the following format: positions x j x 1 x x 3 x N x N +1 x N + x N 1 x N wavenumbers = = 1 = = ± N = N 1 = N + 1 = = 1 Nyquist
1 Fourier Transform ApplicaUons AutocorrelaUon: We can use the discrete Fourier Transform to speed up the autocorrelauon calculauon (or in general any cross correlauon with a lag). Discretely this is O(N ) operauons correlation with itself R ff if we express R ff as a Fourier series R ff s l how can we interpret this?? In physical space N 1 ( s l ) = f x j j = ( ) = ˆRff e is l R ff R ff N 1 ( ) = f j j = ( ) f ( x j + s l ) ( ) = ˆRff and we can show that R ff N 1 (i.e. the mean variance) f j = N ˆf j = N 1 = N ( ) = N ˆf energy spectral density magnitude of the Fourier coefficients total contribution to the variance
11 Fourier Transform ApplicaUons Energy Spectrum: (power spectrum, energy spectral density) If we loo at specific values from our autocorrelauon funcuon we have: E( ) = N ˆf where E() is the energy spectral density The square of the Fourier coefficients is the contribution to the variance by fluctuations of scale (wavenumber or equivalently frequency Typically (when wrifen as) E() we mean the contribuuon to the turbulent ineuc energy (te) = ½(u +v +w ) and we would say that E() is the contribuuon to te for mouons of the scale (or size). For a single velocity component in one direcuon we would write E 11 ( 1 ). E() Example energy spectrum This means that the energy spectrum and the autocorrelation function form a Fourier Transform pair (see Pope for details)