The Climate Data Analysis Tools (CDAT) project leverages ParaView with other open-source tools to enable analysts to track, monitor, and predict. Tutorial practice files here: VTK file format information for those. Install ParaView from Ubuntu repositories. Installing ParaView with the command. Sudo apt-get install paraview. Results in an earlier version (5.01.) of ParaView.
Paraview Download
Overview
This article is intended to serve as an overview for creating slices from 3Ddata in ParaView.
For the purposes of this article, we will be using Paraview 5.4.1.
For installation instructions, please see the guide forCPU-based rendering orGPU-based rendering.
For help running ParaView scripts, please see thebatch-execution instructions.
Manual Instructions
Before beginning, load your 3D data with whatever loader is appropriate foryour use case. In this example, we’ve loaded the motorbike tutorial fromOpenFOAM. To load an OpenFOAM case to ParaView, create a file called run.foam
in the case directory.
1) With your data proxy selected in the pipeline browser on the left, clickthe “Slice” button on the “Common” toolbar at the top, or go toFilters >> Common >> Slice
in the top menu.
2) Next, in the “Properties” tab for the Slice object, define your Originpoint and Normal vector. Then hit “Apply”.
3) Finally, set your camera view and slice representation.
Scripted Instructions
To create a slice in ParaView, first import the necessary module.
Loading the Data
In this guide, we’ll use the motorbike tutorial from OpenFOAM, as we did in themanual tutorial above. Your use-case may require a different procedure.
To create the slice, you’ll need to first begin with a 3D dataset in yourPipeline Browser.
Loading this case can be done with:
Where case.MeshRegions
corresponds to the “Mesh Regions” selection you madein the “Properties” tab when loading the case manually, and case.CellArrays
corresponds to the manual selection for “Cell Arrays”.
In this case, “internalMesh” is the 3D fluid data, and we are only interestedin loading our velocity and pressure fields.
We’ll also create a RenderView window to display our slice, and set itsresolution.
Creating the Slice
Paraview Dxf
To create the slice, first create the data object.
Additionally, set the origin point and normal vector for the slice.
Finally, show the data in your view and update the view.
At this point, you can adjust the properties of your slice_display
objectto set its representation, adjust the legend, etc.
Note that you may need to hide the 3D data that the slice was created from, incase it was already displayed. This can be done with:
Similarly, if you have an active source that’s highlighted in the view, andwish to turn it off for screenshot capture, you can use:
Paraview.com
GoalsThis tutorial is intended to be a hands-on resource for users interested in learning the basic concepts of ParaView. The examples can easily be run on a laptop, using the example data set provided.
| |
DataThe data used for this tutorial is:
| The data is available for download here (~27MB compressed, ~39MB uncompressed): |
Load Multi-component Dataset
| With all of the default settings, you should see something like this: |
Select which data to viewLet's start by looking at the continuum.000** data. This is an unstructured mesh that has velocity and count (density) values.
| |
Manipulating the Color MapTo change the colors used to represent the Velocity:
| |
Data RepresentationIn order to be able to see the particles and red blood cells inside the cylinder, we need to be able to see through it. If we scroll down a bit in the Object Inspector view:
| |
Generate Streamlines
| |
Streamlines as TubesThe streamlines are just that, lines. We can use the Tubes filter to represent them as 3D objects, rather than just lines.
| |
Cutting Planes (Slices)Now let's add some cutting plans, or slices, to see what the cross-section of the continuum data looks like.
| |
Data Representation: OpacityEven with the continuum data represented as wireframe, there is still considerable occlusion of the interior structures. In order to further reduce this occlusion by the wireframe, we can make it more transparent.
| |
Animating Simulation DataSince our data has multiple time steps, we can easily animate through them to see how the data changes over time.
| |
AnimationsAnimations can be saved to disk as a movie file, to be played back later.
| |
Particles as GlyphsGlyphs are another way of visually representing data where the attributes of a graphical element are dictated by attributes of the data. All of the particles are displayed as red points in the graphics window. There are ~39K particles in this particular data set, which makes the display a bit cluttered. In order to both filter some of these out, and create 3D representations for them, let's apply a glyph filter to this data. Now let's add some of our other data back into the scene. Let's start with the particle data. All of the particles are displayed as red points in the graphics window. There are ~39K particles in this particular data set, which makes the display rather cluttered. In order to both filter some of these out, and create 3D representations for them, we will apply the glyph filter to this data. Notice that the particles.000* is still visible.
| |
Enter: Red Blood CellsNow let's add in both of the other data sets, which are polygonal meshes which make up Red Blood Cells (RBCs). These two data sets are essentially the same kind of data, so we can apply the same filters and make the same types of representation changes to each of them. However, some of the RBCs are marked by the simulation that generated them as healthy (rbc.000*) and some of them are marked as diseased (bad_rbc.000*).
| |
Using Color to Differentiate DataTo enable us to distinguish these two types of data from one other, we can vary their representations. One way to do this is by setting the color of the two data sets to different colors. Repeat this process for each of rbc.000* and bad_rbc.000*, picking different colors.
| |
Further Exploration: Highlight the MeshChange the representation of one of the RBC data sets. In this example, the continuum.000* data is also hidden to reduce confusion with showing multiple overlapping meshes.
| |
Further Exploration: Highlight the VerticesAdd glyphs to illustrate the position of the vertices of one of the RBC data sets.
| |
Further Exploration: Color by VariableTry playing around with the viewing options and representations of the other data objects. Change the:
| |
Background Color
| |
This tutorial was developed with support from National Science Foundation Grant OCI-0904190, and from the Argonne Leadership Computing Facility at Argonne National Laboratory, which is supported by the Office of Science of the U.S. Department of Energy under contract DE-AC02-06CH11357. |