阵列元件的冗余连接

Redundant Connection of Arrayed Component

收到警告我有一个 "redundant connection(s) (due to other connections)." 我正在将一个 HeatPort 链接到几个通过使用数组扩展的组件。请参阅下面的代码段。

each 的使用似乎不起作用,或者我没有正确使用。

Redundant connection(s) (due to other connections):
connect(topFrontExteriorConvection.solid, module3_PipeComponents[2].port_a);
connect(topFrontExteriorConvection.solid, module3_PipeComponents[3].port_a);
connect(topFrontExteriorConvection.solid, module3_PipeComponents[4].port_a);
connect(topFrontExteriorConvection.solid, module3_PipeComponents[5].port_a);
connect(topFrontExteriorConvection.solid, module3_PipeComponents[6].port_a);
in the connection set.
ecoCeramicRadiation.T =module3_PipeComponents[1].port_a.T =module3_PipeComponents[2].port_a.T =module3_PipeComponents[3].port_a.T =module3_PipeComponents[4].port_a.T =module3_PipeComponents[5].port_a.T =module3_PipeComponents[6].port_a.T =topFrontExteriorConvection.solid.T
Note that this is not an actual error, and the redundancy can be removed in several ways.

.solid.port_a 之间的热平衡在数学上应该是正确的,但我可能没有在 Modelica 中正确设置平衡。请让我知道是否有一种方法可以创建这些连接而不会使它们变得多余。虽然这只是一个警告,但我收到了基于这些警告的以下错误。

Edit 1 我已经设置了一个辅助模型,其中组件不再排列,而是在模型中复制了几次。热端口连接到其他几个热端口,但我仍然收到上述消息。连接如下所示:

连接类型有问题吗?

Edit 2 添加代码片段。下面是冗余连接警告的相关代码。此模型有更多代码,但为简洁起见已将其删除。

  parameter Integer numPipes=6 "Number of repeating pipes.";

  Buildings.HeatTransfer.Convection.Exterior topFrontExteriorConvection(
    hFixed=exteriorConvectionCoefficientFixed,
    conMod=extMode,
    azi=Azimuth,
    til=ecoCeramicTopPanelTilt,
    A=surfaceAreaTop);

  Components.Module3_PipeComponents module3_PipeComponents[numPipes](
    each segmentLength=segmentLength,
    each thicknessEco=thicknessEco,
    each pipeVolume=pipeVolume,
    each fluidFlow=fluidFlow,
    each initialFluidTemp=initialFluidTemp,
    each fluidDensity=fluidDensity,
    each pipeDiameter=pipeDiameter,
    each pipeLength=pipeLength,
    each surfaceAreaTop=segSurfaceArea);

equation
  connect(fluidInlet, module3_PipeComponents[1].flowPort_a);
  for i in 1:numPipes - 1 loop
    connect(module3_PipeComponents[i].flowPort_b, module3_PipeComponents[i+1].flowPort_a);
  end for;
  for i in 1:numPipes loop
    connect(ecoCeramicRadiation, module3_PipeComponents[i].port_a);
    connect(topFrontExteriorConvection.solid, module3_PipeComponents[i].port_a);
    connect(module3_PipeComponents[i].port_b, topInsulationConduction.port_a);
  end for;
  connect(module3_PipeComponents[numPipes].flowPort_b, fluidOutlet);

问题是以下几行:

for i in 1:numPipes loop
    connect(ecoCeramicRadiation,              module3_PipeComponents[i].port_a);
    connect(topFrontExteriorConvection.solid, module3_PipeComponents[i].port_a);
...
end for;

这意味着 numPipes*2 个连接涉及 numPipes+2 个连接器,如果 numPipes 足够大,这意味着冗余连接。

避免这种情况的一种方法是:

for i in 1:numPipes loop
    connect(ecoCeramicRadiation,              module3_PipeComponents[i].port_a);
...
end for;
connect(ecoCeramicRadiation, topFrontExteriorConvection.solid);