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

28.1.4 Displaying Pathlines

Pathlines are used to visualize the flow of massless particles in the problem domain. The particles are released from one or more surfaces that you have created with the tools in the Surface menu (see Chapter  27). A line or rake surface (see Section  27.5) is most commonly used. Figure  28.1.24 shows a sample plot of pathlines.

Figure 28.1.24: Pathline Plot
figure

Note that the display of discrete-phase particle trajectories is discussed in Section  22.16.1.



Steps for Generating Pathlines


You can plot pathlines using the Pathlines panel (Figure  28.1.25).

Display $\rightarrow$ Pathlines...

Figure 28.1.25: The Pathlines Panel
figure

The basic steps for generating pathlines are as follows:

1.   Select the surface(s) from which to release the particles in the Release From Surfaces list.

2.   Set the step size and the maximum number of steps. The Step Size sets the length interval used for computing the next position of a particle. (Note that particle positions are always computed when particles enter/leave a cell; even if you specify a very large step size, the particle positions at the entry/exit of each cell will still be computed and displayed.) The value of Steps sets the maximum number of steps a particle can advance. A particle will stop when it has traveled this number of steps or when it leaves the domain. One simple rule of thumb to follow when setting these two parameters is that if you want the particles to advance through a domain of length $L$, the Step Size times the number of Steps should be approximately equal to $L$.

3.   Set any of the options described below.

4.   Click the Display button to draw the pathlines, or click the Pulse button to animate the particle positions. The Pulse button will become the Stop ! button during the animation, and you must click Stop ! to stop the pulsing.



Options for Pathline Plots


The options mentioned in the procedure above include the following. You can include the grid in the pathline display, control the style of the pathlines (including the twisting of ribbon-style pathlines), and color them by different scalar fields and control the color scale. You can also "thin'' the pathline display, trace the particle positions in reverse, and draw "oil-flow'' pathlines. If you are "pulsing'' the pathlines, you can control the pulse mode. If you are using larger time step size for calculations then you can control the accuracy of the pathline by specifying tolerance. In addition to the regular pathline display, you can also generate an XY plot of a specified quantity along the pathline trajectories. Finally, you can choose node or cell values for display (or plotting).

Including the Grid in the Pathline Display

For some problems, especially complex 3D geometries, you may want to include portions of the grid in your pathline display as spatial reference points. For example, you may want to show the location of an inlet and an outlet along with the pathlines (as in Figure  28.1.24). This is accomplished by turning on the Draw Grid option in the Pathlines panel. The Grid Display panel will appear automatically when you turn on the Draw Grid option, and you can set the grid display parameters there. When you click Display in the Pathlines panel, the grid display, as defined in the Grid Display panel, will be included in the plot of pathlines.

Controlling the Pathline Style

Pathlines can be displayed as lines (with or without arrows), ribbons, cylinders (coarse, medium, or fine), triangles, spheres, or a set of points. You can choose line, line-arrows, point, sphere, ribbon, triangle, coarse-cylinder, medium-cylinder, or fine-cylinder in the Style drop-down list in the Pathlines panel. (Note that pulsing can be done only on point, sphere, or line styles.)

Once you have selected the pathline style, click the Style Attributes... button to set the pathline thickness and other parameters related to the selected Style:

Controlling Pathline Colors

By default, the pathlines are colored by the particle ID number. That is, each particle's path will be a different color. You can also choose the color based on the surface from where the pathlines were released from using the surface ID as the particle variable. You can choose to color the pathlines by any of the scalar fields in the Color by drop-down list. (Select the desired category in the upper list and then select a related quantity in the lower list.) If you color the pathlines by velocity magnitude, for example, each particle's path will be colored depending on the speed of the particle at each point in the path.

The range of values of the selected scalar field will, by default, be the upper and lower limits of that field in the entire domain. The color scale will map to these values accordingly. If you prefer to restrict the range of the scalar field, turn off the Auto Range option (under Options) and set the Min and Max values manually beneath the Color by list. If you color the pathlines by velocity, and you limit the range to values between 30 and 60 m/s, for example, the "lowest'' color will be used when the particle speed falls below 30 m/s and the "highest'' color will be used when the particle speed exceeds 60 m/s. To show the default range at any time, click the Compute button and the Min and Max fields will be updated.

"Thinning'' Pathlines

If your pathline plot is difficult to understand because there are too many paths displayed, you can "thin out'' the pathlines by changing the Path Skip value in the Pathlines panel. By default, Path Skip is set to 0, indicating that a pathline will be drawn from each face on the selected surface (e.g., $n$ pathlines). If you increase Path Skip to 1, every other pathline will be displayed, yielding $n/2$ pathlines. If you increase Path Skip to 2, every third pathline will be displayed, yielding $n/3$, and so on. The order of faces on the selected surface will determine which pathlines are skipped or drawn; thus adaption and reordering will change the appearance of the pathline display when a non-zero Path Skip value is used.

Coarsening Pathlines

To further simplify pathline plots, and reduce plotting time, a coarsening factor can be used to reduce the number of points that are plotted. Providing a coarsening factor of $n$, will result in each $n$th point being plotted for a given pathline in any cell. This coarsening factor is specified in the Pathlines panel, in the Path Coarsen field. For example, if the coarsening factor is set to 2, then FLUENT will plot alternate points.

figure   

Note that if any particle or pathline enters a new cell, this point will always be plotted.

Reversing the Pathlines

If you are interested in determining the source of a particle for which you know the final destination (e.g., a particle that leaves the domain through an exit boundary), you can reverse the pathlines and follow them from their destination back to their source. To do this, turn on the Reverse option in the Pathlines panel. All other inputs for defining the pathlines will be exactly the same as for forward pathlines; the only difference is that the surface(s) selected in the Release From Surfaces list will be the final destination of the particles instead of their source.

Plotting Oil-Flow Pathlines

If you want to display "oil-flow'' pathlines (i.e., pathlines that are constrained to lie on a particular boundary), turn on the Oil Flow option in the Pathlines panel. You will then need to select a single boundary zone in the On Zone list. The selected zone is the boundary on which the oil-flow pathlines will lie.

Controlling the Pulse Mode

If you are going to use the Pulse button in the Pathlines panel to animate the pathlines, you can choose one of two pulse modes for the release of particles that follow the pathlines. To release a single wave of particles, select the Single option under Pulse Mode. To release particles continuously from the initial positions, select the Continuous option.

Controlling the Accuracy

If you are using large time step size for the calculation, there might be significant error introduced while calculating the pathlines. To control this error, select Accuracy Control and specify the value of Tolerance. The tolerance value will be taken in to consideration while calculating the pathlines for each time step.

Generating an XY Plot Along Pathline Trajectories

If you want to generate an XY plot along the trajectories of the pathlines you have defined, turn on the XY Plot option in the Pathlines panel. The Color by drop-down list will be replaced by Y Axis Function and X Axis Function lists. Select the variable to be plotted on the $y$ axis in the Y Axis Function list, and specify whether you want to plot this quantity as a function of the Time elapsed along the trajectory, or the Path Length along the trajectory by selecting the appropriate item in the X Axis Function drop-down list. Specify the Step Size, number of Steps, and other parameters as usual for a standard pathline display. Then click Plot to display the XY plot.

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 in Section  28.8.2.

To save the plot data to a file, turn on the Write to File option in the Pathlines panel. The Plot button will change to the Write... button. Clicking on the Write... button will open 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.

Saving Pathline Data

To save pathline data to a file, perform the following steps:

1.   Enable the Write to File option in the Pathlines panel (Figure  28.1.25).

2.   In the Type drop-down list, select one of the following types of files:
  • Standard for FIELDVIEW ( .fvp) format

  • Geometry for .ibl format (which can be read by GAMBIT)

  • EnSight format

figure   

If you plan to write the pathline data in EnSight format, you should first verify that you have already written the files associated with the EnSight Case Gold file type by using the File/Export... menu option (see Section  4.12.9).

For further information about the files that are written for any of these types, please refer to the appropriate section following these steps.

3.   Choose to color the pathlines by any of the scalar fields in the Color by drop-down lists.

4.   Select the surface(s) from which to release the particles in the Release From Surfaces list.

5.   If you selected EnSight under Type, you will need to specify the EnSight Encas File Name. Use the Browse... button to select the .encas file that was created when you exported the file with the File/Export... menu option. If you do not make a selection, then you will need to create an appropriate .encas file manually.

You can also select the number of Time Steps For EnSight Export. This number directly determines how many time levels will be available for animation in EnSight.

6.   Click on the Write... button to open the Select File dialog box, in which you can specify a name and save a file containing the pathline data.

To initiate saving pathline data through the text command interface enter the following TUI command:

display/path-lines/write-to-files

In addition to pathline data, you can also export particle data in either Standard, EnSight or Geometry type. For information on exporting particle data in FIELDVIEW (standard), EnSight or .ibl (geometry) format, refer to Section  25.20.2.

Standard Type

If Standard is selected under Type, FLUENT will write the file in FIELDVIEW format, which can be exported and read into FIELDVIEW. The FIELDVIEW $^{TM}$ ASCII Particle Path Format is licensed from Intelligent Light, proprietor of an independent visualization software package ( http://www.ilight.com). The file name that you use for saving the data must have a .fvp extension. You also have the ability to retrieve and display the particle and pathline trajectories from the file.

If the case is steady-state, the particle path information will be written in ASCII format. For transient or unsteady-state cases, the BINARY format must be used. The FIELDVIEW file contains a set of paths, where each path consists of a series of points. At every point the spatial location and selected variables are defined. A full description of the ASCII and BINARY formats can be found in Appendix K - Particle Path Formats of FIELDVIEW's Reference Manual [ 2], available to licensed FIELDVIEW users.

The following is an example of the FIELDVIEW format for a steady-state case:

FVPARTICLES 2 1
Tag Names
0
Variable Names
2
time
particle_id
3
0.2  0.8  1.3  0.2  0
0.3  0.9  1.3  0.4  0
0.5  1.1  1.3  0.6  0

The beginning of the file displays header information. Tag Names cannot be specified when the file is exported from FLUENT, and hence will always be 0. FLUENT allows you to export two variables, which are listed under Variable Names: the first is determined by the scalar fields selected in the Color by drop-down lists ( time in the example above); the second is always particle_id.

The rest of the file contains information about each path. A path section begins by listing the total number of points for the path. Then a line of data is presented for each point, with the X, Y, and Z locations listed in the first three columns and the variable information in the fourth and fifth columns. The example above presents a single pathline consisting of three points; the time ranges from .2 to .6, and the ID of the particle is 0.

Geometry Type

If Geometry is selected under Type, the file will be written in .ibl format. The resulting file contains particle paths in the form of a curve which can be read in GAMBIT. The following is an example of a Geometry file format that contains multiple curves:

Closed  Index   Arclength

Begin section ! 1
    Begin curve ! 1
    1                    185.61                   0               23.26
    2         88.90000000000001                   0              -89.67

    Begin curve ! 2
    1         88.89999999999569                   0   -89.6699999999997
    2         76.90221619148909                   0  -101.2290490001453
    3         62.92208239159677                   0  -110.2907424975297
    4         47.47166726362848                   0  -116.5231659809653
    5         31.11689338997181                   0  -119.6980363161113
    6         14.45680848476821                   0  -119.6990633707006
    7        -1.898356710978934                   0  -116.5262095254603
    8        -17.34954014966171                   0  -110.2956910520416
    9        -31.33079110697006                   0  -101.2357213074894
    10         -43.330000000007                   0  -89.67815166483965

    Begin curve ! 3
    1                    -43.33                   0  -89.67815166485001
    2                   -175.56                   0      64.69066040289

The above example demonstrates how multiple curves can be imported; single curves may also be imported. After importing this file into GAMBIT, the file is read by first looking for a Begin curve string and then looking for the X, Y, and Z coordinates under the Begin curve line.

EnSight Type

By selecting EnSight under Type, you can generate files with the following extensions:

An .mpg file will be written for every time step specified in the Time Steps For EnSight Export field. A sequential number will be appended to the .mpg extension to indicate the time step. Each file contains a header which lists the time at which the data was exported, as well as three columns listing the X, Y and Z coordinates for every particle at that particular time step.

The following is an example of a file called particle.mpg0003, which contains data for nine particles at the third time step:

File is written from fluent in ensight measured particle format for 
t =  2.42813e-04
particle coordinates
       9
       1-7.27734e-05 1.91710e-03 4.69093e-03
       2-1.75772e-04 1.97040e-03 3.92842e-03
       3-2.26051e-04 2.10134e-03 5.63228e-03
       4-1.16390e-04 2.32442e-03 5.23423e-03
       5-6.32735e-04 2.53326e-03 5.70791e-03
       6-9.69431e-04 2.37006e-03 5.27602e-03
       7-6.77868e-04 2.92054e-03 4.11570e-03
       8-9.78029e-04 2.75717e-03 4.13314e-03
       9-8.54859e-04 3.73727e-03 2.23796e-03

An .mscl file will be written for every time step specified in the Time Steps For EnSight Export field. A sequential number will be appended to the .mscl extension to indicate the time step. Each file contains the scalar information (specified under Color By) for every particle at a particular time step.

The following is an example of a file called particle.mscl0006, which captures Particle ID data for nine particles at the sixth time step:

particle id
 0.00000e+00 6.00000e+00 1.20000e+01 1.80000e+01 2.40000e+01 3.00000e+01 
 3.60000e+01 4.20000e+01 4.80000e+01

A new .encas file will be written if a selection is made under EnSight Encas File Name. This new file is a modified version of the .encas file selected with the Browse... button, and contains information about all of the related files (including geometry, velocity, scalar and coordinate files). The name of the new file will be the root of the original file with .new appended to it (e.g. if test.encas is selected, a file named test.new.encas will be written). It is this new file that should be read into EnSight.

The following is an example of a file called spray2-unsteady.new.encase, that refers to the files generated when the data was originally exported as an EnSight Case Gold file type ( .geo, .vel, .sc11 and .sc12) and the files created during the pathline data export ( .mpg and .mscl):

FORMAT
type:  ensight gold
GEOMETRY
model: spray2-unsteady.geo
measured: 1 particle.mpg****
VARIABLE
scalar per measured node: 1 particle-id particle.mscl****
scalar per node: pressure                  spray2-unsteady.scl1
scalar per node: pressure-coefficient      spray2-unsteady.scl2
vector per node: velocity                  spray2-unsteady.vel
TIME
time set: 1 Model
number of steps: 10
filename start number:     1
filename increment:        1
time values:   0.00000e+00  1.21406e-04  2.42813e-04  3.64219e-04  4.85626e-04 
6.07032e-04  7.28438e-04  8.49845e-04  9.71251e-04  1.09266e-03

Choosing Node or Cell Values

In FLUENT you can determine the scalar field value at a particle location using 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 used. If you prefer to use the cell values, turn the Node Values option off.

If you are plotting pathlines 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.


next up previous contents index Previous: 28.1.3 Displaying Vectors
Up: 28.1 Basic Graphics Generation
Next: 28.1.5 Displaying Results on
© Fluent Inc. 2006-09-20