const inputTerminalElement = flux.getNodeById("1501507b-cdec-3bb5-9f90-16bbee4df666");
const outputTerminalElement = flux.getNodeById("bdd9047c-6297-4b8c-d048-339363a9ceec");
//Input change event for controls
flux.on("inputChange", (e) => {
if (e.control_name === "Inductance") {
flux.simulationModel = {
type: "inductor",
inductance: e.value, //Henry
map_input_to_terminal_uid: inputTerminalElement?.uid,
map_output_to_terminal_uid: outputTerminalElement?.uid,
};
}
});
// Before Event
flux.on("beforeStep", (event) => {
flux.simulationModel = {
type: "inductor",
inductance: 1,
map_input_to_terminal_uid: inputTerminalElement?.uid,
map_output_to_terminal_uid: outputTerminalElement?.uid,