Number of Scatterings in Random Walks
0000-0001-9561-8134 1]Korea Astronomy & Space Science Institute, 776 Daedeokdae-ro, Yuseong-gu, Daejeon 34055, Republic of Korea 2]Astronomy and Space Science Major, University of Science and Technology, 217, Gajeong-ro, Yuseong-gu, Daejeon 34113, Republic of Korea \jkashead
1 Introduction
Scattering of radiation through a medium with a large optical depth occurs in various astrophysical contexts. The most frequently encountered scattering mechanisms include Thomson scattering of photons by non-relativistic free electrons in ionized gaseous nebulae and resonance scattering of Ly and Mg II photons in the neutral interstellar and circumgalactic medium. In Thomson scattering, the scattering cross section is nearly independent of the incident photon’s frequency. In earlier studies, the Ly radiative transfer (RT) problem was also investigated under the assumption that the resonance cross section could be approximated as that at the line center, independent of the photon frequency (e.g., Osterbrock, 1962), although, in reality, it is not.
The diffusion process of Thomson-scattered line radiation in a slab geometry, particularly in the context of polarization, was investigated in Chandrasekhar (1960) and Phillips & Meszaros (1986). The polarization of Thomson-scattered radiation in an oblate spheroidal medium was studied by Angel (1969). The wavelength dependence of polarization of a Thomson-scattered emission line was explored in Lee (1999) and Kim et al. (2007). A Monte Carlo study, conducted by Choe & Lee (2023), investigated the diffusion process of Thomson-scattered line radiation in both real space and frequency space. Monte Carlo Ly RT has also been extensively studied in many different astrophysical contexts (Ahn et al., 2000; Chang et al., 2023; Gronke & Dijkstra, 2014; Seon & Kim, 2020; Seon et al., 2022; Song et al., 2020; Verhamme et al., 2006; Yan et al., 2022; Zheng & Miralda-Escudé, 2002). Recently, a Monte Carlo RT simulation of the Mg II 2796, 2803 doublet line was also performed to investigate the doublet flux ratio (Seon, 2023).

These diffusion processes lead to the broadening of emission lines, with their strength and width determined by the number of scatterings experienced by photons and the gas temperature. Therefore, one of the most critical factors in understanding line formation processes is the number of scatterings. Osterbrock (1962) applied the probability methods from the random walk process described in Chandrasekhar (1943) to Ly photons. They found that the mean number of scatterings required for a photon to diffuse out would be in a medium with a very large optical depth, denoted as . A similar argument was developed by Rybicki & Lightman (1986) for a random-walk process, demonstrating that the mean number of scatterings undergone by a photon before escaping an optically thick medium is .
In the Ly RT process, the number of scatterings in the limit of large optical depth was analytically derived for a slab and a sphere by Harrington (1973) and Seon & Kim (2020), respectively. Seon & Kim (2020) validated the analytical solutions through Monte Carlo simulations, covering for a wide range of optical depths and gas temperatures in both slab and sphere geometries. However, surprisingly, to the best of our knowledge, we found no literature validating the approximate formula of Rybicki & Lightman (1986) for the number of scatterings in the simple random walk process, where the scattering cross section is independent of the photon frequency.
This absence of validation for the approximate formula concerning the number of scatterings in random walks has motivated the present study. We soon recognized that the formula is not correct and, consequently, derived new analytical formulas for both a sphere and a slab. These results were further verified through Monte Carlo simulations. The analytical approximations are derived in Section 2. Section 3 details the Monte Carlo simulation methods and results. The summary and discussion are found in Section 4.
2 Analytical Approximations
The approach in this study is similar to that adopted in Rybicki & Lightman (1986). However, we have derived the approximate equations accurately by carefully handling the probability distribution function for both sphere and slab geometries.
The scattering region is assumed to be a sphere or a slab, where photons are isotropically emitted from the center and scattering particles are uniformly distributed inside the region. The optical thickness of a medium is given by , where , , and represent the particle number density, cross section, and the radius of the sphere (or the height of the slab), respectively. The geometries and the definition of the system size are illustrated in Figure 1. The optical thickness can be expressed as in terms of the mean free path, . In the following, we note that the probability of being scattered within an optical depth interval at the optical depth is .
2.1 Sphere
In an optically thin sphere, photons will be scattered at most only once. Consequently, the mean number of scatterings eventually becomes equivalent to the probability that a photon undergoes scattering in the medium. The mean number of scatterings is then given by the following expression:
(1) | |||||
For a medium of large optical thickness, photons will be scattered multiple times. The displacement of a photon between the th and th scatterings is denoted by , as illustrated in Figure 1. The net displacement of the photon after scatterings is then . The average net displacement is obtained by squaring and then averaging it over all photons:
(2) |
where the angle brackets denote the average over all photons. The second term in the equation involves averaging the cosines of angles between the directions before and after scatterings. In the summation, and do not necessarily denote sequentially occurring scattering events. In the optically thick limit, this will vanish for any scattering type with front-back symmetry, such as isotropic, Thomson, or Rayleigh scattering. Then, only the first term will contribute to the mean net displacement, which will consequently become , where and are the mean number of scatterings and the mean square displacement for a single scattering event, respectively. The mean square displacement of a single scattering event can be calculated as follows:
(3) |
The photon will escape after the symetem acquiring the net displacement of . Therefore, the mean number of scatterings undergone by photons is given by
(4) |
Combining the above equations for optically thin and thick cases, we obtain an approximation that might be applicable in both optically thin and optically thick media:
(5) |
Our result differs from that of Rybicki & Lightman (1986) by a factor of 2 in the optically thick limit. This difference arises from their assumption that the path lengths between scatterings are always constant, rather than following the probability distribution function (PDF) . Their result is not self-consistent because they assumed the PDF when deriving the number of scatterings in the optically thin limit but not in the optically thick limit.
2.2 Slab
In an optically thin slab, photons will escape the system when the component of the displacement vector expected at the first scattering event is beyond the half height of the slab, i.e., when . Therefore, unlike in the spherical geometry case, the condition for scattering depends on the polar angle of the photon direction. The probability of being scattered when a photon is emitted into a direction of is because the optical thickness from the center to the slab boundary along that direction is . Therefore, the mean number of scatterings can be obtained by integrating the probability over , which is uniformly distributed in the range of . The resulting number of scatterings is then given as follows:
(6) | |||||
Here, is the upper incomplete gamma function, where is the Euler-Mascheroni constant. It is noteworthy that the number of scatterings for a slab is found to be higher than obtained for a sphere. This is because the optical depth along a direction with is always higher than that at .
In the optically thick limit, we need to consider the mean square of the component of the net displacement, which is given by:
(7) | |||||
Here, is the magnitude of the th displacement (i.e., ), and is the cosine of the polar angle of , measured from the positive -axis direction, as illustrated in Figure 1. The angles and are independent, and thus the second term will vanish if the scattering is front-back symmetric. The first term becomes if photons undergo scattering times before escaping. Here, represents the mean squared coordinate of the displacement vector between scattering events. The radiation field would be isotropic in the optically thick limit, even when the scattering is not isotropic, if it is front-back symmetric. In that case, the polar angle will be uniformly distributed, and can be estimated as follows:
(8) | |||||
As a result, the mean number of scatterings can be obtained from the condition , as follows:
(9) |
As for the spherical geometry, it is tempting to add the equations for the optically thin and thick case. However, it was found that the equation for the optically thin slab is applicable only to much lower optical thickness () compared to that for a sphere. This arise because the optical thickness of a slab along a direction parallel to the plane is, in fact, infinite. The formula was also found to significantly deviate from the simulation results at intermediate optical depths. Therefore, instead of simply combining the formulas for optically thin and thick limits, we made slight modifications to Equation (6) for the optically thin case and obtained an approximate formula. The final approximate formula is given as follows:
(10) |
In the next section, we demonstrate that this adjusted formula reproduces the simulation results fairly well.


3 Monte Carlo Simulation
In this section, we describe our Monte Carlo RT simulation method and compare the simulation results with the analytical approximation equations for the number of scatterings.
3.1 Simulation Methods
The Monte Carlo simulation algorithms adopted in this study are similar to those described in Seon & Kim (2020) and Choe & Lee (2023). Photons are traced from the center, where they are generated, until they escape from the scattering region. The emitting source is assumed to be monochromatic and isotropic. The scattering cross section is assumed to be independent of the wavelength, akin to the Thomson scattering process. The optical depth traveled by a photon between scattering events is directly proportional to the physical path length .
Simulations were performed using two different approaches: with and without adopting the first forced scattering algorithm. In the first approach, the optical depth traveled by a photon before experiencing the next scattering event is randomly chosen as follows:
(11) |
where is a uniformly distributed random number between 0 and 1. In this approach, the photon weight is always . In the second approach, to minimize the inefficiency inherent in simple Monte Carlo simulations in the optically thin limit, the forced scattering algorithm is adopted for the first scattering event for every photon (e.g., Cashwell & Everett, 1959; Witt, 1977; Baes et al., 2011; Seon, 2023). The optical depth traveled between scattering events is randomly chosen as follows:
(12) |
where is a uniform random number, and is the photon weight. The photon weight is for the first scattering event, and for subsequent scatterings. Here, for a sphere, while for a slab, when the photon is emitted along a direction corresponding to . The results obtained using both approaches were found to agree very well. In this paper, the results obtained using the first approach are presented.
The next scattering location from the current position is determined by , where is the current propagation direction vector of the photon before the scattering. Because the scattering medium is assumed to have a constant density in this study, distances are measured in units of the mean free path (i.e., ). After determining the next scattering location, the radial distance of the photon is compared with the radius in the case of spherical geometry or the coordinate is compared with the height of the medium in the case of slab geometry. The comparison determines the fate of the photon – whether it escapes the system or continues scattering.
If the photon does not escape, the next scattering propagation vector is chosen by sampling the scattering polar angle and azimuthal angle relative to . The scattering angles are defined in a coordinate system formed by three unit vectors: , , and , provided is not parallel to (i.e., ). If is parallel to , the three basis vectors are chosen to be , , and . Once the scattering angles (, ) were sampled according to an appropriate PDF, the next propagation vector is obtained as follows:
(13) |
where . The formulas given in Pozdnyakov et al. (1983) and Seon (2009) are equivalent to the above equation, except for the definition of , which is modified as . In the case of isotropic scattering, and for two independent, uniformly distributed random numbers and . In Thomson scattering, the scattering angle is sampled according to the distribution function proportional to . For Thomson scattering, µ is chosen as follow for a uniform random number :
µ | (14) |
This equation is derived in Seon (2006) and further discussed in Seon & Kim (2020).
The number of scatterings for each photon is calculated by adding the photon weight every time it undergoes scattering. The process continues until the photon escapes. Finally, the mean number of scatterings is calculated by averaging the results obtained for a large number of photons. The number of photons used in this study ranges from to , depending on the medium’s optical depth . For optically thin cases (), or photons were used, while a relatively small number of photons were adopted for optically thick cases.
3.2 Comparison with the analytic approximations
Figure 2 presents the results of the Monte Carlo RT simulations conducted in a sphere (left panel) and in a slab (right panel). In the upper panels, the results obtained by assuming the isotropic scattering are compared with the analytical approximations, Equations (5) and (10). Additionally, the formula proposed by Rybicki & Lightman (1986) is also compared. In the figure, the black lines with circles represent the simulation results, while the red lines indicate the analytic approximations. The red solid line represents our formula, while the red dashed line represents the formula from Rybicki & Lightman (1986). As can be seen in the figure, the simulation results are well reproduced using our formulas in both a sphere and a slab. On the contrary, in optically thick cases, the formula of Rybicki & Lightman (1986) overpredicts the simulation for a sphere by a factor of 2, while it underpredicts those for a slab by a factor of 1.5. In optically thin cases, it significantly underpredicts the results for a slab. It is also evident that, for a given optical thickness , the number of scatterings in a slab is always higher than that in a sphere, as the optical thickness in a slab depends on the photon propagation direction and becomes very high in the plane direction.
The red lines in the lower panels present the relative discrepancies between the approximate formulas and the simulations where the isotropic scattering is adopted. The figures illustrate that the approximate formulas reasonably account for the simulation results within approximately 9% for a sphere and 13% for a slab. It is evident that the accuracy of the approximate formula for a sphere is better than that for a slab. This arises from the fact the optical thickness toward the direction near the plane in a slab can be very large even in the case of .
The lower panels in Figure 2 also display the relative differences between the simulation results for isotropic scattering and Thomson scattering in the blue lines with crosses. Although the differences are minor, one might recognize that the Thompson scattering results yield slightly, but systematically, larger numbers of scatterings, particularly in the case of a slab geometry with optical thicknesses of . This minor difference is attributed to the fact that, in relatively low optical thicknesses, the radiation field in an asymmetric slab is less isotropic compared to the spherical symmetric case. However, at high optical thicknesses (), the radiation field rapidly become isotropic even in a slab geometry.
4 Summary and Discussion
In this paper, we derived approximate formulas (Equations 5 and 10) for the number of scatterings in random walk processes, where the cross section is independent of the photon frequency, both in a sphere and a slab. The formulas demonstrate a good match with the Monte Carlo simulation results, with discrepancies reaching a maximum of only approximately 9% for a sphere and 13% for a slab. The formulas apply to both isotropic and Thomson scattering.
It is also found that, for a given optical thickness, the number of scatterings in a slab is always higher than that in a sphere. This is because the optical thickness of photons propagating approximately parallel to the plane in the slab can be very high.
It is noteworthy that in the optically thick limit, the number of scatterings in Ly RT is proportional to : for a sphere and for a slab (Seon & Kim, 2020). This linear dependence is significantly different from that expected in random walks, where the number of scatterings is proportional to . This difference arises from the diffusion in frequency that occurs in Ly RT, a phenomenon not present in random walks. Once the frequency of a Ly photon diffuses into the wings far from the line center, the cross section decreases dramatically, leading to escape through a single longest ‘excursion,’ as described by Adams (1972). Consequently, the number of scatterings decreases markedly compared to the case of random walks.
While it is beyond the scope of this paper to investigate line broadening in detail based on the number of scatterings, it is reasonable to assume that, after a sufficiently large number of scatterings, the core of an emission line profile will be well described by a Gaussian profile, with its width approximately proportional to the square root of the number of scatterings (equivalently, proportional to the optical depth), owing to the independence of the scattering cross-section on the photon frequency. In Figure 6 of Choe & Lee (2023), the full width at half maximum (FWHM) of the Thomson-scattered line for is approximately twice as wide as that for , consistent with our expectation. Therefore, in the case of spherical geometries, using the formula from Rybicki & Lightman (1986) would predict a broader line width by a factor of for a given optical depth (column density). Conversely, for slab geometries, the line width is predicted to be narrower by a factor of at a fixed optical depth. In practical terms, when analyzing observational data, their formula will suggest a lower column density by a factor of in spherical geometry and a higher column density by a factor of in slab geometry.
In the present study, we considered uniform density media. In a plane-parallel medium, where the density depends only on the height () from the midplane, the number of scatterings is expected to be independent of the detailed density dependence on . This independence arises because the integral of a density over a length along a direction angle , measured from the plane, is simply given by . This integral is independent of the detailed functional form of . Indeed, in their Ly radiative transfer study in media with power-law density profiles, Lao & Smith (2020) found that emergent Ly spectral profiles from any density profile in slab geometry are equivalent to those from a uniform medium with the same vertically-measured optical depth. However, in sphere geometry, the integral of a density profile – a function of the radius – over a distance along a direction strongly depends on the detailed structure of the density profile along the path. In the study by Lao & Smith (2020), it was found that the emergent Ly spectrum from a sphere with a power-law density profile ( for a positive ) becomes narrower, and its peak shifts towards the line center as the density drops more steeply (larger ). This result indicates that the number of scatterings of Ly photons is smaller for a steeper density profile, characterized by a higher density at the center. Similar trends are expected in the case, where the cross-section is independent of the frequency, as addressed in the present study. However, no detailed interpretation of this behavior was provided in their study. This trend is attributable to the fact that the solid angle subtended by a high-density central region from a location is always smaller than that corresponding to the same column density expected in the case of uniform density. Consequently, the probability of scattering toward low densities is higher than in a uniform sphere, resulting in a smaller number of scatterings.
Acknowledgements.
The authors are grateful to the referee, who provided constructive comments. This work was partially supported by a National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. 2020R1A2C1005788) and by the Korea Astronomy and Space Science Institute grant funded by the Korea government (MSIT; No. 2023183000 and 2023186903).References
- Adams (1972) Adams, T. F. 1972, ApJ, 174, 439
- Ahn et al. (2000) Ahn, S.-H., Lee, H.-W., & Lee, H. M. 2000, JKAS, 33, 29
- Angel (1969) Angel, J. R. P. 1969, ApJ, 158, 219
- Baes et al. (2011) Baes, M., Verstappen, J., De Looze, I., et al. 2011, ApJS, 196, 22
- Cashwell & Everett (1959) Cashwell, E. D., & Everett, C. J. 1959, A Practical Manual on the Monte Carlo Method for Random Walk Problems (Oxford: Pergamon Press)
- Chandrasekhar (1943) Chandrasekhar, S. 1943, Reviews of Modern Physics, 15, 1
- Chandrasekhar (1960) Chandrasekhar, S. 1960, Radiative transfer (New York: Dover Publications)
- Chang et al. (2023) Chang, S.-J., Yang, Y., Seon, K.-I., Zabludoff, A., & Lee, H.-W. 2023, ApJ, 945, 100
- Choe & Lee (2023) Choe, H. Y., & Lee, H.-W. 2023, JKAS, 56, 23
- Gronke & Dijkstra (2014) Gronke, M., & Dijkstra, M. 2014, MNRAS, 444, 1095
- Harrington (1973) Harrington, J. P. 1973, MNRAS, 162, 43
- Kim et al. (2007) Kim, H. J., Lee, H.-W., & Kang, S. 2007, MNRAS, 374, 187
- Lao & Smith (2020) Lao, B.-X., & Smith, A. 2020, MNRAS, 497, 3925
- Lee (1999) Lee, H.-W. 1999, ApJ, 511, L13
- Osterbrock (1962) Osterbrock, D. E. 1962, ApJ, 135, 195
- Phillips & Meszaros (1986) Phillips, K. C., & Meszaros, P. 1986, ApJ, 310, 284
- Pozdnyakov et al. (1983) Pozdnyakov, L. A., Sobol, I. M., & Syunyaev, R. A. 1983, Astrophys. Space Phys. Res., 2, 189
- Rybicki & Lightman (1986) Rybicki, G. B., & Lightman, A. P. 1986, Radiative Processes in Astrophysics (New York: Wiley)
- Seon (2006) Seon, K.-I. 2006, PASJ, 58, 439
- Seon (2009) Seon, K.-I. 2009, PKAS, 24, 43
- Seon (2023) Seon, K.-I. 2023, submitted to ApJ, arXiv:2310.17908
- Seon & Kim (2020) Seon, K.-I., & Kim, C.-G. 2020, ApJS, 250, 9
- Seon et al. (2022) Seon, K.-I., Song, H., & Chang, S.-J. 2022, ApJS, 259, 3
- Song et al. (2020) Song, H., Seon, K.-I., & Hwang, H. S. 2020, ApJ, 901, 41
- Verhamme et al. (2006) Verhamme, A., Schaerer, D., & Maselli, A. 2006, A&A, 460, 397
- Witt (1977) Witt, A. N. 1977, ApJS, 35, 1
- Yan et al. (2022) Yan, D., Seon, K.-I., Guo, J., Chen, G., & Li, L. 2022, ApJ, 936, 177
- Zheng & Miralda-Escudé (2002) Zheng, Z., & Miralda-Escudé, J. 2002, ApJ, 578, 33