Basic Graph Tutorial
Generating graphs is a powerful tool for analysis. Below are step by step instructions about how to make and manage graphs from one of the example models. Many of the graphs created in this example will be multi-scenario graphs. However, the information discussed within is the same regardless of which scenarios are selected.
For this example, the US - Gas Turbine Fuel System model file was used. A copy of the completed model can be downloaded from the Gas Turbine Fuel System example, or can be found in the AFT xStream installation folder.
Open the model and create three children of the 2 Sections Minimum Per Pipe scenario. The three children scenarios evaluate three different closure times of the Premix Gas FCV #2 valve (J11): 0.01 seconds, 0.1 seconds, and 0.5 seconds. Run the three scenarios and return to the 0.01 Second Valve Closure scenario.
To skip to different sections of this tutorial, use the links below:
- Transient Junctions and Saving Graphs
- Transient Profiles and Animations
- Displaying multiple graphs simultaneously
- Creating graphs from the Workspace
Transient Junctions and Saving Graphs (return to top)
Figure 1: High Pressure Steam Example
Go to the Graph Results Primary Window and determine what type of graph you want to generate. The first graph created in this example will be a Transient Junction Graph. The Transient Junction is one of several different types of Graphs that can be made. This graph is created by first selecting the Transient Jct tab and selecting the desired parameters. The only junction with saved transient data will be the valve J11. Add this junction to the “Graph These Junctions:” column by double-clicking the junction ID number, or selecting the “>” symbol. Select “Cv” as the parameter. Select all three valve opening children scenarios using the Multi-scenario... button, and then select “Generate”. This creates a plot of “Cv vs. Time” for all three scenarios on the left.
Note that the Graph Guide, accessed by clicking on the "What Would You Like to Do?" icon on the upper right of the graph, will guide you through the process of creating a graph
Note: The model file used in this tutorial does not have force sets applied, so the Forces graph tab is not available in the Graph Parameters area. The Forces tab will be available if force sets are defined and applied in the Analysis Setup window.
Figure 2: Valve Cv vs. Time
The Graph has been created, but has not yet been added to the list under "My Graphs". To add this Graph to the list, first select the “Add Graph to List” icon on the Graph Results toolbar (this option and many others can be accessed by right-clicking on the Graph at any time). Name the Graph “Transient Junction - J11 Cv”. The Graph has now been saved and will be easily regenerated with the same format if the output changes. The name of the saved Graph can be seen in the Graph List Manager, with two small squares in the icon associated with it indicating it is a multi-scenario graph. The border of the Graph has also changed to dark green along with borders of the parameters and the name of the Graph in the Graph List Manager, indicating that the Graph is current, saved, and that the displayed parameters are the ones used to generate the Graph.
Figure 3: Adding a Graph to My Graphs
Formatting options are available by selecting “Formatting” above the different graph types. When formatting changes occur the border of a Graph will change from dark green to light green, indicating a change has been made to a graph in the Graph List. Another indicator that the Graph is not saved is the small yellow square over the icon on the tab. Here, the title has been changed from “Cv vs. Time” to “Valve J11 Cv vs. Time”. Once the formatting settings have been changed, this change and other formatting changes are not retained to the Graph unless “Update Current Graph in List” is selected.
Figure 4: Update Formatting Changes to Graphs
After selecting “Update Current Graph in List” the border has changed back to dark green and the yellow square has disappeared. This indicates that this is the current formatting of this graph, and that regenerating this graph will generate the same graph (according to the current model output).
Figure 5: Valve Cv graph with updated formatting changes
Transient Profiles and Animations (return to top)
The next step in the example is to make a new Graph in a separate tab. This is done by selecting the “New Tab” icon in the lower right. This Graph will be a “Profile” Graph that displays Static Pressure along the length of the flow path from the compressor through J11 and to Combustion Basket #3. Select pipes 1, 2, 3, 6, 9, 10, and 11 in the system and change the parameter to “Pressure Static” with units of length in feet and units of pressure in psig. Make sure that the Mx and Mn boxes are checked to display the maximum and minimum static pressures. Make sure "Animate Using" is set to none.
Note: An easy way to select the pipes in a longer path would be to select them in the Workspace, then click the Workspace button under Pipes to automatically select the desired path.
Figure 6: Generating a Profile plot with Min and Max Pressure Static
The graph shows the minimum and maximum static pressures during the transient simulation for each pipe station along the flowpath. Save this new graph as a new Graph List item. The two graphs we have made can be switched quickly between by either selecting the graph from the list, by clicking on the corresponding tab, or using Graph Tab Selection.
Figure 7: Pressure Static vs. Flow Length Profile added to Graph List
This is a useful graph, but animating the pressure profile over time can provide even more information. Animating from the Output file requires that all data for the pipe stations being animated to be saved to the Transient Output File in the Pipe Sectioning and Output panel, which is done by default.
Select the Animate Using Output option, then click generate.
After selecting generate the Graph will now allow for animation with options to Play, Record, Stop, and manipulate the animation in other ways. The recorded animation can be exported to a video file for convenience.
Figure 8: Max/Min Profile Graph with Animation
Displaying Multiple Graphs Simultaneously (return to top)
Another option that is available is to add another parameter to the graph. This is called generating stacked graphs. To do this select “Add” next to “Select Parameter”. This will graph an additional parameter that shares the same X-Axis as the original parameter. For this example, select “Pressure Static” as the parameter, but with units in barG rather than psig.
Figure 9: Stacked Pressure Profile with different units
We now have the same plot twice, which is not the most efficient way to view this data. A better way would be to have the secondary parameter (which could be any of the available options for a profile plot) on a secondary y-axis. This can be done by double clicking on the arrow to the left of “Pressure Static: barG” or by selecting the blue right arrow on the “Select Parameter Row”. This will visibly indent the secondary parameter. When the Graph is regenerated it will now only be one plot of Pressure Static vs. Length, but it will have units displayed in psig on the primary y-axis and units of barG on the secondary y-axis.
Figure 10: A Single Graph with Alternate Units on a Secondary Y-Axis
Update the Current Graph in List using the toolbar button. The Graph is now complete and can be easily regenerated if input data is changed on the Workspace and the model reran. It can also be used to generate the same graph for data from other scenarios.
Figure 11: The Resulting Graph when it is Updated
It is now possible to close the Graphs and regenerate them either in their own tabs or all graphs in a folder in the same tab. To test this out, close both Graph tabs and then create a new "Graph on same tab" folder from the right click menu. Right click each of the graphs made in this tutorial, and choose to move the graph list items to the "Graph on same tab" folder.
Right-click on the "Graph on same tab" folder and then choose “Load Folder Items” and then “Same Tab”. After the Graphs have been loaded in the same tab, the tab icon changes to an orange square, indicating that multiple Graphs are being displayed on one tab. All graphs will now be animated, with a vertical red line appearing on the graphs with a time axis. This red line will move over the animation time to compare values more readily.
Depending on the monitor display being used, or the number of graphs being displayed, this view may be easy to view or difficult to see data. For the sake of this example, we've kept the display size relatively small, meaning it is more difficult to view the data on all the graphs. However, with larger monitors available, it is likely easier to view this data.
Figure 12: All graphs loaded into the same tab
Other ways to view multiple graphs simultaneously are to plot them as stacked graphs, as we did previously for our pressure profile in psig and barG, or to plot saved graph items in two tabs either stacked or side-by-side. Right-clicking on a Graph-Tab at the bottom of the window shows the options for displaying two separate tabs.
If we have two Time graphs with the same x-axis, we can display them in a single, stacked graph. This approach to viewing graphs can be especially helpful in examining how a junction transient is affecting output parameters nearby. To create a stacked graph of multiple Graph List Items, first make sure both items have the same time scale. Then, move them into their own folder. Here, we've moved the Combustion Basket #3 Profile graph back to the My Graphs folder and moved the example's Combustion Basket #1 Temperature vs Time graph to the "Graph on same tab" folder. Finally, right-click the "Graph on same tab" folder, select "Load Folder Items", and then the "Stack Common X-Axis in Same Tab" option.
Figure 13: Load Current Folder Graphs in Same Tab - Stack Same x-Axis
As we just saw with the Profile Graph Folder, it is possible to create more Graph Folders other than “My Graphs”. Saved Graph List Items can then be organized into different folders and can independently be generated into their own tabs or a whole folder of Graphs can be generated into one tab. Using multiple folders will allow the user to create many unique variations of animations or other Graphs that can be used to convey transient output in a meaningful and intuitive manner.
Creating Graphs from the Workspace (return to top)
Some graphs can also be generated directly from the Workspace after running the model. To create a graph for the valve inlet and outlet static pressures from the Workspace right click on the valve J11, choose “Create Transient Graph for Pipes”, and select “Pressure Static”.
Figure 14: Creating Transient Graphs of the Inlet/Outlet Pipes Connected to a Junction
This will automatically generate the requested Graph with default units. This is a quick and easy way to see the pressure difference across the valve. Notice that this graph will be a Transient Pipe graph, since the pipe inlet/outlet stations are being used to graph the equivalent valve inlet/outlet values.
Figure 15: The Pressure Static vs. Time of the Two Pipes Connected to Valve J11
Make one more Graph from the Workspace by right-clicking pipe 10, selecting “Create Transient Graph for Pipes”, “Mass Flowrate”, and then “Outlet Only”.
Figure 16: Graph the Changes to Mass Flowrate vs. Time from the Workspace
This will add a Graph of the Mass Flowrate at the Outlet Station of Pipe 10 as is shown below in Figure 17.
Figure 17: Mass Flowrate vs. Time at the Outlet of Pipe P10