const p1TerminalElement = flux.getNodeById("4d7e96b3-dda1-0bb8-027c-576f61f36a5e"); //P1
const p2TerminalElement = flux.getNodeById("954ce0ba-b994-46a7-b901-351077895a90"); //P2
const voltageDrop = flux.createOutputNode("vdrop");
// Setup Event
flux.on("setup", (event) => {
flux.simulationModel = {
type: "resistor",
resistance: 0,
map_input_to_terminal_uid: p1TerminalElement?.uid,
map_output_to_terminal_uid: p1TerminalElement?.uid
};
});
// Before Event
flux.on("beforeStep", (event) => {
flux.simulationModel = {
resistance: 0,
};
});