#2323 closed defect (worksforme)
Error: "variable [...] not constant"
Reported by: | anonymous | Owned by: | somebody |
---|---|---|---|
Priority: | normal | Milestone: | 1.13.0 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
When trying to validate the example model ThermoPower.Examples.RankineCycle.Simulators.ClosedLoop from the ThermoPower library in OpenModelica the following error message is generated:
"Error: Variable Choices.System.Dynamics in package ThermoPower.System is not constant.
Dynamics is of type enumeration and should be constant.
Change History (14)
comment:1 by , 11 years ago
Milestone: | 1.9.0 → 1.9.1 |
---|
comment:2 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:3 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:8 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:9 by , 7 years ago
Milestone: | 1.12.0 → Future |
---|
The milestone of this ticket has been reassigned to "Future".
If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.
If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".
In both cases, a short informative comment would be welcome.
comment:10 by , 7 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
As of v1.13.0-dev.234+g1a074b074, simulation code is generated without problems. The simulation fails for numerical reasons, but that's beyond the scope of this ticket.
comment:11 by , 7 years ago
Milestone: | Future → 1.13.0 |
---|
comment:12 by , 6 years ago
I literally have the exact same scenario with a Rankine Power Cycle that I built myself replicating the Rankine Example off of the ThermoPower Library.
I have an error associated with the pump I am using. I've tried re-modeling this Power Cycle many times, simplifying it further and further in hopes of reaching a successful simulation but it seems that this error for me is always associated with the water pump.
The error is:
[2] 12:46:39 Translation Error
Variable Pump.q_single0 in package ThermoPower.Water.Pump is not constant.
I've tried to allow the program to calculate this parameter on its own via the embedded equation within the cell which pulls values from other assigned parameters. Also, since this value needs to be "constant" I made sure that all of the other parameters being used in this equation are staying constant, which they are. No luck.
I've also tried using dummy values for this flow rate in hopes that an assigned numerical value will over ride the error of constant. No luck.
Finally, I've tried going into the Text View of the model and located the Pump associated with this error. Once there, I've tried editing the code ...
ThermoPower.Water.Pump Pump(
Np0 = 1,
V = 10,
dp0 = 0,
hstart = 1e5,
n0 = 150,
n_const = 150,
q_single(fixed = true, start = 10),
w0 = 50,
w_single(fixed = false),
wstart = 50)
Where I would then change fixed = true. This was unsuccessful as well.
This was posted a while ago but hoping someone out there has ran into this issue as well and has a solution!
Thanks!
comment:13 by , 6 years ago
@kieran.fung I would suggest opening a new ticket and attach (or email us) the model so we could make fixes. You could also try the new instantiation module (-d=newInst
) as it has several improvements over the current frontend especially for Fluid/Media type models (and has around 90% coverage of the current frontend in the general case).
Postponed until 1.9.1