Visualize Velocity Vectors in FreeCAD CFD
Visualizing velocity vector fields from a FreeCAD Computational Fluid Dynamics (CFD) simulation allows you to clearly inspect flow patterns, recirculation zones, and velocity gradients across your model. This guide explains how to extract, configure, and display velocity vectors using FreeCAD's CfdOF workbench and its integrated ParaView post-processing pipeline.
Step 1: Open the Simulation Results in ParaView
While FreeCAD's CfdOF workbench handles geometry, meshing, and solver execution via OpenFOAM, detailed vector visualization is best performed in ParaView.
- Once your solver run finishes successfully in FreeCAD, select your CfdAnalysis container in the tree view.
- Click the ParaView button in the CfdOF workbench
toolbar (or open the generated
.foamfile located in your simulation working directory directly inside ParaView). - In ParaView's Pipeline Browser, select the loaded case file.
- In the Properties panel under Cell Arrays and Point Arrays, ensure the velocity field U is checked.
- Click Apply.
Step 2: Extract an Internal Slice (Optional but Recommended)
If your simulation is 3D, plotting vectors across the entire volume can obscure your view. Slicing the domain provides a clean 2D plane for vector display.
- Highlight the case file in the Pipeline Browser.
- Click the Slice filter icon from the top toolbar.
- In the Properties panel, choose the plane orientation (X, Y, or Z Normal) and position it across your region of interest.
- Click Apply.
Step 3: Apply the Glyph Filter
Vectors in ParaView are rendered using the Glyph filter, which maps 3D arrows onto data points.
- Select your dataset (either the main case or the Slice you created) in the Pipeline Browser.
- Go to Filters > Common > Glyph, or click the Glyph icon on the toolbar.
- In the Properties tab, configure the following
settings:
- Orientation Array: Set to
U(Velocity). - Glyph Type: Set to
Arrow. - Scale Array: Set to
Uto make arrow lengths proportional to speed, or selectNo scale arrayfor uniform arrow sizes. - Vector Logic: Ensure it is set to
DirectionorVelocity.
- Orientation Array: Set to
Step 4: Adjust Vector Density and Sizing
Overcrowded vectors make the flow field unreadable. Use the distribution settings to optimize clarity:
- Locate the Masking section in the Glyph properties.
- Change Glyph Mode to
Every Nth PointorUniform Spatial Distribution. - Adjust the Stride or Maximum Number of Points until the arrows are well-spaced and distinct.
- Under the Scale settings, adjust the Scale Factor slider to increase or decrease the physical size of the arrows.
- Click Apply to generate the vector field.
Step 5: Color the Vectors by Velocity Magnitude
- With the Glyph object selected in the Pipeline Browser, locate the active variable dropdown menu in the top toolbar.
- Change the variable from solid color to U.
- Choose the component Magnitude to display a color gradient from minimum to maximum velocity.
- Toggle the color legend button to display the velocity scale bar on your viewport.