2.1. Equivalent Response Model of Missile-Fuze System
The propagation path of light in a medium mainly depends on the refractive index distribution of the medium. For a compressible gas medium, the factors affecting its refractive index include gas density, temperature, and composition. In general, the refractive index of the gas medium mainly depends on the density of the gas, and the Lorentz-Lorenz formula is typically used to describe the relationship between the refractive index and density of the flow field [
1]:
where
is the flow field density,
is the refractive index distribution of the flow field, and
is the Gladstone–Dale constant, which is generally considered to be related to the wavelength of light, as follows:
In the formula, is the wavelength of light, and its unit is ; the unit for is m3/kg.
Although the refractive index of the atmosphere will change with air density, the overall refractive index of the atmosphere is still approximately 1 [
29], so a simple approximation can be made to Formula (1): let
,
; then, there is the following:
Based on Formula (3), the refractive index distribution can be obtained from the flow field density distribution.
From a mathematical point of view, the essence of the ray tracing problem in aero-optics is to solve the ray differential equation of the gas medium in the flowing state [
25]:
In the equation, is the position vector of a point on the ray propagation path, and are the refractive index and the refractive index gradient at the point, respectively, and is the ray propagation path. This equation basically has no analytical solution for the light propagation path in any nonuniform refractive index field. The equation has analytical solutions only in some special cases, such as a spherical, cylindrical, or planar iso-refractive index surface. In these cases, the equation is generally solved by numerical methods.
2.2. Improved Ray Tracing Method Based on Adaptive Step Size Adjustment
The accuracy of ray tracing based on the Runge-Kutta method is affected by the tracing step size. The conventional fixed step size method uses a fixed tracing step size . The smaller the value of is, the higher the tracing precision, but the computational load will increase at the same time. For a complex high-speed nonuniform flow field, a constant step size cannot meet the tracing precision requirements in areas with gentle or severe refractive index variations and will result in a waste of computing resources. Therefore, the tracing step size is adaptively adjusted so that the step size is larger in places where the refractive index changes gently and smaller in places where the refractive index changes sharply. This method not only can ensure accuracy but also can improve the computational efficiency.
The refractive index gradient essentially reflects the magnitude of the refractive index variation, so light propagation is most sensitive to the refractive index gradient. In this section, a step size adjustment method based on the refractive index gradient is proposed. The method essentially constructs a step size adjustment function with the maximum refractive index gradient of the grid node as a variable. The following piecewise function is given through the previous pilot calculation:
In the formula, the tracing step length , is the difference between the maximum and minimum refractive index values of the neighboring grid nodes of the calculating position, is the average geometric size of grid cells in the calculating position , and and are the grid cell side lengths.
There are two explanations for Formula (5):
- (1)
is set to not exceed the average geometric size of the local grid cells. The reason is that considering the turbulent phenomenon of sharp changes in the density of shock waves in the shock-wave flow field, the accuracy of computational fluid dynamics (CFD) in capturing shock waves is generally two to three grid cells. Although the refractive index changes greatly in these grids, the change in the refractive index in the local area before and after the shock wave may be very gentle; if is set too large, it may cross the shock wave structure and cause a large error in the result.
- (2)
The minimum tracing step size is 0.05 , which is the optimal value determined by multiple numerical tests.
For the high-speed nonuniform flow field studied in this paper, since an accurate refractive index distribution function cannot be obtained, the exact solution of the light propagation path cannot be obtained. To verify the correctness and effectiveness of the ray tracing method proposed in this paper, ray tracing in a medium with a radial refractive index gradient distribution is performed by the conventional fixed-step ray tracing method and the adaptive step size adjustment method proposed in this paper. The tracing results are compared with the analytical solutions to analyze the advantages and disadvantages of the two methods.
Since the calculation results of CFD software are based on the discrete data of irregular quadrilateral grid nodes, the refractive index and refractive index gradient of any point cannot be directly obtained. Therefore, it is necessary to interpolate the number of any point in the grid. Considering the interpolation accuracy and time complexity, this paper adopts the inverse distance weighted average interpolation method based on the quadrilateral grid with good stability and accuracy.
The position of the first step in the ray tracing process is known as
, and the nearest four mesh vertices are found and numbered 1, 2, 3, 4. Then, based on the refractive index of the four vertices
, the refractive index and refractive index gradient are interpolated at
as follows:
where
is the distance from the point
to the four vertices of the grid.
Given the refractive index of space grid nodes, the refractive index gradient at the grid nodes should be solved first, and then the gradient value of any point in the grid can be obtained by the interpolation method.
For a medium with a known refractive index distribution of the flow field, the refractive index gradient can be obtained by taking the derivative of the refractive index distribution function. In this paper, the gradient operator is used to solve the grid point refractive index gradient, and the Barron gradient operator is selected to solve the refractive index gradient.
The Barron gradient operator is the result of the cubic spline difference of discrete refractive index values at five points in the neighborhood of the desired node, and the refractive index gradient at the node can be obtained as follows:
Figure 1 shows the tracing errors at different tracing step lengths. It can be seen in the figure that the tracing precision is not much different among the cases where the step lengths are 0.5 mm and 0.2 mm and adaptive. The tracing error at the adaptive step length is slightly smaller than those at the other two step sizes, which are all on the order of 10
−4. The reason for this phenomenon is that the refractive index is spatially discretely distributed, and the refractive index and refractive index gradient during the tracing process are obtained by interpolation, which inevitably introduces errors. Notably, the refractive index gradient needs to be interpolated twice, which eventually leads to a larger computation error. Comparing the curves at the three step length settings, the tracing error increases with increasing z-axis distance, which is accompanied by oscillation, and the maximum error at the adaptive step size is 3.09 × 10
−4. In addition, the number of steps required for tracing decreases with increasing tracing step size, and the adaptive step size adjustment method has the fewest tracing steps, so its computational efficiency is high. The results show that for the same grid cell, the ray tracing error is not sensitive to the tracing step size, but the adaptive step size adjustment ray tracing method can significantly improve the tracing efficiency.
In summary, the adaptive step size adjustment ray tracing method proposed in this paper has high computational accuracy and can effectively reduce the number of tracing steps, thereby reducing the computational load. The proposed method is suitable for ray tracing of any medium with a discrete spatial distribution of the refractive index.