// Howdy 👋.
// If you are new to writing code in Flux make sure to check out our get started docs: https://docs.flux.ai/reference/introduction
// We also have a Flux Slack Community in case you need help: https://join.slack.com/t/fluxcommunity/shared_invite/zt-2ouyf80w6-7Wp81YlNEsuDFFdED9UQMA
// To infinity and beyond 🚀
const anodeTerminalId = "dff57d78-487b-f832-db06-4405c23ce37c"; //P1
const cathodeTerminalId = "880f28ef-cf41-0acc-4a98-ce0afa37b0c2"; //P2
const anodeTerminal = flux.getNodeById(anodeTerminalId, "elementTerminal");
const cathodeTerminal = flux.getNodeById(cathodeTerminalId, "elementTerminal");
const outputVoltage = flux.createOutputNode("vout");
const inputVoltage = flux.createOutputNode("vin");
const current = flux.createOutputNode("I");
const voltageDrop = flux.createOutputNode("vdrop");
const seriesResistance = 0.42;
const emissionCoefficient = 3.73;
const saturationCurrent = 93.2e-12;
const breakdownVoltage = 0;
//setup event