Opened 6 years ago

#5374 new discussion

How do I solve Modelica errors of variables, where the variables are parameters of extensions that your model is using?

Reported by: KieranF <kieran.fung@…> Owned by: somebody
Priority: high Milestone: Future
Component: *unknown* Version: v1.13.0
Keywords: Error, Structurally, Singular, Structurally Singular, Translation Error, Variable Not Found, Cc: kieran.fung@…

Description

I've been trying to build a Rankine Power Cycle on OpenModelica for quite some time now and have been running into a reoccurring issue that I'm just not sure how to troubleshoot.

My Issue:
I'm able to get the majority of all of my Rankine Power Cycle model iterations to at least get a checked model as well as a successful instantiation. At this point I deem my model ready to try and simulate. The types of errors that usually break my simulation are variables that are located within extended models that my model is using.

For example:
Currently I am checking and verifying sub assemblies of the Rankine Power Cycle to be able to properly verify which components work and which do not under x,y,z circumstances. My heat exchanger model is checked and is able to instantiate but upon simulation I get error codes that read:

 [22] 14:34:06 Symbolic Error
    [ThermoPower.Gas: 1053:5-1053:66]: Model is structurally singular, error 
    found sorting equations 
    125: 0.0 = 0.0;
    for variables 
    HX.gasFlow.vbar[5](140), HX.gasFlow.drbdX1[2,4](125)

What the issue here for me is that the error above, or all errors of these types, are hyperlinked to either partial models or packages that my own model extends. So the variables above "vbar" or "drbdX1" are no where within my HeatExchanger Model that I built, but the components inside of my own model somehow extend to these variables that are inevitably causing the error.

Things I've tried:

I've tried adding values to the extended hyperlinked models/packages in order to fix the error. This does not do anything.

I've tried copy and pasting said lines of code into my own model in order to declare whatever package/function that has already been declared within the extension. This does not work as usually produces an error for incorrect declaration.

The hyperlinked error does little to not help on how exactly I should fix the model, or where or which model I should fix it on.

If you have any insight or recommendations on how to fix such an issue, please feel free to comment below! Thank you for your time and reading this far into my plea for help :)

I've attached the model I'm working on just in case.

Attachments (2)

HX_Turbine_Check.mo_UnSuccessful.mo (4.4 KB ) - added by KieranF <kieran.fung@…> 6 years ago.
HX_Turbine_Check.mo_UnSuccessful.2.mo (5.7 KB ) - added by KieranF <kieran.fung@…> 6 years ago.
Updated File, most relevant to use and simulate

Download all attachments as: .zip

Change History (2)

by KieranF <kieran.fung@…>, 6 years ago

by KieranF <kieran.fung@…>, 6 years ago

Updated File, most relevant to use and simulate

Note: See TracTickets for help on using tickets.