  Charge traps in the semiconductor bulk (bulk charge traps) make it difficult
to predict the electric field within wide-bandgap semiconductors. The issue is
the daunting number of bulk charge-trap candidates which means the treatment of
bulk charge traps is generally qualitative or uses generalized models that do
not consider the trap's particular electronic structure. The electric field
within a wide-bandgap semiconductor is nonetheless a crucial quantity in
determining the operation of semiconductor devices and the performance of
solid-state single-photon emitters embedded within the semiconductor devices.
In this work we accurately compute the average electric field measured at the
location of N$V^-$ charged defects for the substitutional N (N$_\text{C}$)
concentration of $n_{\text{N}_\text{C}} \approx 1.41\times10^{18}$ cm$^{-3}$
for the commonly used oxygen-terminated diamond (see [D. A. Broadway $et$
$al$., Nature Electronics 1, 502 (2018)]). We achieve this result by evaluating
the leading-order contribution to the electric field far away from the surface,
which comes from the N$_\text{C}$ defects that induce the ionization of the
N$V^-$. Our results use density-functional theory (DFT) and the principle of
band bending. Our work has the potential to aid both in the prediction of the
functioning of semiconductor devices and in the prediction and correction of
the spectral diffusion that often plagues the optical frequencies of
solid-state single-photon emitters upon repeated photoexcitation measurements.
Our results for the timescales involved in thermally driven charge transfer
also have the potential to aid in investigations of charge dynamics.
