Changes between Version 41 and Version 42 of Tutorial/ParticleImageVelocimetry


Ignore:
Timestamp:
Jan 29, 2015, 3:30:18 PM (9 years ago)
Author:
vaillant1p
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial/ParticleImageVelocimetry

    v41 v42  
    55
    66== Visual check of the image pair ==
    7 Particle Image Velocimetry (PIV) measures the displacement of features in a pair of images. Visual evidence of feature displacement between the two images is a prerequisite  for the success of the computation. To observe this motion, write the file indices 1 and 2 in the boxes '''[i1]''' and '''[i2]''' respectively, in the frame '''[File Indices]''' on the left. Then push the red button '''[<-->]''' in the frame '''[Navigate]''', see figure. The image then alternatively switches from 1 to 2. The speed of motion can be adjusted with the slider '''[speed]'''. Press '''[STOP]''' to stop the motion.
     7The Particle Image Velocimetry (PIV) computation measures the displacement of features in a pair of images. Visual evidence of feature displacement between the two images is a prerequisite  for the success of the computation. To observe this motion, write the file indices 1 and 2 in the boxes '''[i1]''' and '''[i2]''' respectively, in the frame '''[File Indices]''' on the left. Then push the red button '''[<-->]''' in the frame '''[Navigate]''', see figure. The image then alternatively switches from 1 to 2. The speed of motion can be adjusted with the slider '''[speed]'''. Press '''[STOP]''' to stop the motion.
    88
    99       [[Image(movie1-2.JPG)]]
    1010
    1111== Launching PIV ==
    12 The PIV computation is accessed from uvmat by the upper bar command '''[Run/PIV]''', or from '''series''' by selecting the function '''civ_series'''. The name 'CIV' means '''C'''orrelation '''I'''maging '''V'''elocity to stress that the method relies on image correlation, which evaluates the displacement of image textures, not necessarily from particles. Note that an older GUI ''''civ'''' is also available, but it is obsolete and not used here.
     12The PIV computation is accessed from '''uvmat''' by the upper bar command '''[Run/PIV]''', or from '''series''' by selecting the function '''civ_series'''. The name 'CIV' means '''C'''orrelation '''I'''maging '''V'''elocity to stress that the method relies on image correlation, which evaluates the displacement of image textures, not necessarily from particles. Note that an older GUI ''''civ' '''is also available, but it is obsolete and not used here.
    1313
    14 A new GUI '''civ_input''' now appears. In the menu '''[!ListCompareMode]''', keep the default option 'PIV'. Keep also the default option 'Di=0|1' for the image pair (menu tag '''[!ListPairCiv1]'''). Keep also the default parameters in the frame '''CIV1''' and press '''[OK]''', so the GUI '''civ_input''' desappears.  Then press '''[RUN] ''' in the GUI''' series''' to run the calculation. The button '''[RUN]''' is then colored to yellow until the computation is finished.
     14A new GUI '''civ_input''' now appears. In the menu '''[!ListCompareMode]''', keep the default option 'PIV'. Keep the default option 'Di=0|1' for the image pair (menu tag '''[!ListPairCiv1]''') and the default parameters in the frame '''CIV1'''. Press '''[OK]''' so the GUI '''civ_input''' desappears.  Then press '''[RUN] ''' in the GUI''' series''' to run the calculation. The button '''[RUN]''' is then colored to yellow until the computation is finished.
    1515
    16 The operation produces a  file with format netcdf, named with extension '''.nc''', in a folder called ''Images.civ''. This can be viewed by pressing '''[STATUS] '''in the GUI '''series''', which displays the result file ''frame_1-2.nc''. The index string '_1-2' indicates that it results from images 1 and 2. Select the file name and press '''[OPEN]''' to open it directly with '''uvmat''', or use the browser of '''uvmat'''.
     16The operation produces a  file with format netcdf, named with extension '.nc', in a folder called 'Images.civ'. This can be viewed by pressing '''[STATUS] '''in the GUI '''series''', which displays the result file 'frame_1-2.nc'. The index string '_1-2' indicates that it results from images 1 and 2. Select the file name and press '''[OPEN]''' to open it directly with '''uvmat''', or use the browser of '''uvmat'''.
    1717
    18 [[Image(Civ_1.JPG)]]
     18        [[Image(Civ_1.JPG)]]
    1919
    2020== Visualizing  the velocity fields ==
    21 In '''uvmat '''velocity vectors are displayed in the central window, while the histograms of each component are in the lower left windows. The arrow length is automatically set by default. It can be adjusted by the edit box '''[num_!VecScale]''' in the  frame '''[Vectors]''' on the right hand side.
     21In '''uvmat '''velocity vectors are displayed in the central window, while the histograms of each component are in the lower left windows. The arrow length is automatically set by default. It can be adjusted by the edit box '''scale''' ('''[num_!VecScale]''') in the  frame '''[Vectors]''' on the right hand side.
    2222
    2323The vector color indicates the quality of the image correlation maximum leading to each vector, blue is excellent, green average, red poor. The thresholds for such color display can be adjusted from 0 to 1 (perfect image correlation)  in the frame''' [Vectors]''', using the boxes '''[!ColCode1] ''' and '''[!ColCode2]''',  or equivalently by the corresponding  sliders '''[Slider1]''' and '''[Slider2] '''.
     
    2525The black color indicates warning in the PIV calculation process. In this example, black vectors are indeed located on the edge, in zones outside the area of flow visualisation (this display can be desactivated by unselecting the box '''hide warn''' (tag '''[!CheckHideWarning]''') in the frame '''Vectors''').
    2626
    27 The position (''x,y'') and velocity components (''U,V'') can be displayed in the upper right text display window by moving the mouse over it. The correlation 'C' and warning flag 'F' are also indicated. The warning flag is equal to 0 for good vectors while non-zero values indicate different calculation problems, see below.
     27The position (''x,y'') and velocity components (''U,V'') can be displayed in the upper right text display window by moving the mouse over it. The correlation 'C' and warning flag 'F' are also indicated. The warning flag is equal to 0 for good vectors while non-zero values indicate different calculation problems.
    2828
    2929== Histograms of velocity ==
     
    3434
    3535== Various vector color representations ==
    36 Vector color can also  represent another quantity, as chosen in the menu '''[!ColorScalar] ''' in the frame '''[Vectors]'''. For instance the vector length 'norm(U,V)' can be used. Then a color continuous 64 color code is appropriate, as set in the menu '''[!ColorCode]'''. The color code extrema are set by '''[num_!MinVec] ''' and '''[num_MaxVec]''', choose for instance 0 and 5 respectively.'''''''''''
     36Vector color can also  represent another quantity, as chosen in the menu '''[!ColorScalar] ''' in the frame '''[Vectors]'''. For instance the vector length 'norm(U,V)' can be used. Then a color continuous 64 color code is appropriate, as set in the menu '''[!ColorCode]'''. The color code extrema are set by '''[num_!MinVec] ''' and '''[num_MaxVec]''', choose for instance 0 and 5 respectively.
    3737
    3838== Scalar maps ==
    39 Other field representations are available, selected in the menu '''[Fields]''' at the top of the GUI. For instance the option 'U' provides a (false) color map of the x wise velocity component. The color code can be adjusted by the edit box '''[num_MinA] ''' (saturated blue color below this value) and '''[num_MaxA]''' (saturated red color beyond this value). Choose for instance -1 and 5 respectively.
     39Other field representations are available, selected in the menu '''[Field]''' at the top of the GUI. For instance the option 'U' provides a (false) color map of the x wise velocity component. The color code can be adjusted by the edit box '''[num_MinA] ''' (saturated blue color below this value) and '''[num_MaxA]''' (saturated red color beyond this value). Choose for instance -1 and 5 respectively.
    4040
    4141A contour plot can be obtained instead of a color map by selecting the option 'contour' in the menu '''[!ListContour]''' in the frame''' [Scalar] '''. Then select the contour interval, for instance 0.5. The result is shown in the following figure.
     
    4545== Spatial derivatives ==
    4646
    47 To get the vorticity field, 'vort' , and other spatial derivatives, you need to come back to the GUI''' series''' with images as input and action civ_series'''. '''In''' civ_input''', select the check boxes '''[FIX1] ''' and  '''[PATCH1] ''' , validate the input with '''[OK]''', then press '''[RUN]''' in the GUI '''series'''. A question box appears to warn about the existence of the result file, answer '''[OK]''' to refresh it with the new data. Otherwise the results are stored in a new subdirectory with extension ''.civ1'', so the previous results are not erased (you can modify this extension by editing the boxe '''[OutputDirExt]''' in the GUI '''series'''.
     47To get the vorticity field, 'vort' , and other spatial derivatives, you need to come back to the GUI''' series''' with images in '''[Input Files]''' and '''[Action]''' as 'civ_series'. In''' civ_input''', select the check boxes '''[FIX1] ''' and  '''[PATCH1] ''', validate the input with '''[OK]''', then press '''[RUN]''' in the GUI '''series'''. A question box appears to warn about the existence of the result file, answer '''[OK]''' to refresh it with the new data. Otherwise the results are stored in a new subdirectory with extension '.civ1', so the previous results are not erased (you can modify this extension by editing the boxe '''[!OutputDirExt]''' in the GUI '''series'''.
    4848
    49 This will produce an interpolated velocity field and their spatial derivatives in the same netcdf file.  After this operation vorticity can be visualized in the GUI  '''uvmat''', selecting the option 'vort'''' ''' in the popup menu '''[!FieldName]'''.
     49This will produce an interpolated velocity field and their spatial derivatives in the same netcdf file.  After this operation vorticity can be visualized in the GUI  '''uvmat''', selecting the option 'vort' in the popup menu '''[!FieldName]'''.
    5050
    5151== Superposing image and vectors ==
     
    8080
    8181== Masks ==
    82 Spurious vectors are observed outside the fluid domain, which particularly disturbing when spatial derivatives are calculated.
     82Spurious vectors are observed outside the fluid domain, which is particularly disturbing when spatial derivatives are calculated.
    8383
    8484This can be avoided by using a mask, which is an image of the same size as the images used for PIV. Grey color in the mask indicate regions excluded from measurement.
     
    8888Then the mask itself is produced by the menu bar command '''[!Tools/Make mask]'''. The corresponding image is then displayed and stored by default in the directory of the initial image. Note that if several mask polygons have been initially created, as listed in '''[!ListObject]''' (bottom right of the GUI uvmat), they will be merged as dark regions in the resulting mask (useful in case of multiple ’holes’).
    8989
    90 The mask image can be seen as a mask by selecting '''[view_mask]''' at the upper left of the GUI '''uvmat'''. For checking purpose, it can be also opened by the browser of '''uvmat''' like any image. In the GUI '''civ''', the mask is introduced by the selecting the green check box '''[Mask]'''. Vectors under the mask are not calculated in the resulting velocity data.
     90The mask image can be seen as a mask by selecting '''[view_mask]''' at the upper left of the GUI '''uvmat'''. For checking purpose, it can be also opened by the browser of '''uvmat''' like any image. In the GUI '''civ_input''', the mask is introduced by the selecting the green check box '''[Mask]'''. Vectors under the mask are not calculated in the resulting velocity data.
    9191
    9292Further improvments of the results are discussed in Tutorial/CorrelationImageVelocimetryOptimisation