modelTestRegRootDerivative
Demonstrate that regRoot cannot be differentiated in a typical pressure drop equation (model fails during simulation)
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This test model demonstrates that the regRoot(..) function cannot be differentiated, if multiplied with a discontinuous factor as it is usual for pressure drop components where upstream properties are used. In such a case, the regRoot2(..) function should be used. In order to test this behaviour, change the line "yd=0" to "yd = der(y)".
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x_small | 0.01 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x | ||
| Real | y | ||
| Real | yd | ||
| Real | k1 | ||
| Real | k2 |