Difference between revisions of "The On Ramp/Level 1/Post-Process"

From PHASTA Wiki
Jump to: navigation, search
m (Jrwrigh moved page Level 1 Post-Process to The On Ramp/Level 1/Post-Process: Move to a subpage organization)
(Misc edits)
Line 1: Line 1:
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 generated by PHASTA.  
+
In this section we will learn how to set-up the Visualization file which [[ParaView]] (a flow visualization software) reads in, and how to utilize Paraview to analyze our flow field solutions generated by [[PHASTA]].  
  
 
== Visualization File ==
 
== Visualization File ==
Line 63: Line 63:
  
 
<code>vglrun /users/jeffhadley/Builds/build-paraview-v5.7.0/bin/paraview</code>
 
<code>vglrun /users/jeffhadley/Builds/build-paraview-v5.7.0/bin/paraview</code>
 +
 +
 +
[[Category:Post-Processing]] [[Category:Paraview]]

Revision as of 11:42, 18 September 2022

In this section we will learn how to set-up the Visualization file which ParaView (a flow visualization software) reads in, and how to utilize Paraview to analyze our flow field solutions generated by PHASTA.

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.

The following is an example flow.pht file for our 8-1-Chef case, where we ran 10 time steps in PHASTA, saved every 5th time step, and we want to visualize the 5th and 10th time step in Paraview.

<?xml version="1.0" ?>
<PhastaMetaFile number_of_pieces="8">
   <GeometryFileNamePattern pattern="8-procs_case/geombc.dat.%d" #8-procs_case here matches the folder name where our geombc files are located.  
                            has_piece_entry="1"
                            has_time_entry="0"/>
   <FieldFileNamePattern pattern="8-procs_case/restart.%d.%d" #8-procs_case here matches the folder name where our restart files are located.
                         has_piece_entry="1"
                         has_time_entry="1"/>
   <TimeSteps number_of_steps="2" #Needs to be 2 as we want to visualize 2 time steps.
              auto_generate_indices="1"
              start_index="5" #Index of the first time step we want to visualize. Make sure this time step is available by checking the files in       
                               8-procs_case
              increment_index_by="5" #5 + 5 = 10. If we had more time steps, we could visualize the 15th, 20th, 25th, 30th, etc. 
              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 on viz003 (if you have not done so already) by using the soft adds located in:

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 in the "Open File" Paraview GUI.

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