Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Possible Modelica.Media bug

Possible Modelica.Media bug

While checking my media models compatibility against ThermoPower, I observed a too high difference in the results obtained in the TestRefrigeranEvaporator test model, using the standard Modelica.Media.R134a.R134a_ph medium and my own medium. I arrived to the conclusion that it was due to the physical properties calculation and checked it. The result I obtain with the Modelica medium seems incorrect regarding density, as you can check with the attached model. The calculation done at 25ºC and 30 bars gives a liquid density result much lower than the saturated one, what seems very strange. I checked the calculation with CoolProp and it seems that the Modelica calculation is erroneous. The calculation at 25ºC is OK till 18 bars.
Can someone check this?

ModelicaTest5.mo

Attachments:

Re: Possible Modelica.Media bug

Well, I think I have found the origin of the problem. The medium is giving negative values for  isothermal compressibility, when they should be possitive. Reviewing the code it seems that a term is missing inside the brackets of the kappa calculation.
I hope not to be wrong and that this can help.

There are 0 guests and 0 other users also viewing this topic
You are here: