Opened 15 years ago

Last modified 14 years ago

#1129 closed defect (fixed)

check of Modelica.Electrical.MultiPhase.Examples.TransformerYD in MSL 3.1 fails

Reported by: Peter Aronsson Owned by: Peter Aronsson
Priority: critical Milestone: Red October
Component: Version:
Keywords: Cc: Peter Aronsson, Adrian Pop

Description

checkModel(Modelica.Electrical.MultiPhase?.Examples.TransformerYD) gives:

"Check of Modelica.Electrical.MultiPhase.Examples.TransformerYD completed.
Class Modelica.Electrical.MultiPhase.Examples.TransformerYD has 297 equation(s) and 285 variable(s).
225 of these are trivial equation(s).
"

Similar bug exists also for Modelica.Electrical.MultiPhase?.Examples.TransformerYY.

MathCore TRAC: http://intranet/trac/mathmodelica/ticket/2727

Change History (5)

comment:1 by Adrian Pop, 14 years ago

This is a problem with conditional components and *unconnected* flow variables:

partial model Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort "Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network"
  parameter Boolean useHeatPort = false "=true, if HeatPort is enabled";
  parameter Modelica.SIunits.Temperature T=293.15 "Fixed device temperature if useHeatPort = false";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort(T(start=T)=T_heatPort, Q_flow=-LossPower) if useHeatPort;
  Modelica.SIunits.Power LossPower "Loss power leaving component via HeatPort";
  Modelica.SIunits.Temperature T_heatPort "Temperature of HeatPort";
equation 
  if not useHeatPort then
     T_heatPort = T;
  end if;

If a deleted component contains a connector that has a flow variable which is unconnected the
set-to-zero phase of unconnected flow components will add the equations to the DAE,
even if the component is deleted! This gets us rid of 12 equations.
This will make our model balanced: 297-12 equations = 285 is equal to 285 variables.

comment:2 by Adrian Pop, 14 years ago

Seems that there is a bug in {{{ConnectUtil.removeUnconnectedDeletedComponents}} which doesn't do its job!

comment:3 by Adrian Pop, 14 years ago

The problem is in Exp.crefPrefixOf which doesn't consider that:

a.b.c is a prefix of a.b.c[1].x!

I now changed Exp.crefPrefixOf to consider the case above.
Running testsuite now to see if it doesn't break anything else.

comment:4 by Adrian Pop, 14 years ago

The result for now:

Class Modelica.Electrical.MultiPhase.Examples.TransformerYD has 285 equation(s) and 285 variable(s).
213 of these are trivial equation(s).
Class Modelica.Electrical.MultiPhase.Examples.TransformerYY has 281 equation(s) and 281 variable(s).
211 of these are trivial equation(s).

comment:5 by Adrian Pop, 14 years ago

Fixed in revision 6297.

Note: See TracTickets for help on using tickets.