#2864 closed defect (fixed)
Replace homotopy with actual expression in non-initial sections
Reported by: | sjoelund.se | Owned by: | lochel |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Backend | Version: | trunk |
Keywords: | Cc: |
Description
We need to replace homotopy with actual expression in non-initial sections since the expression cannot be simplified or differentiated properly unless you do so. ModelicaTest 3.2.1: ModelicaTest.Fluid.TestComponents.Vessels.TestVolume gives the following error:
Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 151 * Number of variables: 151 [/var/lib/hudson/jobs/OpenModelica_TEST_ALL_LIBRARIES/workspace/OpenModelica/build/lib/omlibrary/Modelica 3.2.1/Fluid/Vessels.mo:358:11-391:17:writable] Error: Internal error Differentiate.differentiateEquationTime failed for 0.0 = if Volume.regularFlow[2] then Volume.ports[2].p - homotopy(Volume.medium.p + 0.5 * Volume.portAreas[2] ^ -2.0 * Modelica.Fluid.Utilities.regSquare2(-1.0, Volume.m_flow_small, (-1.0 + Volume.portsData[2].zeta_in + (Volume.portAreas[2] / 2.593327596953829) ^ 2.0) * Volume.ports_penetration[2] / Volume.portInDensities[2], (1.0 + Volume.portsData[2].zeta_out - (Volume.portAreas[2] / 2.593327596953829) ^ 2.0) / (Volume.ports_penetration[2] * Volume.medium.d), false, 1.0), Volume.medium.p) else if Volume.inFlow[2] then Volume.ports[2].p - Volume.medium.p else -1.0 Error: Internal error - IndexReduction.pantelidesIndexReduction1 failed! Use +d=bltdump to get more information. Error: Internal error - IndexReduction.pantelidesIndexReduction failed! Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!
See also #2751 for similar issues with keeping initial parts in the non-initial partitions.
Change History (10)
comment:1 Changed 10 years ago by sjoelund.se
- Milestone changed from Future to 1.9.1
comment:2 Changed 10 years ago by lochel
- Status changed from new to accepted
comment:3 Changed 10 years ago by sjoelund.se
I think one way of handling this model would be special rules in Differentiate.mo to also handle homotopy(...).
comment:4 Changed 10 years ago by lochel
No, I don't think a special derivative rule for homotopy(…) is a good idea. I will split up the systems earlier and treat the actual and simplified expressions different.
comment:5 Changed 10 years ago by sjoelund.se
- Milestone changed from 1.9.1 to 1.9.2
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:6 Changed 9 years ago by sjoelund.se
- Milestone changed from 1.9.2 to 1.9.3
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:7 Changed 9 years ago by sjoelund.se
- Milestone changed from 1.9.3 to 1.9.4
Moved to new milestone 1.9.4
comment:8 Changed 9 years ago by lochel
- Resolution set to fixed
- Status changed from accepted to closed
comment:9 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.9.4 to 1.9.4-1.9.x
Milestone renamed
comment:10 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.9.4-1.9.x to 1.9.4
Milestone renamed
Good ticket. It was already on my list anyway.