const baseTerminalId = "e58a3dd6-aa89-7716-2bf8-b8c7649c81a6";
const emitterTerminalId = "9a0bc6c3-e55b-8f6f-e628-e0185649fcaf";
const collectorTerminalId = "baa327a6-55d7-f964-5a6f-8c467b266e3e";
const baseTerminal = flux.getNodeById(baseTerminalId);
const emitterTerminal = flux.getNodeById(emitterTerminalId);
const collectorTerminal = flux.getNodeById(collectorTerminalId);
const baseVoltage = flux.createOutputNode("base-voltage");
const emitterVoltage = flux.createOutputNode("emitter-voltage");
const collectorVoltage = flux.createOutputNode("collector-voltage");
const baseCurrent = flux.createOutputNode("base-current");
const emitterCurrent = flux.createOutputNode("emitter-current");
const collectorCurrent = flux.createOutputNode("collector-current");
// Setup Event
flux.on("setup", () => {
const beta = flux.properties.find((prop) => prop.name === "Beta / hFe")?.value || 100;
const leakage = flux.properties.find((prop) => prop.name === "Leakage Current")?.value || 1e-13;
flux.simulationModel = {