const inputTerminalElement = flux.getNodeById("8e368e3a-b302-60ac-bda1-1132ce641968");
const outputTerminalElement = flux.getNodeById("de26d411-cf22-2f30-b683-00a42f847b91");
//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,