0

In Open Modelica Fluid Environment, I´m seeing the Error "Medium is partial, name lookup is not allowed in partial classes." Which is commonly solved properly defining the media in each element.

I followed the related instruction of the post (How to specify medium in Openmodelica?) Namely I have redeclared the medium in each component of my system but still get this error when I try to simulate, although the check went through just fine.

Now this error is referenced to the Interfaces file, specificaly the line:

"stream Medium.ExtraProperty C_outflow[Medium.nC] "Properties c_i/m close to the connection point if m_flow < 0"; "

Do you understand why this still happens? I guess this C_outflow refers to concentration or other specific property of fluid. However I haven´t set any particular property. I tried turning false the allowFlowReversal option in order to not have m_flow < 0 but it didn´t help.

Do you have any ideas of how to solve this issue? I´d appreciate any help from this dear community.

Here my model code with the first element as an example. Many thanks in advance.

model ####

replaceable package Medium = Modelica.Media.Water.StandardWaterOnePhase constrainedby Modelica.Media.Interfaces.PartialMedium; parameter Real D_p = 0.0254; //Normal Diameter of pipe

Modelica.Fluid.Vessels.ClosedVolume Tank1(redeclare package Medium = Medium, V = 0.05, nPorts = 2 ) annotation( Placement(visible = true, transformation(origin = {-2, 46}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); ...

Werner
  • 1
  • What OM version do you have? – Adrian Pop Jun 11 '21 at 06:48
  • Hi Adrian, I got the lastest version (Official Release, 1.17.0, (32bit/64bit) ) – Werner Jun 12 '21 at 11:38
  • Might be a bug, but unfortunately without access to the entire model is impossible to say. If you can share the model add a new issue here: https://github.com/OpenModelica/OpenModelica/issues and attach it. If you cannot share it in a public way, maybe you can send it to OpenModelica@ida.liu.se and we can debug with it and then delete it. – Adrian Pop Jun 12 '21 at 17:40
  • Hi Adrian, thank you very much for your reply. Please find de Issue under the link https://github.com/OpenModelica/OpenModelica/issues/7556 – Werner Jun 14 '21 at 10:55

0 Answers0