# Extending UWOC System Applications through Photon Transmission Dynamics Study in Harbor Waters
## 2 Materials and Methods
### The Process of Monte Carlo Numerical Simulation  
#### 2.3.1 The Initial Parameters of Photon Packets  
The Monte Carlo method is a stochastic simulation technique used to model the propagation of light in seawater. This method involves tracking the random propagation paths of numerous photons, thereby facilitating statistical analysis and calculation. In this approach, the light source is modeled as a collection of photon packets, each characterized by specific distribution properties. The simulation process is guided by the optical and water quality parameters pertinent to the communication system. The photon scattering angle, determined by the volume scattering phase function, plays a crucial role in this process. By tracking the trajectory of each photon, the method enables a detailed analysis of their motion paths. Ultimately, this simulation allows for the accumulation and analysis of data regarding the number of photons received and their distribution characteristics. Such comprehensive data are crucial for understanding and optimizing underwater communication systems. In the Monte Carlo simulation, the initial parameters of a photon are defined by its initial coordinates \((x_{0},\ y_{0},\ z_{0})\) on the Transmission Plane and the directional components \(\big{(}\mu_{0x},\ u_{0y},\ \mu_{0z}\big{)}\) of the photon's direction vector along the x, y, and z axes, respectively. These directional components, commonly referred to as Direction Cosines, determine the photon's propagation direction, while the coordinates indicate its current position. As illustrated in Figure 4, we assume that the photon packet travels along the z-axis and lies on the Transmission Plane. In the depicted setup, the Transmission Plane is situated within the x-y plane. The solid blue arrow in Figure 4 represents the initial direction vector of the photon packet. Additionally, the dashed blue rectangle illustrates the initial photon motion coordinate system, which undergoes changes with each photon scattering event. It is important to note that, despite the dynamic nature of the photon motion coordinate system, the coordinate system established by the transmitter and receiver remains constant. In other words, the x, y, and z axes, as shown in Figure 4, are fixed. This distinction between the changing photon motion coordinate system and the static system set by the transmitter and receiver is crucial for understanding the dynamics of photon movement and scattering in the simulation. Here, \((r_{0},\,\alpha_{0})\) is the polar coordinate for the initial photon position in the Transmission plane, the distance between the photon packet's current position, and the center of the light source is denoted as \(r_{0}\). Additionally, the initial azimuth angle (\(\psi_{0}\)) and elevation angle (\(\varphi_{0}\)) of the photon are specified. The photon's initial weight is set to \(\omega=1\). The initial coordinates of the photon \((x_{0},\,y_{0},\,z_{0})\) and the Direction Cosines \(\left(\mu_{0x},\,\,\mu_{0y},\,\,\mu_{0z}\right)\) are derived using trigonometric functions, as shown in Equations (5) and (6). \[ \begin{cases}x_{0}=r_{0}cos\alpha_{0}\\ y_{0}=r_{0}sin\alpha_{0}\\ z_{0}=0\end{cases}  \tag{5}\]  
\[ \begin{cases}\mu_{0x}=sin\varphi_{0}cos\psi_{0}\\ \mu_{0y}=sin\varphi_{0}sin\psi_{0}\\ \mu_{0z}=cos\varphi_{0}\end{cases}  \tag{6}\]  
In the Monte Carlo simulation process, the beam of the light source does not necessarily have to be azimuthally isotropic. The initial angle and the position for a photon packet should always be random, irrespective of the symmetrical nature of the beam. \(\alpha_{0}\) and \(\psi_{0}\) can be randomly determined, this random selection is guided by Equation (7), where \(R\) represents a random value within the normalized interval \([0,1]\). This method ensures that  
Figure 4: Schematic diagram of the initial position and orientation of the photon packet in the Transmission Plane. the angles are uniformly distributed, aligning with the radial symmetry of the light source and beam configuration. \[