<div dir="ltr">Hi,<div><br></div><div>The best way to do this would be in a programmable filter. I'm guessing numpy has some method to compute eigenvalues for non-symmetric matrices. Beyond that adding the capability to the Python calculator or some other filter would be needed.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 13, 2017 at 3:35 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">
    <div class="m_5477797258878518425moz-cite-prefix">Hi Andy,<br>
      <br>
      i think i found the reason: i need the computation of
      (unsymmetrical) eigenvalues for lambda2 - however it seems that
      the function "eingenvalue" calculates only symmetric ones (see
<a class="m_5477797258878518425moz-txt-link-freetext" href="https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.vtk.numpy_interface.algorithms.html" target="_blank">https://www.paraview.org/<wbr>ParaView/Doc/Nightly/www/py-<wbr>doc/paraview.vtk.numpy_<wbr>interface.algorithms.html</a>).
      How can i calculate the unsymmetric ones with ParaView?<br>
      <br>
      Best regards,<br>
      <br>
           Stefan<br>
      <br>
      <br>
    </div>
    <blockquote type="cite">
      
      <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">
            <div> Hi,<br>
              <br>
              <br>
              for vortex-detection i (tried) to calculate the
              lambda2-criterion (see e.g. <a class="m_5477797258878518425m_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_5477797258878518425m_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/2<wbr>016/01/24/using-paraview-to-vi<wbr>sualise-vorticity-lambda2-vort<wbr>icity-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>
              <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><br>
              and in ParaView this mean<br>
              <br>
              <tt>o Vector of velocity with
                "Calculator".................: Vel =
                iHat*x_velocity+jHat*y_velocit<wbr>y+kHat*z_velocity</tt><tt><br>
              </tt><tt>o Gradients of Vel with "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+(Gra<wbr>dients -
                strain(Vel))**2)</tt><tt><br>
              </tt><tt>o Caluclate lambda2 with
                Calculator....................<wbr>: lambda2 = lambda_Y</tt><tt><br>
              </tt><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>
              <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:%28531%29%20295-2836" value="+15312952836" target="_blank">531/295-2836</a>  
              </tt><tt><br>
              </tt><tt> o Numerical Optimization             Fax. .: +49
                <a href="tel:%28531%29%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_5477797258878518425m_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_5477797258878518425m_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/opensou<wbr>rce/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/ParaV<wbr>iew</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/mail<wbr>man/listinfo/paraview</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <p><br>
    </p>
  </div>

</blockquote></div><br></div>