const anodeerminalElement = flux.getNodeById("893dfc04-7725-fe76-872a-d9a8fc8a1099");
const cathodeTerminalElement = flux.getNodeById("6f0d9d57-4480-cb9d-f304-bedfecdd66be");
const voltagePeak = flux.createOutputNode();
const voltageAnode = flux.createOutputNode();
const voltageCathode = flux.createOutputNode();
const voltagePeakToPeak = flux.createOutputNode();
const rmsOutput = flux.createOutputNode();
const freqHz = flux.createOutputNode();
flux.on("setup", (event) => {
const peakVoltage = 5;
const dcOffset = 0;
const frequency = 15;
const phaseShift = 0;
const time = (event.step * event.step_size_time) * 1000;
const wave = 2 * Math.PI * (time + phaseShift) * frequency;
const voltage = 0;
flux.simulationModel = {
type: "voltageSource",
voltage: voltage,