如何从外部连接输入连接器?

问题描述 投票:0回答:1

我对 Modelica 还很陌生,所以也许我的问题是一个基本问题。

我有一个燃烧室模型,有 3 个端口(或连接器):

1- AirPort(为模型提供介质(其中指定了空气的质量分数)、P、h 和 f(= 质量流量))。 2- 排气口连接相同的变量(还有质量分数),但离开燃烧室 3- 为燃烧器提供无单位值的实数输入,该值决定质量流量值。

现在这个模型可以工作了,但我想用另一个端口替换第三个端口,该端口允许传输实际变量(质量流量、焓和压力),而不仅仅是无单位值。

这样做时,我收到以下错误:

The input connector p of prop is not connected from the outside.
It is likely that it should have been connected, and recursive check assumes this.
The missing connection is a likely cause of errors in the model.

The input connector Xi of prop is not connected from the outside.
It is likely that it should have been connected, and recursive check assumes this.
The missing connection is a likely cause of errors in the model.

The input connector h of prop is not connected from the outside.
It is likely that it should have been connected, and recursive check assumes this.
The missing connection is a likely cause of errors in the model.

The input connector p of propFuel is not connected from the outside.
It is likely that it should have been connected, and recursive check assumes this.
The missing connection is a likely cause of errors in the model.

The input connector h of propFuel is not connected from the outside.
It is likely that it should have been connected, and recursive check assumes this.
The missing connection is a likely cause of errors in the model.

定义“prop”和“propFuel”的行:

  BasicAeroEngines.Media.ExhaustGas.BaseProperties prop "Properties of exhaust gas";
  BasicAeroEngines.Media.Hydrogen.BaseProperties propFuel "Properties of fuel";

以及这些在同一模型中使用的位置:

  prop.T = T;
  prop.X = X_L;
  h_L = prop.h;
  cp_gas = ExhaustGas.specificHeatCapacityCp(prop.state);

  propFuel.p = P;
  propFuel.T = T;
  h_L = propFuel.h;
  propFuel.X = {1};

这些是连接器的线路:

    BasicAeroEngines.Interfaces.AirPort airInlet;
    BasicAeroEngines.Interfaces.ExhaustPort exhaust;

    ThermoPower.Water.FlangeC fuelFlow

其中FlanceC定义如下:

    connector FlangeC
    extends ThermoPower.Water.Flange_NEW;
    end FlangeC;

其中‘ThermoPower.Water.Flange_NEW’定义如下:

    connector Flange_NEW
    "Flange connector for water/steam flows TEST FOR NEW COMBUSTOR"
    replaceable package Medium = ExternalMedia.Media.CoolPropMedium (mediumName="Hydrogen", substanceNames={"H2"}, ThermoStates=Modelica.Media.Interfaces.Choices.IndependentVariables.ph);
    flow Medium.MassFlowRate m_flow
    "Mass flow rate from the connection point into the component";
    Medium.AbsolutePressure p "Thermodynamic pressure in the connection point";
    stream Medium.SpecificEnthalpy h_outflow
    "Specific thermodynamic enthalpy close to the connection point if m_flow < 0";
   stream Medium.MassFraction Xi_outflow[Medium.nXi]
   "Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0";
   stream Medium.ExtraProperty C_outflow[Medium.nC]
    "Properties c_i/m close to the connection point if m_flow < 0";

    end Flange_NEW;

非常感谢您的帮助!

首先我想,也许错误来自于一个未确定的系统,但后来我用这些行关闭了系统:

  propFuel.p = P;
  propFuel.T = T;
  h_L = propFuel.h;
  propFuel.X = {1};

但我仍然遇到同样的错误。

hex modelica heat
1个回答
0
投票

中型型号中的输入连接器的使用方式应该有点奇怪,因此诊断没有帮助。不幸的是,这会阻止生成其他诊断信息。

在 Dymola 套装中:

Advanced.ReportEquationsForSingular=0

您将获得有关该问题的更多信息。 如果没有完整的模型,将很难提供更多帮助。

© www.soinside.com 2019 - 2024. All rights reserved.