Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrealistic expectation on size of err_u #4410

Open
henrikt-ma opened this issue Jun 3, 2024 · 0 comments
Open

Unrealistic expectation on size of err_u #4410

henrikt-ma opened this issue Jun 3, 2024 · 0 comments
Labels
L: Media Issue addresses Modelica.Media L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined

Comments

@henrikt-ma
Copy link
Contributor

It appears problematic that ModelicaTest.Media.TestAllProperties.PartialMediumFunctions has a single eps constant used to define absolute error tolerance different media properties.

assert(err_u <= eps, "Error: abs(medium.u - u) > eps " + "(err_u = " +

Take ModelicaTest.Media.TestAllProperties.CO2 for example. The expected value of medium.u is 156518.651861815, and the value of eps is 1e-10. This means that the assertion that err_u < eps requires medium.u to have a relative error smaller than 6e-16. Considering that double precision is the de facto standard (the specification only has a recommendation regarding the range, not the precision of Real), this does not seem realistic.

@henrikt-ma henrikt-ma added L: Media Issue addresses Modelica.Media L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Media Issue addresses Modelica.Media L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined
Projects
None yet
Development

No branches or pull requests

1 participant