Integrating plane data in Paraview

From ScorecWiki

Jump to: navigation, search

NOTE: This tutorial was written using Paraview 3.2.1 and 3.4.0 (in AcuConsole). Different versions may not contain the same filters as required for this analysis.

Contents


Before Starting

Before starting this process, you will need to get some information about your model. Decide where you want your plane and figure out the bounding dimensions. Decide how many points you will want to sample from. You should start small and increase the number of sampling points until there is a minimal change in results.

Generating Sampling Points

When you have decided where to put your plane and how many points to start with, you should generate a file of sampling points that you will load into Paraview. A couple of useful Matlab M files to start with would be:

/users/bwright/StruGridGen/strugridgen.m

this file generates a set of points for 2 square planes which can be at an angle to the x-y axis. Another possible file for generation is:

/bigtmp/osahni/FlowControl/AFOSR/geometry5_perpendicularjet/grid_data/gen_grid_points.m

These files should be used as examples of how to generate points for your plane. Each problem is different, so you will have to tailor these to your own problem (or make your own).

Header

Once you have your points in a file (.dat in the example scripts), you need to copy the following header to the top (with the appropriate values):

# vtk DataFile Version 4.2
Coordinates for probes\n
ASCII
DATASET STRUCTURED_GRID
DIMENSIONS Dim1 Dim2 1
POINTS NumPts float

Dim1 and Dim2 are the number of points (or rows/columns of points) in each dimension. The 1 is for the third dimension, which for our application (a plane) is 1. NumPts is the number of points in the entire grid (Dim1*Dim2). Now with your header in place, rename the file to a .vtk. You're now done with the sampling point generation.

Importing into Paraview

For additional help with Paraview, see Using ParaView.

  • Open and apply your .pht file (or .Log file for AcuConsole) containing your solution data.
  • It can be useful for viewing purposes to Extract Surfaces and use Clip planes to remove outer walls obstructing your vision to the inside region.
  • Open the .vtk file in the same way that you would open your .pht file and apply it. (If you extracted surfaces and clipped to remove the outer walls) You should see the plane defined by your points. If not, check that your points are generated correctly and that your header is correct.
  • Create a Slice co-planar to your structured grid plane with your input file (.pht) as the input. To do this, enter the same normal as your structured plane and one point from your grid. These planes should appear co-planar in the visualization window.
  • Go to the filter "Resample with dataset". For Input, select the Slice plane and for Source select the .vtk structured grid plane.
  • With the Resample with dataset selected as the input file, apply the Integrate Variables filter. A window should appear with the integrated values of all of your solution variables.
Personal tools