const baseTerminal = flux.getNodeById("ecd94b37-7c1e-5ed2-0d84-081f661af1b8");
const emitterTerminal = flux.getNodeById("5aaae533-2aaa-d0d6-c7e6-f460f5cb43e0");
const collectorTerminal = flux.getNodeById("d390f815-effa-3515-32c3-e0e17631215a");
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", (event) => {
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 = {
type: "transistor",
pnp: false,
map_base_to_terminal_uid: baseTerminal?.uid,
map_emitter_to_terminal_uid: emitterTerminal?.uid,
map_collector_to_terminal_uid: collectorTerminal?.uid,