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 by clicking in the Surface group box of the Setting Up Domain ribbon tab (see Creating Surfaces and Cell Registers for Displaying and Reporting Data). A line or rake surface (see Line and Rake Surfaces) is most commonly used. Figure 31.24: Pathline Plot shows a sample plot of pathlines.
Note that the display of discrete-phase particle trajectories is discussed in Displaying of Trajectories.
You can plot pathlines using the Pathlines Dialog Box (Figure 31.25: The Pathlines Dialog Box).
Results → Graphics → Pathlines
Edit...
The basic steps for generating pathlines are as follows:
Select the surface(s) from which to release the particles in the Release From Surfaces list.
(Eulerian Multiphase model only) From the Track in Phase drop-down list, select the phase in which pathlines will be tracked. If you want to track pathlines in the mixture of all phases, select all-phase. By default, particles are tracked in the primary phase.
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 , the Step Size times the number of Steps should be approximately
equal to
.
Set any of the pathline plot options described in Options for Pathline Plots.
Click to draw the pathlines, or click to animate the particle positions. The button will become the button during the animation, and you must click to stop the pulsing.
You can include the mesh 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).
For some problems, especially complex 3D geometries, you may want to include portions of the mesh 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 31.24: Pathline Plot). This is accomplished by turning on the Draw Mesh option in the Pathlines Dialog Box. The Mesh Display Dialog Box will appear when you enable the Draw Mesh option, where you can set the mesh display parameters. When you click in the Pathlines Dialog Box, the mesh display, as defined in the Mesh Display Dialog Box, will be included in the plot of pathlines.
Note: The Draw Mesh option settings are not saved with the pathline definition. Once the dialog box is closed these settings will revert to being disabled. If you want these settings persisted within the current session, you can use the non-persistent Pathlines dialog box.
Postprocessing
→ Graphics
→
Pathlines
→
Edit...
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 Dialog Box. Pulsing can be done only on point, sphere, or line styles.
Once you have selected the pathline style, click to set the pathline thickness and other parameters related to the selected Style:
If you are using the line or line-arrows style, set the Line Width in the Path Style Attributes Dialog Box that appears when you click . For line-arrows you will also set the Spacing Factor, which controls the spacing between the lines. The size of the arrow heads can be adjusted by entering a value in the Scale text-entry box.
If you are using the point style, you will set the Marker Size in the Path Style Attributes Dialog Box. The thickness of the pathline will be the thickness of the marker.
If you are using the sphere style, you will set the Diameter and the Detail in the Path Style Attributes Dialog Box.
The best diameter to use will depend on the dimensions of the domain, the view, and the particle density. However, an adequate starting point would be a diameter on the order of 1/4 of the average cell size or 1/4 step size. Units for the Diameter field correspond to the mesh dimensional units.
The level of detail applied to the graphical rendering of the spheres can be controlled using the Detail field in the Path Style Attributes Dialog Box. The level of detail uses integer values ranging from 4 to 50. Note that the performance of the graphical rendering will be better when using a small level of detail, that is, very coarse spheres, such as 6 or 8. The rendering performance significantly decreases with higher levels of detail. You should gradually increase the detail to determine the best-case scenario between performance and quality.
Also note that to take full advantage of spherical rendering, lighting should be turned on in the view. The Gouraud setting provides much smoother looking spheres than the Flat setting and better performance than the Phong setting. For more information on lighting, see Adding Lights.
If you are using the triangle or any of the cylinder styles, you will set the Width in the Path Style Attributes Dialog Box. For triangles, the specified value will be half the width of the triangle’s base, and for cylinders, the value will be the cylinder’s radius.
If you are using the ribbon style, clicking opens the Ribbon Attributes Dialog Box, in which you can set the ribbon’s Width. You can also specify parameters for twisting the ribbon pathlines. In the Twist By drop-down list, you can select a scalar field on which the pathline twisting is based (for example, helicity). Select the desired category in the upper list and then select a related quantity in the lower list. The twisting may not be displayed smoothly because the scalar field by which you are twisting the pathline is calculated at cell centers only (and not interpolated to a particle’s position). The Twist Scale sets the amount of twist for the selected scalar field. To magnify the twist for a field with very little change, increase this factor; to display less twist for a field with dramatic changes, decrease this factor.
When you click , the Min and Max fields will be updated to show the range of the Twist By scalar field.
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 and the Min and Max fields will be updated.
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 Dialog Box. By default, Path Skip
is set to 0, indicating that a pathline will be drawn from each face on the
selected surface (for example, pathlines). If you increase Path Skip
to 1, every other pathline will be displayed, yielding
pathlines. If you increase Path Skip
to 2, every third pathline will be displayed, yielding
, and so on. The order of faces on the selected surface
will determine which pathlines are skipped or drawn; therefore adaption will
change the appearance of the pathline display when a nonzero Path
Skip value is used.
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 , will result in each
th point being plotted for a given pathline in any cell. This coarsening
factor is specified in the Pathlines Dialog Box, in
the Path Coarsen field. For example, if the coarsening
factor is set to 2, then ANSYS Fluent will plot alternate points.
Important: Note that if any particle or pathline enters a new cell, this point will always be plotted.
If you are interested in determining the source of a particle for which you know the final destination (for example, 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, enable the Reverse option in the Pathlines Dialog Box. 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.
If you want to display “oil-flow” pathlines (that is, pathlines that are constrained to lie on a particular boundary), enable the Oil Flow option in the Pathlines Dialog Box. 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.
If you are going to use the button in the Pathlines Dialog Box 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.
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.
If you want to display the pathlines relative to the moving reference frame, enable the Relative Pathlines option in the Pathlines Dialog Box. You will then need to select the surfaces from the Release from Surfaces list.
If you want to generate an XY plot along the trajectories of
the pathlines you have defined, enable the XY Plot option in the Pathlines Dialog Box. 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 -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 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 ANSYS Fluent at a later time and plot it alone using the File XY Plot Dialog Box, as described in XY Plots of File Data, or add it to a plot of solution data, as described in Including External Data in the Solution XY Plot.
To save the plot data to a file, enable the Write to File option in the Pathlines Dialog Box. The button changes to a button. Clicking opens 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 XY Plot File Format.
To save pathline data to a file, perform the following steps:
Enable the Write to File option in the Pathlines Dialog Box (Figure 31.25: The Pathlines Dialog Box).
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
Important: 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... ribbon tab option (see EnSight Case Gold Files).
For further information about the files that are written for any of these types, refer to the appropriate section following these steps.
Choose to color the pathlines by any of the scalar fields in the Color by drop-down lists.
Select the surface(s) from which to release the particles in the Release From Surfaces list.
If you selected EnSight under Type, you will need to specify the EnSight Encas File Name. Use Browse... to select the .encas file that was created when you exported the file with the File/Export... ribbon tab 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.
Click 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 Exporting Steady-State Particle History Data.
If Standard is selected under Type, ANSYS Fluent will write the file in FIELDVIEW format, which can be exported and read into FIELDVIEW. The FIELDVIEW 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 ANSYS Fluent, and hence will always be 0. ANSYS Fluent enables 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.
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 that 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.
By selecting EnSight under Type, you can generate files with the following extensions:
.mpg
.mscl
.encas
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
that 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 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 (for example 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.encas, 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
In ANSYS 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. Note that for face-only functions
like Wall Shear Stress, the cell value is the
area-weighted average from the face values that define that cell as c0.
If you are plotting pathlines to show the effect of a porous medium or 2D fan boundary, 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.
You can create named pathline definitions and save them for later use. See Creating and Using Contour Plot Definitions for additional information on graphics object definitions.
The steps for creating and using pathline definitions are similar to the Steps for Generating Pathlines, with the addition of a field for naming the pathline definition.
Pathline definitions can be included in scenes as long as the XY Plot option is not enabled.
Note: You can move the colormap of a pathline definition by left-clicking and dragging it to the desired location. The colormap can also be resized by dragging the corners of the box that appears when you hover over the colormap. The colormap location is not saved with the pathline definition.