Skip to content

Latest commit

 

History

History
341 lines (320 loc) · 16.7 KB

File metadata and controls

341 lines (320 loc) · 16.7 KB
layout default
title Frequently Asked Questions
Find answers to common questions about OpenPIV. Click on any question to expand the answer.

General Questions

What is Particle Image Velocimetry (PIV)?

It is an optical method for fluid flow measurements. PIV uses laser illumination to visualize particles in a flow and captures their motion using high-speed cameras. By analyzing sequential images, PIV can determine velocity fields across entire flow regions.

Read more on Wikipedia
<!-- Question 2 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#general2">
      <i class="bi bi-gear"></i> What is OpenPIV?
    </button>
  </h2>
  <div id="general2" class="accordion-collapse collapse" data-bs-parent="#generalAccordion">
    <div class="accordion-body">
      OpenPIV is a user-friendly software for Particle Image Velocimetry. It contains software in Python, Matlab, and C++ that allows to estimate the velocity fields from images of particles and post-process the fields to obtain important fluid dynamics quantities such as vorticity, rate-of-strain, dissipation and Reynolds stresses in the case of turbulent flows. 
      <br><br>
      The main development focus now is on the <strong>Python</strong> version.
      <br><br>
      OpenPIV was originally written in Matlab (tm) in 1998 but switched to Python. OpenPIV is designed to be portable: it runs on all platforms, on mobiles, and on high performance clusters and on virtual machines.
    </div>
  </div>
</div>

<!-- Question 3 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#general3">
      <i class="bi bi-lightbulb"></i> Why was OpenPIV created?
    </button>
  </h2>
  <div id="general3" class="accordion-collapse collapse" data-bs-parent="#generalAccordion">
    <div class="accordion-body">
      OpenPIV was created in order to combine the know-how of different developers into a single, coherent group developing the next generation of the open source Particle Image Velocimetry software. It is based on the three older packages URAPIV, PyPIV, and URAPIV-C++. We hope that other open source PIV developers will join this initiative.
    </div>
  </div>
</div>

<!-- Question 4 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#general4">
      <i class="bi bi-check-circle"></i> What is OpenPIV good for?
    </button>
  </h2>
  <div id="general4" class="accordion-collapse collapse" data-bs-parent="#generalAccordion">
    <div class="accordion-body">
      OpenPIV is good for analysing your PIV images, acquired with frame-straddle or continuous, time-resolved PIV system. It is good to check if your commercial software is not producing any strange results, it is good to use for the images taken not only of fluid, but also solid motion, cell tracking, bees or flies or birds tracking, etc.
      <br><br>
      <strong>Applications include:</strong>
      <ul>
        <li>Fluid dynamics research</li>
        <li>Aerodynamics testing</li>
        <li>Microfluidics</li>
        <li>Biological motion tracking</li>
        <li>Particle tracking in general</li>
      </ul>
    </div>
  </div>
</div>

<!-- Question 5 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#general5">
      <i class="bi bi-shield-check"></i> Are there copyright restrictions on the use of OpenPIV?
    </button>
  </h2>
  <div id="general5" class="accordion-collapse collapse" data-bs-parent="#generalAccordion">
    <div class="accordion-body">
      Read the LICENSE files in repositories, we use standard open source licenses. OpenPIV is free to use, modify, and distribute according to the terms of these licenses.
      <br><br>
      <a href="{{ site.baseurl }}/license.html" class="btn btn-sm btn-outline-primary">
        <i class="bi bi-file-text"></i> View License Details
      </a>
    </div>
  </div>
</div>

<!-- Question 6 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#general6">
      <i class="bi bi-quote"></i> How to cite OpenPIV?
    </button>
  </h2>
  <div id="general6" class="accordion-collapse collapse" data-bs-parent="#generalAccordion">
    <div class="accordion-body">
      If you use the Python version, you can cite all versions by using the DOI:
      <br><br>
      <a href="https://doi.org/10.5281/zenodo.3930343" target="_blank">
        <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.3930343.svg" alt="DOI">
      </a>
      <br><br>
      If you use another package, please check the Readme files in every package: Matlab, Python, C++ and the toolboxes were created at different times and by different teams.
      <br><br>
      <a href="{{ site.baseurl }}/howtocite.html" class="btn btn-sm btn-outline-primary">
        <i class="bi bi-file-text"></i> Full Citation Information
      </a>
    </div>
  </div>
</div>

Technical Questions

What is the scaling parameter (sclt)?

Scaling or sclt

The Scaling parameter converts the pixel/dt units into meters/second or other physical units. For example, if the time between the two consecutive images is dt = 0.5 seconds and the magnification is such that 1 pixel in the image corresponds to 50 cm, then the value of sclt is estimated as:

sclt = 50 cm/pixels / 0.5 sec/dt = 100 [cm/seconds/pixels]

For example, if a given displacement vector was estimated to be 10 pixels, then the velocity will be:

100 * 10 = 1000 cm/s
<!-- Question 8 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#tech2">
      <i class="bi bi-funnel"></i> What's the purpose of local and global filtering?
    </button>
  </h2>
  <div id="tech2" class="accordion-collapse collapse" data-bs-parent="#technicalAccordion">
    <div class="accordion-body">
      <h6>Global Filtering</h6>
      <p>
        <strong>Global filtering</strong> supposedly removes the obvious <strong>outliers</strong>, i.e. the vectors which length is larger than the mean of the flow field plus 3 times its standard deviation. These are global outliers in the statistical sense.
      </p>
      
      <h6>Local Filtering</h6>
      <p>
        <strong>Local filtering</strong> is performed on small neighborhoods of vectors, e.g. 3 x 3 or 5 x 5, in order to find <strong>local outliers</strong> - the vectors that are dissimilar from the close neighbors. Typically there are about 5 per-cent of erroneous vectors and these are removed and later the missing values are interpolated from the neighbor vector values.
      </p>
      
      <p>This is also a reason for the Matlab version to generate three lists of files:</p>
      <ul>
        <li><strong>raw</strong> - <code>_noflt.txt</code></li>
        <li><strong>filtered</strong> (after global and local filters) - <code>_flt.txt</code></li>
        <li><strong>final</strong> (after filtering and interpolation) - <code>.txt</code></li>
      </ul>
    </div>
  </div>
</div>

<!-- Question 9 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#tech3">
      <i class="bi bi-window"></i> Why use larger windows for FFT than interrogation windows?
    </button>
  </h2>
  <div id="tech3" class="accordion-collapse collapse" data-bs-parent="#technicalAccordion">
    <div class="accordion-body">
      <p>You might see code like:</p>
      <pre>ffta = fft2( a2, Nfft, Nfft );

fftb = fft2( b2, Nfft, Nfft );

where the size has been specified as Nfft which is twice the interrogation window size.

In the FFT-based correlation analysis, we have to pad the interrogation window with zeros and get correlation map of the right size and avoid aliasing problem (see Raffel et al. 2007).

<!-- Question 10 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#tech4">
      <i class="bi bi-arrow-repeat"></i> Why is sub-image b2 rotated before correlation?
    </button>
  </h2>
  <div id="tech4" class="accordion-collapse collapse" data-bs-parent="#technicalAccordion">
    <div class="accordion-body">
      <p>You might see:</p>
      <pre>b2 = b2(end:-1:1,end:-1:1);</pre>
      <p>
        Without rotation the result will be convolution. The definition is:
      </p>
      <pre>ifft(fft(a)*fft(conj(b)))</pre>
      <p>
        So, the operation <code>conj()</code> is replaced by <em>rotation</em> which is identical <strong>in the case of real values</strong>. It is more computationally efficient.
      </p>
    </div>
  </div>
</div>

<!-- Question 11 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#tech5">
      <i class="bi bi-map"></i> Why mask neighborhood pixels around peak1 when finding peak2?
    </button>
  </h2>
  <div id="tech5" class="accordion-collapse collapse" data-bs-parent="#technicalAccordion">
    <div class="accordion-body">
      <p>
        In the <code>find_displacement(c,s2nm)</code> function for finding <code>peak2</code>, why are neighbourhood pixels around <code>peak1</code> masked?
      </p>
      <p>
        These peaks might appear as "false second peak", but they are the part of the same peak. Think about a top of a mountain. You want to remove not only the single point, but cut out the top part in order to search for the second peak.
      </p>
    </div>
  </div>
</div>

<!-- Question 12 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#tech6">
      <i class="bi bi-speedometer"></i> What are the units of u, v in the output?
    </button>
  </h2>
  <div id="tech6" class="accordion-collapse collapse" data-bs-parent="#technicalAccordion">
    <div class="accordion-body">
      <p>
        After the program is executed, the variable <code>vel</code> contains all the parameters for all the velocity vectors. What are the units of <code>u, v</code>? Is it in metres/second?
      </p>
      <p>
        It is not, the result depends on the <code>sclt</code> variable. If <code>sclt</code> is not used (i.e. equal to 1) then the output is in <code>pixels/dt</code>, where <code>dt</code> is the time interval between the two PIV images.
      </p>
    </div>
  </div>
</div>

<!-- Question 13 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#tech7">
      <i class="bi bi-filter"></i> What is the "Outlier Filter Value" in OpenPIV?
    </button>
  </h2>
  <div id="tech7" class="accordion-collapse collapse" data-bs-parent="#technicalAccordion">
    <div class="accordion-body">
      <p>
        The outlier filter value is the threshold of the global outlier filter and says how many times the standard deviation of the whole vector field is exceeded before the vector is considered as outlier. See above the discussion on various filters.
      </p>
    </div>
  </div>
</div>

<!-- Question 14 -->
<div class="accordion-item">
  <h2 class="accordion-header">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#tech8">
      <i class="bi bi-file-earmark-text"></i> What are the fifth and sixth columns in the output files?
    </button>
  </h2>
  <div id="tech8" class="accordion-collapse collapse" data-bs-parent="#technicalAccordion">
    <div class="accordion-body">
      <p>
        What are the fifth and sixth columns in the data <code>*.txt</code>, <code>*flt.txt</code> or <code>*noflt.txt</code>?
      </p>
      <ul>
        <li>The <strong>fifth column</strong> is the value of the <code>Signal-To-Noise</code> (<code>s2n</code>) ratio.</li>
        <li>The <strong>sixth column</strong> is a mask of invalid vectors.</li>
      </ul>
      <p>
        Note that the value is different (numerically) if the user chooses <code>Peak-to-Second-Peak</code> ratio as the <code>s2n</code> parameter or <code>Peak-to-Mean</code> ratio as <code>s2n</code> parameter. The value of <code>Peak-to-Second-Peak</code> or <code>Peak-to-Mean</code> ratio is stored for further processing.
      </p>
    </div>
  </div>
</div>

Still have questions?

Our community is here to help!

      <div class="row mt-4">
        <div class="col-md-4 mb-3">
          <a href="https://groups.google.com/forum/#!forum/openpiv-users" class="btn btn-primary btn-lg" target="_blank">
            <i class="bi bi-people"></i> Community Forum
          </a>
        </div>
        <div class="col-md-4 mb-3">
          <a href="mailto:openpiv2008@gmail.com" class="btn btn-outline-primary btn-lg">
            <i class="bi bi-envelope"></i> Email Us
          </a>
        </div>
        <div class="col-md-4 mb-3">
          <a href="https://github.com/OpenPIV/openpiv-python/issues" class="btn btn-outline-primary btn-lg" target="_blank">
            <i class="bi bi-github"></i> GitHub Issues
          </a>
        </div>
      </div>
    </div>
  </div>
</div>