// see https://docs.flux.ai/simulator/scr
const terminals = [];
terminals[0] = flux.getNodeById("8b9cc7d5-f240-fc66-9c13-5f39bbacdb3e");
terminals[1] = flux.getNodeById("39d0868a-88e1-43b1-d4ee-0ab1920952cf");
terminals[2] = flux.getNodeById("427c0500-cf72-25b9-9874-f6ba64d47cda");
flux.on("setup", () => {
flux.simulationModel = {
type: "SCR",
map_anode_to_terminal_uid: terminals[0]?.uid,
map_cathode_to_terminal_uid: terminals[1]?.uid,
map_gate_node_to_terminal_uid: terminals[2]?.uid
}
})
const v0 = flux.createOutputNode({ name: "VP0", value: 0, unit: "V" });
const v1 = flux.createOutputNode({ name: "VP1", value: 0, unit: "V" });
const v2 = flux.createOutputNode({ name: "VP2", value: 0, unit: "V" });
const current = flux.createOutputNode({ name: "Current", value: 0, unit: "A" });