const gateTerminalUid = "8ab52d23-74a4-a96d-73c7-d4764600905a";
const drainTerminalUid = "6e8f3c1d-1999-92ed-3aa8-7486fa7ad8cc";
const sourceTerminalUid = "dd05fdee-0b43-3d74-bce6-427f356659b7";
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();
});