Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » ironman
  • » Profile

Posts

Posts

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.

https://imgchr.com/i/MlW4JO
https://imgchr.com/i/MlW5WD
https://imgchr.com/i/MlWhFK
https://imgchr.com/i/MlWWo6

Nov-03-19 15:41:11
For ThermoSysPro Users

I am a new user, I used to use EBSILON Professional(https://de.wikipedia.org/wiki/EBSILON_Professional) to build the static simulation model, but now I am considering building the dynamic model of Solar Tower CSP. Unfortunately, I didn't find the heliostat field and solar receiver components in the library. Now I am trying to build them myself. Anyone interested and suggestions are welcome.



Alex
NCEPU China
2019/11/03

  • Index
  • » Users
  • » ironman
  • » Profile
You are here: