3

I am simulating a heat pump water heating system in Modelica. I have attached the picture of my model. However, when I run the model I get the error "Medium is partial, name lookup is not allowed in partial classes". Can you please let me know:

  • How should I specify the water in tank, heat pump condenser and pipe?
  • How should I specify air in heat pump evaporator?

And in general, I did not find any example of modeling thermal systems in Openmodelica, can you suggest a source?

enter image description here

Thanks

marco
  • 5,944
  • 10
  • 22
user186204
  • 47
  • 5
  • Usually the medium can be selected in the parameter dialog, you can open that dialog by double-clicking any component, or right-click and select "Parameters". In some cases, the medium is set as a top-level parameter of the system, and I did indeed not find the way how to change such top-level parameters in OpenModelica Connection Editor. Examples of thermofluid systems in MSL are here: Modelica.Fluid.Examples.HeatingSystem – Priyanka Oct 16 '20 at 10:13
  • 3
    Unfortunately, currently there is no possibility of choosing working fluid in OpenModelica via **Diagram View**. You should refer to **Text View** and add ```replaceable package Medium = Modelica.Media.Water.StandardWater constrainedby Modelica.Media.Interfaces.PartialMedium;``` or any other Medium of your interest. Then, under each of your component that contains this Medium you should add the following line: ```redeclare package Medium = Medium,```. Available working fluids you can find under **Modelica.Media** – Tomillo Oct 19 '20 at 07:38

0 Answers0