[ANSYS, Inc. Logo] return to home search
next up previous contents index

29.9.2 XY Plots of Solution Data

You can produce a very sophisticated XY plot by using data from several zones, surfaces, or files and modifying the axis and curve attributes. Using the capability for loading external data files, you can create plots that compare your ANSYS FLUENT results with data from other sources. To get further information about the solution, you can investigate the frequency of distribution of the data using a histogram (see Section  29.9.8).



Steps for Generating Solution XY Plots


You can create an XY plot of solution data using the Solution XY Plot dialog box (Figure  29.9.3).

figure Plots figure figure XY Plot figure Set Up...

Figure 29.9.3: The Solution XY Plot Dialog Box
figure

The basic steps for generating a solution XY plot are as follows:

1.   Specify the variables(s) you are plotting:
  • To plot a variable on the $y$ axis as a function of position on the $x$ axis, turn on the Position on X Axis option and choose the variable to be plotted on the $y$ axis in the Y Axis Function drop-down list. Select a category from the upper list and then choose the desired quantity in the lower list. (See Chapter  31 for an explanation of the variables in the list.)

  • To plot a variable on the $x$ axis as a function of position on the $y$ axis, turn on the Position on Y Axis option and choose the variable to be plotted on the $x$ axis in the X Axis Function drop-down list.

  • To plot one variable as a function of another, turn off both the Position on X Axis and Position on Y Axis options and select the variables to be plotted in the X Axis Function and Y Axis Function drop-down lists.

2.   Specify the plot direction:

  • To plot a variable as a function of position along a specified direction vector, select Direction Vector in the X Axis Function or Y Axis Function drop-down list (whichever is the position axis), and specify the components of the direction vector for plotting under Plot Direction. The position axis of the plot is indicated by the selection of Position on X Axis or Position on Y Axis. The positions plotted will have coordinate values that correspond to the dot product of the data coordinate vector with the plot direction vector. For example, if you are plotting a variable at the pressure outlet of the geometry shown in Figure  29.9.4, you would specify the Plot Direction vector (1,0,0) since you are interested in how the variable changes as a function of $x$. Figure  29.9.5 shows the resulting XY plot. (If you specified (0,1,0) as the plot direction, all variable values would be plotted at the same position (see Figure  29.9.6), since the $y$ value is the same at every point on the pressure outlet.)

  • It is also possible to plot a variable as a function of position along the length of a specified curvilinear surface. The curvilinear surface must be piecewise linear and it cannot contain more than one closed curve, such as a complete circle. To plot a variable in this way, select Curve Length in the X Axis Function or Y Axis Function drop-down list (whichever is the position axis). Then specify the plot direction along the surface: to plot the variable along the direction of increasing curve length, select Default under Plot Direction; to plot the variable in the direction of decreasing surface length, select Reverse. To check the direction in which the variable will be plotted along a surface, select the surface in the Surfaces list and click Show under Plot Direction. ANSYS FLUENT will display the selected surface in the graphics window, marking the start of the surface with a blue dot and the end of the surface with a red dot. ANSYS FLUENT will also display arrows on the surface showing the direction in which the variable will be plotted.

3.   Choose the surface(s) on which to plot data in the Surfaces list. Note that if you are plotting a variable as a function of position along the length of a curvilinear surface, you can select only one surface in the Surfaces list.

4.   Set any of the options described below, or modify the attributes of the axes or curves as described in Sections  29.9.9 and 29.9.10.

5.   Click the Plot button to generate the XY plot in the active graphics window.

Note that you can use any of the mouse buttons to annotate the XY plot (see Section  29.2.4) or move the plot legend from its default position in the upper left corner of the graphics window.

Figure 29.9.4: Geometry Used for XY Plot
figure

Figure 29.9.5: Data Plotted at Outlet Using a Plot Direction of (1,0,0)
figure

Figure 29.9.6: Data Plotted at Outlet Using a Plot Direction of (0,1,0)
figure



Options for Solution XY Plots


The options mentioned in the procedure above include the following. You can include data from an external file in the solution XY plot to compare your results with experimental data. You can also choose node or cell values to be plotted, and save the plot data to a file.

Including External Data in the Solution XY Plot

To add external data to your XY plot for comparison with your results, you must first ensure that any external data files are in the format described in Section  29.9.6. You can then load the file(s) by clicking on the Load File... button and specifying the file(s) to be read in the resulting Select File dialog box (see Section  2.1.6). Once a file has been loaded, its title will appear in the File Data list. You can choose the data file(s) to be included in your plot from the titles in this list.

To remove a file from the File Data list, select it and then click the Free Data button.

Choosing Node or Cell Values

In ANSYS FLUENT you can choose to display the computed cell-center values or values that have been interpolated to the nodes. By default, the Node Values option is turned on, and the interpolated values are displayed. If you prefer to display the cell values, turn the Node Values option off. Node-averaged data curves may be somewhat smoother than curves for cell values.

For face-only functions (e.g., Wall Shear Stress), the cell values that are displayed for boundary zone surfaces will actually be the face values. These face values are more accurate, as face-only functions are computed on the faces and not on the cells. For these face-only functions, the cell values on postprocessing surfaces will display the values in the cell. For more information about cell values, see Section  31.1.1.

If you are displaying the XY plot to show the effect of a porous medium or fan, to depict a shock wave, or to show any other discontinuities or jumps in the plotted variable, you should use cell values; if you use node values in such cases, the discontinuity will be smeared by the node averaging for graphics and will not be shown clearly in the plot.

Saving the Plot Data to a File

Once you have generated an XY plot, you may want to save the plot data to a file. You can read this file into ANSYS FLUENT at a later time and plot it alone using the File XY Plot dialog box, as described in Section  29.9.3, or add it to a plot of solution data, as described above.

To save the plot data to a file, turn on the Write to File option in the Solution XY Plot dialog box. The Plot button will change to the Write... button. Clicking on the Write... button will invoke the Select File dialog box (see Section  2.1.6), in which you can specify a name and save a file containing the plot data. The format of this file is described in Section  29.9.6.

To sort the saved plot data in order of ascending $x$ axis value, turn on the Order Points option in the Solution XY Plot dialog box before you click the Write... button. This option is available only when the Write to File option is turned on.


next up previous contents index Previous: 29.9.1 Plot Types
Up: 29.9 Histogram and XY
Next: 29.9.3 XY Plots of
Release 12.0 © ANSYS, Inc. 2009-01-29