Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#2864 closed defect (fixed)

Replace homotopy with actual expression in non-initial sections

Reported by: Martin Sjölund Owned by: Lennart Ochel
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 by Martin Sjölund, 10 years ago

Milestone: Future1.9.1

comment:2 by Lennart Ochel, 10 years ago

Status: newaccepted

Good ticket. It was already on my list anyway.

comment:3 by Martin Sjölund, 10 years ago

I think one way of handling this model would be special rules in Differentiate.mo to also handle homotopy(...).

comment:4 by Lennart Ochel, 10 years ago

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 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.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 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:8 by Lennart Ochel, 9 years ago

Resolution: fixed
Status: acceptedclosed

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:10 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.