Skip to content

api

User-facing configuration objects for the DEVSIM charge-transport solve.

A :class:gsim.tcad.Simulation is configured by physical concern, the way :class:gsim.fdtd.Simulation is: the geometry and its stack, the meshed domain, the materials, the doping, the contacts and interfaces, and the solver. Each concern is a validated model; calling it applies several settings at once, and single attributes can be assigned.

Lengths are in um, concentrations in cm^-3, frequencies in Hz and voltages in V; field names carry their unit.

Classes:

  • Contact –

    Where an electrode meets a doped Region: an ohmic contact.

  • Contacts –

    The declared contacts, by name.

  • Domain –

    The cross-section plane and the extent of the meshed 2D domain.

  • Doping –

    The doping profiles, each naming the mesh Region it applies to.

  • Geometry –

    The component and the layer stack it is extruded with.

  • Insulator –

    An insulating Region taking part in the electrostatic solve only.

  • Interface –

    Where two doped Regions meet: potential and carriers are continuous.

  • Interfaces –

    The declared interfaces between doped Regions, by name.

  • Materials –

    Semiconductor parameters and the insulators joining the solve.

  • Solver –

    Mesh resolution, Newton convergence and small-signal settings.

  • TCADMesh –

    The mesh a :class:gsim.tcad.Simulation solves on.

Contact

Bases: BaseModel

Where an electrode meets a doped Region: an ohmic contact.

The curve the two Regions share becomes a named line group on the mesh, and DEVSIM drives the contact's bias there.

Attributes:

  • name (str) –

    Contact name, also its mesh group name (e.g. "anode").

  • semiconductor (str) –

    The doped Region the contact injects into.

  • electrode (str) –

    The Region on the other side: the metal, or any Region that is neither doped nor declared insulating.

Methods:

validate_sides

validate_sides() -> Self

Require two different Regions.

Contacts

Contacts(items: Iterable[T | Mapping[str, Any]] | None = None)

Bases: _Named[Contact]

The declared contacts, by name.

Methods:

  • add –

    Declare a contact between a doped Region and its electrode.

add

add(*, name: str, semiconductor: str, electrode: str) -> Contact

Declare a contact between a doped Region and its electrode.

Domain

Bases: MutableModel

The cross-section plane and the extent of the meshed 2D domain.

Attributes:

  • plane (str | None) –

    Cross-section plane, "x=<um>" or "y=<um>".

  • window (AscendingInterval | None) –

    In-plane (min, max) clip of the domain in um (y for an x-plane, x for a y-plane); None keeps the full extent.

  • window_z (AscendingInterval | None) –

    Vertical (min, max) clip of the domain in um.

  • margin_x (float | None) –

    Airbox margin along x in um.

  • margin_y (float | None) –

    Airbox margin along y in um.

  • z_above (float | None) –

    Airbox extension above the stack top in um.

  • z_below (float | None) –

    Airbox extension below the stack bottom in um.

The four airbox fields default to None: the mesh preset decides. Setting any of them configures the airbox, the unset ones at 0 um.

Methods:

validate_plane classmethod

validate_plane(value: str | None) -> str | None

Require an x= or y= plane spec.

Doping

Doping(profiles: Iterable[DopingProfile] | None = None)

The doping profiles, each naming the mesh Region it applies to.

Methods:

  • add –

    Add a profile (see :mod:gsim.tcad.doping) and return it.

  • clear –

    Remove every profile.

  • regions –

    The doped Regions, in the order the profiles first name them.

  • remove –

    Remove one profile.

add

add(profile: DopingProfile | Mapping[str, Any]) -> DopingProfile

Add a profile (see :mod:gsim.tcad.doping) and return it.

clear

clear() -> None

Remove every profile.

regions

regions() -> list[str]

The doped Regions, in the order the profiles first name them.

remove

remove(profile: DopingProfile) -> None

Remove one profile.

Geometry

Bases: MutableModel

The component and the layer stack it is extruded with.

Attributes:

  • component (Any | None) –

    The gdsfactory component the cross-section is cut from.

  • stack (Any | None) –

    A gsim LayerStack, the path of a stack YAML file, or None to extract the stack of the active PDK.

Methods:

validate_stack classmethod

validate_stack(value: Any) -> Any

Accept a LayerStack, a YAML path, or None.

Insulator

Bases: BaseModel

An insulating Region taking part in the electrostatic solve only.

Attributes:

  • region (str) –

    Mesh region (volume group) name, e.g. "sio2".

  • relative_permittivity (float) –

    Static relative permittivity of the Region.

Interface

Bases: BaseModel

Where two doped Regions meet: potential and carriers are continuous.

An Interface carries no terminal voltage; that is what separates it from a :class:Contact.

Attributes:

  • name (str) –

    Interface name, also its mesh group name (e.g. "junction").

  • region_a (str) –

    One doped Region.

  • region_b (str) –

    The other doped Region.

Methods:

validate_sides

validate_sides() -> Self

Require two different Regions.

Interfaces

Interfaces(items: Iterable[T | Mapping[str, Any]] | None = None)

Bases: _Named[Interface]

The declared interfaces between doped Regions, by name.

Methods:

  • add –

    Declare an interface between two doped Regions.

add

add(*, name: str, region_a: str, region_b: str) -> Interface

Declare an interface between two doped Regions.

Materials

Bases: MutableModel

Semiconductor parameters and the insulators joining the solve.

Attributes:

  • temperature_k (float) –

    Lattice temperature (K) of the silicon parameter set.

  • semiconductor (str) –

    DEVSIM material name given to the doped Regions.

  • mobility (MobilityModel) –

    Low-field mobility against the total doping, evaluated node by node. DEVSIM's own silicon defaults are two constants whatever the doping, which misstates the series resistance of a slab doped from 1e17 to 1e20 cm^-3.

  • insulators (dict[str, PositiveFloat]) –

    Insulating Regions solved for the potential alone, Region name to static relative permittivity. Empty by default, which keeps the electrostatics inside the doped semiconductor; a declared insulator lets the field fringe around the Junction through it. An :class:Insulator or a list of them is also accepted.

Methods:

coerce_insulators classmethod

coerce_insulators(value: Any) -> Any

Allow {"sio2": 3.9}, Insulator models, or a list of them.

Solver

Bases: MutableModel

Mesh resolution, Newton convergence and small-signal settings.

Attributes:

  • mesh_preset (Literal['coarse', 'default', 'fine'] | None) –

    Mesh quality preset of the shared native-2D pipeline; None uses the pipeline's default.

  • refined_mesh_size_um (PositiveFloat | None) –

    Mesh size near conductors and regions marked fine (um), overriding the preset.

  • max_mesh_size_um (PositiveFloat | None) –

    Largest element size (um), overriding the preset.

  • refinement_boxes (list[RefinementBox] | None) –

    Boxes (h_min, h_max, z_min, z_max, size) in um held to size over their whole area, e.g. where a depletion edge moves.

  • absolute_error (PositiveFloat) –

    Newton absolute error target of devsim.solve.

  • relative_error (PositiveFloat) –

    Newton relative error target of devsim.solve. With extended precision the 2D drift-diffusion Newton reaches 1e-12 on the test diode.

  • max_iterations (int) –

    Newton iteration cap.

  • bias_step_v (PositiveFloat) –

    Step (V) the swept contact is ramped in between biases.

  • extended_precision (bool) –

    Use DEVSIM's 128-bit extended-precision assembly. Keep it on: in double precision the Newton on the test diode does not converge even to the default 1e-6.

  • small_signal_freq_hz (PositiveFloat) –

    Frequency (Hz) of the quasi-static AC solve that extracts C(V).

  • junction_freq_hz (PositiveFloat) –

    Frequency (Hz) of the AC solve whose admittance the series-RC junction fit reads: high enough that the capacitive current dominates the DC leakage, far below the branch's own RC rolloff.

  • claim_devsim_namespace (bool) –

    Claim DEVSIM's process-global namespace at device setup: drop the circuit and the devices gsim created earlier. Foreign DEVSIM devices are never touched. Turn it off only when an earlier charge-transport device must stay alive.

TCADMesh

Bases: BaseModel

The mesh a :class:gsim.tcad.Simulation solves on.

Attributes:

  • mesh_path (Path) –

    The shared native-2D mesh (um), the one Palace BoundaryMode sees.

  • devsim_mesh_path (Path) –

    Its copy with coordinates in cm, loaded by DEVSIM.

  • groups (dict[str, Any]) –

    Physical groups of the mesh (volumes, contact lines, interface lines, shared curves).