const inputTerminalElement = flux.getNodeById("6fe315b0-58c3-b1f6-eacc-eea7ab8db17a"); //P1
const outputTerminalElement = flux.getNodeById("6ccd8774-167d-5115-fcc3-058377139cd2"); //P2
const p1TerminalId = "6fe315b0-58c3-b1f6-eacc-eea7ab8db17a"; //P1
const p2TerminalId = "6ccd8774-167d-5115-fcc3-058377139cd2"; //P2
const p1Terminal = flux.getNodeById(p1TerminalId, "elementTerminal");
const p2Terminal = flux.getNodeById(p2TerminalId, "elementTerminal");
const voltageInputNode = flux.createOutputNode("v1");
const voltageOutputNode = flux.createOutputNode("v2");
const amperageOutputNode = flux.createOutputNode("current");
const powerOutputNode = flux.createOutputNode("power");
const voltageDrop = flux.createOutputNode("vdrop");
// Setup Event
flux.on("setup", (event) => {
const resistance = Number(flux.properties.find((prop) => prop.name === "Resistance")?.value || 47000);
flux.simulationModel = simModel(resistance);
});
// Property was changed event