The following content is still incomplete.
The software used here for calculating flow velocity distribution in a circular tube is an evolution of the initial software described in Sections 3.1 and 3.2; a detailed explanation is provided in Section 3.3. Before reading this section, it is essential to have a thorough understanding of the content in those previous sections. The software provided here performs calculations using a tube length approximately equal to the tube diameter; however, since the number of sawblade elements simulating surface roughness must be an integer, slight variations in the length occur depending on the Reynolds (Re) number. While intermediate results are output during the calculation, the simulation continues even after a steady state is reached. Since determining the exact point of steady-state convergence is complex, the program is designed to simply run for 510 steps before terminating. Here, one “step” represents 200 times (220 μs) the minimum time interval Δtm (DTM = 1.1 μs)—which separates molecular movement and intermolecular collisions in this DSMC calculation—and also serves as the interval for outputting preliminary result files. Once familiar with the calculation process, users may choose to terminate the simulation early based on their own judgment regarding steady-state achievement; however, completing the calculation requires a significant amount of time in any case. For example, completing the calculation for a single Re number takes approximately 44 hours (using 32 threads) on a Ryzen 9 9950X3D CPU (calculation times are nearly identical for the 9950X and 9950X3D2 models), whereas it takes roughly twice as long—about 88 hours (using 16 threads)—on a Ryzen 7 6800H (assuming M.2 SSDs are used in both cases). The input data consists of the following: ① the number of threads used for calculation (the maximum number is recommended); ② whether to start a new calculation or resume an existing one; ③ the Reynolds number (Re) (input is restricted to the range of 1000 to 7000; values below 1000 lead to severe statistical fluctuations, while values above 7000 may introduce compressibility effects); ④ the choice between the Bird method and the U-sys method; ⑤ the surface roughness approximation modeled as a sawblade profile – a choice between automatically determining the three roughness parameters based on the Re number or specifying custom values (if custom values are chosen, the three parameters must be entered subsequently); ⑥ the choice between no surface roughness (diffuse reflection surface) and the presence of surface roughness; ⑦ the choice of initial velocity distribution (uniform or parabolic); and ⑧ the choice of output format (gnuplot or Tecplot). These parameters must be determined beforehand. Note that for walls where surface roughness is not considered (smooth surfaces), the calculation assumes a diffuse reflection surface (random reflection surface).
Although the mean flow velocity varies roughly from 10 m/s to 70 m/s in proportion to the Reynolds number, the underlying molecular velocity is approximately 350 m/s; consequently, the lower the mean flow velocity, the greater the statistical fluctuations in the results. Therefore, a larger number of samples—or calculation iterations—is required to obtain smooth average values (the specific procedure is described later). While the Reynolds number could be adjusted by changing the density or characteristic length, doing so would require a detailed preliminary investigation into how the cell resolution (the granularity of the physical space discretization in the DSMC calculation) affects the results. For this reason, the Reynolds number is adjusted here solely by varying the mean flow velocity.
The sequence of the ten output data items is as follows: x-coordinate, y-coordinate (or r-coordinate), number density n, flow velocity u, u/U (ratio of flow velocity u to mean flow velocity U), flow velocity v, temperature T, x-direction temperature Tx, yz-direction temperature Tyz, and Mach number M. Note that length is normalized by the tube diameter (characteristic length), while velocity is normalized by either the most probable molecular speed or the mean flow velocity. Number density and temperature are normalized by their respective initial values. Please also note that this output data differs from the calculations described in Section 3.2.
●● Practical Calculation Procedure ●●
The procedure for calculating the flow velocity distribution within a circular tube is described below. This explanation assumes you are already thoroughly familiar with the content of Chapter 2 (“Test Calculation”) and Section 3.2, and have actually performed those calculations yourself. If you have not done so, please execute those calculations first to verify that you can obtain the results without issues.
(A) Files Required for Calculation
The four files required for the calculation are: ① the main calculation software (AVT5F.exe); ② the initial value file for a sequence of 65 random numbers (ransuuM65); ③ software for averaging multiple result files generated every 45 steps (SUM009.exe); and ④ one additional file (libiomp5md.dll). These are stored in a single compressed file named “Tube_Turbu” (TTurbu). As with the previously mentioned “2. Test Calculation,” download this file and extract its contents to retrieve the four individual files. A folder named “TTurbu” will be created (e.g., in your Downloads folder or on your desktop) containing these four files; run “AVT5F.exe” from there. If Microsoft Defender SmartScreen displays a message stating “SmartScreen is unavailable” when you attempt to run the program, simply ignore it—SmartScreen isn’t actually that smart—and proceed by selecting “Run.” Additionally, the display in the command prompt window where the calculation runs is easier to read if the window width is set to 170 or greater.
(B) Starting the calculation (inputting multiple data points via the keyboard)
① When the calculation software (AVT5F.exe) is launched, the number of threads available on your PC is displayed; enter a number equal to or less than this value to specify the number of threads to use. If a value outside the range of 1 to the maximum is entered, the maximum value is selected (the maximum value is recommended).
② Next, enter 0 for a new calculation or 1 to continue a previous calculation. For a continuation calculation, files such as “uvw333” and “tfile2” must already exist. Entering 1 starts the calculation immediately, whereas a new calculation requires the following additional inputs.
③ Enter the Reynolds number (Re) (1000–7000). If a value outside this range is entered, you will be prompted to enter it again.
④ Select whether to perform the calculation using the Bird method or the U-system (U-sys method). The U-sys method is the standard approach; the Bird method is included for comparison purposes. Note that the “Bird method” in this program actually refers to the modified Bird method.
⑤ Choose whether to have the three parameters approximating the surface roughness (modeled as a sawblade shape) determined automatically based on the Reynolds number, or to specify the values yourself (if specifying manually, enter the three data values sequentially).
⑥ Specify whether the inner wall surface of the cylinder is “smooth” or “rough.” If “smooth” is selected, the input from step ⑤ is ignored. Note that with a smooth surface, a parabolic velocity distribution characteristic of laminar flow should be obtained, regardless of the Reynolds number.
⑦ Select the initial velocity distribution for the calculation. Choose between a uniform distribution based on the average velocity and a parabolic distribution. It is generally better to select an initial distribution that differs from the expected final result so that the gradual evolution of the velocity profile can be observed.
⑧ Select the output format for the results: gnuplot or Tecplot. Note that the only difference between the result files for gnuplot and Tecplot is that the Tecplot version includes two extra lines at the beginning; you can convert a Tecplot file to a gnuplot file by manually deleting these lines. Please compare the two result files and determine for yourself how to make this adjustment.
Once all the input steps are complete, the calculation begins, and the following information is displayed first (the number “1” shown below might appear as “0” instead):
B-or- U, Wall (S or R), Flat-Palabo, GNU_or_TEC
1 1 1 1
These numbers indicate, in order: whether the calculation uses the Bird method or the U_sys method; whether the surface is smooth or rough; whether the initial velocity distribution is uniform or parabolic; and whether the output format is gnuplot or Tecplot. This same information is also recorded at the beginning of the file named “IN-DATA.” Additionally, in the file named “ID50-A40-DTH0-DX2,” the first value represents “its reciprocal is the sawblade fluctuation width,” the second value represents “the sawblade angle,” and the fourth value represents “the coefficient determining the sawblade spacing.”
(C) Monitoring the calculation process
While the calculation is running, you should pay attention to its progress and ensure that the result files are being generated correctly. First, please focus on the following section of the screen display:
——————————————————-
@@ Re = ….. ….. ….. …..
——————————————————-
Regarding the first “Re” value, it may not exactly match the Re value you entered. This slight discrepancy arises because molecular velocities are generated using random numbers. To understand the subsequent values, please first review the following explanation. Specifically:
● Every time the “minute time step separating molecular movement and intermolecular collisions”—the smallest time unit in the DSMC calculation—repeats 200 times (referred to here as one calculation step), a primary result file (sjetc001, sjetc002, etc.) is generated in the subfolder DATx. Once 15 of these files accumulate, a secondary result file (AAA-001-015) is created in DATx, and the preceding sjetc files are deleted (the file numbers increment sequentially). Furthermore, when three AAA-xxx-yyy files are generated (advancing 45 steps), an OUT-001-045 file (tertiary result file) is created in the corresponding folder, and the oldest AAA-***-*** file in DATx is simultaneously deleted. The generated tertiary result files are in a format readable by gnuplot or Tecplot. While one OUT-ppp-qqq file (representing an average over 45 steps) is created every 15 steps, please note that consecutive OUT-***-*** files are averages calculated using partially overlapping data.
Regarding the “a/b (=IOUT1/IOUT0)” value displayed after the Reynolds number (Re): “a” indicates the sequence number of the next primary result file to be output, and “b” indicates how many primary result files must be output before a secondary result file is created; “a” resets to 1 once a secondary result file is generated. The subsequent number indicates the current iteration count of the “smallest time unit” since the simulation began, followed by the cumulative count of primary result files to be generated next. The value appearing after skipping three numbers (likely 35.0000) represents the sawblade angle in degrees (or the specific value if a custom angle was designated). Finally, the display lists whether the Bird method or U-sys method is being used, followed by the type of initial velocity distribution previously specified. Additionally, information nearly identical to this (with some differences) is written to the file named JB-AKTN2-AKTH and is updated whenever a primary result file is generated. Each time a primary result file is created, auxiliary files such as uvw333 and tfile2 are also produced; if these files exist, the calculation can be resumed from an intermediate point. If they are missing from the folder, resuming the calculation is not possible. Other screen displays were used during the program’s development; while they serve specific purposes, explanations for them are omitted here.
(D) Determining if a steady state has been reached and calculating the average of subsequent results
Determining whether the calculation has reached a steady state depends on whether subsequent results cease to change beyond the range of statistical fluctuation. To avoid complex mathematical criteria, the practical approach is to visually compare plots of the obtained results and judge convergence based on experience. In my experience, a steady state is usually reached after 400 steps; since the calculation concludes at 510 steps, simply waiting until the end is a reasonable strategy.
Individual tertiary result files represent averages calculated over 45 steps. While they can be used directly for high Reynolds numbers (Re), low Re values result in lower mean flow velocities and increased statistical fluctuation. Therefore, one can aggregate multiple tertiary result files to calculate an average and obtain smoother results. The tool for this purpose is SUM009. To use it, launch SUM009 and first enter the final step number of the last tertiary result file to be included in the average (i.e., the “bbb” value if the file is named OUT-aaa-bbb). Next, specify—using a number between 2 and 4—how many steps back from that result file should be included in the data. At first glance, the value specified for the look-back might seem small; however, since the process skips overlapping secondary results, specifying “2” actually averages six secondary results (using the tertiary result file from three steps back), specifying “3” averages nine (from six steps back), and specifying “4” averages twelve—resulting in a significantly broader averaging range. The final result file is named O22=xxx-yyy=Z, where xxx and yyy are the secondary result numbers and Z is the value (2 through 4) specified.
While Tecplot includes a built-in feature to create animations by sequentially linking individual result plots, gnuplot—to the best of my knowledge—lacks this capability. Therefore, to create animations using gnuplot, please locate and use free animation software available online. Note that this section omits details on visualizing results with gnuplot; please refer to the explanations in Chapter 2, Section 3.2, and Section 4.2, or consult the numerous gnuplot guides available on the web.