Mode solver semivectorialΒΆ

[1]:
import numpy as np
import matplotlib.pyplot as plt
import modes as ms

ms.mode_solver_semi(n_modes=2, thickness=0.22, width=0.5, wavelength=1.55)
[1]:
<modes._mode_solver_semi_vectorial.ModeSolverSemiVectorial at 0x7f090c463610>
[2]:
ms.mode_solver_semi(n_modes=2, thickness=0.22, width=0.5, wavelength=1.55, logscale=True)
[2]:
<modes._mode_solver_semi_vectorial.ModeSolverSemiVectorial at 0x7f08d900fd90>
[3]:
ms.mode_solver_semi?

Convergence tests

Lets change the simulations size and see how the neff changes

[4]:
sub_widths = np.linspace(1.5, 3, 3)
n_effs = [ms.mode_solver_semi(plot=False, n_modes=1, sub_width=sub_width).results['n_effs'][0].real for sub_width in sub_widths]
[5]:
plt.plot(sub_widths, n_effs)
plt.xlabel('simulation width (um)')
plt.ylabel('neff')
[5]:
Text(0, 0.5, 'neff')
../_images/notebooks_10_mode_semi_6_1.png
[6]:
ds = np.linspace(0.01, 0.02, 3)
n_effs = [ms.mode_solver_semi(plot=False, n_modes=1, y_step=d, x_step=d).results['n_effs'][0].real for d in ds]
[7]:
plt.plot(ds*1e3, n_effs)
plt.xlabel('mesh size (nm)')
plt.ylabel('neff')
[7]:
Text(0, 0.5, 'neff')
../_images/notebooks_10_mode_semi_8_1.png
[ ]: