Free (standard conforming) library to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.
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.
It appears problematic that
ModelicaTest.Media.TestAllProperties.PartialMediumFunctions
has a singleeps
constant used to define absolute error tolerance different media properties. https://github.com/modelica/ModelicaStandardLibrary/blob/7a2a5ed3a1c92bd6d2eaed1a2813a0ae6ab75d91/ModelicaTest/Media.mo#L104Take
ModelicaTest.Media.TestAllProperties.CO2
for example. The expected value ofmedium.u
is 156518.651861815, and the value ofeps
is 1e-10. This means that the assertion thaterr_u < eps
requiresmedium.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 ofReal
), this does not seem realistic.