// see https://docs.flux.ai/simulator/varactor
const terminals: Array<any> = [];
terminals[0] = flux.getNodeById("a2e53cd4-ca87-859e-9696-0dcd939dbfe9");
terminals[1] = flux.getNodeById("dbeac0ae-a4fe-0c5b-74b3-be8fb5a0538a");
flux.on("setup", () => {
flux.simulationModel = {
type: "varactor",
map_anode_to_terminal_uid: terminals[0]?.uid,
map_cathode_to_terminal_uid: terminals[1]?.uid
}
})
const v0 = flux.createOutputNode({ name: "VP0", value: 0, unit: "V" });
const v1 = flux.createOutputNode({ name: "VP1", value: 0, unit: "V" });
const vdrop = flux.createOutputNode({ name: "Vdrop", value: 0, unit: "V" });
const current = flux.createOutputNode({ name: "Current", value: 0, unit: "A" });