## 2 Mathematical Foundation of Generalized Algorithm
### Modifications of Aperture Representation  
Several modified models have been proposed in [21; 22; 23] to evaluate the SE of an enclosure with arbitrarily positioned aperture. However, the simplest and most accurate model has been developed by the authors of [24]. According to this model, the value of \(Z_{qp}\) at an arbitrary location of the aperture on the frontal wall can be calculated as the product of (1) and the following factor:  
\[C_{mn}=\sin\left(\frac{m\pi X}{a}\right)\cos\left(\frac{n\pi Y}{b}\right), \tag{13}\]  
where; \(m\) and \(n\) are the not-negative integers, defining the numbers of \(TE_{mn}\) and \(TM_{mn}\) modes, and \(X\) and \(Y\) are the coordinates of the aperture centre on the front wall (see Figure 3). Figure 3: Front wall with an aperture shifted to the left (**a**), arbitrarily shaped aperture replaced by a set of coplanar stripline segments (**b**). Figure 2: Equivalent circuits after the first (**a**) and second (**b**) transformation steps. In [25], a modified analytical model for evaluating the SE of an enclosure with a circular aperture of radius \(r\) was proposed. The \(Z_{qp}\) value can be calculated using (1) or (11), but, first, the geometric dimensions of an equivalent rectangular aperture must be determined. The following equation is used for this purpose:  
\[l=w=r\sqrt{\pi}. \tag{14}\]  
According to [26], the \(Z_{qp}\) value for an elliptical shape aperture can be calculated as the product of (1) and (11). However, the characteristic impedance \(Z_{0s}\) in (1) must be replaced by:  
\[Z_{0s}=\frac{Z_{m}Z_{e}}{Z_{m}+Z_{e}}, \tag{15}\]  
where;  
\[Z_{m}=\frac{1}{2}\Bigg{[}\frac{k_{g}^{2}S}{3\pi Z_{g}}+\frac{S}{j2\pi f\
u_{0} \chi_{m}}\Bigg{]}^{-1}, \tag{16}\]  
\[Z_{e}=2\Bigg{[}\frac{k_{g}^{4}b^{2}S}{3\pi Z_{g}}+\frac{j2\pi f\varepsilon_{0} b^{2}S}{\chi_{e}}\Bigg{]}^{-1}, \tag{17}\]  
where; \(S\) is the area of the elliptic aperture, \(\varepsilon_{0}\) and \(\mu_{0}\) are the electric and magnetic constants, and \(\chi_{e}\) and \(\chi_{m}\) are the electric and magnetic polarizabilities of the aperture calculated from its dimensions and complete elliptic integrals of the first and second kind (for more details see [26]), respectively. Based on equivalent circuits, the SE evaluation for an enclosure with an arbitrary-shaped aperture can also be realized. For this purpose, according to [27; 28], \(Z_{qp}\) can be calculated from the results of full-wave numerical analysis. However, in [29], a fully analytical formulation for determining the \(Z_{qp}\) impedance for an arbitrary-shaped aperture has been proposed. Starting from the centre, the aperture is divided into several intervals (Figure 3b). Each of these intervals is replaced by a segment of a regular coplanar stripline with length \(l_{i}\) and width \(w_{i}\). The transmission line segments replacing the aperture edges are assumed to be short-circuited. First, the input impedance \(Z_{in\,i}\) of these segments is calculated, similar to (8). The calculated values act as loads for the following segments of the coplanar stripline, for which the input impedance is again calculated as:  
\[Z_{in}=Z_{0s}i\frac{Z_{in\,i-1}+jZ_{0s}i\tan(k_{0}l_{i})}{Z_{0s\,i}+jZ_{in\,i }\tan(k_{0}l_{i})}. \tag{18}\]  
The calculation by (14) continues until the two input impedances to the left and right of the aperture centre have been determined. Eventually, \(Z_{qp}\) is determined from the parallel connection of these two input impedances. Real shielding enclosures of electronic equipment usually contain several apertures with different shapes and sizes. To take this into account in the analytical SE evaluation, the following procedure was proposed in [25]. First, using (1) or (11)-(14), \(Z_{qp\,N}\) values are calculated separately for each aperture located on the front wall.