I'm missing something elementary about Modelica connectors in that anytime a model assigns into a flange, I end up with too many equations. It seems the translator, in resolving the connections, adds equations that I don't want(/need), torpedoing the compilation.
In OMEdit 1.16 this model fails with 10 equations, 9 unknowns:
model scratch
Modelica.Mechanics.Rotational.Interfaces.Flange_b flange;
Modelica.Mechanics.Rotational.Components.Inertia load(J = 1.5);
equation
flange.tau = 1;
connect(flange, load.flange_a);
end scratch;
When instantiated, it has defined flange.tau twice:
flange.phi = load.flange_a.phi;
load.flange_a.tau - flange.tau = 0.0;
flange.tau = 0.0;
load.flange_b.tau = 0.0;
load.phi = load.flange_a.phi;
load.phi = load.flange_b.phi;
load.w = der(load.phi);
load.a = der(load.w);
load.J * load.a = load.flange_a.tau + load.flange_b.tau;
flange.tau = 1.0;
What am I missing or where is this discussed?
Many thanks and happy Friday.
