const gateTerminalUid = "d4705b32-ebd5-e041-cb38-748831726582";
const drainTerminalUid = "b50a105a-0fa7-3419-f176-24e4103e029f";
const sourceTerminalUid = "470f452b-3deb-a180-5510-3fe7b2058e85";
const gateTerminal = flux.getNodeById(gateTerminalUid, "elementTerminal");
const drainTerminal = flux.getNodeById(drainTerminalUid, "elementTerminal");
const sourceTerminal = flux.getNodeById(sourceTerminalUid, "elementTerminal");
const vgs = flux.createOutputNode("Vgate-source");
const vds = flux.createOutputNode("Vdrain-source");
const vs = flux.createOutputNode("Vsource");
const vd = flux.createOutputNode("Vdrain");
const vg = flux.createOutputNode("Vgate");
const drainToSource = flux.createOutputNode("Idrain-source");
const thresholdVoltage = Number(flux.properties.find((prop) => prop.name === "Threshold Voltage")?.value ?? 1.5);
//setup event
flux.on("setup", () => {
flux.simulationModel = simModel();
});