Opened 10 years ago

Last modified 10 years ago

#3191 new defect

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

Reported by: Lennart Ochel Owned by: somebody
Priority: high Milestone: Future
Component: Backend Version: trunk
Keywords: Cc: Francesco 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 by Lennart Ochel, 10 years ago

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 by Lennart Ochel, 10 years ago

Cc: Francesco 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.