Opened 10 years ago

Last modified 9 years ago

#2895 assigned defect

Error translating new Medium package

Reported by: andreabr@… 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)

MixtureIncompressibleLiquid.mo (19.6 KB ) - added by andreabra@… 10 years ago.
New medium package
TestOfMediumPipelineOil.mo (472 bytes ) - added by andreabr@… 10 years ago.
Test of my medium
MultiSubstanceLiquid.mo (5.4 KB ) - added by andreabr@… 10 years ago.
Model

Download all attachments as: .zip

Change History (8)

comment:1 by Martin Sjölund, 10 years ago

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.

in reply to:  1 comment:2 by anonymous, 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.

by andreabra@…, 10 years ago

New medium package

by andreabr@…, 10 years ago

Attachment: TestOfMediumPipelineOil.mo added

Test of my medium

comment:3 by Martin Sjölund, 10 years ago

Component: UnknownFrontend
Owner: changed from somebody to Adrian Pop
Status: newassigned

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.

by andreabr@…, 10 years ago

Attachment: MultiSubstanceLiquid.mo added

Model

in reply to:  3 comment:4 by anonymous, 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 anonymous, 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.

Note: See TracTickets for help on using tickets.