Interpolation error in DNS simulations of turbulence: consequences for particle tracking Michel van Hinsberg Department of Physics, Eindhoven University of Technology, PO Box 513, 5600MB Eindhoven, The Netherlands J.H.M. ten Thije Boonkkamp F. Toschi H.J.H. Clercx
Content Introduction Interpolation - Performance - Consequences Summary and outlook Calzavarini, E., Kerscher, M., Lohse, D. and Toschi. F. Dimensionality and morphology of particle and bubble clusters in turbulent flow. Journal of Fluid Mechanics, 607:13-24., 2008. / name of department 7-6-2012 PAGE 1
Introduction Fluid Isotropic turbulence DNS simulations Pseudo spectral code Tri-periodic domain Particles Lagrangian tracking One-way coupling Small light spherical particles Maxey & Riley equations / name of department 7-6-2012 PAGE 2
Introduction Light particles Bed-load sediments - Pattern formation - turbidity currents Plankton aggregates Plankton / name of department 7-6-2012 PAGE 3
Criteria for interpolation methods High order of convergence High order of smoothness Small number of FFTs Small overall errors / name of department 7-6-2012 PAGE 4
Interpolation methods Order of convergence Order of smoothness FFT Overall errors comment Lagrange Interpolation N-1 0 1 - For even N N-1-1 1 - For odd N Spline interpolation N-2 (N-2)/2 1 - Only even N Hermite interpolation N-1 (N-2)/2 8 + Only even N B-spline interpolation N-1 N-2 1 + / name of department 7-6-2012 PAGE 5
B-spline functions / name of department 7-6-2012 PAGE 6
B-spline interpolation 2 steps: - transformation to B-spline basis - carry out the interpolation Transformation efficiently done in Fourier space Fast algorithm for interpolation / name of department 7-6-2012 PAGE 7
Relative interpolation error k x / name of department 7-6-2012 PAGE 8
Discretisation error Re=275 K max η=1.8 K max η=3.7 / name of department 7-6-2012 PAGE 9
Error interpolation / name of department 7-6-2012 PAGE 10
Comparison errors Error ratio = Interpolation error Discretisation error - Linear inter. (N=2): 3.7 - Lagrange inter. (N=4): 0.50 - Spline inter. (N=4): 0.63 - Hermite inter. (N=4): 0.06 - B-spline inter. (N=4): 0.08 Error ratio = / name of department 7-6-2012 PAGE 11
Lagrangian error Testing the theory Time evolvement of error Evolving tracers with different interpolation methods Comparison with a simulation of double grid resolution / name of department 7-6-2012 PAGE 12
Lagrangian error of tracers 10 0 10 1 10 2 Linear N=2 B spline N=2 B spline N=4 L 4 L 2 L 1 error 10 3 10 4 10 5 10 6 10 3 10 2 10 1 10 0 t / name of department 7-6-2012 PAGE 13
Lagrangian error of tracers 10 0 10 1 10 2 Linear N=2 B spline N=2 B spline N=4 L 4 L 2 L 1 error 10 3 10 4 10 5 10 6 10 3 10 2 10 1 10 0 t / name of department 7-6-2012 PAGE 14
Lagrangian error at Kolmogorov time scale 10 1 Lagrange Spline B spline Hermite 10 2 error 10 3 10 4 2 3 4 5 6 7 8 N / name of department 7-6-2012 PAGE 15
Lagrangian error double grid resolution 10 1 Lagrange Spline 10 2 B spline Hermite 10 3 error 10 4 10 5 10 6 10 7 2 3 4 5 6 7 8 N / name of department 7-6-2012 PAGE 16
Acceleration of particles Important for the calculation of forces on the particles Important for statistics / name of department 7-6-2012 PAGE 17
Acceleration of tracers 10 5 0 a 5 linear N=2 10 Lagrange N=4 spline N=4 B spline N=4 Hermite N=4 15 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 t / name of department 7-6-2012 PAGE 18
Acceleration of tracers 10 5.5 5 6 0 6.5 a 5 7 0.36 0.38 0.4 linear N=2 10 Lagrange N=4 spline N=4 B spline N=4 Hermite N=4 15 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 t / name of department 7-6-2012 PAGE 19
Acceleration spectrum 10 0 10 2 acc spectrum 10 4 10 6 10 8 linear N=2 Lagrange N=4 spline N=4 B spline N=4 Hermite N=4 Spectral 10 1 10 0 10 1 10 2 10 3 k / name of department 7-6-2012 PAGE 20
Acceleration spectrum 10 0 10 2 acc spectrum 10 4 10 6 10 8 linear N=2 Lagrange N=4 spline N=4 B spline N=4 Hermite N=4 Spectral 10 1 10 0 10 1 10 2 10 3 k / name of department 7-6-2012 PAGE 21
Energy in spectrum 10 3 Lagrange Spline B spline Hermite 10 4 energy 10 5 10 6 2 3 4 5 6 7 8 N / name of department 7-6-2012 PAGE 22
Energy in spectrum double grid resolution 10 3 Lagrange Spline 10 4 B spline Hermite 10 5 energy 10 6 10 7 10 8 10 9 2 3 4 5 6 7 8 N / name of department 7-6-2012 PAGE 23
Optimal interpolation method 9 8 7 N 6 5 4 1 kmax = 3 N g 3 Lagrange 2 Spline B spline Hermite 1 1.5 2 2.5 3 3.5 4 4.5 5 k η max / name of department 7-6-2012 PAGE 24
Conclusions Advantages B-spline interpolation - High order of convergence - High order of smoothness - Low number of FFTs needed - Errors comparable with Hermite interpolation M.A.T. van Hinsberg, J.H.M. ten Thije Boonkkamp, F. Toschi and H.J.H. Clercx. On the effiency and accuracy of interpolation methods for spectral codes. Submitted to SIAM J. Sci. Comput. Methods for estimation interpolation error - Compare interpolation error with discretisation error - Linear interpolation not sufficient for our purpose / name of department 7-6-2012 PAGE 25
Questions? / name of department 7-6-2012 PAGE 26
Optimal interpolation method 9 8 7 Criteria: Error ratio < 1 6 N 5 4 3 Lagrange 2 Spline B spline Hermite 1 1.5 2 2.5 3 3.5 4 4.5 5 k η max k = 2 max 3 N g / name of department 7-6-2012 PAGE 27
real(u k ) F(U k ) 1 1 0 1 -- k -1 0 k D 1 F(D) 1 -- x 0 0 1 -- x real(u k D) 1 F(U k D) 1 -- x 0 0 k k+ 1 -- x / name of department 7-6-2012 PAGE 28
real(u k D) 1 F(U k D) 1 -- x 0 0 k k+ 1 -- x C 1 F(C) - 0 0 1 -- x real((u k D)*C) 1 F((U k D)*C) 1 0 0 k k+ 1 -- x -1 / name of department 7-6-2012 PAGE 29
3D interpolation Sequence of 1D interpolations: fast 2 properties needed Superposition M. van Aartrijk, Dispersion of inertial particles in stratified turbulence. PHD thesis, Eindhoven University of technology, 2008. / name of department 7-6-2012 PAGE 30
Maxey & Riley equations / name of department 7-6-2012 PAGE 31
Maxey & Riley equations M.A.T. van Hinsberg, J.H.M. ten Thije Boonkkamp, and H.J.H. Clercx. An efficient, second order method for the approximation of the Basset history force. J. Comput. Phys., 230:1465-1478, 2011. / name of department 7-6-2012 PAGE 32
Interpolation High order interpolation vs linear interpolation Accuracy vs Speed Interpolation error vs discretisation error u o x 2 x 3 x 4 x / name of department 7-6-2012 PAGE 33
Error for B-spline interpolation error 10 0 10 1 10 2 10 3 t e t e double res t K t K double res t e = after one eddy turnover time t k = at Kolmogorov time scale 10 4 10 5 10 6 2 3 4 5 6 7 8 N / name of department 7-6-2012 PAGE 34