The On Ramp/Level 1/Post-Process
In this section we will learn how to set-up the Visualization file which Paraview (Our flow visualization software) reads in, and how to utilise Paraview to analyze our flow field solutions.
Visualization File
In order for Paraview to know which restart and geombc files to process, we need to give it this information by means of a .pht
meta-data file. In the directory where the PHASTA case was run, .../8-1-Chef/Run/
for our example, you will need to create/copy a meta-data file with a .pht
file extension. Common practice is to name this file flow.pht
and to only include the file in your Run
directory when you are ready to launch and work in Paraview. You can copy over an example .pht
file from the tutorials folder called flow.pht
.
A detailed explanation of the variables inside of the .pht
file is provided in this video.
<?xml version="1.0" ?> <PhastaMetaFile number_of_pieces="8"> <GeometryFileNamePattern pattern="8-procs_case/geombc.dat.%d" has_piece_entry="1" has_time_entry="0"/> <FieldFileNamePattern pattern="8-procs_case/restart.%d.%d" has_piece_entry="1" has_time_entry="1"/> <TimeSteps number_of_steps="1" auto_generate_indices="1" start_index="10" increment_index_by="0" start_value="0." increment_value_by="0.5"> </TimeSteps> <Fields number_of_fields="3"> <Field phasta_field_tag="solution" paraview_field_tag="velocity" start_index_in_phasta_array="1" number_of_components="3" data_dependency="0" data_type="double"/> <Field phasta_field_tag="solution" paraview_field_tag="pressure" start_index_in_phasta_array="0" number_of_components="1" data_dependency="0" data_type="double"/> <Field phasta_field_tag="solution" paraview_field_tag="eddy visocity" start_index_in_phasta_array="5" number_of_components="1" data_dependency="0" data_type="double"/> </Fields> </PhastaMetaFile>
Visualizing Fields and Computing Quantities
As always, set the environment (if you have not done so already) by using:
more ~kjansen/soft-core.sh
To open the visualization tool Paraview, run the command:
vglrun paraview
It is common practice to be in the directory where your .pht
file is located when you run the vglrun paraview
command. This sets the working directory in Paraview to the one which contains your .pht
file, and you can then quickly open that file without having to search for it.
A tutorial on how to navigate the GUI to visualize solution fields as well as compute other solution fields is given in this video.
Note: You can also open a specific Paraview build by setting the path to the executable file. For example, a Paraview v5.7.0 executable file was built in the following directory: /users/jeffhadley/Builds/build-paraview-v5.7.0/bin/
. To run this specific build of paraview, you would run the command:
vglrun /users/jeffhadley/Builds/build-paraview-v5.7.0/bin/paraview