DOI: 10.23729/cfe98559-2ca5-43c6-b8f3-b542f9ff94bb
title: Replication package for "Enabling infinite Q factors in absorbing optical systems", 2023

description: This replication package provides detailed instructions for replicating the results presented in the article: "Enabling infinite Q factors in absorbing optical systems", Nanophotonics, 2023 (DOI: https://doi.org/10.1515/nanoph-2023-0281), by R. Kolkowski and A. Shevchenko. The instructions are given in the PDF file "Replication_instructions__Enabling_infinite_Q__Nanophotonics_2023.pdf" with the following contents: / Figures 1-5 and their captions (section I), / a Python code to obtain the results presented in Figure 1 (section II / file "Fig1_code.py"), / step-by-step tutorials for creating the COMSOL models necessary to obtain the results presented in Figures 2-5: - a model to perform the eigenfrequency analysis of the bare waveguide (Figure 2(b) and (c) / section III / file "eigfreq_analysis_Fig2bc.mph"), - a model to perform the scattering simulation of the metasurface - to obtain the electric field distribution at resonance under external excitation (Figure 2(d) / section IV / file "metasurface_scattering_Fig2d.mph"), - a model to perform the scattering simulations for many parameter values (an input for the cluster computations) - to obtain the values of the transmittance, reflectance, absorptance and field enhancement (Figures 3-5 / section V / file "metasurface_scattering_Fig345.mph"), / a batch submission script (file "run_sweep.slrm") and an auxiliary Python code (files "get_parameters_set.py" and "get_parameters_set_zoom.py") for running COMSOL computations on a cluster (section VI), / Python codes for reading, postprocessing and plotting the results: - a code to perform the mode analysis (finding the Bragg condition for the TE and TM modes) and to create the 2D plots (Figure 3 / sections VII, VIII, and IX / files "mode_analysis.py" and "plot_spectrum_vs_Px.py"), - a code to plot the selected spectra of the transmittance, reflectance, absorptance, and field enhancement (Figure 4 / section X / file "plot_selected_spectra.py"), - a code to extract the values of the Q factor and to plot them (Figure 5 / Section XI / files "extract_Q_factors.py" and "plot_Q_factors.py"). The dataset contains the following files: / COMSOL model files (.mph) created by following the instructions in sections III, IV, and V: - eigfreq_analysis_Fig2bc.mph (in the folder "Fig2bc"), - metasurface_scattering_Fig2d.mph (in the folder "Fig2d"), - metasurface_scattering_Fig345.mph (identical copies in the folders "Fig3_4_5" and "..._input_files"), / Python scripts (.py): - Fig1_code.py (in the folder "Fig1bcde"), - get_parameters_set.py (identical copies in the folders "Fig3a_input_files", "Fig3b_input_files", and "Fig3c_input_files"), - mode_analysis.py (identical copies in the folders "Fig3a_results", "Fig3b_results", and "Fig3c_results"), - plot_spectrum_vs_Px.py (different versions in the folders "Fig3a_results", "Fig3b_results", and "Fig3c_results"), - get_parameters_set_zoom.py (identical copies in the folders "..._zoom_input_files", "Fig5_blue_curve_input_files", and "Fig5_magenta_curve_input_files"), - plot_selected_spectra.py (different versions in the folders "Fig4..."), - extract_Q_factors.py (different versions in the folders "Fig5_..."), / Batch submission scripts (.slrm): - run_sweep.slrm (different versions in the folders "..._input_files"), / Additional files: - original Figures 1-5 (in the folders "Fig1bcde", "Fig2bc", "Fig2d", "Fig3_4_5", and "Fig5"), - images exported from COMSOL (in the folders "Fig2bc" and "Fig2d"), - text files with the definitions of the parameters and variables for the COMSOL models (in the folders "Fig2bc", "Fig2d", and "Fig3_4_5"), - an example "probe_table.txt" file (in the folder "Fig3_4_5"), - lists of the parameter values - files "full_list.txt" and "full_list_zoom.txt" (different versions in the folders "..._input_files"), - combined results of the COMSOL computations - files "spectrum_vs_Px_3a.txt", "spectrum_vs_Px_5_blue.txt", etc. (in the folders "...results", "Fig4...", and "Fig5_..."), - extracted values of the Q factors - files "Q_factors_Fig5_black_curve.txt", "Q_factors_Fig5_blue_curve.txt", etc. (in the folders "Fig5...") , - images generated by the Python scripts - files "spectrum_vs_Px_3a.png", "spectrum_4a.png", "Q_factors_Fig5_black_curve.png", etc. (in the folders "...results", "Fig4...", and "Fig5_...").