<div dir="ltr">I tried this out with the Wavelet source and it's RTData as the input. You can see what I did by loading the attached state file shlieren.pvsm). I inlined information below on the steps. Note that you can use the Point Data to Cell Data Filter to change to cell data output. Let me know how it goes. If you could share a result, I'd like to see how it comes out!<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 27, 2015 at 2:51 PM, Neal,Christopher R <span dir="ltr"><<a href="mailto:chrisneal@ufl.edu" target="_blank">chrisneal@ufl.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi,</p>
<p><br>
</p>
<p>I would like to compute a numerical schlieren field from a density field in Paraview. The schlieren variable would just be the magnitude of the density gradient computed at each cell center in the data set. I have been able to compute a basic schlieren
dataset by using the Paraview filter "Gradient of Unstructured DataSet". However I would like to do something like the following.</p>
<p><br>
</p>
<p>1.) Compute density gradients.</p>
<p>2.) Compute the magnitude of the gradients.</p></div></div></blockquote><div><br></div><div>I used the Python calculator with the expression "mag(Gradients)" here. The output array was called gradientmagnitude.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif">
<p>3.) Normalize the gradient magnitudes by the maximum value in the domain( so that the new variable goes from 0 to 1 )</p></div></div></blockquote><div><br></div><div>I created another Python Calculator with the expression "gradientmagnitude/max(gradientmagnitude)" and called the output array oldSchlieren. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif">
<p>4.) Store this new data as a new variable called 'Schlieren'<br>
</p>
<p>5.) Take the new schlieren variable and perform a second point-by-point operation on the data.<br>
</p>
<p> NewSchlieren = exp( -k*oldSchlieren) <br></p></div></div></blockquote><div><br></div><div>I used the Calculator filter with the input of "exp(-.5*oldSchlieren)" and named the output newSchlieren. I just used a value of k of 0.5.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif"><p>
</p>
<p><br>
</p>
<p>where k is a constant that I set. This 5th operation just serves to sharpen the lines that are present in the oldSchlieren data set.</p>
<p><br>
</p>
<p>I'm thinking that I need to write some sort of programmable filter. I'm just not sure how I would actually perform point-by-point operations on the data sets.<br>
</p>
<p><br>
</p>
<p>Any guidance on how to read/operate on variables in the data set would be greatly appreciated.
<br>
</p>
<p><br>
</p>
<p>Thanks,</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>
<div name="divtagdefaultwrapper">
<span lang="en-US">
<div style="margin:0px"><font face="Calibri,sans-serif"><span style="font-size:11pt">Christopher R. Neal<span name="searchHitInReadingPane"></span></span></font></div>
<div style="margin:0px"><font face="Calibri,sans-serif"><span style="font-size:11pt">Graduate Student
<br>
Center for Compressible Multiphase Turbulence<br>
</span></font></div>
<div style="margin:0px"><font face="Calibri,sans-serif"><span style="font-size:11pt">Mechanical and Aerospace Engineering Department<br>
</span></font></div>
<div style="margin:0px"><font face="Calibri,sans-serif"><span style="font-size:11pt">University of Florida</span></font></div>
<div style="margin:0px"><font face="Calibri,sans-serif"><span style="font-size:11pt">Cell: <a href="tel:%28863%29-697-1958" value="+18636971958" target="_blank">(863)-697-1958</a></span></font></div>
<div style="margin:0px"><font face="Calibri,sans-serif"><span style="font-size:11pt">E-mail: <a href="mailto:chrisneal@ufl.edu" target="_blank">chrisneal@ufl.edu</a></span></font></div>
</span></div>
</div>
</div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div></div>