Semiconductor diffusion current over time

Suppose you have an injection of holes into a semiconductor such that at some time you have this linear hole profile:

Because the diffusion current at any point is proportional to the slope of P at that point, the diffusion current is equal everywhere from 0 to L. I think this suggests that P(x) should not change over time, as long as this linear profile remains. But it seems to me that this completely linear profile can only exist for an instant since at x=L the charges need to end up somewhere, and if this is some block of P-type silicon of length L then the charges will start to stack up so that P(x) will increase from x=L back toward X=0. So then P(x) will gradually become flat, at which point there will be no more diffusion current. Is this correct?

I'm also wondering about the typical exponential carrier profile, as seen here for example:

Here since the slope of P(x) decreases as x increases, the current (pointing towards the right) decreases as x increases. So for some point x, $$\ P(x) > P(x+ \Delta) \$$, so at some instant in time more charge is entering some point from the left than is leaving it towards the right. This is generally explained by saying that the diffusing carriers are recombining as they go toward the right. However, like in the linear case, this particular form of P(x) is only valid at some instant, and as time goes on (toward the steady state), P(x) is becoming more flat, i.e. the holes are becoming evenly distributed and so will stop diffusing due to lack of gradient. Doesn't this mean that an alternative explanation of the decrease in current as you go to the right is that some holes are simply starting to build up in certain spots and so stop diffusing, thus leading to less current towards the right?

• In equilibrium, drift current cancels diffusion current Commented Jul 24, 2020 at 13:31
• from van.physics.illinois.edu/qa/listing.php?id=21874 : "You're right that there must be some charge density as the source of the field, but that density is typically a negligible fraction of n for n-doped materials. Thus it's usually an excellent approximation to treat the equilibrium concentrations as determined by the local doping and charge neutrality, even though the small violations of charge neutrality are essential to setting up the equilibrium fields." Commented Jul 24, 2020 at 13:47
• Thanks for the link; I think I understand why if the actual doping in the semiconductor is nonuniform (linear, exponential, etc) then the equilibrium carrier distribution will not be uniform (drift will balance it). But is this saying that if you take an instrinsic piece of semiconductor and inject excess carriers at one end (through shining light or something), the equilibrium carrier concentration will not be uniform? Commented Jul 24, 2020 at 21:07
• In a semiconductor device physics parlance, the concentration of injected excess carriers is never called "equilibrium carrier concentration". Citing ecee.colorado.edu/~bart/book/book/chapter2/ch2_6.htm , "a constant ambient constant temperature is not a sufficient condition for thermal equilibrium. In fact, applying a non-zero voltage to a device or illuminating it with light will cause a non-equilibrium condition, even if the temperature is constant." Commented Jul 25, 2020 at 5:32

Illuminating a surface of a piece of semiconductor creates both electrons and holes. Left as they are, these excessive charge carriers will recombine in the bulk of semiconductor. In this scenario, the excessive charge carrier distribution is obeyed to diffusion-type PDE with recombination terms.

To separate holes from electrons, you need to extract light-generated electrons from the bulk by external electric field. Or, alternatively, even without light, with external electric field you can extract heat-generated mobile electrons and have excessive holes that will not only diffuse into the bulk, but also drift into the same direction as they also feel the external electric field. Evidently, the scenario with external electric field is not what you are considering in your question.

You can also inject holes into your piece of semiconductor through a contact with another piece of a semiconductor highly doped with electron acceptors (p-type extrinsic semiconductor). This asymmetric doping configuration results in a p+n junction with depletion region extending mostly in a lightly doped side, that is, into your piece of an admittedly lightly doped n-type semiconductor. In this case, the charge carrier distribution starts with low concentration of holes in the depletion region. Outside a space charge region (depletion zone) and into a quasi neutral region of your lightly doped n-type semiconductor, a hole concentration exponentially approaches the equilibrium hole concentration of a semiconductor under consideration.

Depletion region width in your piece of semiconductor $$x_{n0} = \sqrt{2\epsilon_s{\phi_B}\over{qN_d}}$$ ϵs is the permetivity of semiconductor, q is the elementary charge, ϕB is the built-in potential, Nd is the donor concentration.

Injected hole concentration at x > xn0 $${\delta}p_n(x) = p_{n0}*(exp({qV\over{kT}}) - 1)*exp({-(x-x_{n0})\over{L_p}})$$ Lp is the diffusion length.

This is also unlike any of your graphs.

In all the considered scenarios, even in transient processes, there are no holes that "build up in certain spots and stop diffusing". The hole's fate is either to tend to equilibrium concentration or to recombine. I suppose you are overthinking the situation.