Skip to content

simulation

DEVSIM charge-transport simulation of a waveguide cross-section.

Simulation is configured by physical concern, like :class:gsim.fdtd.Simulation. Meshing goes through the shared native-2D pipeline of :class:gsim.palace.BoundaryModeSim, the exact mesh Palace BoundaryMode sees, so there is no second meshing path. Contacts and Interfaces become named line groups on that mesh, which DEVSIM binds boundary conditions and continuity to.

Classes:

  • Simulation –

    Poisson and drift-diffusion on a waveguide cross-section.

Simulation

Simulation(
    *,
    geometry: Geometry | Mapping[str, Any] | None = None,
    domain: Domain | Mapping[str, Any] | None = None,
    materials: Materials | Mapping[str, Any] | None = None,
    doping: Doping | Iterable[DopingProfile] | None = None,
    contacts: Contacts | Iterable[Contact | Mapping[str, Any]] | None = None,
    interfaces: Interfaces | Iterable[Interface | Mapping[str, Any]] | None = None,
    solver: Solver | Mapping[str, Any] | None = None,
)

Poisson and drift-diffusion on a waveguide cross-section.

Example

from gsim import tcad sim = tcad.Simulation() sim.geometry(component, stack=stack) sim.domain(plane="x=0", window=(-25.0, -15.0)) sim.doping.add( ... tcad.StepDoping( ... region="p_rib", dopant_type="acceptor", concentration_cm3=1e18 ... ) ... ) sim.contacts.add(name="anode", semiconductor="p_rib", electrode="metal_p") sim.solver(mesh_preset="coarse", refined_mesh_size_um=0.05) sim.mesh(output_dir="./tcad") sweep = sim.sweep([0.0, 1.0, 2.0], contact="cathode")

The mesh inputs (geometry, domain, contacts, interfaces and the mesh fields of solver) are recorded by :meth:mesh; a solve raises once any of them has changed. A change to a device input (materials, doping, the other solver fields) rebuilds the DEVSIM device on the existing mesh at the next solve.

Methods:

  • mesh –

    Generate the shared native-2D mesh and its cm-scaled DEVSIM copy.

  • solve –

    Solve the drift-diffusion system at one bias point.

  • sweep –

    Solve a bias sweep and return carrier maps and C(V) per point.

mesh

mesh(*, output_dir: str | Path | None = None, verbose: bool = False) -> TCADMesh

Generate the shared native-2D mesh and its cm-scaled DEVSIM copy.

Resolution comes from the solver concern. A new mesh drops the DEVSIM device; the next solve builds it again.

Parameters:

  • output_dir (str | Path | None, default: None ) –

    Directory the meshes are written to. Required on the first call, remembered afterwards.

  • verbose (bool, default: False ) –

    Print the meshing pipeline's progress.

Returns:

  • TCADMesh –

    The mesh paths and physical groups.

solve

solve(
    bias: float = 0.0, *, contact: str | None = None, verbose: bool = False
) -> BiasPoint

Solve the drift-diffusion system at one bias point.

Parameters:

  • bias (float, default: 0.0 ) –

    Bias voltage applied to the swept contact (V); the other contacts stay at 0 V.

  • contact (str | None, default: None ) –

    Swept contact name (defaults to the first declared).

  • verbose (bool, default: False ) –

    Stream DEVSIM's own output, Newton iterations included (silent by default).

Returns:

  • BiasPoint –

    The solved :class:BiasPoint including carrier maps, terminal

  • BiasPoint –

    currents, and the small-signal capacitance Im(I)/omega from

  • BiasPoint –

    the quasi-static AC solve.

sweep

sweep(
    biases: Iterable[float], *, contact: str | None = None, verbose: bool = False
) -> BiasSweepResult

Solve a bias sweep and return carrier maps and C(V) per point.

Parameters:

  • biases (Iterable[float]) –

    Bias voltages (V) applied in order to the swept contact.

  • contact (str | None, default: None ) –

    Swept contact name (defaults to the first declared).

  • verbose (bool, default: False ) –

    Stream DEVSIM's own output, Newton iterations included (silent by default).

Returns:

  • BiasSweepResult –

    class:BiasSweepResult with one :class:BiasPoint per bias.