modelSaturationPressureDerivativeCheck

Model to test correct implementation of derivative

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TemperatureTMin190Temperature
Modelica.Units.SI.TemperatureTMax373.16Temperature

Components

TypeNameDefaultDescription
RealyFunction value
Realy_compFunction value for comparison
RealerrIntegration error
Modelica.Units.SI.TemperatureTTemperature

Revisions

  • April 22, 2016, by Michael Wetter:
    Changed accuarcy test in assertion to use the relative error because the magnitude of y is 1E5 and hence testing an absolute error is too stringent. This is for Buildings, issue 510.
  • August 17, 2015 by Michael Wetter:
    Updated regression test to have slope that is different from one. This is for issue 303.
  • October 4, 2014, by Michael Wetter:
    Added a high tolerance which is needed for OpenModelica to pass the assert statement.
  • November 20, 2013, by Michael Wetter:
    First implementation.