modelRegNonZeroPowerDerivative_2_Check
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
| Type | Name | Default | Description |
|---|---|---|---|
| Real | n | 0.33 | Exponent |
| Real | gain | 4 | Gain for computing the mass flow rate |
| Real | delta | 0.7 | Smoothing coefficient |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x | Independent variable | |
| Real | y_comp | Comparison value | |
| Real | y | Dependent variable | |
| Real | der_y_comp | 1st order derivative of comparison value | |
| Real | der_y | 1st order derivative of dependent variable | |
| Real | err | Integration error | |
| Real | der_err | Integration error |
Revisions
-
August 17, 2015 by Michael Wetter:
Updated regression test to have slope that is different from one. This is for issue 303. -
April 14, 2008, by Michael Wetter:
First implementation.