Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#5466 closed defect (fixed)

The NF does not handle conditional initial equations in sub-components of arrays of components correctly

Reported by: Francesco Casella Owned by: Per Östlund
Priority: blocker Milestone: 1.16.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Please check IBPSA.Fluid.MixingVolumes.BaseClasses.Validation.MixingVolumeHeatMoisturePort. The C-code compilation fails.

The root cause can be traced to the flat model containing equations such as

  if {true, false, false} then
    vol[1].dynBal.medium.p = vol[1].dynBal.p_start;
  end if;

which come from flattening an array of components vol[N], each of which contains a component dynBal with the following initial equations:

  if massDynamics == Modelica.Fluid.Types.Dynamics.FixedInitial then
    if initialize_p then
      medium.p = p_start;
    end if;
  else
    if massDynamics == Modelica.Fluid.Types.Dynamics.SteadyStateInitial then
      if initialize_p then
        der(medium.p) = 0;
      end if;
    end if;
  end if;

Change History (3)

comment:1 by Per Östlund, 5 years ago

Resolution: fixed
Status: newclosed

Fixed in 4cf73067.

comment:2 by Francesco Casella, 5 years ago

Milestone: 2.0.01.16.0

comment:3 by Francesco Casella, 5 years ago

Backported to 1.14.0 and 1.15.0

Note: See TracTickets for help on using tickets.