[Paraview] [EXTERNAL] Re: Make animation from steady state result

Cory Quammen cory.quammen at kitware.com
Fri Jan 19 08:18:18 EST 2018


Andrew,

Responses inlined below:

On Fri, Jan 19, 2018 at 6:27 AM, Andrew Parker via ParaView
<paraview at paraview.org> wrote:
> Dear all,
>
> Sorry to post onto an old thread. I have been reading this thread and the
> related write up here:
> https://www.paraview.org/Wiki/Advanced_Tips_and_Tricks#Animating_a_static_vector_field
>
> This thread (and the tips and tricks post) is really close to what I want to
> do, but I have a few follow-up questions.  I too have a steady-state
> solution field. I want to trace particles from the inlet of my domain to the
> exit, following the steady-state velocity field, and report for each
> particle the temperature-time history (or any other scalar from my
> simulation) that the particle sees.  In additional and crucially, the time
> the particle has within the domain: a residence time.  The residence time
> would be the maximum value or IntegrationTime each particle attains before
> it leaves the domain.
>
> I see that if I follow the notes I can plot (using Glyphs) the temperature
> as it varies across my domain as the particles are animated down the
> streamlines: this is working.  What I do not seem to be able to find
> however, is the IntegrationTime.  It appears as point-field data after the
> streamlines are created, but vanishes after the contour filter is applied.
> I guess the contour filter is computing a singular value for all values of
> the IntegrationTime from T=0 to T=N with a specific level of granularity.

By default, the Contour filter does not copy the scalar field used to
determine the contour surface since it will always be the same value.
You can tell it to copy the scalar field by enabling the Compute
Scalars option.

> However, I can't seem to extract the specific value of IntegrationTime (the
> contour value) when I stop the simulation at any given point.  Do you know
> how to do that?  The "time" scale in the VCR window always goes from 0->1
> not from 0->(max value of IntegrationTime in seconds).  Can the actual value
> of time be backed out or animated? If so how do I do that, or am I applying
> the Contour filter wrongly: as per the post, I am only using the default
> values in the Counter filter panel.

Instead of using the Sequence animation mode, use Real Time. Then, set
the Start Time to the minimum IntegrationTime value and End Time to
the maximum IntegrationTime value. You can see these listed either in
the Information tab of the StreamTracer filter in the Pipeline Browser
or under the Contour filter's Property tab under the Isosurfaces
section (Value Range). To show the current time in the render view,
use an Annotate Time source, available in the Sources menu.

> Finally, and importantly for me, while the Glyphs move across the screen
> following the streamlines, and render via the temperature field, how to I
> actually extract information from this pseudo time series to perform
> analysis?  For example, the min and max temperature seen by a particle as it
> moved across the streamline for instance?  I'm actually hoping to plot
> offline (as a function of IntegrationTime) the min and max temperature
> obtained for each particle: I can then take the min and max of that set for
> the quickest and slowest particles.

You can run the Connectivity filter on the StreamTracer output to
assign a unique value to each streamline. This unique value will be
called RegionId. It starts at 0 and ends at the number of stream lines
minus 1. Selecting each stream line can be done with the Threshold
filter in ParaView using the RegionId as the threshold array, then you
can see the min/max of your temperature and IntegrationTime variables
in the Information tab. Iterating over all stream lines and saving the
min/max of the different scalar fields is possible using ParaView's
Python scripting capabilities. However, you may find it faster to
export the data to a tool with which you are more familiar.

To do that, I would suggest saving the Connectivity filter output to a
.csv file. The CSV file will contain all the scalar fields in
different columns, including the aforementioned RegionId field. Simply
filter on the RegionId field using your favorite software/plotting
tool to find the min and max temperature and max IntegrationTime of
the particle along the stream line.

HTH,
Cory


> Using the latest stock version of paraview.
>
> Cheers,
> Andy
>
> On 6 June 2014 at 20:30, Scott, W Alan <wascott at sandia.gov> wrote:
>>
>> Ken and Jean, excellent idea!  I liked it so much that I wrote it up in
>> the SNL ParaView tutorials, tips and tricks page.  It is located here:
>> http://www.paraview.org/Wiki/Advanced_Tips_and_Tricks
>>
>>
>>
>> Alan
>>
>>
>>
>> From: ParaView [mailto:paraview-bounces at paraview.org] On Behalf Of
>> Moreland, Kenneth
>> Sent: Friday, June 06, 2014 11:43 AM
>> To: David E DeMarle; minh hien
>> Cc: paraview at paraview.org
>>
>>
>> Subject: [EXTERNAL] Re: [Paraview] Make animation from steady state result
>>
>>
>>
>> Here's a more expanded list of steps outlining the solution David gave in
>> case you are not very familiar with the contour filter and animation
>> controls in ParaView.
>>
>>
>>
>> 1. Create the streamlines as you normally would.
>>
>>
>>
>> 2. Add a Contour filter to the streamline (third toolbar, second button
>> from the left).
>>
>> 2.a. Change the Contour By property to IntegrationTime.
>>
>> 2.b. Press Apply.
>>
>> This little trick will create a point on each streamline at a particular
>> time in the particle advection simulation that created the streamlines.
>>
>>
>>
>> 3. Open the Animation View (View -> Animation View)
>>
>> 3.a. On the bottom row, select the contour filter in the first chooser box
>> and Isosurfaces in the second chooser box. Then hit the blue plus button at
>> the left.
>>
>> 3.b. Make sure Mode is set to Sequence and change No. Frames to 100.
>>
>> 3.c. Hit the play button in the VCR controls (green triangle in the top
>> toolbar). You will see the dots animate over the streamlines.
>>
>> 3.d. You can adjust the speed of the animation by changing the No. Frames.
>>
>>
>>
>> 4. If you want to see glyphs instead of dots, just add the glyph filter to
>> the output of the contour filter.
>>
>>
>>
>> BTW, props to Jean Favre for originally posting this solution to the
>> ParaView mailing list (http://markmail.org/message/ms57z7jjubh2pzjg).
>>
>>
>>
>> -Ken
>>
>>
>>
>> From: David E DeMarle <dave.demarle at kitware.com>
>> Date: Thursday, June 5, 2014 8:07 AM
>> To: minh hien <minh.cfd at gmail.com>
>> Cc: "paraview at paraview.org" <paraview at paraview.org>
>> Subject: [EXTERNAL] Re: [Paraview] Make animation from steady state result
>>
>>
>>
>> Make an isocontour of the streamlines' integrationTime variable.
>>
>> Then in animation view, make a track for the isocontour value.
>>
>>
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909
>>
>>
>>
>> On Thu, Jun 5, 2014 at 9:52 AM, minh hien <minh.cfd at gmail.com> wrote:
>>
>> Hi all,
>>
>>
>>
>> I got steady state solution for my problem. After plotting streamlines at
>> steady state, I would like to make animation showing moving of spheres
>> (resulted from Glyph filter) on the streamlines, the spheres' velocity
>> should be defined by the flow velocity. How can I make this?
>>
>> Any suggestion would be very much appreciated.
>>
>>
>>
>> Thank you in advance.
>>
>>
>>
>> Minh
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://paraview.org/mailman/listinfo/paraview
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.


More information about the ParaView mailing list