## 4 Monte Carlo Simulation
### MCS Framework
#### 4.1.3 Photon Travelling Step  
First, the \(l\) can be defined as the geometric distance a photon might travel between two events. For completeness, it is a good idea to explain how \(s\) statistical expression emerged in [66]. It is very important to focus on the definition's declaration stated earlier. As stated above, \(s\) is the geometric distance a photon travels between two scattering events. This means that the only risk the photon might encounter is the absorption. The translation of the stated impairment's assumption statement into a mathematical representation in Equations (47) and (48) leads to the elimination of the second term on the RHS of Equations (47) and (48). Because this term describes the energy flow due to the scattering impairment that is not required while the photon travels between two scattering events, there is no need to use Equations (47) or (48). Still, instead, we can use Equation (44) directly. Then, if we assume the constant distribution across the solid \(\Phi\), then we can rewrite Equation (44) in the following format:  
\[\frac{dI(\tau,\theta_{s})}{I(\tau,\theta_{s})}=\left.\frac{c\ d\tau}{\cos \theta_{s}}\right. \tag{64}\]  
By integration, we obtain the following:  
\[\left.\frac{I(\tau,\theta_{s})}{I_{0}}=\left.\frac{I(\tau)}{I_{0}}\right|_{ \theta_{s}}=p(\tau)=\left.\frac{e^{-\tau c}|_{\theta_{s}}}{\cos\theta_{s}}\right. \tag{65}\]  
where \(\theta_{s}\) is the scattering angle of the photon under consideration, and \(p(\tau=l)\) is the PDF for light attenuation with respect to \(\tau(l)\), which is the optical distance travelled. The associated CDF \(P(l)\) of \(p(l)\) can be expressed as follows:  
\[P(l)=\int\limits_{0}^{l}e^{-\tau}d\tau~{}~{}=~{}(1-e^{-lc}) \tag{66}\]  
Many MCS studies (e.g., [73]) for simulating UOWC channel computation used the idea of photon weight. The primary motivation for this assumption is to avoid unnecessary computation cycles to emulate the full travel distance of photons that never reach the surface of the photodetector; such an assumption adds a bias to the CDF's Equation (66). Hence, Equation (66) will assume the following form:  
\[l=L-\ln\Bigl{[}e^{L}+\Bigl{(}1-e^{L}\Bigr{)}q\Bigr{]} \tag{67}\]  
where \(L\) is the communication linkspan between the Tx and Rx, and \(q\) is an RV, which represents the value of \(P(l)\), _and_\(q\) has a value range of \(0\ \leq\ q\ \leq\ 1\). However,  
degree of randomness will be less than expected, which weakens the random framework of the MC computational approach. To portray a complete random propagation process, Equation (73) will take the following form:  
\[f\big{(}z,\ E_{p},\ K\big{)}=-\sum_{k=1}^{K}\Bigg{[}\sum_{m=1}^{M_{k}}\bigg{(} \frac{n_{k,m}cos\theta_{k,m}}{c_{k,m}}\bigg{)}\text{In}(\ q_{k,m}\ )\Bigg{]}_{E_{p}|m}\ \text{ Full random selections (inhomogeneous medium)} \tag{74}\]  
where \(c_{k,m}\) and \(\theta_{k,m}\) each assumes random values for each photon \(k\) at every step \(m\) during the propagation. The term \(\text{In}(\ q_{k,m}\ )\) is proportional to the travelled radial distance \(s\). Equations (73) and (74) are the governing equations of the MCS programme. In Equation (43), we assumed a point photon source. Hence, there is no term to represent the optical pulse profile. Equations (73) and (74) are the fundamental received photon intensity profiles implemented in the MCS studies. The stochastic model numerical solution [25] of the RTE expanded on Equations (73) and (74) by applying PDF for the \(\theta_{k,m}\). However, the work in [25] does not consider the PDF averaging of \(n_{k,m}\) and \(c_{k,m}\) in Equation (74). Equations (73) and (74) do not account for the optical source profile (i.e., emitted pulse profile), which implies that the initial position and direction for all photons are the same. Otherwise, i.e., when assuming an extended light source, Equations (73) and (74) need to be modified in terms of the temporal or spatial profile. Such modification is shown in Equations (75) and (76) below.