// Howdy 👋.
//
// If you are new to writing code in Flux make sure to check out our get started docs: https://docs.flux.ai/write-code
//
// We also have a Flux Slack Community in case you need help: https://join.slack.com/t/fluxcommunity/shared_invite/zt-p48n941f-wzQ06kGmuFJ2HXnGYT1JkA
//
// To infinity and beyond 🚀
const anodeTerminal = flux.getNodeById("d727c28d-8dc3-54a3-dbd6-c7b78c0f1164");
const cathodeTerminal = flux.getNodeById("189822c2-307d-3ef1-984d-6a157f530d3a");
const outputVoltage = flux.createOutputNode("vout");
const inputVoltage = flux.createOutputNode("vin");
const voltageDrop = flux.createOutputNode("vDrop");
const current = flux.createOutputNode("I");
// Setup Event
flux.on("setup", (event) => {
const voltage = flux.properties.find((prop) => prop.name === "Voltage")?.value || 5.00;
flux.simulationModel = {
type: "voltageSource",
voltage: voltage,