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

Inheritance problems on power systems library

Inheritance problems on power systems library

Hi everyone,
I analyze for a lot of time the power system library.
We can see in the Recursive BuildModel Test of the power system library that some test fails to run.
Most of the fails appear  when transformers are involved in the model.
The examples under the spot file using transformers have most of them a change in the configuration of the transformers.
All the transformers in the power system library 3ph have Y-Y topology configuration by default. In the real world the Delta-Y configuration is the most used.
To reuse the transformer model a redeclaration statement needs to be used at the model of the system under construction.
According with choices explicit in the model, to change the topology of the transformer term the follow statement is needed.
PowerSystems.AC3ph.Transformers.TrafoStray trafo(par = data, redeclare PowerSystems.AC3ph.Ports.Topology.Delta top_p)
If I am not wrong, this redeclare statement supposes to work, but when I analyzed the initialized model, the topology change in the port is missing and it remains an Y topology.
When I tried to run the simulation, an error message in pop-up window appears saying that there more variables than equations.
Analyzing the topology definition port of the transformer, YDportTrafo_p_n, The definition is done by default Y topology for both ports when the possibility to redeclare each port into Delta topology. This definition includes same variables declarations about Voltages and Currents to connect the port with its terminals considering the relations between the coils.
According with my tests, the discrepancy between the number of the number of variables and the number of equations is the result of the redeclaration statement, the variables definition are lost. In the other hand, the topology of the port remains Y.
When I tried to redefine the variables again, the compiler ignore the statement with a warning message.
I check the same model without changing the topology of the transformer and it works find.
I suppose that there is a bug in the omc compiler when it try to translate the model and the redeclare statement fails.
Fixing this problem will increase the success when running Recursive BuildModel Test of the power system library.
If something that I wrote is wrong,  or if you know any way to work around the bug please let me know.
Have a nice week end,

Edited by: daniwi - Apr-09-15 15:03:42

Re: Inheritance problems on power systems library

Hi,

Unfortunately, in some weird cases with redeclare we have some issues.
Either we don't apply all the modifiers, we apply them in a bad order, or we lose some of them.
Please add a ticket about it in our trac:
https://trac.openmodelica.org/OpenModelica
and if possible attach a (total) model which has this issue so we can debug it.

Cheers,
Adrian Pop/

Re: Inheritance problems on power systems library

A new tracticket was created number 3274

There are 0 guests and 0 other users also viewing this topic
You are here: