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
Slice1to the off state (closed eye).Click the
ico.foamitem to select it.
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 (
) to the off state.
Create the streamline filter by clicking the “Stream Tracer” tool button (
) or using the 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:
Set the Point1 fields to
0.00.00.1.Set the Point2 fields to
0.00.50.2.Just below the Line Parameters subsection, set the Resolution field to
40.You can also uncheck the Show Line box.
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
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.
5. Enable Automatic Changes
Before leaving your work, be sure to re-enable the “Apply Changes Automatically” button ( ). (Otherwise, you will need to click the Apply when you make other changes like importing geometry files.)