$29
Objective
The topic of this assignment is vector feld / fow visualization. You will study a delta wing dataset and visualize the velocity information using vector feld visualization techniques. Your task will be to show the major fow structures present in the dataset (primary and secondary vortices and recirculation bubble on each side of the wing). In addition, you will visualize the spatial relationship that exists between the velocity (vector) feld and the pressure (scalar) feld. Refer to the corresponding instructions below.
Task 1: Glyphs [20%]
Your frst task consists in using cutting planes to probe the vector values. Specifcally, you will create a plane orthogonal to the X axis of the volume (the main axis of the wing) and sample the velocity vector feld on that plane. You will need to follow an approach similar to what is demonstrated in ProbeCombustor.py for that purpose. To represent individual vectors as arrows, you will use vtkArrowSource as the source of a vtkGlyph3D flter. Use 3 plane at 3 diferent locations along the X axis (with normal pointing along the X direction) to capture the structures mentioned above. Show the delta wing geometry in each image for context (the corresponding geometry is provided as vtkUnstructuredGrid in a separate fle).
Deliverables: Create an executable named three_planes.py that contains the (hardcoded) information needed to visualize the vector glyphs on the 3 planes that you have selected. Your executable should receive the names of two fles from the command line, namely the CFD fle containing the vector feld information and the fle containing the geometry of the delta wing.
> python three_planes.py <vfem.vtu> <wing.vtu>
Report: Explain in the report how you selected the planes used in your implementation and comment on the properties of the fow that you can discern in your visualization. Include pictures showing each cutting plane
https://www.cs.purdue.edu/homes/cs530/projects/project4.html 1/3
10/16/21, 10:24 PM Programming Assignment 4 - Flow Visualization
individually (along with the associated glyphs) as well as other images showing all planes and the wing together.
Task 2: Streamlines, Stream Tubes and Stream Surfaces [40%]
Task 1 should provide you with a general sense of the location of interesting structures in the fow volume. Your second task now consists in using streamlines, stream tubes and stream surfaces as demonstrated in officeTubes.py and streamSurface.py to show how the fow swirls around the vortices present in the data.
Deliverables: You will construct 3 visualizations for this task.
A frst executable showing a large number (between 50 and 200) of streamlines.
A second executable showing a small number of stream tubes
A third executable showing a stream surface seeded along an appropriately chosen line segment (aka rake).
In each case, the seeding locations and the other parameters of the technique must be hardcoded in your program. You must choose parameter values that produce good quality results and capture the behavior of the fow around the vortices on each side of the wing. Note that each visualization should represent the velocity magnitude using color coding and the corresponding color scale should be provided for reference. Show the delta wing geometry in each image for context.
• streamlines <vfem.vtu> <wing.vtu>
• streamtubes <vfem.vtu> <wing.vtu>
• streamsurfaces <vfem.vtu> <wing.vtu>
Report: Explain in the report how the seeding locations were chosen for each of these three techniques and how they relate to the observations made in Task 1.
Task 3: Combining Scalar and Vector Visualization [20%]
The scalar and vector information available for this dataset provide two complementary perspectives on the properties of the fow. For the third task of this assignment, you will combine isosurfaces of pressure with streamlines to visualize the relationship between the streamlines’ geometry and the shape of the isosurfaces. Create visualizations in which the streamline seeds and the isovalues of the isosurface are chosen in such a way as to best illustrate the correlation between the two kinds of object.
Deliverables: Create an executable named combined.py that produces a visualization of the CFD dataset, combining isosurfaces of the pressure scalar feld, streamlines of the velocity vector feld, and geometry of the delta wing. The various parameters needed to create the visualization must be hardcoded in the program. Your executable should receive from the command line the names of the fles needed to create the visualization: velocity and pressure dataset (in the same fle), and wing geometry description.
> python combined.py <vfem.vtu> <wing.vtu>
Report: Describe in the report the things you tried before arriving at the proposed solution and explain why your fnal selection is a good one. Show the delta wing geometry in each image for context.
Task 4: Analysis [20%]
https://www.cs.purdue.edu/homes/cs530/projects/project4.html 2/3
10/16/21, 10:24 PM Programming Assignment 4 - Flow Visualization
Considering your results in Task 1 and Task 2 of the assignment, comment on the efectiveness of the resulting visualizations for your understanding of this dataset. What were the pros and cons of each technique? Comment on the results you were able to achieve in Task 3 by integrating isosurfacing and vector visualization. Did you fnd this combination benefcial? Provide a justifed answer to each of these questions in the report.
Data Sets
The CFD dataset used in this project is a available as a (fairly) large vtkUnstructuredGrid. The information available corresponds to the velocity (vector feld) and the pressure (a scalar feld). A separate fle describing the geometry of the delta wing is also available (also a vtkUnstructuredGrid). Note that the CFD simulation that produced this dataset used adaptive mesh refnement, which explains the vast discrepancies that exist between the resolution of the mesh next to the wing and further away from it.
3D Flow: Velocity (vector feld), and Pressure (scalar feld) in double precision (vfem.vtu, 170 MB)
Wing geometry (wing.vtu, 1.0 MB )
Submission
Submit your solution for this project on Brightspace before April 1, 2021 at 11:59 pm. Refer to the instructions below.
Include all program fles (three_planes.py, streamlines.py, streamtubes.py, streamsurfaces.py, combined.py) along with any other source code you may have.
Include high resolution sample images showing results for each task.
Include a report summarizing what you have done and answering all the questions asked. As always, the report should include high-resolution images.
Include a README.txt fle with execution instructions (optional).
Include all fles to be submitted in a single directory named <myLogin>_p4, where <myLogin> is your Purdue login.
Do not include binary fle
Do not include data fles
Do not use absolute paths in your code
Use Brightspace for your submission.
Last modifed Thu Mar 25 2021
https://www.cs.purdue.edu/homes/cs530/projects/project4.html 3/3