[Paraview] How do you "see" FieldData

Moreland, Kenneth kmorel at sandia.gov
Fri Mar 24 14:35:07 EDT 2017


The Exodus II file format has the concept of "global data." When this is read into ParaView/VTK, it gets placed into what vtkDataSet calls the "field data." Because of this, I tend to use the two interchangeably (and likewise so does the ParaView GUI). Personally, I prefer the term "global data" as it is more descriptive.

Arrays in global/field data can be whatever you want and whatever size you want. For example, someone might want to record the total volume of the data set. That could reasonably be stored in the global/field data. Another example might be that someone wants to record the time at which a particular event occurs. This could be stored in the global/field data as an array of marked time indices. As you can see, global/field data can mean pretty much whatever you want it to mean, so you can't do much with it unless you understand the semantics. Consequently, global/field data is mostly ignored by ParaView.

One thing that we have encountered with simulations at Sandia is that the simulation might track some global information, such as the mean of a field, and append that value to an array in the global data every time a timestep is written out. Thus, you end up with a global/field data array of length equal to the number of timesteps. The Plot Global Data Over Time filter addresses this use case and only this use case.

If you want to compute a value and then plot how that value changes over time, your best approach is to write that value out to a table and then use Plot Selection Over Time to plot the value.

-Ken

From: Scott, W Alan
Sent: Friday, March 24, 2017 12:17 PM
To: Moreland, Kenneth <kmorel at sandia.gov>; paraview at paraview.org
Subject: RE: [Paraview] How do you "see" FieldData

OK, looking at your reply, I think I have a fundamental misunderstanding, and have been mixing up terms.  What is a "global data" and "field data"?  What's the difference?

I think you are saying that if we have 43 timesteps (can.exo), any global arrays will have 43 entries (such as time or atmospheric pressure).  However, field data will have a single entry (such as Title)?  Below, you are setting - and resetting - the field data over and over again?

Alan

From: Moreland, Kenneth
Sent: Thursday, March 23, 2017 4:00 PM
To: Scott, W Alan <wascott at sandia.gov<mailto:wascott at sandia.gov>>; paraview at paraview.org<mailto:paraview at paraview.org>
Subject: RE: [Paraview] How do you "see" FieldData

I don't think Plot Global Variables Over Time works the way you think it does. This filter assumes that the global arrays contain a static array the same size as the number of time steps and then plots that with the time array on the x axis and the entries in this array in the y axis. If the size of the global variable does not equal the number of time steps, the view will show nothing.

I think you really want to use Plot Selection Over Time. That you can give a value and it will iterate the pipeline over time and compute the value for each time step. Unfortunately, it looks like the filter is broken for selections on field data. It works, however, on table data, so you can write the result as that.

I got what I think you want using the can data set. Here are the steps I used:

1. Load can.ex2. All variables. Apply.
2. Add the Programmable Filter. Set the output type to vtkTable (!) and use the following script:
disp_y = inputs[0].PointData["DISPL"][:,1]
mean_disp = mean(disp_y)
output.RowData.append(mean_disp, "MEAN_DISP")
3. Select the single row shown in the spreadsheet that pops up.
4. Add Plot Selection Over Time filter. Apply.

-Ken

From: ParaView [mailto:paraview-bounces at paraview.org] On Behalf Of Scott, W Alan
Sent: Thursday, March 23, 2017 3:06 PM
To: paraview at paraview.org<mailto:paraview at paraview.org>
Subject: [EXTERNAL] [Paraview] How do you "see" FieldData

>From a user:




How do you "see" FieldData variables created in the ProgrammableFilter in the PlotGlobalVariablesOverTime filter?  I'm creating a FieldData variable in the ProgrammableFilter.  Now I'd like to plot it over time.  It isn't available as an option for me to plot, though.  I see other global variables, just not this one.



disp_y = inputs[0].PointData["displ_"][:,1]



mean_disp = mean(disp_y)



output.FieldData.append(mean_disp, "MEAN_DISP")





Am I doing something wrong here?

Thanks,

Alan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170324/9de8c8e9/attachment.html>


More information about the ParaView mailing list