Opened 10 years ago
Last modified 9 years ago
#2895 assigned defect
Error translating new Medium package
Reported by: | Owned by: | Adrian Pop | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
Hi,
I wrote a package for a new Medium which I need to run my models. It is a mixture of table-based incompressible liquids. I have tested it on a very simple model (two incompressible liquids, two Boundary_pT each containing a different fluid, two valves, a pipe where the two liquids are mixed, and a Boundary_pT at atmospheric pressure) and I am able to run it. When I just change a few parameters or I increase the complexity of the model (for example by adding a pump) the model crashes.
Now I have tried to test my Medium using Modelica.Media.Examples.Tests.Components.PartialTestModel and I got the following error message:
[CodegenC.tpl:10494:39-10494:39] Error: Template error: Unknown dimensions may not be part of generated code. This is most likely an error on the part of OpenModelica. Please submit a detailed bug-report.
What shall I do?
Thanks in advance for your help.
Regards,
Andrea.
Attachments (3)
Change History (8)
follow-up: 2 comment:1 by , 10 years ago
comment:2 by , 10 years ago
Replying to sjoelund.se:
If you use mos-script or OMShell, I would suggest:
saveTotalModel("total.mo", Path.To.Class.To.Simulate);
and attaching this model to the ticket. Or creating a minimal model that triggers the error if you do not want to upload the full model.
I have attached the package that I coded for my new Medium and a very simple test which triggers the error.
Thank you for the very quick reply.
Regards,
Andrea.
follow-up: 4 comment:3 by , 10 years ago
Component: | Unknown → Frontend |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Adrian: These are record constants with unknown dimensions from what I can tell (data[1]
is part of the flat Modelica, but no such constant exists). Something with constant evaluation fails.
comment:4 by , 10 years ago
Replying to sjoelund.se:
Adrian: These are record constants with unknown dimensions from what I can tell (
data[1]
is part of the flat Modelica, but no such constant exists). Something with constant evaluation fails.
In some cases the medium package works correctly, in other cases I get the error message. I attach a model where the medium package works correctly, I hope it helps.
comment:5 by , 9 years ago
I know it has been a long time since this was opened. Were you ever able to resolve it? I am getting the same error for a model I'm building.
If you use mos-script or OMShell, I would suggest:
saveTotalModel("total.mo", Path.To.Class.To.Simulate);
and attaching this model to the ticket. Or creating a minimal model that triggers the error if you do not want to upload the full model.