<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>David,<br><br>If you are using the filter called Calculator, there is no gradient nor transpose functions in it. The only functions you can use are the ones you can click on the little buttons in the GUI (you can type them instead of clicking, but those are the only ones available). So you must use the ComputeDerivative filter before the Calculator because you won't get the gradient any other way. <br><br>Additionally, keep in mind that velocity is a vector and so the vector gradient of velocity will be a tensor output. It will have variable names like VectorGradient_0 through VectorGradient_8 when used inside the calculator. Only the scalar components are available, it doesn't work like a matrix in the Calculator filter. <br><br>If you want to compute the strain (what I think your S is), you should use the ComputeDerivatives filter and set the "Vectors" to your velocity vector, set the  "Output Tensor Type" to "Strain" and since you are after lambda_2, you should set the "Output Vector Type" to "Vorticity".<br><br>Once this is done, you will have cell-data fields for strain and for vorticity. You probably want to do a CellDataToPointData filter to get this back to node-centered data (which is required if you want iso-surfaces). Once that is done, in your Calculator filter, you now have access to scalars called Strain_0 through Strain_8 and Vorticity_X, Vorticity_Y and Vorticity_Z. <br><br>Strain_0 is S_xx, Strain_1 is S_xy, Strain_2 is S_xz, Strain_3 is S_yx... through to Strain_8 = S_zz. <br><br>With all of those individual components, your Calculator filter for Lambda_2 will just be a bunch of products and sums of those terms. <br><br>Tim<br><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"David Larsson" <david.larsson@sth.kth.se><br><b>To: </b>"Tim Gallagher" <tim.gallagher@gatech.edu><br><b>Cc: </b>paraview@paraview.org<br><b>Sent: </b>Tuesday, December 8, 2015 6:30:28 AM<br><b>Subject: </b>SV: [Paraview] Velocity field analysis - lambda2<br><br>


<style style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin:0}p
        {margin:0}p
        {margin-top:0;
        margin-bottom:0}--></style>


<p><font size="2">Hi Tim, </font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">thanks for your answer. Your method sound straight-forward. The only issue I have now is that I'm simply not sure how to control the Calculator of paraview. Following your steps, I want to set e.g.:</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">'Result Array Name': S_squared</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">and then compute using the calculator something like</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">(gradient(velocity) + transpose(gradient(velocity)))^2/2</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">but this gives me a calculator error ('Syntax Error: expecting a variable name'). So I assume I'm simply using the calculator the wrong way (giving input in an incorrect manor).</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Could you specify how you give input to the calculator following your outlined steps? Also, do you know the difference between the 'ComputeDerivative' and 'Gradient' is?</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Thanks again for the help,</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">/David<br>
</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2"></font><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><a id="NoLP" href="https://webmail.kth.se/owa/redir.aspx?C=IxWYxXymHES_fQvc4qU3B9BOtBARstEIlfcjHJ6nx0MeBY57EwkoSX2SdYQPib-GqeXHouLYnDA.&URL=mailto%3adavid.larsson%40sth.kth.se" target="_blank"><font size="2"><br>
</font></a></span></font></p>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px"><span lang="sv"></span></div>
</div>
<div style="color: rgb(33, 33, 33);">
<hr style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Från:</b> Tim Gallagher <tim.gallagher@gatech.edu><br>
<b>Skickat:</b> den 7 december 2015 23:16<br>
<b>Till:</b> tim gallagher<br>
<b>Kopia:</b> paraview@paraview.org; David Larsson<br>
<b>Ämne:</b> Re: [Paraview] Velocity field analysis - lambda2</font>
<div> </div>
</div>
<div>
<div style="font-family:times new roman,new york,times,serif; font-size:12pt; color:#000000">
For the sake of people years later who come across this thread, there is a typo in my definition and it should be:
<br>
<br>
lambda_2 = S_ik S_kj + \Omega_ik \Omega_kj<br>
<br>
Tim<br>
<br>
<hr id="zwchr">
<div style="color:#000; font-weight:normal; font-style:normal; text-decoration:none; font-family:Helvetica,Arial,sans-serif; font-size:12pt">
<b>From: </b>"Tim Gallagher" <tim.gallagher@gatech.edu><br>
<b>To: </b>"David Larsson" <david.larsson@sth.kth.se><br>
<b>Cc: </b>paraview@paraview.org<br>
<b>Sent: </b>Monday, December 7, 2015 5:11:30 PM<br>
<b>Subject: </b>Re: [Paraview] Velocity field analysis - lambda2<br>
<br>
<style>
<!--
p
        {margin:0}
-->
</style>
<div style="font-family:times new roman,new york,times,serif; font-size:12pt; color:#000000">
David,<br>
<br>
I haven't taken on lambda-2 yet, but I have been able to build a pipeline for Q-Criterion. It looks something like:<br>
<br>
Data -> CellDataToPointData (if it isn't already point data) -> ComputeDerivatives (set the gradient option to vorticity and the tensor option to strain) -> CellDataToPointData -> Calculator (compute |S|^2) -> Calculator (compute |\Omega|^2) -> Calculator (compute
 Q-criterion)<br>
<br>
Since lambda_2 = S_ik S_ij + \Omega_ik \Omega_kj, you can use the same procedure and use just the standard calculators if you want to expand the Einstein summation and plug them all.
<br>
<br>
Once I've done this, I save the set of 3 calculators as a custom filter. When I use pvpython, I load my custom filter in the server manager and then use the CD2PD and ComputeDerivatives filters as needed. The python calculator might be a better way to do it,
 but I haven't tried that yet.<br>
<br>
Tim<br>
<br>
<hr id="zwchr">
<div style="color:#000; font-weight:normal; font-style:normal; text-decoration:none; font-family:Helvetica,Arial,sans-serif; font-size:12pt">
<b>From: </b>"David Larsson" <david.larsson@sth.kth.se><br>
<b>To: </b>paraview@paraview.org<br>
<b>Sent: </b>Monday, December 7, 2015 4:11:39 PM<br>
<b>Subject: </b>[Paraview] Velocity field analysis - lambda2<br>
<br>
<style style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<p><font size="2">Dear all, </font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">I'm working with velocity vector fields over multiple time steps. I would like to compute a number of entities for the velocity field - most importantly the lambda2-scalar, but being relatively new to paraview I'm not really sure how to do
 that.</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">I can do some simple modifications using the calculator but can't really find my way to grad() or curl() etc. I guess the solution is going over to pvpython (which would also be preferred with regards to doing automated analysis).</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Does anyone have any experience with performing numerical analysis of vector velocity fields in pvpython that could give some hints on how to get started? Or does anyone even have performed lambda2-analysis on such?
</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">I've seen some similar questions in the mail-list from before but can't seem to find a conclusive answer, so I thought I'd give it a try myself.</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">Thanks for the help.</font></p>
<p><br>
<font size="2"></font></p>
<p><font size="2">/David<br>
</font></p>
<p><br>
<font size="2"></font></p>
<p><br>
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><a id="NoLP" href="https://webmail.kth.se/owa/redir.aspx?C=IxWYxXymHES_fQvc4qU3B9BOtBARstEIlfcjHJ6nx0MeBY57EwkoSX2SdYQPib-GqeXHouLYnDA.&URL=mailto%3adavid.larsson%40sth.kth.se" target="_blank"><font size="2"><span style="font-size:10pt"></span></font></a></span></font></p>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px"><span lang="sv"></span></div>
</div>
<br>
_______________________________________________<br>
Powered by www.kitware.com<br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView<br>
<br>
Search the list archives at: http://markmail.org/search/?q=ParaView<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://public.kitware.com/mailman/listinfo/paraview<br>
</div>
<br>
</div>
<br>
_______________________________________________<br>
Powered by www.kitware.com<br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView<br>
<br>
Search the list archives at: http://markmail.org/search/?q=ParaView<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://public.kitware.com/mailman/listinfo/paraview<br>
</div>
<br>
</div>
</div>
</div>


</div><br></div></body></html>