/** * SEMICONDUCTORS device cohort (Wave A4 phase 2): diode, led, * schottky_diode, zener_diode, tvs_diode, bicolor_led, rgb_led, bjt_npn, * bjt_pnp, nmos, pmos, tl431. * * Every handler body below is the engine's old switch-case / if-block body * MOVED VERBATIM, with identifier access adapted through DeviceContext * (this._pinNode -> ctx.pinNode, this._vAt -> ctx.vAt, the _stampAll / * _updateElementI pass-level `vt` local -> ctx.junctionVt() — the same * pure thermalVoltage(ambient) computation, so the float is identical — * this.state.mosfetGates -> ctx.state.mosfetGates, out[comp.id] = v -> * ctx.setElementCurrent(comp.id, v), loop break/continue -> handler * `return`). Do not simplify, reorder mna.add calls, or rewrite algebra * here: float accumulation order in the matrix is semantics, and the * bitwise oracle suite pins these exact trajectories. * * Model grouping vs the old switch labels: bjt_npn/bjt_pnp and nmos/pmos * keep their shared case bodies as single models. The engine's shared * schottky_diode/led/diode case body is kept as ONE copy in shared helpers * but split across TWO models (diodeModel and ledModel) because hook * PRESENCE drives compiled bucket membership: only "led" was ever in * PASSIVE_FAILURE_UPDATE_KINDS, so an updateFailures hook on a model * covering plain diodes would pull them into the failure pass — a bucket * (and damage-behavior) change the old kind-gated block never made. * * BJT pnjlim interplay: the per-load cache (_rebuildJunctionCache), the * per-solve _vPrevBJT reset, and the _junctionLimitedThisIteration * consumption inside solveNonlinear (Wave A3 acceptance guard) all remain * engine-owned; handlers reach the cache, the previous-iterate map, and * the limited flag through their context aliases only. * * Other engine-owned machinery deliberately NOT moved: mosfetGates * load()-time carry-forward and snapshot/rollback, the pre-commit gate * snapshot for the element-current pass (reached via * ctx.previousMosfetGate), getElementChannelI (public telemetry shared * with the unmigrated seg7 kinds, reached via ctx.elementChannelCurrents), * and the _thermalDissipationW LED branch (profile-keyed thermal pass, not * a per-kind switch). * * Import layering (registry header, decision 7): pure helper FUNCTIONS and * exported consts from sim-engine.ts are safe to import despite the module * cycle because handlers dereference them only at solve time. Never read * sim-engine bindings at module evaluation time from this file. */ import type { DeviceModel } from "../device-registry.js"; export declare const AC_GMIN = 1e-12; /** * Small-signal conductance of the guarded Shockley law at a bias voltage — * d(i_d)/d(v) of the SAME piecewise model stampDiodeShockley stamps: the * exponential slope below the vSat guard, continued as the constant tangent * slope beyond it. This is exactly the `gd` the Newton stamp computes, so * the AC matrix reproduces the transient Jacobian entry bit-for-bit. * Exported alongside AC_GMIN for the other cohorts' junction acStamps. */ export declare function shockleyConductanceAtOp(voltage: number, Is: number, n: number, Vt: number, vSatOverride?: number): number; export declare const zenerDiodeModel: DeviceModel; export declare const tvsDiodeModel: DeviceModel; export declare const diodeModel: DeviceModel; export declare const ledModel: DeviceModel; export declare const bicolorLedModel: DeviceModel; export declare const rgbLedModel: DeviceModel; export declare const bjtModel: DeviceModel; export declare const mosfetModel: DeviceModel; export declare const tl431Model: DeviceModel;