Finally start Gmsh with:
gmsh mand.msh
The results then are displayed:
Unfortunately, this result, just like the man.msh
file, is not visually helpful. Therefore, we will be using VisIt once again to visualise more interesting parts of this simulation:
Extended Analysis
To be able to actually see what is happening, we will need to use a more powerful post-processor. In this case, we will be using VisIt.
We will not explain in detail how to use this program, but if you want to know more, please refer to the VisIt Users Page or the VisIt FAQ.
Start VisIt and you will see 2 windows: the main VisIt window, and “Window 1”.
Window 1 will only be used to plot the necessary information, and only contains actions regarding the view. Anything else should be searched for in the main window.
- Click on Open under “Sources” and select
mand.vtk
. At this moment, still nothing is visible. To visualise anything we will need to add plots: - Click on Add under “Plots” and select the following:
- Pseudocolor
- npressure
(Intermezzo: The difference between npressure and pressure (or n* vs *) is that npressure is the result as calculated on the nodes, which results in a smoother plot because the values in the cell will be interpolated, instead of having all the same color)
At this moment, if “drawn”, the view would be similar to that of what we saw in Gmsh. We still need to only plot the man. To this extent we will filter out all other objects:
- Click on Operators under “Plots” and select the following:
- Selection
- Threshold
- Click on the arrow next to pseudocolor to reveal Threshold.
- Double click on Threshold attribute and do the following:
- Delete selected variable
- Add variable > Scalars > type_id
- Edit both the lower and upper bounds to 4 (this selects only the man)
- Click Apply
- Click Dismiss
(Tip: To check which type_id you need to select, you can first visualize the type_id using pseudocolor, double click it, and add some transparency using a lower “fixed opacity” value. This way you will be able to see which one to show)
- Click “Draw” to visualise the current selection. You should be seeing something similar to below picture
(Tip: click on Controls > Annotations . . . to edit what the visualisation window looks like)Now, to add some information about the velocity of wind around the man, we will add a plot of particle paths that move through a region of interest:
- Click on Add under “Plots” and select the following:
- Pseudocolor
- operators
- IntegralCurve
- nvelocity
- Click on the arrow next to the operators/IntegralCurve/nvelocity to reveal IntegralCurve.
- Double click on IntegralCurve attribute and do the following:
- Change the Source Type to Sphere
Note > This is the region of interest we were talking about - Place it directly behind the man
- Origin:
0 0.5 -0.5
- Radius:
0.25
- Origin:
- Change the Sampling Type to “Random” and select 100 for the Number of random samples
- Change Sampling along to “Boundary”
- Change Integration direction to “both” such to show the origin of the plotted particle
- Reduce both the Relative and the Absolute tolerances to 1e-08
- Click to the second tab “Appearance”
- Change Data value to “Speed”
This should be enough to generate the desired output - Click Apply
- Dismiss any Warning
- Click Dismiss
- Change the Source Type to Sphere
- Click “Draw” to visualise the current selection. You should be seeing something similar to below picture
Some more tips for VisIt
Cross Section
To make a cross section, use the above knowledge to add a pseudocolor plot nvelmag, a threshold operator for type_id 1 (the volume) and finally a slice operator orthogonal to the X-axis, through point 0 0 0
.
Then, changing the pseudocolor attributes and reducing the limits to 0-1
, and changing the color table, the result should look somewhat like this:
Difference n* and * results
Dolfyn generates multiple output elements, depending on the input file. In this case we used:
post P vert
post UVW vert
Which saves the nodal data as well as the cell-data. Using these data in the plots will make VisIt interpolate the values within the cell, instead of plotting the cell value in the entire cell.
The difference is shown below:
Using cell values (without prefix n*)
Using nodal values (with prefix n*)
Scripting
To make your life easier, VisIt alows you to script. This makes it possible to generate the views you want, without clicking through menus time after time.
To get you started, click on Controls > Commands . . .
In this menu, you can record and execute commands.