const inputTerminalElement = flux.getNodeById("d32cfbbc-ed6c-2cf2-f153-ca1a25b3d54e");
const outputTerminalElement = flux.getNodeById("cae755f3-5728-3f63-fd41-73f7a1dd94d0");
//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,