Plotting flow streamlines in Paraview - GeoChemFoam/GeoChemFoam GitHub Wiki
This tutorial will use the results of running the initCase.sh and runCaseFlow.sh scripts in GeoChemFoam Tutorial 01.
-
Run the tutorial 1 scripts and copy the results into a local directory by following steps 1-6 in Tutorial 1.
-
Load the results into Paraview by dragging the Paraview_loader.foam file from your results directory into Paraview. (If it is a big file you may need to wait a minute or two).
-
Uncheck 'Skip Zero Time', and select Case Type 'Decomposed' then press 'Apply' and 'Refresh'. You should now how cell arrays U and p.
- Select 'U' from the dropdown menu.
- Click on the stream tracer button:. Then select 'point cloud' from the stream tracer properties.
- Increase the radius of the sphere until it just barely encapsulates the mesh and then increase the number of point to at least 10,000, (but 50,000+ would be better), then press 'Apply'.
- Paraview will now default to 'p', so reselect 'U' from the dropdown menu as in Step 4. Rescale the data to the visible range by clicking this: . You should now have something that looks like this:
- (optional) Uncheck 'show sphere'. Change the background color to black by searching for background in the properties pane and selecting black.
- (optional) Change the color map to Jet with log scaling. First select the edit color map button if the colormap editor is not already displayed: . Click the 'choose a preset button' in the colormap editor and then select 'Jet' and click Apply. Then check 'Use logscale when mapping data to colors'. You will get an error associated with having zero values in logspace. This is irrelevant and can be ignored.
You can then click the rescale data to custom range button and rescale it to whatever range you wish. The appearance of the legend can be edited with this:
You should now have a figure that looks something like this:
This figure can be exported using File-> Save Screenshot or File-> Save Animation if your simulation has multiple timesteps.