I understand that the customer is trying to create a simscape component in which when placing the ernergy flow it calculates the mass flow by multiplying a factor, as well as increasing the temperature of the fluid leaving the component.
Below are required changes:
- Change “F_r” from “s^2/m^2 (or implied kg/s per kW)” to “{0.045 / 1000, 'kg/(s*W)'}“ to correctly calculate mass flow rate in “kg/s” when multiplied by “commanded_Phi_flow” in “Watts”.
- Modified the energy balance equation from “Phi_A == Phi_B” to “Phi_B == Phi_A + commanded_Phi_flow” to accurately model the heat (commanded_Phi_flow) being added within the component.
- Updated the temperature calculation to “T_B == T_A + commanded_Phi_flow / (mdot_B * cp_A)“ from “Phi_B/(mdot_B*cp_I)” to use the actual added heat and the dynamic specific heat capacity “(cp_A)”, including an if condition to handle zero mass flow.
Hope this helps.