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

2018-02-02 Thread Andrew Parker via ParaView
Cory,

As a follow up.  Can I ask if it would be possible to do all that is
suggested on Scott's page:
https://www.paraview.org/Wiki/Advanced_Tips_and_Tricks#
Animating_a_static_vector_field

Along with all of your additional steps below from your last post (be great
to add these to Scott's page), entirely in pvpython or pvbatch?  I make use
of the anaconda version from here: https://anaconda.org/conda-forge/paraview

Would it be possible do you think to script all of this? I have not tired
it yet I should add just checking for show stoppers before I begin.
Thanks,
Andy

On 19 January 2018 at 13:18, Cory Quammen <cory.quam...@kitware.com> wrote:

> Andrew,
>
> Responses inlined below:
>
> On Fri, Jan 19, 2018 at 6:27 AM, Andrew Parker via ParaView
> <paraview@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 Par

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

2018-01-19 Thread Andrew Parker via ParaView
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.
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.

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.

Using the latest stock version of paraview.

Cheers,
Andy

On 6 June 2014 at 20:30, Scott, W Alan  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-boun...@paraview.org] *On Behalf Of 
> *Moreland,
> Kenneth
> *Sent:* Friday, June 06, 2014 11:43 AM
> *To:* David E DeMarle; minh hien
> *Cc:* paraview@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 
> *Date: *Thursday, June 5, 2014 8:07 AM
> *To: *minh hien 
> *Cc: *"paraview@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 Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909 <(518)%20881-4909>
>
>
>
> On Thu, Jun 5, 2014 at 9:52 AM, minh hien  wrote:
>
> Hi 

[Paraview] Paraview bug found in pvtu files containing polyhedrons

2016-02-29 Thread Andrew Parker via ParaView
Dear All,

I have recently been having problems reading pvtu files in paraview when those 
files contain arbitrary polyhedrons: this is from the output of a large scale 
code that runs in parallel via mpi.  To show the problem, I have written a very 
small sample code, attached, that runs in serial but reproduces the salient 
issues experienced by my larger code when run in parallel.  It is clear, via 
the toggling a boolean, that the problem happens when vtk_polyhedrons types are 
used.  There is a short description at the top of the bug.cxx file, followed by 
instructions.  I use stock versions of paraview here, although self compiled 
ones show no difference.

In short compile the code, run it, and open the pvtu file in paraview.  You 
should see 4 cells.
Switch the “bug” bool to true, recompile, re-run it, and reopen the pvtu file.  
The screen will be blank.  

The only difference is that cells are added to the unstructured grid explicitly 
as vtk_polyhedrons using a face-stream, rather than as hexs.  I cannot do this 
in the real code!  The rest of the code is just there to produce the “serial” 
mesh, and threshold this mesh to produce two “parallel-partition” meshes.  I 
use the new ghost type framework as this is consistent with the real code, and 
this runs and compiles on OS X and gcc.  Likewise it has been build against vtk 
6.3 and the bug manifests itself in paraview 4.4 and 5.0.  Visit 2.10 does not 
have this bug and can correctly open the pvtu containing polyhedrons: this is 
my current workaround.

Can any of the developers shed light on this?  Is a fix known, if so when will 
it be released?  Do others have this problem [1, 2, 3] outside of those long 
reported? Does anyone else have workarounds?

Any help really appreciated, 
Andy

[1] http://public.kitware.com/pipermail/vtkusers/2015-May/090835.html
[2] https://cmake.org/pipermail/paraview/2012-October/026456.html
[3] https://cmake.org/pipermail/paraview/2015-January/032950.html



bug.cxx
Description: Binary data
cmake_minimum_required(VERSION 2.8)

PROJECT(ptvuBug)

set(CMAKE_COLOR_MAKEFILE ON)
   


set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wall -Wconversion 
-Wuninitialized -std=c++11 -Wno-sign-conversion -Werror=ignored-qualifiers 
-Werror=unused-local-typedefs -Werror=return-type -Werror=cast-qual")

find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

ADD_EXECUTABLE(bug bug.cxx)
TARGET_LINK_LIBRARIES(bug ${VTK_LIBRARIES})
 


___
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:
http://public.kitware.com/mailman/listinfo/paraview