## 2 Design and Model  
The proposed sensor is schematically depicted in Figure 1. The total diameter of the fiber was \(D=24\)\(\upmu\)m. The PCF cross section was composed of a hexagonal array of air holes in a silica background (Figure 1a). The diameter of the fiber core was \(5\)\(\upmu\)m, and the distance between two adjacent air holes was \(\Lambda=2\)\(\upmu\)m. The diameter \(d\) of each air hole was obtained from the ratio \(d/\Lambda=0.88\). The D-shaped structure can be fabricated by the stack-and-draw technique [13]. A metamaterial layer composed of silver nanorods embedded in an alumina matrix was deposited on the flat surface of the fiber. Its total width and thickness were \(10\)\(\upmu\)m and \(40\) nm, respectively. Figure 1b highlights the metamaterial structure. Figure 1: D-shaped photonic crystal fiber with a metamaterial layer. (**a**) Cross section of the sensor with total diameter \(D=24\)\(\upmu\)m and \(\Lambda=2\)\(\upmu\)m. The diameter \(d\) of each air hole was obtained from the ratio \(d/\Lambda=0.88\). The outermost layer that encloses the entire domain corresponds to a 0.1 D-thick PML. (**b**) A closer view of the orientation of the silver nanowires in the metamaterial layer with respect to the flat face of the D-shaped PCF. (**c**) A perspective view of the metamaterial layer deposited on the top of the flat face of the PCF. The layer is \(10\)\(\upmu\)m width and \(40\) nm thick. For accurate modeling at the optical spectral range, the dispersive characteristics of all materials in the sensing structure had to be considered. The refractive index of silica was computed from the Sellmeier equation [14], and the air region was modeled by a constant refractive index \(n_{air}=1\). The metamaterial was described in terms of its effective bulk permittivity, which was computed from Maxwell-Garnett theory (MGT) [15]:  
\[\varepsilon=\varepsilon_{h}\frac{1+2f\frac{\varepsilon_{1}-\varepsilon_{h}}{ \varepsilon_{1}+2\varepsilon_{h}}}{1-f\frac{\varepsilon_{1}-\varepsilon_{h}} {\varepsilon_{1}+2\varepsilon_{h}}}. \tag{1}\]  
where \(\varepsilon_{1}\) corresponds to the permittivity of silver nanorod inclusions and \(\varepsilon_{h}\) is the permittivity of the alumina host medium. In general, MGT does not properly retrieve the effective constitutive parameters of media with an arrayed set of large inclusions due to disregarding multipole interactions between local fields [15; 16; 17]. In uniaxial media, however, this analytical model remains valid to describe lightwave couplings that are direct contributions from local modes excited along the optical axis [18; 19; 20]. Since the surface plasmon modes at the flat interface between the D-shaped PCF and a conductive layer are excited by the fiber mode polarized perpendicularly to the interface [4; 11], the plasmonic resonances derive from the local plasmon modes excited along the optical axis of the nanowire medium in the case of the geometric configuration displayed in Figure 1, preserving the accuracy of the Maxwell-Garnett formalism for the homogenization of the metamaterial. In Equation (1), the filling factor \(f\) represents the fractional volume of silver that composes the metamaterial lattice. The dispersive permittivity of silver was obtained from the corrected version of the Drude-Lorentz model [11]:  
\[\varepsilon_{Ag}(\omega)=\varepsilon_{\infty}-\frac{\omega_{p}^{2}}{\omega( \omega+i\gamma)}-\frac{\Delta\varepsilon\Omega_{L}^{2}}{\left(\omega^{2}- \Omega_{L}^{2}\right)+i\omega\Gamma_{L}} \tag{2}\]  
The parameters \(\omega_{p}=2155.6\) THz and \(\gamma=15.92\) THz are the plasma frequency and damping factor, respectively, and \(\varepsilon_{\infty}=5.9673\) stands for the residual polarization of silver at high frequencies. The parameters in the correction factor are \(\Delta\varepsilon=1.09\), \(\Omega_{L}=650.07\) THz, and \(\Gamma_{L}=104.86\) THz [21]. To evaluate the spectral output of the SPR sensor, we carried out numerical modeling of the effective guided modes using the finite element method software COMSOL Multiphysics [22].