How to control energy grids#
Last update: 2026-04-27
Contents
In this tutorial we are presenting all groups where energy grids can be defined for various models and outputs used across the simulator.
States and densities - grid{ energy_grid{ } }#
The energy grid defined within the group energy_grid{ } is used for energy-resolved charge densities:
electron charge densities \(n(x,E)\) and
hole charge densities \(p(x,E)\).
Furthermore, as the charge densities enter calculation of semiclassical spectra, these are defined on the same energy grid. Hence all the models triggered within the group optics{ semiclassical_spectra{ } } are using this definition of the energy grid.
Affected outputs are located directly in bias_*/, as well as in bias_*/Optics_Semi_classical/.
bias_*/*_LDOS.fld,
bias_*/*_LDOS_*.fld,
bias_*/*_density_vs_energy.fld,
bias_*/*_density_vs_energy_*.fld,
bias_*/Optics_Semi_classical/*_spectrum_*.dat, and
bias_*/Optics_Semi_classical/local_*_spectrum_*.fld.
You can easily explore this by modifying the content of the group energy_grid{ } in the input file 1DGaAs_SolarCell_computed_absorption.nnp in the tutorial GaAs solar cell.
Note that by setting the grid as below, one gets energy range from -3 eV to 4 eV for all denisties directly in the bias_*/ folder, but from 0 eV to 7 eV for all optical spectra in the bias_*/Optics_Semi_classical/ folder.
grid{
energy_grid{
energy_min = -3.0
energy_max = 4.0
energy_resolution = 0.01
}
}
On top of this, when our simple light propagation model is used with the computed spectra triggered by the keyword use_computed_spectra{ }, then then this grid will indirectly impact calculations of the generation rates \(G(x,E)\), even though they are defined on a different energy grid.
Output of charge densities as a function of energy - classical{ energy_distribution{ } }#
This grid is defined inside energy_distribution{ } only for the purpose of generating an output file bias_*integrated_densities_vs_energy.dat.
This energy grid does not impact any further calculations.
energy_distribution{
energy_min = -8.0
energy_max = 2.0
energy_resolution = 0.001
}
You can try it running the simulation UVC-LED_wz_III-N_1D.nnp from a tutorial AlGaN/AlN UVC-LED with distributed-polarization layer.
Photons in photogeneration - optics{ light_propagation{ } }#
Depending on how absorption spectra are going to be used in the simulation photogeneration, slightly different keywords are responsible for the definition of used energy grid.
Spectra computed within the runtime - use_computed_spectra{ }#
When the light propagation is triggered, a simple model is used to calculate absorption of the traveling photons together with related generation rates. One of the modes is to use semiclassical optical spectra (with the grid as described above) calculated within the same runtime. This can be triggered with by calling a group use_computed_spectra{ }.
In this case, the quantities such as generation rate, photon flux, and effective total absorption and transmission spectra are calculated on an energy grid with the range controlled by the keywords energy_min and energy_max, and the grid spacing inherited from the definition in energy_grid{ energy_resolution }.
All affected outputs are located in Irradiation/ and bias_*/Irradiation/.
Note
Differently to the definitions in energy_grid{ } described in the previous section, here both minimum and maximum energies defining the energy range must be positively defined.
grid{
energy_grid{
energy_resolution = 0.01
}
}
optics{
light_propagation{
energy_min = 0.5
energy_max = 4.5
use_computed_spectra{ }
}
}
To practice these keywords you can further explore the same input file 1DGaAs_SolarCell_computed_absorption.nnp from the tutorial GaAs solar cell.
Spectra imported to global framework - use_global_spectra{ }#
In this mode of the light propagation, a single imported global absorption spectrum is used for all regions. As this spectrum is not computed during the runtime and arbitrary the energy grid is allowed in the imported file, the energy grid for simulation must be fully defined within optics{ light_propagation{ } }, including the resolution inside use_global_spectra{ }. This is the grid to which imported spectra will be interpolated and further used for simulation.
All affected outputs are located in Irradiation/.
optics{
light_propagation{
energy_min = 0.5
energy_max = 4.5
use_global_spectra{
energy_resolution = 0.01
}
}
}
You can easily explore these settings by modifying the input file 1DGaAs_SolarCell.nnp from the tutorial GaAs solar cell.
Spectra imported to local framework - use_local_spectra{ }#
In this mode, the framework for position-resolved is used for the global imported spectra.
In some cases the results will be exactly the same as in the case of use_global_spectra{ }.
However, ohmic, schottky, or other similar contacts are treated as fully transparent.
The grid is defined similarly like in the previous case, but the resolution is defined within use_local_spectra{ }.
All affected outputs are also located in Irradiation/.
optics{
light_propagation{
energy_min = 0.5
energy_max = 4.5
use_local_spectra{
energy_resolution = 0.01
}
}
}
You can easily explore these settings by modifying the input file 1DGaAs_SolarCell.nnp from the tutorial GaAs solar cell.
Note
Having use_local_spectra{ } defined, you can also add the group output_local_spectra{ }.
Optical transitions based on wave functions - optics{ quantum_spectra{ { } }#
Another energy grid is separately defined in optics{ quantum_spectra{ } } for all optical spectra calculated within the Fermi’s golden rule.
This grid is completely independent from the previous definitions and impacts all optical spectra stored in the folder bias_*/OpticsQuantum/ and its subfolders.
optics{
quantum_spectra{
energy_min = 1.1
energy_max = 1.6
energy_resolution = 1e-4
}
}
You can test it by running absorption_InGaAs-QW_Dumitras_PRB_2002_1D.nnp from the tutorial Optical absorption of an InGaAs quantum well | 1D.
Transmission within ballistic transport - quantum{ cbr{ } }#
The last place where the energy grid can be defined is for calculations of the transmission function through a quantum device triggered by a group cbr{ }.
It is yet another independent definition not interfering with the other ones.
It impacts only output files located in bias_*/CBR/ and its subfolders.
quantum {
cbr{
energy_resolution = 0.0005
energy_min = 0.0
energy_max = 0.6
}
}
You can test it by running transmission-barrier_1D.nnp from the tutorial Transmission (CBR).