<div dir="ltr">Hi,<div><br></div><div>Maybe compute each portion manually and check that against the correct values. Also, verifying the gradient calculation is correct is another thing to look at. If the grid isn't specified properly then the gradient operation will likely be wrong.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 9, 2017 at 8:46 AM, Stefan Melber <span dir="ltr"><<a href="mailto:Stefan.Melber@dlr.de" target="_blank">Stefan.Melber@dlr.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#ffffff">
    <font size="-1">Hi,<br>
      <br>
      <br>
      for vortex-detection i (tried) to calculate the lambda2-criterion
      (see e.g. <a class="m_6725794015711734747moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/Lambda2_method" target="_blank">https://en.wikipedia.org/wiki/<wbr>Lambda2_method</a>)
      with ParaView. The way of calculation is based on this link
      <a class="m_6725794015711734747moz-txt-link-freetext" href="http://www.iesensor.com/blog/2016/01/24/using-paraview-to-visualise-vorticity-lambda2-vorticity-q-criterion/" target="_blank">http://www.iesensor.com/blog/<wbr>2016/01/24/using-paraview-to-<wbr>visualise-vorticity-lambda2-<wbr>vorticity-q-criterion/</a>.<br>
      <br>
      However - the results are a kind of "wrong" - see attached
      pictures: l2_solver.png shows what the flow solver writes out for
      lambda2, l2_paraview.png shows what calculated with the algorithm
      below.<br>
      <br>
      Calculation of lambda2:<br>
      <br>
    </font><font size="-1"><tt>D = Gradients = [d_ij]</tt><tt><br>
      </tt><tt>S = strain(Vel)</tt><tt><br>
      </tt><tt><br>
      </tt><tt>S     = (D + D^T)/2</tt><tt><br>
      </tt><tt>Omega = (D - D^T)/2</tt><tt><br>
      </tt><tt><br>
      </tt><tt>lambda = EigenValue_of(S^2 + Omega^2) </tt><tt><br>
      </tt><tt>       = EigenValue_of(S^2 + (D - S)^2) </tt><tt><br>
      </tt><tt>       = EigenValue_of(S^2 + (Gradients - strain(vel))^2)
      </tt><tt><br>
      </tt><tt>       </tt><tt><br>
      </tt><tt>lambda2 = lambda_Y</tt><tt><br>
      </tt></font><font size="-1"><br>
      and in ParaView this mean<br>
      <br>
    </font><font size="-1"><tt>o Vector of velocity with
        "Calculator".................: Vel =
        iHat*x_velocity+jHat*y_<wbr>velocity+kHat*z_velocity</tt><tt><br>
      </tt><tt>o Gradients of Vel with "<wbr>GradientOfUnstructuredDataSet"<wbr>:
        switch on "compute gradient" and name it "Gradients"</tt><tt><br>
      </tt><tt>o Calculate lambda with "PythonCalculator"............<wbr>.:
        lambda = eigenvalue(strain(Vel)**2+(<wbr>Gradients - strain(Vel))**2)</tt><tt><br>
      </tt><tt>o Caluclate lambda2 with Calculator....................<wbr>:
        lambda2 = lambda_Y</tt><tt><br>
      </tt></font><font size="-1"><br>
             <br>
      <br>
      Does anyone see the error why the calculation of lambda2 with
      ParaView does not work?<br>
      <br>
      Remark: i contacted the author of the blog above already - seems
      he never tested his calculation and has no idea what is "wrong".<br>
      <br>
          Stefan<br>
      <br>
    </font> <br>
    <br>
    <tt>==============================<wbr>==============================<wbr>====</tt><tt><br>
    </tt><tt>                              <wbr>                            
            </tt><tt><br>
    </tt><tt>                     _/             <b>Dr. Stefan
        Melber-Wilkending</b></tt><tt><br>
    </tt><tt>                   _/_/                                  
             </tt><tt><br>
    </tt><tt>                 _/  _/             Deutsches Zentrum für
      Luft-  </tt><tt><br>
    </tt><tt>         _/_/_/_/_/_/_/_/_/_/         und Raumfahrt e.V.
      (DLR)   </tt><tt><br>
    </tt><tt>       _/    _/    _/    _/                            <wbr>    
           </tt><tt><br>
    </tt><tt>     _/    _/    _/    _/             German Aerospace
      Center    </tt><tt><br>
    </tt><tt>   _/_/_/_/_/_/_/_/_/_/          <wbr>    Institute of
      Aerodynamics   </tt><tt><br>
    </tt><tt>         _/  _/  _      _               and Flow
      Technology      </tt><tt><br>
    </tt><tt>         _/_/   | \ |  |_|           Transport Aircraft
      Branch   </tt><tt><br>
    </tt><tt>         _/     |_/ |_ |
      \                             <wbr>          </tt><tt><br>
    </tt><tt>                              <wbr>           Lilienthalplatz
      7       </tt><tt><br>
    </tt><tt> Fields of activities:                  38108 Braunschweig</tt><tt> 
           <br>
    </tt><tt>                              <wbr>               Germany</tt><tt>       
           <br>
    </tt><tt> o Numerical Windtunnel Simulation                    <wbr>     
           </tt><tt><br>
    </tt><tt> o Aero-Acoustic Windtunnel Design    Phone : +49
      <a href="tel:(531)%20295-2836" value="+15312952836" target="_blank">531/295-2836</a>   </tt><tt><br>
    </tt><tt> o Numerical Optimization             Fax. .: +49
      <a href="tel:(531)%20295-2914" value="+15312952914" target="_blank">531/295-2914</a>   </tt><tt><br>
    </tt><tt> o Visualization
      Techniques                    <wbr>                  </tt><tt><br>
    </tt><tt> o High-Lift Aerodynamics           Email : <a class="m_6725794015711734747moz-txt-link-abbreviated" href="mailto:Stefan.Melber@DLR.de" target="_blank">Stefan.Melber@DLR.de</a></tt><tt><br>
    </tt><tt> o Glider-Aerodynamics           <wbr>   Web ..: <a class="m_6725794015711734747moz-txt-link-freetext" href="http://www.dlr.de/AS" target="_blank">http://www.dlr.de/AS</a></tt><tt><br>
    </tt>                              <wbr>                              <wbr>                              <wbr>                     
    <br>
    <tt>==============================<wbr>==============================<wbr>====</tt><tt><br>
    </tt><br>
  </div>

<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>