- Index
- » Developer
- » OpenModelica development
- » Possible Modelica.Media bug
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
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.
- Index
- » Developer
- » OpenModelica development
- » Possible Modelica.Media bug