const inputTerminalElement = flux.getNodeById("bc08469d-5b9d-acdf-72d0-5b5cb35f788e");
const outputTerminalElement = flux.getNodeById("c1617912-7ccb-653a-6937-126d94d5584a");
//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,