As your error message states:
Node TemperatureIncrease.B is possibly missing a branch statement for domain variable
name: Phi.
Node TemperatureIncrease.B is possibly missing a branch statement for domain variable
name: mdot.
Node TemperatureIncrease.A is possibly missing a branch statement for domain variable
name: Phi.
Node TemperatureIncrease.A is possibly missing a branch statement for domain variable
name: mdot.
In other words, you are missing a branches section defining the sign convention of the heat flux and mass flow rate at each port. If you look at the source code of some existing components (e.g. foundation.thermal_liquid.two_port_steady), you will see this section is included in the .ssc file.
branches
mdot_A : A.mdot -> *;
mdot_B : B.mdot -> *;
Phi_A : A.Phi -> *;
Phi_B : B.Phi -> *;
end
However, you'll see that a lot more may be missing from your code. I'd recommend using the inheritance feature in the Simscape Language by declaring your components as follows:
component TemperatureIncrease < foundation.thermal_liquid.two_port_steady
This will make sure all the necessary nodes/equations/variables are already defined, and you just fill in the rest of this "template" -- in your case, just the parameters and equations.
- Sebastian
Best Answer