OpenFOAM v2412 Discretization Scheme

Scharfetter-Gummel
Numerical Library

A robust exponential differencing implementation providing both fvm::sgDiv and fvc::sgDiv operators for stable transport modeling in high-gradient fields.

Numerical Formulation

Standard central or upwind differencing schemes often produce unphysical oscillations (overshoots) in drift-diffusion transport when the local Peclet number is high. The Scharfetter-Gummel scheme resolves this by assuming a constant flux between cell faces.

This assumes that the particle density $n$ varies exponentially between two nodes $i$ and $i+1$, leading to the following discretized flux expression:

$$J_{i+1/2} = \frac{D}{h} \left[ B(-\chi) n_i - B(\chi) n_{i+1} \right]$$

where $B(x)$ is the Bernoulli Function and $\chi$ represents the normalized potential drop:

$$B(x) = \frac{x}{e^x - 1}, \quad \chi = \frac{\mu \Delta \psi}{D}$$

Key Advantages

  • Ensures solution positivity for all field strengths.
  • Automatically transitions from central to upwind.
  • Reduces required mesh resolution in thin sheaths.

OpenFOAM Integration

The library is implemented as a custom divergenceScheme. Unlike standard schemes that only handle velocity-based flux, sgDiv accounts for the potential gradient provided by an interpolationScheme.

system/fvSchemes
divSchemes
{
    // Custom Scharfetter-Gummel for electron density ne
    div(phi,ne)      Gauss sgDiv;

    // Custom Scharfetter-Gummel for ion species ni
    div(phi,ni)      Gauss sgDiv;
}

interpolationSchemes
{
    // Potential gradient interpolation required for SG
    interpolate(psi) Gauss linear;
}

Implicit (fvm::sgDiv)

Designed for steady-state solvers where the drift-diffusion equation is solved as part of a matrix system. Maximizes diagonal dominance.

Explicit (fvc::sgDiv)

Optimized for PISO/PIMPLE transient loops where explicit correction of the species flux is required every time-step.

Explore the Source Code

This implementation is fully documented and hosted on GitHub. Feel free to clone, contribute, or open an issue for v2412 compatibility questions.