Charge ⚡#

The charge solver computes the steady-state (DC) and optional small-signal AC response of semiconductor devices from the drift-diffusion equations. A charge simulation is composed of a HeatChargeSimulation that bundles the device structures and their charge mediums, the boundary conditions (voltage/current contacts), the monitors that record the fields and device characteristics, and an analysis specification that drives the solve.

Charge simulations run on the accelerated solver by default. The analysis specifications are listed under Analysis; tolerance and convergence guidance and the accelerated-only features are covered in the Accelerated solver and convergence section.

Simulation#

HeatSimulation

Contains all information about heat simulation.

HeatChargeSimulation

Defines thermoelectric simulations.

Charge Mediums#

The electrical behaviour assigned to a structure’s medium.charge. Conductors and insulators set contacts and dielectric regions; the semiconductor medium carries the doping, mobility, recombination and band models that the drift-diffusion solver uses.

ChargeConductorMedium

Conductor medium for conduction simulations.

ChargeInsulatorMedium

Insulating medium.

SemiconductorMedium

This class is used to define semiconductors.

Mobility#

Carrier mobility models assigned to SemiconductorMedium.mobility_n and mobility_p.

ConstantMobilityModel

Constant mobility model

CaugheyThomasMobility

The Caughey-Thomas temperature-dependent carrier mobility model.

MasettiMobility

The Masetti doping-dependent low-field carrier mobility model.

Note

MasettiMobility is supported only on the accelerated solver.

Generation Recombination#

Carrier generation and recombination models contributing to the drift-diffusion source terms.

AugerRecombination

Parameters for the Auger recombination model.

RadiativeRecombination

Defines the parameters for the radiative recombination model.

ShockleyReedHallRecombination

Defines the parameters for the Shockley-Reed-Hall (SRH) recombination model.

FossumCarrierLifetime

Doping- and temperature-dependent SRH carrier lifetime.

DistributedGeneration

Class that allows to add a distributed generation model.

HurkxDirectBandToBandTunneling

This class defines a direct band-to-band tunneling recombination model based on the Hurkx model.

SelberherrImpactIonization

This class defines the parameters for the Selberherr impact ionization model.

Doping#

Spatial dopant distributions applied to a semiconductor medium.

ConstantDoping

Sets constant doping \(N\) in the specified box with a size and concentration.

GaussianDoping

Sets a gaussian doping in the specified box.

CustomDoping

Sets a custom doping profile in the specified box.

Bandgap#

Bandgap-narrowing models for heavily doped semiconductors.

SlotboomBandGapNarrowing

Parameters for the Slotboom model for band-gap narrowing.

Effective Density Of States (DOS)#

Effective density-of-states models for the conduction and valence bands.

ConstantEffectiveDOS

Constant effective density of states model.

IsotropicEffectiveDOS

Effective density of states model that assumes single valley and isotropic effective mass.

MultiValleyEffectiveDOS

Effective density of states model that assumes multiple equivalent valleys and anisotropic effective mass.

DualValleyEffectiveDOS

Effective density of states model that assumes combination of light holes and heavy holes with isotropic effective masses.

Energy Bandgap#

Temperature dependence of the semiconductor energy bandgap.

ConstantEnergyBandGap

Constant Energy band gap

VarshniEnergyBandGap

Models the temperature dependence of the energy band gap (Eg) using the Varshni formula.

Charge Carrier Properties#

Models describing how the optical properties of a medium change with the local carrier concentration.

LinearChargePerturbation

Specifies parameter's perturbation due to free carrier effects as a linear function of electron and hole densities:

CustomChargePerturbation

Specifies parameter's perturbation due to free carrier effects as a custom function of electron and hole densities defined as a two-dimensional array of perturbation values at sample electron and hole density points.

Boundary Conditions#

A boundary condition pairs a condition (the physical constraint, e.g. an applied voltage) with a placement (where on the geometry it is applied) via a HeatChargeBoundarySpec. Collect these in HeatChargeSimulation.boundary_spec.

Note

A charge simulation requires at least two VoltageBC boundaries. When a SteadyCapacitanceMonitor is present, one of the voltage sources must sweep an array of voltages (len(voltage) > 1) so the capacitance can be computed from the DC sweep.

Specifications#

HeatBoundarySpec

Heat BC specification.

HeatChargeBoundarySpec

Heat-Charge boundary conditions specification.

Types#

The condition applied at the boundary. VoltageBC and CurrentBC draw their excitation from the SPICE source classes documented on the SPICE 🔌 page.

VoltageBC

Constant electric potential (voltage) \(= \text{V}\) boundary condition.

CurrentBC

Current boundary conditions.

InsulatingBC

Insulation boundary condition.

Placement#

Where a condition is applied: on an interface between structures or mediums, on a structure’s outer boundary, or on the simulation domain boundary.

StructureStructureInterface

Placement of boundary conditions between two structures.

StructureBoundary

Placement of boundary conditions on the structure's boundary.

MediumMediumInterface

Placement of boundary conditions between two mediums.

StructureSimulationBoundary

Placement of boundary conditions on the simulation box boundary covered by the structure.

SimulationBoundary

Placement of boundary conditions on the simulation box boundary.

Charge-Heat Coupled Sources#

HeatFromElectricSource

Volumetric heat source generated from an electric simulation.

Monitors#

Monitors record steady-state charge quantities over a region: the electrostatic potential, free-carrier concentrations, current density, electric field, and energy bands. A charge simulation requires at least one of SteadyPotentialMonitor, SteadyFreeCarrierMonitor, SteadyCapacitanceMonitor or SteadyCurrentDensityMonitor; SteadyElectricFieldMonitor and SteadyEnergyBandMonitor are additional outputs and do not satisfy this requirement on their own.

Note

SteadyCapacitanceMonitor reports capacitance from a DC voltage sweep, so it requires a voltage source that sweeps an array of voltages (len(voltage) > 1).

SteadyPotentialMonitor

Electric potential (\(\psi\)) monitor.

SteadyFreeCarrierMonitor

Free-carrier monitor for Charge simulations.

SteadyCapacitanceMonitor

Capacitance monitor associated with a charge simulation.

SteadyCurrentDensityMonitor

Current density monitor for Charge/Conduction simulations.

SteadyElectricFieldMonitor

Electric field monitor for Charge/Conduction simulations.

SteadyEnergyBandMonitor

Energy bands monitor for Charge simulations.

Analysis#

The analysis specification controls what a charge simulation computes: the DC (and optional small-signal AC) sweep. Attach one of these to HeatChargeSimulation.analysis_spec. The solver itself is selected separately via HeatChargeSimulation.use_accelerated_solver; convergence and tolerance settings are covered under Accelerated solver and convergence.

SteadyChargeDCAnalysis

Configures relevant steady-state DC simulation parameters for a charge simulation.

IsothermalSteadyChargeDCAnalysis

Configures relevant Isothermal steady-state DC simulation parameters for a charge simulation.

SSACAnalysis

Configures Small-Signal AC (SSAC) analysis parameters for charge simulation.

IsothermalSSACAnalysis

Configures Isothermal Small-Signal AC (SSAC) analysis parameters for charge simulation.

See also

The voltage and current sources used by these analyses are documented on the SPICE 🔌 page.

Accelerated solver and convergence#

ChargeToleranceSpec

Charge tolerance parameters relevant to multiple simulation analysis types.

The accelerated solver is the default for every simulation (HeatChargeSimulation.use_accelerated_solver=True). Setting use_accelerated_solver=False selects the legacy solver, and is only permitted for charge simulations; heat and conduction always run on the accelerated solver.

The two solvers measure convergence differently, so tolerance values are not transferable between them. On the accelerated solver the ChargeToleranceSpec field defaults are tight and sufficient for the majority of problems. Start there and only adjust if a run does not converge.

Per-solver tolerance guidance:

Setting

Accelerated (default)

Legacy

rel_tol

tight, at the defaults (~1e-9 to 1e-10)

loose (~1e-5)

abs_tol

ignored on this path

large (~1e7 to 1e8)

Note

abs_tol only affects the legacy solver. On the accelerated (default) solver, rel_tol is the effective convergence knob.

Convergence parameters#

Convergence on the accelerated solver is governed by a few fields on ChargeToleranceSpec and SteadyChargeDCAnalysis. On this solver rel_tol is the effective tolerance (abs_tol is ignored); the remaining fields control how the solver steps toward the DC solution.

Parameters you can adjust:

  • rel_tol (ChargeToleranceSpec, default 1e-10): relative convergence tolerance and the effective convergence criterion on the accelerated solver. The tight default is sufficient for most problems. Loosening it is not a way to fix non-convergence (see Troubleshooting below): it only stops the solve at a higher residual, i.e. a less accurate solution.

  • max_iters (ChargeToleranceSpec, default 120): maximum number of nonlinear (Newton) iterations per bias step. If the convergence history shows the residual still decreasing when a bias reaches this cap, raise it.

  • convergence_dv (SteadyChargeDCAnalysis, default 1.0 V): the bias step. The solver starts at zero bias and ramps to the requested voltage in convergence_dv increments, re-solving at each step. Lowering it takes smaller, more robust steps toward the target bias, at the cost of more steps and longer runtime.

  • ramp_up_iters (ChargeToleranceSpec, default 1): number of iterations over which quantities such as doping are ramped up to their full values during start-up. Increasing it introduces doping more gradually, which can stabilize start-up on heavily doped devices.

Advanced controls (leave at their defaults):

These rarely need changing. Non-default values emit a warning and can cause long runtimes or non-convergence:

  • cfl_number (default 1e9)

  • cfl_min (default None)

  • preconditioner_iterations (default 50)

Troubleshooting convergence (accelerated solver)#

The defaults converge for most problems. If a charge run on the accelerated solver does not converge, work through these in order:

  1. Look at the convergence history first. Inspect sim_data.device_characteristics.dc_convergence – its converged, n_iters and residual_history fields (see SteadyConvergenceData):

    conv = sim_data.device_characteristics.dc_convergence
    conv.converged, conv.n_iters, conv.residual_history
    

    This tells you whether the residual was still decreasing (the solver simply needs more iterations) or had stagnated above the tolerance (it will not converge further without other changes).

  2. Residual still decreasing – give it more iterations. Raise max_iters first. If the residual is still dropping when n_iters reaches the cap, also raise max_pseudo_steps. A non-default max_pseudo_steps emits a warning about long runtimes and convergence; that warning is conservative and is expected in this case.

  3. A high-bias point fails or oscillates. Lower convergence_dv so the solver approaches the target voltage in smaller bias steps.

  4. Start-up is unstable on a heavily doped device. Increase ramp_up_iters so doping is introduced more gradually.

  5. Only then, trade accuracy for runtime. If the residual has stagnated above the tolerance and a less accurate solution is acceptable, loosen rel_tol to stop at that residual – but never down to legacy-style values such as 1e-5. Loosening rel_tol is not a convergence fix; it only stops the solve at a higher residual.

Migrating from the legacy solver#

Because the two solvers measure convergence differently, tolerance values are not transferable: a configuration tuned for the legacy solver won’t necessarily work for the accelerated solver. In most cases td.ChargeToleranceSpec() (the defaults) is enough.

  • Tighten rel_tol back toward the defaults (~1e-9 to 1e-10). The loose rel_tol (~1e-5) used on the legacy solver is satisfied almost immediately on the accelerated solver and returns an unconverged result.

  • Drop the inflated abs_tol. It is ignored on the accelerated solver, so leaving it at the field default is fine.

The cfl_number, cfl_min, max_pseudo_steps and preconditioner_iterations controls apply only to the accelerated solver and have no legacy counterpart, so there is nothing to migrate there; leave them at their defaults.

Accelerated-only features#

A few features are supported only on the accelerated solver, and requesting use_accelerated_solver=False while they are configured raises an error that names the offending feature:

  • MasettiMobility

  • SSAC at_voltages bias-point selection

Output Data#

Important

2D vs 3D simulations and units. Charge simulations can be 2D (one size component is 0) or 3D. In 2D mode, the solver treats the geometry as a cross-section with infinite extrusion depth. Extensive output quantities (current, capacitance, resistance) are therefore reported per unit length (\(\mu\text{m}\)). For example:

  • Current: \(\text{A}\) (3D) \(\rightarrow\) \(\text{A}/\mu\text{m}\) (2D)

  • Capacitance: \(\text{fF}\) (3D) \(\rightarrow\) \(\text{fF}/\mu\text{m}\) (2D)

  • Resistance: \(\Omega\) (3D) \(\rightarrow\) \(\Omega \cdot \mu\text{m}\) (2D)

Intensive quantities (potential, carrier concentration, electric field, energy bands) keep the same units regardless of dimensionality.

To convert a 2D result to a total device quantity, multiply by the physical device depth in micrometers.

Simulation Data#

Monitor Data#

SteadyPotentialData

Stores electric potential \(\psi\) from a charge simulation.

SteadyFreeCarrierData

Stores free-carrier concentration in charge simulations.

SteadyEnergyBandData

Stores energy bands in charge simulations.

SteadyCapacitanceData

Class that stores capacitance data from a Charge simulation.

SteadyElectricFieldData

Stores electric field \(\vec{E}\) from a Charge/Conduction simulation.

SteadyCurrentDensityData

Stores current density \(\vec{J}\) from a Charge/Conduction simulation.

Device Data#

DeviceCharacteristics

Stores device characteristics.

Convergence Data#

SteadyConvergenceData

Per-bias Newton convergence state for a steady-state charge sweep.

See also

Grid specifications for unstructured charge simulations are documented under Grid Specification.