## 28.8.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 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  28.8.7).

Steps for Generating Solution XY Plots

You can create an XY plot of solution data using the Solution XY Plot panel (Figure  28.8.3).

Plot XY Plot...

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 axis as a function of position on the axis, turn on the Position on X Axis option and choose the variable to be plotted on the 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  30 for an explanation of the variables in the list.)

• To plot a variable on the axis as a function of position on the axis, turn on the Position on Y Axis option and choose the variable to be plotted on the 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  28.8.4, you would specify the Plot Direction vector (1,0,0) since you are interested in how the variable changes as a function of . Figure  28.8.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  28.8.6), since the 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. 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. 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  28.8.8 and 28.8.9.

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  28.2.4) or move the plot legend from its default position in the upper left corner of the graphics window.

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  28.8.5. 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. 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 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.

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 FLUENT at a later time and plot it alone using the File XY Plot panel, as described in Section  28.8.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 panel. The Plot button will change to the Write... button. Clicking on the Write... button will invoke the Select File dialog box, in which you can specify a name and save a file containing the plot data. The format of this file is described in Section  28.8.5.

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

Previous: 28.8.1 Plot Types
Up: 28.8 Histogram and XY
Next: 28.8.3 XY Plots of