Changes between Initial Version and Version 1 of Ticket #5727, comment 22


Ignore:
Timestamp:
2019-12-24T12:38:38Z (5 years ago)
Author:
Karim Adbdelhak

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5727, comment 22

    initial v1  
    11I 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.
    22
    3 Furthermore i analyzed {{{      ModelicaTest.Fluid.TestExamplesVariants.BranchingDynamicPipes_MomentumSteadyState}}} which have 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.
     3Furthermore 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.
    44
    55I 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.