|
|
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 28). A line or rake surface (see Section 28.5) is most commonly used. Figure 29.1.24 shows a sample plot of pathlines.
Note that the display of discrete-phase particle trajectories is discussed in Section 23.7.1.
Steps for Generating Pathlines
You can plot pathlines using the Pathlines dialog box (Figure 29.1.25).
Graphics and Animations
Pathlines
Set Up...
The basic steps for generating pathlines are as follows:
Options for Pathline Plots
The options mentioned in the procedure above include the following. 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).
Including the Mesh in the Pathline Display
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 29.1.24). This is accomplished by turning on the Draw Mesh option in the Pathlines dialog box. The Mesh Display dialog box will appear automatically when you turn on the Draw Mesh option, and you can set the mesh display parameters there. When you click Display in the Pathlines dialog box, the mesh display, as defined in the Mesh Display dialog box, 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 dialog box. (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:
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, i.e., 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 Section 29.2.6.
(When you click Compute, the Min and Max fields will be updated to show the range of the Twist By scalar field.)
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 dialog box. By default,
Path Skip is set to 0, indicating that a pathline will be drawn from each face on the selected surface (e.g.,
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; 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
, 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.
|
|
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 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.
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 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.
Controlling the Pulse Mode
If you are going to use the Pulse 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.
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.
Plotting Relative Pathlines
If you want to display the pathlines relative to the rotating 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.
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 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
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 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 in Section 29.9.2.
To save the plot data to a file, turn on the Write to File option in the Pathlines dialog box. The Plot button will change to the Write... button. Clicking on the Write... button will open 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.
Saving Pathline Data
To save pathline data to a file, perform the following steps:
|
|
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.14.9).
|
For further information about the files that are written for any of these types, please refer to the appropriate section following these steps.
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.
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 4.15.
Standard Type
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 [ 1], 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 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.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 |
Choosing Node or Cell Values
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 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.