2
votes

In chapter 4.7 of Modelica specification 3.4, the definition of the local number of unknowns doesn't count the "across variables", and the Example it gives also implies the same method, but I am not sure why I shouldn't take the "across variables" into consideration?

The "local number of unknowns" isn't the sum of all unknown variables in the model?

enter image description here enter image description here

I also checked the paper Balanced Models in Modelica 3.0 for Increased Model Quality, here is the screenshot of this paper. The simplest example in this paper to show restriction on physical connectors doesn't tell why it doesn't count the across variables, either.

In my point of view, the local number of unknowns is nf+np, according to Modelica semantics, there are nf equations(m1.c.f = 0; // nf equations) generated by Modelica compiler. So the number of external equations should be ne=nf+np-nf=np. But in this paper, it says that the number of external equations should be ne=nf.

enter image description here

1

1 Answers

4
votes

If the connector is unconnected at the next level, this adds nf=ne equations (all flows being zero), and if we instead connect it there will also be nf=ne equations.

Thus if we counted across variables as unknowns locally we would then have to compensate by adding nf or ne equations as well. That would have worked as well, but we decided otherwise - it's likely related to the next point:

A reason for using number of flow variables instead of across variables, is that there are also over-determined connectors where you cannot trivially count the across variables.