- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Using the connector in Dymola
Page Start Prev 1 Next End
Using the connector in Dymola
Using the connector in Dymola
Nov-11-19 17:32:16
I am currently trying to evaluate using Dymola to build the solar power plant model. I am following your book to learn Modelica. But at the start, I got a confusing question about using the connector in Modelica. I am using Dymola 2020.
Here are the codes of a connector and a model that uses the connector:
Code:
connector Port
flow Real Q;
Real P;
Real T;
end Port;
Code:
model Inlet
parameter Real Q = 1;
parameter Real P = 2;
parameter Real T = 3;
Port a;
equation
a.Q = Q;
a.P = P;
a.T = T;
end Inlet;
I set 3 equations in the model, but there is an error showing there are 4 equations, I am not sure why there are 4 equations??
Code:
The problem is structurally singular.
It has 3 scalar unknowns and 4 scalar equations.
The Real part has 3 unknowns and 4 equations.
The Integer part has 0 unknowns and 0 equations.
The Boolean part has 0 unknowns and 0 equations.
The String part has 0 unknowns and 0 equations.
The number of scalar Real unknown elements are 3.
The number of scalar Real equation elements are 4.
Part of the problem for Real elements is overdetermined.
There are 1 scalar equations too many in the set:
a.T = T;
a.P = P;
a.Q = Q;
WARNINGS have been issued.
ERRORS have been issued.
Page Start Prev 1 Next End
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Using the connector in Dymola
There are 0 guests and 0 other users also viewing this topic