Changes between Initial Version and Version 1 of Ticket #5727, comment 22
- Timestamp:
- 2019-12-24T12:38:38Z (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5727, comment 22
initial v1 1 1 I fixed one small thing which should have a great effect on {{{ModelicaTest.Fluid.TestUtilities.TestRegRoot2Derivatives}}} and similar models. It was just a small error in the update module for differentiation counting. 2 2 3 Furthermore i analyzed {{{ ModelicaTest.Fluid.TestExamplesVariants.BranchingDynamicPipes_MomentumSteadyState}}} which ha vea failure at initialization just as you described. I looked into the generated code and stumbled upon the functions {{{saturationPressure}}}, {{{saturationPressureLiquid}}} and their derivatives in the {{{Media}}} library. It seems like the first function uses the latter one and that is also true for the derivatives. It seems like this inheritance produces problems since the generated function for the derivative of {{{saturationPressureLiquid}}} in c-code seems like utter garbage. It could be some form of automated differentiation result.3 Furthermore i analyzed {{{ ModelicaTest.Fluid.TestExamplesVariants.BranchingDynamicPipes_MomentumSteadyState}}} which has a failure at initialization just as you described. I looked into the generated code and stumbled upon the functions {{{saturationPressure}}}, {{{saturationPressureLiquid}}} and their derivatives in the {{{Media}}} library. It seems like the first function uses the latter one and that is also true for the derivatives. It seems like this inheritance produces problems since the generated function for the derivative of {{{saturationPressureLiquid}}} in c-code seems like utter garbage. It could be some form of automated differentiation result. 4 4 5 5 I think this is common usage of predefined derivatives of functions, so i don't really understand why it breaks in this particular case. I will have a look at it.