openmodelicainterest  

Re: Variable and class not found in Modelica.Media

Martin Sjölund
Fri, 29 Jan 2010 10:21:33 -0800

Hi,

Modelica.Media is one of our priorities right now. I didn't check your log or mo/mos files because I recognize the error messages. The errors you are getting is because specificEmpalthy_ptx (or whatever it's called), is a partial function that should be redeclared by "redeclare replaceable function extends specificEmpatlthy_ptx algorithm ... end specificEmpatlthy_ptx;". We currently only perform the extends part of it, and put the new class in our class. However, we don't redeclare it in the base class.

--
Martin Sjölund

Sun, Yongqi (E F ES EN 1 2) wrote:
Hello, everyone! I'm interested in using Modelica.Media delivered with OpenModelica 1.5.0 RC1. My first simple test model ("media_test.mo") initializes "AbsolutePressure" and "SpecificEnthalpy" from "Modelica.Media.Water.WaterIF97_ph", and contains no complicated calculation. I use the "media_test.mos" to load the Modelica library, load the model file, and then simulate it. But the simulation fails, yielding errors about missing variables and classes ("media_test.log"). Typical errors are: Error: Class Modelica.Media.Water.WaterIF97_ph not found in scope media_test.Medium. Error: Variable nS not found in scope Modelica.Media.Interfaces.PartialTwoPhaseMedium

Error: Class Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants not found in scope Modelica.Media.Water while instantiating waterConstants.

Can anyone help me with this? I really appreciate your help.

With best regards,
Yongqi Sun

Siemens AG
Energy Sector
Fossil Power Generation Division
Energy Solutions
E F ES EN 12
Freyeslebenstr. 1
91058 Erlangen, Deutschland Tel.: +49 (9131) 18-6118 mailto:yongqi....@siemens.com