# 1D - C-V curve calculation for general structures (Post-processing by python)¶

nextnano++ can calculate many fundamental quantities like potentials, carrier densities, wave functions and so on. By processing the results of nextnano++ using the calculation tools such as python, we can calculate further advanced characteristics required for some specific devices.

C-V curve is one of the example of such characteristics. This curve is used for the analysis of the devices that could have a depletion region such as metal-insulator-semiconductor, p-n junction, MOSFET and so on.

Specifically, the C-V characteristic is obtained by calculating the capacitance as

$C=\frac{dQ}{dV}.$

When the bias sweep and spacial integration are specified in the input file, the electron and hole densities integrated over the region are output in integrated_density_electron.dat and integrated_density_hole.dat with respect to each bias. The C-V curve can be calculated by taking a derivative of the Q-V curve that is obtained from these data file.

(For the details of bias sweep and spacial integration, please refer to the input file of the tutorial in Example.)

In this tutorial we provide python scripts that calculate and plot the C-V curve. They are applied to our MIS tutorial here, but they can also be applied for the general structures that output integrated_density_electron.dat and integrated_density_hole.dat. The second script uses our post-processing tool nextnanopy.

## Post-processing without nextnanopy¶

CapacitanceBySplines_2021_Nov.py first calculates the Q-V curve interpolating the total integrated charges obtained from the data files and calculates the C-V curve from that Q-V curve.

Example command:

python C:\Users\naoki.mitsui\Documents\CapacitanceBySplines_2021_Nov\CapacitanceBySplines_2021_Nov.py -o C:\Users\naoki.mitsui\Documents\nextnano\Output\ -p


The commandline options are followings:

• -o : Path of the output folder where integrated_density_hole.dat and integrated_density_electron.dat are stored follows. (required)

• -p : if present in the command line, the total integrated charge and interpolated C-V curves will be plotted using Matplotlib (optional)

• -b1 : Substring of the contact that will be used as reference follows. When not specified the first common contact of both integrated_density files will be used. (optional)

• -b2 : Substring of a second contact that will be used as reference follows. The final C-V will be calculated as function of the voltage given by bias1 - bias 2. If bias1 was not specified, bias2 will be ignored. (optional)

### Example¶

Here we have a MIS tutorial: “Capacitance-Voltage curve of a “metal”-insulator-semiconductor (MIS) structure”.

After running the nnp input file of this tutorial MIS_CV_1nmSiO2_1D_nnp.in, we can find integrated_density_electron/hole.dat in the output folder.

By executing CapacitanceBySplines_2021_Nov.py in the following command,

python C:\Users\naoki.mitsui\Documents\CapacitanceBySplines_2021_Nov\CapacitanceBySplines_2021_Nov.py -o C:\Users\naoki.mitsui\Documents\nextnano\Output\MIS_CV_1nmSiO2_1D_nnp\ -p


we get the Q-V curve and C-V curve as follows.

## Post-processing with nextnanopy¶

This part will be added soon.