Advertisement

Investigation on the Interface Smoothing of Coupled N–S/DSMC Method Using Image Processing Filters

  • Guo-biao CaiEmail author
  • Zhen-yu Tang
  • Xiao-qing Wei
Original Paper

Abstract

Gas flow problems involving both continuum and rarefied regimes are common in many scientific and engineering applications. Coupled N–S/DSMC method is a major solution to simulate the continuum–rarefied transitional flow. Interface determination is one of the key aspects in developing coupled N–S/DSMC solver, which is often implemented using continuum breakdown parameters to indicate the rarefication level. Due to the statistics characteristic of DSMC method, distribution of the continuum breakdown parameters usually fluctuates, resulting in difficulty in locating the interface. Considering the similarity between continuum breakdown parameter smoothing and noise reduction in image processing, a general smoothing method is proposed in this paper, which employs the image filters to smoothen the distribution of continuum breakdown parameters. Two commonly used image filters, the mean filter and the median filter, are investigated. Several comparison studies are implemented by simulating a typical vacuum plume impingement flow problem. The median filter with 5 × 5 mask provides the best performance. The flow problem of flow over a 2D cylinder is used to validate the coupled N–S/DSMC solver using median filter to smoothen continuum breakdown parameter, which proves the accuracy of the coupled solver and validity of the smoothing method.

Keywords

Coupled N–S/DSMC method Continuum breakdown parameter Interface smoothing Mean filter Median filter 

1 Introduction

In many scientific and engineering applications, gas flows containing both continuum and rarefied regimes need to be studied, such as in the vacuum plume flow problem of space thrusters, inside the thruster nozzle, the gas density is high, while outside the nozzle, it drops rapidly, approaching to the vacuum state and the degree of the rarefaction of gas changes extremely, from continuous gas flow to rarefied gas flow. It is difficult to adopt one single method to simulate this kind of problem and the coupled Navier–Stokes (N–S) and Direct Simulation Monte Carlo (DSMC) [1] method is a preferable solution, which handles the continuous and rarefied gas regions using Computational Fluid Dynamics (CFD) method and DSMC method, respectively. There are two important issues in developing an N–S/DSMC solver, which are interface location and information exchange between the continuums and rarefied regions, and current paper pays special attention to the former one.

To measure the extent of rarefaction quantitatively, researchers have proposed different continuous breakdown parameters. Because the Kn parameter [1] is a global parameter, it isn’t suitable for coupled N–S/DSMC method as a continuous breakdown parameter. Based on the Kn number, several continuous breakdown parameters have been developed, including P parameter [2], KnGLL parameter [3], KnGL parameter [4], B parameter [5, 6, 7], and the Ptne parameter [8].

Previous studies have been carried out on the formation of continuous breakdown parameters, but no matter what kind of continuous breakdown parameters are employed, an extra smoothing operation must be performed before a satisfactory interface location result can be obtained. The reason is that, the continuum breakdown parameters within the DSMC region are calculated from variables those are got from particle statistics, and thus the fluctuation of the continuum breakdown parameters is inevitable. After a threshold value is set, the interface will not be an ideal curve or curved surface in 2D and 3D coordinate, respectively, but a complicated situation will appear. Many scattered isolated partitions will appear near the interface, making the further coupled calculation hard to implement.

Former coupled N–S/DSMC solvers [9, 10, 11] must have had considered this problem in some manner, but no special research has focused on it. In the present paper, investigations are performed on this subject, aiming to find a general solution for coupled N–S/DSMC method to locate the interface more reliably and flexibly.

The interface smoothing problem and the noise reduction problem in the image processing are considered analogous in the present paper. Thus two common filtering methods in image processing, the mean filter and median filter, are introduced to deal with the partition smoothing in coupled N–S/DSMC calculation.

2 Coupled N–S/DSMC Method

The DSMC method, which was proposed by G. A. Bird [1, 12], uses a small number of simulation particles instead of a large number of gas molecules in the real flowfield to obtain the macroscopic flow parameters by statistical means. In the actual gas flow, the movement and collision of gas molecules are always carried out simultaneously, meaning that they are coupled. DSMC method uses probabilistic (Monte Carlo) means to decouple the motion and the collision of gas molecules, simplifying the process of the algorithm and saving much computational time. But the consumption of computational resources is still unacceptable to employ DSMC method in the continuum region, while the CFD method, which solves the gas dynamic equations using finite difference schemes, is quite mature and efficient in modeling the continuum flow. The N–S solver is only available in the continuum region because of the hypothesis that the equations based on. Since DSMC method and N–S solver have their own proper applications, respectively, the concept to couple these two methods to form a continuum–rarefied transitional flow solver is straightforward.

A DSMC code named PWS [13] (Plume Work Station) is used as the DSMC solver in the current coupled N–S/DSMC research. The PWS is developed by the authors based on the Cartesian grid system. The surfaces in complex geometries of flowfield are divided into several simple convex units and embedded in the grid as described in Ref. [13]. HS (Hard Sphere), VHS (Variable Hard Sphere), VSS (Variable Soft Sphere), CLL (Cercignani–Lampis–Lord) molecular models are implemented in PWS, and RSF (Random Sampling Frequency) collision sampling method is adopted [14].

A finite-volume N–S solver named NozzleFlow is developed as the N–S solver for the coupled N–S/DSMC solver. NozzleFlow adopts multi-block structured grid, which possesses the advantages of low memory requirement, high computational efficiency, and high computational precision, meanwhile it is well suited for the complex geometries of flowfield. Transitional and rotational energy modes are assumed to be described by a single temperature, and vibrational energy mode is neglected, in continuum region. AUSM + (Advection Upstream Splitting Method) and LU-SGS (Lower–Upper Symmetric Gauss–Seidel) schemes are employed for the spatial and temporal discretization, respectively. The viscosity model in NozzleFlow is modified as a power-law form, as seen in the following equation, to compact with the VHS molecule collision model used by PWS code:
$$ \mu = \mu_{\text{ref}} \left( {\frac{T}{{T_{\text{ref}} }}} \right)^{\omega}, $$
(1)
where μref and Tref denote reference viscosity and reference temperature, respectively, and ω is the power-law exponent.
To form the N–S/DSMC-coupled solver, several techniques have been investigated, including the mixing of state-based and flux-based coupling schemes, Cartesian grids and quadrilateral structured grids interpolation method, which are described in Ref. [11]. The KnGL is used as the continuum breakdown parameter in the current study, which is defined as:
$$ Kn_{\text{GL}} = \hbox{max} \{ Kn_{\text{GL}} ,\,Kn_{{{\text{GL,|}}V |}} ,Kn_{{{\text{GL,}}T}} \} $$
(2)
and
$$ Kn_{{{\text{GL}},Q}} = \frac{\lambda }{Q}|\nabla Q|, $$
where Q represents density, velocity magnitude and temperature in Eq. (2). λ is the mean molecule-free path.
The general process of coupled calculation is shown in Fig. 1.
Fig. 1

Flowchart of coupled N–S/DSMC calculation

3 Problem in Interface Determination

In the coupled method, the continuum/rarefied interface is decided by continuous breakdown parameters. From the definitions of KnGL, it can be figured out that they are all calculated from the derivation of macroscopic gas parameters. When calculating the KnGL within the rarefied regions, the related gas parameters are all obtained by the statistics of particles, and thus the fluctuation is inevitable. What is even worse is that before the interface reaches to a steady state, there will not be enough steps of DSMC calculations in each coupled iteration to increase the convergence speed, and thus there will not be enough number of particles to obtain smooth macroscopic gas parameters by statistics.

To demonstrate this issue, a typical flow problem, a thruster flow impinging onto a plate, is employed. Figure 2 shows schematic of the nozzle-plate configuration. A bell nozzle with 3-mm throat diameter and 42.37-mm outlet diameter is used to generate a plume of nitrogen gas at 300 K temperature. Total pressure of combustion chamber is 0.4 MPa. A plate body with 100-mm diameter is located downstream of the nozzle on the axis of the plume. The distance between the plate and the nozzle exit is 30 mm.
Fig. 2

Schematic of nozzle-plate configuration

The computational grids for N–S and DSMC solvers are shown in the right and left parts of Fig. 3, respectively. Figure 3 also shows the boundary conditions for both solvers. The gas–surface interaction in DSMC simulation is modeled using diffuse reflection and the wall temperature of nozzle and cone surfaces is set to 300 K.
Fig. 3

Schematic of grid and boundary condition

Figure 4 shows results of KnGL (left) and domain partition (right, by setting 0.05 as the threshold value) obtained by N–S/DSMC simulation after 15 coupled iterations without continuum breakdown parameter smoothing technique. It can be seen that the higher KnGL regions, which indicate more rarefied, are mainly distributed in three types of zones: the bow shock zone within the direct impingement region, the backflow zone and the shear flow zone near the plate with high radial position. This distribution result is qualitatively reasonable. A notable issue can be found from the figure is that the KnGL distribution in some zones is very disorderly. As mentioned above, the statistic fluctuation in the rarefied partition results in the rough distribution of KnGL. By setting 0.05 as the continuum–rarefied threshold value, the domain partition result can be obtained as shown in the right part of Fig. 4. Several small isolated N–S regions are located within the DSMC region. It is obvious that this partition result is unacceptable in coupled calculation. Meanwhile, the bow shock narrow zone is also labeled as DSMC region because of the higher KnGL value within the shock wave. Although the gradient of parameters is large within the shock, which results in the high KnGL, the density is much high here comparing with the back-flow region. N–S calculation can provide reliable results in this zone, and it would consume much more computational resources if DSMC is employed in this region.
Fig. 4

Results of KnGL (left) and domain partition (right) from N–S/DSMC simulation without smoothing

This demonstration case shows that, without continuum breakdown parameter smoothing technique, further coupled N–S/DSMC calculation is difficult to perform.

4 Two Commonly Used Spatial Image Filters

Spatial filtering is used to operate the pixels in the image directly. Its processing can be expressed by the following formula:
$$ g(x,y) = T[f(x,y)]. $$
(3)
The input function is f(x, y), defined in the neighborhood of (x, y), which represents the pixels segment of the original image. T is a kind of smooth, de-noising operation for f(x, y). The output function is g(x, y), that expresses the pixel distribution of the processed image. To define neighborhood of (x, y), the main method is to use a rectangular or square sub-image, whose center is (x, y), as shown in Fig. 5. The sub-image can be called mask. The mask’s center moves from one pixel to another, and the operation is applied to each position to get the output. Mean filter and median filter are two kinds of spatial filtering methods for de-noising [15].
Fig. 5

3 × 3 neighborhood of (x, y) points in an image mean filter

4.1 Mean Filter

Mean filter is a linear one, which uses the mask to determine the average gray values of the pixels in the neighborhood to replace the previous one, so as to achieve a smooth image. The mean filter is mainly used to remove the noise from the image, relatively small compared with the masking. Two different masks are shown in Fig. 6. The left mask is standard average, and the other is weighted average.
Fig. 6

Two mean filter masks of a 3 × 3 matrix

An image, whose pixel points consist of a M × N matrix, after a m × n (m and n are odd numbers) weighted mean filtering process can be given by the following formula:
$$ g(x,y)\frac{{\sum\limits_{s = - a}^{a} {\sum\limits_{t = - b}^{b} {w(s,t)f(x + s,y + t)} } }}{{\sum\limits_{s = - a}^{a} {\sum\limits_{t = - b}^{b} {w(s,t)} } }}, $$
(4)
where, x = 0, 1, 2, 3 …M − 1, y = 0, 1, 2, 3 …N − 1.

The smoothing effect of mean filter is related to the radius of the mask. The larger the radius, the greater the fuzzy degree, the more smooth the image is. Due to the very small area occupied by the mask in an image, it is difficult to see the difference between the images after smoothing by various masks in Fig. 6 [15].

4.2 Median Filter

Median filter is a kind of nonlinear and effective method to restrain the noise, based on the ranking theory. The principle of median filtering is to use a moving mask that contains odd points, and replace the gray value of the center point in the masking by the median gray value of points in the masking. Assume that there is a sequence of values {f1, f2, …fn}, and do median filtering to the sequence by a masking with a length of m (m is an odd number). That is, extract m numbers: {fi, fi+1, …fi+m−1/,…fi+m−2, fi+m−1}, sort the m numbers according to numerical value, and replace the center point’s gray value by the middle value of the rank. Its principle can be expressed by the following formula:
$$ g_{{{\raise0.7ex\hbox{${i + m - 1}$} \!\mathord{\left/ {\vphantom {{i + m - 1} 2}}\right.\kern-0pt} \!\lower0.7ex\hbox{$2$}}}} = {\text{Median}}\left\{ {f_{i} ,f_{i + 1} , \ldots f_{{{\raise0.7ex\hbox{${i + m - 1}$} \!\mathord{\left/ {\vphantom {{i + m - 1} 2}}\right.\kern-0pt} \!\lower0.7ex\hbox{$2$}}}} , \ldots f_{i + m - 2} ,f_{i + m - 1} } \right\}. $$
(5)

In practical, the larger the masking, the more obvious the de-noising effect is. If the mask is too large, it will lead to changes in contour lines. It is necessary to select the size of the masking carefully.

5 Image Filters Applied to Kn GL Smoothing

In image filtering, the data to be operated is the pixel values. Correspondingly in N–S/DSMC-coupled computation, the filtering method is employed, while the target data to be operated is replaced with continuum breakdown parameter, which is KnGL parameter in the present study. A cell in the coupled calculation mesh corresponds to a pixel position in an image, and the KnGL is regarded as the pixel gray value in an image.

There are several configuration parameters for each image filter, such as mask radius and using weight or not in mean filter. To investigate which filter and what kind of filter configuration is more preferable, several simulations are performed using different filters and different configurations.

5.1 Mean Filter

Different mask radius indicates the filtering range. First, the former described flow problem, thruster flow impinging onto a plate, are simulated using mean filter with two kinds of mask radiuses, which are 3 × 3 and 5 × 5, respectively. After 15 coupled iterations, the KnGL comparison results are shown in Fig. 7.
Fig. 7

KnGL distribution comparison between 3 × 3 and 5 × 5 mean filter masks

It can be figured out that, when the radius is 3 × 3, KnGL distribution is more disordered, the 0.05 contour lines surround several isolated zones, and some cells within the shock wave have KnGL larger than 0.05, which means it will be determined as DSMC cells. The 5 × 5 mask includes more pixels to average, increases the fuzzy level, and thus achieves a more smooth KnGL distribution result, at the same time reserves the overall shape. Within the shock-wave cells, all the KnGL values are below 0.05, and thus can be considered as continuum partition.

The average manner of mean filter is then investigated by comparison. The flow problem is simulated again using the two masks shown in Fig. 6, respectively. The results are shown in Fig. 8. It can be seen that using weighted average, no evident improvement can be obtained.
Fig. 8

KnGL distribution comparison between standard and weighted mean filter masks

Among the three configurations, comparison results show that the 5 × 5 standard average mean filter mask provides an acceptable smoothing effect.

5.2 Median Filter

As to median filter, two configurations with different mask radiuses, 3 × 3 and 5 × 5, are compared. The results are shown in Fig. 9. Both these two masks smooth the KnGL in the shock-wave zone cells to less than 0.03. Again, the smaller filter mask results in some isolated zones, and like the results in Fig. 7, the larger filter mask gets a preferable KnGL distribution.
Fig. 9

KnGL distribution comparison between 3 × 3 and 5 × 5 median filter masks

Figure 10 gathers the median filter and the mean filter with 5 × 5-size-mask results together. From the comparison it can be seen that, the median filter provides more fuzzy effect. The KnGL distribution seems smoother after operated by the median filter and at the same time reserves the overall characteristics. So the median filter is proved to be a more preferable continuum breakdown parameter smooth method.
Fig. 10

KnGL distribution comparisonbetween median filter and mean filter

6 2D Cylinder Flow for Validation

The 2D cylinder flow problem is a very usually used benchmark case to test numerical methods. The median filtering with 5 × 5 mask is used to process the continuum–rarefied interface in the simulation of flow over a 2D cylinder. Figure 11 shows the flow condition. The diameter of the cylinder is 0.08 m. The free-stream consists of nitrogen gas and the condition of the free-stream is U = 1884 m/s, T = 217 K, P = 4.8 Pa, and Ma = 6.
Fig. 11

flow condition

Figure 12 shows the comparison of 0.05 KnGL contour lines between the median filter-operated data and the original without smoothing one. After treatment, the final interface removes the isolated areas. A bow shock wave is produced ahead of the cylinder where the flow parameters change extremely. Because the pressure is relatively low and thus the shock is much thicker than the one in the previous flow problem. The filter smoothens the contour lines instead of diminishing the shock-wave zone. Likewise, from the view of accuracy, the DSMC calculation describes the shock-wave structure more precisely. The DSMC region close to the cylinder surface is due to the slip of gas. The domain partition result is reasonable.
Fig. 12

0.05 KnGL contour lines comparison between median filter treatment (up) and the original one (down)

Full DSMC calculation results can be used as a benchmark to verify the results of the coupled calculation after median filtering. Figure 13 reveals the density contours obtained by both the full DSMC and coupled N–S/DSMC methods. The agreement between these two different solvers is extremely good. The present coupled method predicts the position of bow shock exactly the same as the DSMC benchmark result, and the contours are also the same in other locations of the flowfield.
Fig. 13

Contour comparison of gas density

Figure 14 shows comparison of gas pressure obtained by two methods. The level of agreement observed in the figure is relatively good.
Fig. 14

Contour comparison of gas pressure

The comparison validates the accuracy of the coupled solver employing median filter to smoothen KnGL and demonstrate the smoothing effect again.

7 Conclusion

The coupled N–S/DSMC method is an efficient and accurate solution for continuum–rarefied gas flow simulation. Determination of the continuum–rarefied interface is one of the important aspects in coupled N–S/DSMC computation. Although several continuum breakdown parameters have been proposed by former researchers to indicate the rarefication level, the continuum breakdown parameter would fluctuate in practice, making the interface hard to locate. The present paper proposed a new method to pre-process the continuum breakdown parameter, which borrows the ideas form image processing. Two commonly used image filters, the mean filter and the median filter, are employed to smoothen the KnGL continuum breakdown parameter in the coupled N–S/DSMC calculation. Several comparison studies were implemented by simulating a typical vacuum plume impingement flow problem. The median filter with 5 × 5 mask was proved to be more preferable. A benchmark flow problem of flow over a 2D cylinder was simulated with the coupled N–S/DSMC method, using median filter to smoothen continuum breakdown parameter, and was compared to the full DSMC results, which validated the accuracy of the coupled solver and demonstrated the median filter smoothing effect. The image filter investigated in this paper is also suitable for other coupled solver and continuum breakdown parameters.

8 Future Work

The interface determination technique contains more or less some empirical factors. To ensure the accuracy, the median filter with strong smoothing property is employed in the present investigation. The reviewers inspired us a new interesting idea that the interface can be defined using an edge detector operator. In this case, the image is smoothed first by a Gaussian Kernel and then the interface is determined using the Canny operator. This idea will be studied in the future.

References

  1. 1.
    Bird GA (1976) molecular gas dynamics. Oxford University Press, OxfordGoogle Scholar
  2. 2.
    Bird GA (1970) Breakdown of translational and rotational equilibrium in gaseous expansions. AIAA J 8(11):1998–2003ADSCrossRefGoogle Scholar
  3. 3.
    Boyd ID, Chen G, Candler GV (1995) Predicting failure of the continuum fluid equations in transitional hypersonic flows. Phys Fluids 7:210–219ADSCrossRefGoogle Scholar
  4. 4.
    Wang WL, Boyd ID (2003) Predicting continuum breakdown in hypersonic viscous fows. Phys Fluids 15:91–100ADSCrossRefGoogle Scholar
  5. 5.
    Sun Q, Boyd ID, Candler GV (2004) A hybrid continuum/particle approach for modeling subsonic, rarefied gas flows. J Comput Phys 194:256–277ADSCrossRefGoogle Scholar
  6. 6.
    Garcia Alejandro L, Bell John B, Crutchfield William Y et al (1999) Adaptive mesh and algorithm refinement using direct simulation Monte Carlo. J Comput Phys 154:134–155ADSCrossRefGoogle Scholar
  7. 7.
    Schwartzentruber TE, Scalabrin LC, Boyd ID (2007) A modular particle-continuum numerical method for hypersonic non-equilibrium gas flows. J Comput Phys 225(1):1159–1174ADSMathSciNetCrossRefGoogle Scholar
  8. 8.
    Lian Y (2006) Development and verification of a parallel coupled DSMC–NS scheme using a three-dimensional unstructured grid. National Chiao Tung University, HsinchuGoogle Scholar
  9. 9.
    Schwartzentruber TE, Boyd ID (2006) A hybrid particle-continuum method applied to shock waves. J Comput Phys 215(2):402–416ADSMathSciNetCrossRefGoogle Scholar
  10. 10.
    Wu J-S, Lian Y-Y, Cheng G et al (2006) Development and verification of a coupled DSMC–NS scheme using unstructured mesh. J Comput Phys 219:579–607ADSCrossRefGoogle Scholar
  11. 11.
    Zhenyu Tang, Bijiao He, Guobiao Cai (2014) Investigation on a coupled Navier–Stokes-direct simulation Monte Carlo method for the simulation of plume flowfield of a conical nozzle. Int J Numer Meth Fluids 76(2):95–108MathSciNetCrossRefGoogle Scholar
  12. 12.
    Bird GA (1994) Molecular gas dynamics and the direct simulation of gas flows. Clarendon Press, OxfordGoogle Scholar
  13. 13.
    Bijiao He, Xiaoying He, Mingxing Zhang et al (2013) Plume aerodynamic effects of cushion engine in lunar landing. Chin J Aeronaut 26(2):269–278CrossRefGoogle Scholar
  14. 14.
    Shen Q (2003) Rarefied gas dynamcis. National Defense Science and Technology Industry Press, Beijing, p 321 (in Chinese) Google Scholar
  15. 15.
    Gonzalez RC, Wintz P (2001) Digital image processing, vol 28, no 4. Prentice Hall International, Upper Saddle RiverGoogle Scholar

Copyright information

© Chinese Society of Astronautics 2019

Authors and Affiliations

  1. 1.Beihang UniversityBeijingChina
  2. 2.Beijing Institute of Spacecraft Environment EngineeringBeijingChina
  3. 3.The Institute of Xi’an Aerospace Solid Propulsion TechnologyXi’anChina

Personalised recommendations