Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien...

8
Comparison of interpolation techniques for 2D and 3D velocimetry Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie et Pierre Curie 86960 Futuroscope cedex, France; [email protected] Abstract Some difficulties appear when the researcher want to compare some information located in different positions and calculated by several measurements techniques. Even so to simplify the algorithms for 3D PIV measurements, the choice to calculate velocity vectors on specific location from classic 2D PIV vector fields is often prefered than to determine directly velocity vectors on an unstructured grid mesh. As it could introduce some errors, data interpolation seems then necessary. This preliminary work consists to assess four interpolation methods : the bicubic and the thin shell splines, a least squares technique and a weighting function in relation with the distance between the vectors. Irregularly and regularly spaced data have been used for the interpolation. Different vector selection are compared and the influence of this step is estimated on 2D and 3D PIV measurements (figure1). Figure 1 : Scatterplot and probability function for an instantaneous velocity vector field and an interpolated field.

Transcript of Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien...

Page 1: Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie

Comparison of interpolation techniques for 2D and 3D velocimetry

Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques

SP2MI, Téléport 2, Boulevard Marie et Pierre Curie 86960 Futuroscope cedex, France;

[email protected]

Abstract Some difficulties appear when the researcher want to compare some information located in different positions and calculated by several measurements techniques. Even so to simplify the algorithms for 3D PIV measurements, the choice to calculate velocity vectors on specific location from classic 2D PIV vector fields is often prefered than to determine directly velocity vectors on an unstructured grid mesh. As it could introduce some errors, data interpolation seems then necessary. This preliminary work consists to assess four interpolation methods : the bicubic and the thin shell splines, a least squares technique and a weighting function in relation with the distance between the vectors. Irregularly and regularly spaced data have been used for the interpolation. Different vector selection are compared and the influence of this step is estimated on 2D and 3D PIV measurements (figure1).

Figure 1 : Scatterplot and probability function for an instantaneous velocity vector field and an interpolated field.

Page 2: Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie

Introduction During measurements in the flows, the interpolation techniques to evaluate velocity vectors in specific locations are often employed. On the one hand, these techniques can be used via random vector distributions to calculate velocity vectors on a regular grid. Scalars characterizing the flows are then deduced and the velocity vectors resulting from measurement techniques like PIV, PTV or PSV can be compared at the same locations. On the other hand, the interpolation techniques are also used, via regularly distributed velocity vectors, to determine velocities on an irregular grid. For 3D PIV measurements, these points result from projecting a regular grid of the object reference in the image references. Some authors compared methods to interpolate random distributed vectors on nodes of a regular mesh. Robinson and Rockwell (1993), Spedding and Rignot (1993) carried out comparisons between the techniques Adaptative Gauss Window and Spline Thin Shell onto theoretical and experimental velocity fields. Imaichi and Ohmi (1983), David and Texier (1995) also studied these interpolation effects with the methods of least squares, of weighting according to the distances and by Krigging from random velocity fields. In order to determine the most suitable algorithms to carry out interpolations on a regular grid or on an unstructured grid, a comparative and systematic study between four interpolation techniques (Spline Thin Shell, weighting by the square of the distance, minimization by least squares, Bicubic Spline) is presented in this paper. Using a Columnar vortex, 2D simulated and 3D simulated and projected by real matrices of projection obtained during measurements by 3D-PIV, the interpolation effects of the velocity fields are assessed. In particular, the selection of the points used for the interpolation, the capacity to respect, as far as possible, the instantaneous or mean values of the velocity vectors, the faithful restitution of the velocity gradients are elements particularly highlighted. Interpolation Techniques Four interpolation techniques are compared; they are all well defined in the literature and we present for each only the main characteristics. • The inverse distance weighting methods (called here AGW) This method consists in calculating velocity vector for a location by summing vectors of the selected points origin, weighted by a function W, specific to each point origin. The function W is related to the distance between the points origin (with the number of N) and the point of the interpolation Agui and Jimenez(1987). One can thus write the estimator in the following way :

∑=

=

=

== Nk

kk

Nk

kkk

m

yxw

UyxwU

1

1

),(

).,( (1)

The function W can take various expressions. In the case of the interpolation weighted by the inverse of the

distances, the function W is written : wk=dk-2, with the distance 22 )()( kmkmk yyxxd −+−= and .

In the case of the interpolation by Gaussian window (Adaptive Window Gauss), W takes the

form

∑=

==

Nk

kkw

11

2

2

),( σ

kd

k eyxw−

= (σ being the width of the window of selection). The first of these two expressions has been computed in this comparison.

• The Thin Shell Spline (noticed STS) The principle of the method rests on the search of N functions G and N coefficients λ such that the required

velocity value Um could be calculated in a location (x,y) by U (2) ∑=

==

Nk

kkkm yxGyx

1),(),( λ

The problem consists to find functions G suitable. It was proven that a class of named Thin-Shell Splines function minimized a global function proportionnal to the Laplacian of the velocity fields. The following Um function satisfied this condition :

∑=

=+++=

Nk

kkkkm yxMMGtU

121),()( βααλ (3)

Page 3: Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie

with , and M(x,y), M∑=

==

Nk

kk

10λ ∑

=

==

Nk

kkk M

10λ k(xk,yk), and Gk(Mk,M)=|dk

2|log|dk2| (4)

L.Paihua Montès (1978) studied the resolution of the system which rises from this formulation and calculated the first derivative in the following way:

({∑=

=++=

∂∂ Nk

kkxkk

i ddxv

1

2,,21 1log2 λα )} (5)

({∑=

=++=

∂∂ Nk

kkykk

i ddxu

1

2,,12 1log2 λα )} (6)

It is noticed that the interest of this method holds in the fact that calculation of interpolation takes into account the velocity derivative. • The least squares minimization (noticed MC in the paper) The method of interpolation by least Squares is based on a development of Taylor carried out in an origin point starting from the sought value in a location. To determine the Um velocity in a point M, Imaichi and Ohmi (1983) wrote the development in a point K where the velocity components are known:

)()( mkm

mkm

mk yyy

Uxxx

UUU −∂

∂+−

∂∂

+= (7)

(The same development is applied for V) . Then, Um and Vm are estimated such as the quantities S and T are minimal:

S = 2

1)]()([ mk

mmk

Nk

k

mmk yy

yU

xxx

UUU −

∂∂

−−∂

∂−−∑

=

= (8)

T = 2

1)]()([ mk

mmk

Nk

k

mVmk yy

yV

xxx

VUV −

∂∂

−−∂

∂−−∑

=

= (9)

• The Bicubic Spline (noticed BC) The Bicubic Spline interpolation (from Numerical Recipes in C) is carried out by two successive interpolations according to direction X then Y. The velocity vectors are defined in nodes of a Cartesian grid Ui = U(xi), for i=1 to N and each value U in x location is computed by the following formulation according to a direction X then Y :

11 '''' ++ +++= jjjj DUCUBUAUU (10)

withjj

j

xxxx

A−

−=

+

+

1

1 ,jj

j

xxxx

B−

−=

+1, )( 1)(

61 23

jj xxAA −+−=C and )( 123 )(

61

jj xxBBD −+−= (11)

If the expression (10) is derivated, we obtain the expression of U’i:

11

2

1

2

1

1 '')(6

13'')(6

13+++

+

+ −−

+−−

−−

−= jjjjjj

jj

jj UxxBUxxAxxUU

dxdU (12)

and the second derivative : 1'''''' ++= jj BUAUU (13)

Now to evaluate the second derivative supposing known, the fundamental idea of the Bicubic Spline second interpolation is to seek there such as the first derivative is continuous. This imposes that the equation (12) has the same value in xj and xj+1 what after arrangement gives:

1

1

1

11

1111

1 ''6

''3

"6 −

+

++

+−+−

−−

−=

−+

−+

jj

jj

jj

jjj

jjj

jjj

jj

xxUU

xxUU

Uxx

Uxx

Uxx

(14)

It’s a system of N-2 equations and by using two boundary conditions (y ’’1 or y’’N or the two, equal ones to zero or y’’1 and y’’N calculated from (12) by imposing the boundary conditions with the first derived ), the N unknown U can then be calculated.

Page 4: Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie

Principle of the comparison In order to suppress the uncertainties of experimental data, a Columnar vortex is simulated Robinson and Rockwell (1993). This swirl has a tangential velocity component

( )

−−

Γ=

Rsr

rRsVsvt

2exp1

** (15)

and a vertical velocity component,

−−=

Rsr

VsVv

20 exp (16)

with the parameters : Γ : circulation, Vs : velocity, Rs : vortex radius, V0 : vertical external velocity. To study the influence of the interpolation step of vectors from a random distribution onto a regular grid, three 2D vortices (without vertical velocity) are calculated (figure2 - table1) with different sizes and amplitudes, randomly and repetitively, to obtain 100 fields of velocity vectors. Then they are interpolated on nodes of a regular grid by different interpolation methods : minimization by least squares (noted MC), weighting close to the Adaptative Gauss Window (AGW) and an approximation by a Spline (Spline Thin Shell). In the same way, to evaluate the influence of the interpolation step in a data processing sequence by 3D-PIV, three 3D vortices (Table 1) are simulated and projected to the nodes of a regular grid mesh in two image references (right-hand side and left) using projection parameters resulting from an in-situ calibration Calluaud and David (2002). These regular fields of velocity vectors are interpolated onto an unstructured mesh and are combined by backward projection in the object reference (figure 3). Thus the influence of the preceding interpolation techniques and the influence of approximation by Bicubic Spline are evaluated as a whole in the data processing sequence.

0

0.1

0.2

0.3

norme

0

2

4

6

8

10

X(mm)

02

46

810Y (mm)

Figure 2 : Velocity vector magnitude (mm/s ) for the three simulated vortices.

2D 2D 2D 3D 3D 3D

Vortex reference plain tip reference plain tip V0 0 0 0 15 15 30 RS 2 4 2 12 18 12 VS 5 5 5 10 10 10 Γ 5 5 10 30 000 30 000 30 000

Table1 : Parameters for the simulated vortex

Page 5: Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie

Three modes of vector selection were compared: the four or eight closest vectors or a minimum of one vector per quadrant. The interpolated velocity fields are compared using the calculation of the difference of the Euclidian norm between the real and simulated velocity on the complete field. The relative errors on a velocity profile passing by the center of the vortex is determined too and some random velocity vector fields are examined in details to understand the errors on some vectors and the behavior near the vortex center.

Figure 3 : Schematic representation of the steps to estimate the influence of the interpolation

MD

INTERPOLATION INTERPOLATION

M-1DM-1

G

MG

on 3D PIV measurements with the backward projection. Results Three aspects are observed closely in the results : - the best point selection according to the interpolation techniques; - the faithful restitution of the instantaneous velocity fields, - the influence of the starting distribution of the vectors on the interpolation techniques. At first, the optimum modes of selections of the points for each interpolation type were given starting from the random fields of vectors and the fields uniformly distributed. The methods splines, in general, require a homogeneous distribution of the vectors without hole of information. The approximation by STS is correctly conditioned when the data are not aligned and that the first three points forms an equilateral triangle. The choice of the four closest points remains the mode of the selection most favourable to this method. The method Bicubic Spline, only tested from a regular grid mesh, takes account of all the points to determine the second derivative employed by the approximation. For the method by weighting or of quadratic minimization, the number of points and their locations strongly influence the accuracy of the method. If the criteria of reproducibility is preferable, the choice of the four or the height closest points is better for technique AGW whereas for the method of least squares the height closest points give the most satisfactory results. If we seek to reduce the average error obtained from 100 velocity fields, the choice of the four closest points is essential in the areas of strong velocity gradients (figure 4). If the center of the swirl is examined, the two methods behave in the same way i.e the height points closest then a vector by quadrant.

Page 6: Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie

-2 0 2 4 6 8 10 12 14 16-2,0-1,8-1,6-1,4-1,2-1,0-0,8-0,6-0,4-0,20,00,20,40,60,81,0

Distance to the origin

Relativeerror

4 nearest points

AGWP4ermoyU AGWP4ermaxU AGWP4erminU

-2 0 2 4 6 8 10 12 14 16-2,0-1,8-1,6-1,4-1,2-1,0-0,8-0,6-0,4-0,20,00,20,40,60,81,0

Distance to the origin

Relative

erro

8 nearest points

AGWP8ermoyU AGWP8ermaxU AGWP8erminU

-2 0 2 4 6 8 10 12 14 16-2,0-1,8-1,6-1,4-1,2-1,0-0,8-0,6-0,4-0,20,00,20,40,60,81,0

Distance to th e origi n

Relativeerror

1 vector byquadra nt

AGWQ4ermoyU AGWQ4ermaxU AGWQ4erminU

-2 0 2 4 6 8 10 12 14 16-2,0-1,8-1,6-1,4-1,2-1,0-0,8-0,6-0,4-0,20,00,20,40,60,81,0

Distance to the origin

Relativeerror

4 nearest vectors

MCP4ermoyU MCP4ermaxU MCP4erminU

-2 0 2 4 6 8 10 12 14 16-2,0-1,8-1,6-1,4-1,2-1,0-0,8-0,6-0,4-0,20,00,20,40,60,81,0

8 nearest points

Distance to the origin

Relativeerror

MCP8ermoyUMCP8ermaxU

MCP8erminU

-2 0 2 4 6 8 10 12 14 16-2,0-1,8-1,6-1,4-1,2-1,0-0,8-0,6-0,4-0,20,00,20,40,60,81,0

1 vector by quadrant

Distance to the origin

Relativeerror

MCQ4ermoyU MCQ4ermaxU MCQ4erminU

Figure 4 : Velocity profiles for the U component and the three modes of vector selections (reference vortex).

For the study of the three two-dimensional swirls, we have conserved every mode of selection but we comment only the best mode of points selection for each technique. The norms of velocity amplitude difference show that, from random velocity fields, the method by least squares gives the best results and the more reproductible. In regard to the velocity profiles taken on a diagonal, it seems similar in zones of low gradient since the method AGW better represents the areas of strong velocity gradients. In this place, the minimization by least square tends to smooth the vectors and the velocity field is then underestimated. Near the vortex center, the least square method gives in appearance better results than with the AGW weighting function. The location of the center is correctly positioned. Technique STS does not appear regular enough to be used without a validation by filtering. In general, the results are very accurate but for some points this spline introduces too significant errors (> 200%).

Reference vortex Tip vortex Plain vortex

Figure 5 : Norm of the velocity amplitude difference for the three 2D vortices.

For the study of the three-dimensional vortices, some behavior modifications appeared during vector interpolation from a regular grid onto an unstructured grid mesh. First, because the origin points are better conditioned than those calculated, the methods Spline (Bicubic or STS) give very good results on the values of the velocity difference norm and the relative errors. This is bound, in particular, to the fact that these methods take into account the first or second derivatives and that the latter are correctly estimated on this type of grid. Methods AGW and MC, though, give satisfactory results with nevertheless some differences according to the components (figure 6). The AGW weighting function introduces between 5 to 10% of errors like for the interpolation on the 2D cases. On the other hand, the other techniques seem to be improved. To check that these results are not related to a smoothing during of the passage in the stereoscopic method of backward projection, complementary calculations were carried out from a regular grid onto a unstructured grid mesh. The obtained results confirm the improvement of the accuracy on the vectors interpolated from a regular vector distribution.

Page 7: Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie

AGW P8 BS MC P8 STS P40.00.51.01.52.02.53.03.54.04.55.05.56.06.57.07.5

Reference vortex

Norm

mm/s

Norm U

AGW P8 BS MC P8 STS P4

0.00.51.01.52.02.53.03.54.04.55.05.56.0

Reference vortex

Norm

mm/s

Norm W

AGW P8 BS MC P8 STS P40.00.51.01.52.02.53.03.54.04.55.05.56.06.57.07.58.0

Normmm/s

Norm V

AGW P8 BS MC P8 STS P4

0123456789

10111213

Nnorm

Mm/s

Norm U+V+W

Figure 6 : Norm of the difference for the 3 components and the amplitude of the velocity

from a regular grid mesh to a unstructured grid mesh . Other tests have been made with the bicubic spline interpolation. The introduction of errors (10, 20, 30%) on one or two modules of the velocity vectors for just one of the vectors fields (left or right velocity projection) used for the reconstruction by backward projection, makes it possible to highlight the propagation of this error (figure 7) on the calculation. The velocity errors appear clearly around the place where the vector has been changed and the norm of the relative error reveal some privilegated direction of the error. Conclusion

In conclusion, the interpolation techniques are to be employed with prudence. Since a random distribution, the methods involving minimization by least squares and AGW give reliable results respectively for low and strong velocity gradients. For interpolations using vectors distributed regularly on a structured grid mesh, the Spline methods and in second the approximation by least squares seems to be more accurate for the calculation of the third component. The improvement results mainly to the fact that those techniques give better estimations from structured grid mesh and not to the employment of the backward projection However these results on simulated fields are to be tempered on realistic velocity vectors resulting from experiments and sullied with spurious vectors. An other aspect showed in the figure 1 is the scatter plot and the histogram of the displacement of the vector for the component U. The interpolated vectors from a regular grid mesh have a representation modified after the calculation and it is clear that these variations should have some influence for the determination of the 3D vectors.

References J.C. Agui, J. Jimenez, 1987 : On the performance of particle tracking, Journal of Fluid Mechanics, vol 185, 447-468. D. Calluaud, L. David, 2002 : Backward projection algorithm and stereoscopic particle image velocimetry measurements of the flow around a square section cylinder. 11th International Symposium on Applications of Laser Techniques to Fluid Mechanic, Lisbon.

Page 8: Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD ... · Laurent DAVID, Aurélie ESNAULT, Damien CALLUAUD Laboratoire d’Etudes Aérodynamiques SP2MI, Téléport 2, Boulevard Marie

L. David, A. Texier, 1995 : Influence des techniques d’interpolation sur la précision des champs des vitesses instantanées caractérisant un écoulement. 6ième Congrès de Visualisation et de Traitement d’images en mécanique des fluides, St-Etienne (France). K. Imaichi, K. Ohmi. 1983 : Numerical processing of flow visualization pictures. Measurement of two dimensional vortex flow. Journal of Fluid Mechanics, vol 86, 283-311. WH. Press, SA. Teukolsky, WT. Vetterling, BP. Flannery, 1995 : Numerical Recipes in C, Cambridge Press University. L. Paihuas Montès, 1978 : Quelques méthodes numériques pour le calcul des fonctions splines à une ou plusieurs variables. Thèse de Doctorat de l’Institut Polytechnique de Grenoble. O. Robinson, D Rockwell, 1993 : Construction of 3D images of flow structures via particule tracking techniques. Experiments in Fluids 14, 257-270. G.R. Spedding, E.J.M. Rignot, 1993 : Performance analysis and application of grid interpolation techniques for fluid flows. Experiments in Fluids 15, 417-430.

Figure 7 : Bicubic Spline Interpolation without and with introduction of magnitude errors in one of the image

references, Reconstructed 3D velocity fields for these two interpolations in the object reference.