ChargeSimulatorNN
In semiconductor-based electro-optic modulators, the way charge carriers get redistributed along the device’s cross section with applied voltage plays a crucial role influencing not only the electro-optic response, but also the RF properties of the device. For this reason, we mus account for position and voltage dependent \(\epsilon_{rf}(x,y,V)\) as well as \(\Delta \epsilon_{opt}(x,y,V)\) in the simulation of the device’s RF and electro-optical response.
The ChargeSimulatorNN is a 1D poisson-drift-diffusion simulator based on the commercial software NextNano and their open-source python interface nextnanopy. It was created to provide a fast and effective way to include charge transport data into electro-optical simulations. The vast majority of III-V electro-optical modulators follow a vertical design like in the picture below, where the approximation that the 1D profile is copied in the horizontal direction is a very good one. For this reason, we have limited the use of this simulator to such cases.
Note
The generalization of the package to horizontal diodes such as the common silicon PN junctions ought to be simple to implement. However, due to time constraints, we are keeping it like this for the moment. If you need to implement such a feature, feel free to reach out and we will help you implement it.
Illustration of the 1D to 2D data interpolation performed with the ChargeSimmulatorNN.
- class imodulator.ChargeSimulator.ChargeSimulatorNN(device, simulation_line, inputfile_name='quicksave', output_directory='D:/Repos/imodulator/tests\\\\nn_output', temperature=300.0, bias_start_stop_step=[0, 1, 1])
Initialize the ChargeSimulatorNN.
- Parameters:
device (PhotonicDevice) – The photonic device to simulate.
simulation_line (LineString) – The line along which to perform 1D simulation.
inputfile_name (str, optional) – Name for the nextnano input file. Defaults to “quicksave”.
output_directory (str, optional) – Directory for simulation output. Defaults to config value.
temperature (float, optional) – Simulation temperature in Kelvin. Defaults to 300.0.
bias_start_stop_step (list, optional) – Voltage sweep [start, stop, step]. Defaults to [0,1,1].
Way of working:
The PhotonicDevice should be passed
The simualtion line should be defined as shapely.geometry.LineString.
Warning
Note that this linestring will define the field direction that will later be used for the electro optic calculations, meaning that the order of the points also matters!!
3. The boundaries of the simulation line will act as contacts of 10nm where the starting point will be contact1… and the end of the line will be contact2
The defined voltage will be applied thru contact1
Check your simulation line in the geometry via
>>> self.plot_with_simulation_line()
In order to run the NNInfile: #the commands are from the nextnanopy
>>> self.NNinputf.execute(show_log=False,convergenceCheck=True,convergence_check_mode="continue")
In order to load already completed results
>>> self.load_output_data(folderpath=r"AbsolutePath") #right click on the folder with the self.inputfile_name and copy path
In case you will use EO and RF module, move results to photonic device as interpolators to be used by other modules
- __init__(device, simulation_line, inputfile_name='quicksave', output_directory='D:/Repos/imodulator/tests\\\\nn_output', temperature=300.0, bias_start_stop_step=[0, 1, 1])
Initialize the ChargeSimulatorNN.
- Parameters:
device (
PhotonicDevice) – PhotonicDevice instance containing the device geometry and materials.simulation_line (
LineString) – LineString defining the simulation line along which to perform 1D simulation.inputfile_name (
str(default:'quicksave')) – Name for the nextnano input file. Defaults to “quicksave”.output_directory (
str(default:'D:/Repos/imodulator/tests\\\\nn_output')) – Directory for simulation output. Defaults to config value.temperature (
float(default:300.0)) – Simulation temperature in Kelvin. Defaults to 300.0.bias_start_stop_step (
list(default:[0, 1, 1])) – Voltage sweep [start, stop, step]. Defaults to [0,1,1].
- load_output_data(folderpath=None)
Load and store simulation output data from nextnano results.
- Parameters:
folderpath (str, optional) – Path to results folder. Uses default if None.
Reads bias-dependent data from output files indicated in the InFile and stores as 2D arrays indexed by bias point and position along the simulation line.
- Creates instance variables:
grid: Spatial grid positions [nm] Ec: Conduction band edge energy [eV] Ev: Valence band edge energy [eV] Efn: Electron quasi-Fermi level [eV] Efp: Hole quasi-Fermi level [eV] density_electron: Electron density [cm⁻³] density_hole: Hole density [cm⁻³] electric_field: Electric field [V/cm] mobility_electron: Electron mobility [cm²/Vs] mobility_hole: Hole mobility [cm²/Vs]
All arrays have shape (n_bias_points, n_grid_points).
- plot_results(V_idx=None, cmap='tab10')
Plot simulation results in a 2x1 subplot layout.
- Parameters:
V_idx (list, optional) – Indices of voltages to plot. Defaults to first and last.
colors (list, optional) – List of colors for plotting. Defaults to default color cycle.
- Returns:
Figure and axes objects
- Return type:
tuple
- plot_with_simulation_line(color_polygon='black', color_line='green', color_junctions='blue', color_simulation_line='red', fill_polygons=False, linewidth_simulation=2, fig=None, ax=None)
Plot the device polygons with the simulation line overlay.
- Parameters:
color_polygon (default:
'black') – Color for device polygonscolor_line (default:
'green') – Color for current calculation linescolor_junctions (default:
'blue') – Color for junction regionscolor_simulation_line (default:
'red') – Color for the simulation linefill_polygons (default:
False) – Whether to fill the polygonslinewidth_simulation (default:
2) – Line width for simulation linefig (default:
None) – Existing figure object (optional)ax (default:
None) – Existing axis object (optional)
- Returns:
matplotlib figure and axis objects
- Return type:
fig, ax
- transfer_results_to_device(dx=0.05, xmin=None, xmax=None)
Interpolate 1D simulation data onto a new 2D mesh.
Note
This method for the moment it only interpolates the 1D data onto the horizontal dimension.
- Parameters:
dx (float, optional) – Step size for new mesh in microns. Defaults to 0.05.
xmin (float) – Minimum x value for mesh (required).
xmax (float) – Maximum x value for mesh (required).
- Returns:
None. Stores interpolators in self.photonicdevice.charge.