I am trying to simulate the flow in pipes between reservoirs. I have created my own pipe component (based on Modelica.Fluid) and it works fine when I simulate from one tank to another as shown below.
However, when I try to connect two pipes in series, as shown in the picture below, the model does not work. When I check my model, I'm told my model is balanced and has 402 equations and 402 variables. However, when I try to simulate I get the following error message:
An independent subset of the model has imbalanced number of equations (143) and variables (144)
Any ideas where this error message originates from? How is it possible that a balanced system becomes unbalanced when simulating, and how could it work with one pipe, but not two in series?

