Opened 9 years ago

Last modified 9 years ago

#3191 new defect

Modelica.Fluid.Examples.HeatingSystem fails in combination with replaceHomotopy=actual

Reported by: lochel Owned by: somebody
Priority: high Milestone: Future
Component: Backend Version: trunk
Keywords: Cc: casella

Description

Modelica.Fluid.Examples.HeatingSystem fails if replaceHomotopy=actual is used due to a singular linear system during casualization:

1 : pump.dp_pump = pump.p_b_nominal - tank.ports[2].p
2 : pump.dp_pump = pump.medium.p - tank.ports[2].p
[
  1.0 , 1.0 ;
  1.0 , 1.0
]
  *
[
  tank.ports[2].p ;
  pump.dp_pump
]
  =
[
  pump.p_b_nominal ;
  pump.medium.p
]
  U(2,2) = 0.0, which means system is singular for variable pump.dp_pump.

Change History (2)

comment:1 Changed 9 years ago by lochel

I think singular linear systems should not break compilation, since they can be handled during runtime in some cases.

The following model contains the same singular linear system but can be simulated:

model Unnamed
  Real a, b;
  parameter Real p1 = 100;
  parameter Real p2 = 100;
  discrete Real r(start=1, fixed=true);
equation 
  a = p1 -b;
  r*a = p2 - b;
  
  when time > 0.5 then
    r = 2;
  end when;
end Unnamed;

Therefore, I would prefer to change the error to a warning and proceed compilation.

comment:2 Changed 9 years ago by lochel

  • Cc casella added

The actual question here is, whether the system from the description is intended or not.

Note: See TracTickets for help on using tickets.