const inputTerminalElement = flux.getNodeById("3379fdfc-a3a2-92e2-f9a1-bc9f2b41966e");
const outputTerminalElement = flux.getNodeById("f83122ca-14e0-72e8-71e5-b206f195c371");
//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,