Display the Velocity Field

We will again use the ParaView streamline filter to display the velocity field computed by OpenFOAM.

1. Set the Active Representation

Readers familiar with ParaView know that the “active representation” is currently the slice filter we created in the previous page. Before creating a stream filter for velocity, we want to first (i) hide the slice plane, and (ii) set the icoFoam output data as the active representation. To do these, go to the Pipeline Browser view.

  • Click the eyebal next to Slice1 to the off state (closed eye).

  • Click the ico.foam item to select it.

../_images/pipeline-icofoam.png

2. Create the Filter

Use the same steps as before to create the streamline filter.

  • Turn off automatic updates by toggling the “Apply Changes Automatically” button ( auto_apply ) to the off state.

  • Create the streamline filter by clicking the “Stream Tracer” tool button ( stream_tracer ) or using the Filters ‣ Common ‣ Stream Tracer menu item.

  • Click the Apply button at the top of the Properties tab to update the 3D view. It might take several seconds for modelbuilder to be responsive after this, because the default stream tracer settings can use alot of CPU cycles.

3. Set the Line Geometry

In the Properties view, keep the first collapsible section (Properties (StreamTracer1)) open and collapse the other two. Set these properties in the Line Parameters subsection:

  1. Set the Point1 fields to 0.0 0.0 0.1.

  2. Set the Point2 fields to 0.0 0.5 0.2.

  3. Just below the Line Parameters subsection, set the Resolution field to 40.

  4. You can also uncheck the Show Line box.

  5. Click the Apply button to update the 3D view.

4. More Visual Features

4.1 Ahmed Body geometry: Go back to the OpenFoam view (tab), select the Model sub-tab and click the Show Data button near the top of the tab.

4.2 Streamline tubes: To display more aesthetic streamlines:

  • Close the Properties (StreamTracer1) section.

  • Click the advanced button (near the top of the Properties view) to display advanced properties.

  • Expand the Display (GeometryRepresentation) section.

  • Find the Styling subsection.

  • In the Styling subsection, set the Line Width field to 4.

  • In the Styling subsection, check the box next to Render Lines As Tubes.

../_images/ahmedbody-velocity.png

5. Enable Automatic Changes

Before leaving your work, be sure to re-enable the “Apply Changes Automatically” button ( auto_apply ). (Otherwise, you will need to click the Apply when you make other changes like importing geometry files.)