## 2 Materials and Methods
### Design of Simulation
#### 2.1.1 The Formulas for Calculating SPL  
Noise hazards can be measured, calculated, and interpreted using sound pressure formulas. Using these formulas and calculations, the algorithm can estimate the resulting noise levels or predict the outcome of any modifications [32]. Pressure is a fundamental element in acoustics, with its general formulation presented in Equation (1). The human  
Figure 1: Acoustic ray tracing algorithm framework [31]. ear can detect a wide range of sound pressures, with the threshold of hearing at 0.0002 Pa and 200 Pa being considered a loud sound [33]. \[Pressure(\mathrm{Pa})=\frac{Force(\mathrm{N})}{Area\ (\mathrm{m^{2}})} \tag{1}\]  
The dB scale used to quantify sound is log-based and can be calculated according to Equation (2). It starts at zero when sound pressure equals the threshold of human hearing [33]. \[decibel(\mathrm{dB})=10 log\frac{acoustic\ energy}{reference\ energy} \tag{2}\]  
Reference energy is the threshold of human hearing. Acoustic energy cannot be readily measured, but it is proportional to the square of the sound pressure. \(p\) represents the sound pressure in Pascal (Pa), and \(p_{o}\) represents the reference sound pressure at the threshold of human hearing, which is the Root-Mean-Square (RMS) sound pressure of 0.00002 Pa [33]. \[Sound\ Pressure\ Level\ (\mathrm{dB})=10\ log\frac{p^{2}}{p_{o}{}^{2}}=10 log\bigg{(} \frac{p}{p_{o}}\bigg{)}^{2}=20 log\frac{p}{p_{o}} \tag{3}\]  
SPL over distance is calculated using the inverse square method. In terms of the propagation and attenuation of sound, the inverse square law is a principle in physics, whereby a point source emits a sound wave uniformly in all directions (essentially spherically), where the intensity of the sound wave energy at any given point away from the source is diminished as a function of the total surface area of the sphere coincident with that point. This method can be simplified into Equation (3). \(SPL_{diff}\) is the difference in SPL in dB, while \(r_{1}\) and \(r_{2}\) are the distance of the resultant SPL from the source in meters, as shown in Equation (4). \[Difference\ of\ Sound\ Pressure\ Level,\ \mathrm{SPL}_{diff}=20 log\bigg{(}\frac{r_{1}}{r_{2}} \bigg{)} \tag{4}\]  
Therefore, the resultant Sound Pressure Level (\(SPL_{resultant}\)) over a certain distance (\(r\)) in meters from the SPL at the source (SPL\({}_{source}\)) can be calculated using Equation (5) [34]. \[\mathrm{Resultant\ Sound\ Pressure\ Level,\ \mathrm{SPL}_{resultant}=\mathrm{ SPL}_{source}(\mathrm{dB})-20 log\bigg{(}\frac{1}{r}\bigg{)}} \tag{5}\]  
Since SPLs are based on a log scale, they cannot be added directly. They must be converted back to pressure (Pa), added together, and converted back to log scale (dB), as shown in Equation (6) [34]. \[Total\ Sound\ Pressure\ Level,\ \mathrm{SPL}_{T}=10\log\bigg{(}\sum_{i=1}^{n}10^{( \frac{\mathrm{SPL}_{i}}{\mathrm{bo}})}\bigg{)} \tag{6}\]  
where the SPL\({}_{T}\) is the total SPL and the SPL\({}_{i}\) is the \(i\)th SPL to be summed. The resultant of two sound sources with an equal value will always result in a 3 dB increase. Loud sounds are dangerous only when exposed to a person for a specific amount of time. This is known as the daily noise exposure limit. DOSH, Malaysia, has set allowable SPL for an 8-hour shift, and a 3 dB change will half or double the time. Therefore, the daily noise exposure limit is calculated using Equation (7) [35]. \[Daily\ exposure\ limit\ (\mathrm{hrs})=\frac{8}{2^{(L-85)/3}} \tag{7}\]If a person is exposed to different sources for a different amount of time, the exposure limit is calculated using the percentage of noise dose formula, as shown in Equation (8) [34]. \[\%\ Dose=\left(\frac{C_{1}}{T_{1}}+\frac{C_{2}}{T_{2}}+\ldots+\frac{C_{n}}{T_{n }}\right)*100 \tag{8}\]  
where \(C\) is the exposure time, and \(T\) is the time allowed to be exposed at each dB level. To combat high sound exposure levels, ear protection devices such as earplugs and earmuffs are used.