connector - 实现非常简单的质量流量源时遇到问题

标签 connector modelica dymola

我目前正在通过尝试一些非常简单的示例来学习 Modelica。我为不可压缩流体定义了一个连接器Incompressible,如下所示:

connector Incompressible
  flow Modelica.SIunits.VolumeFlowRate V_dot;
  Modelica.SIunits.SpecificEnthalpy h;
  Modelica.SIunits.Pressure p;
end Incompressible;

我现在希望定义质量或体积流量源:

model Source_incompressible
  parameter Modelica.SIunits.VolumeFlowRate V_dot;
  parameter Modelica.SIunits.Temperature T;
  parameter Modelica.SIunits.Pressure p;
  Incompressible outlet;
equation 
  outlet.V_dot = V_dot;
  outlet.h = enthalpyWaterIncompressible(T);  // quick'n'dirty enthalpy function
  outlet.p = p;
end Source_incompressible;

但是,当检查Source_incompressible时,我得到了这个:

The problem is structurally singular for the element type Real.
The number of scalar Real unknown elements are 3.
The number of scalar Real equation elements are 4.

我在这里不知所措。显然,模型中有三个方程 - 第四个方程从何而来?

非常感谢您的见解。

最佳答案

多米尼克,

这里出现了几个问题。正如马丁指出的那样,连接器是不平衡的(该连接器中没有匹配的“直通”和“跨接”对)。对于流体系统,这是可以接受的。然而,密集的流体属性(例如,焓)必须标记为所谓的“流”变量。

诚然,这个话题相当复杂。我计划在我的 online Modelica book 中添加一个高级章节。关于这个话题,但我还没有时间。同时,我建议您查看 Modelica.Fluid 库和/或 this presentation作者之一,Francesco Casella。

关于connector - 实现非常简单的质量流量源时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23811595/

相关文章:

c++ - 'int8_t' : redefinition error in config. h 尝试将 mysql cpp 连接器连接到 visual studio 2010

modelica - 在 Modelica 中生成三角波函数的问题

Modelica 电气延迟

modelica - "class"在 Modelica 中是什么意思?

mongodb - 使用Mongo-Connector从Mongo DB导入到诸如ElasticSearch/Solr之类的目标系统时,如何排除文档字段?

java - 调用方法失败。消息负载的类型为 : String

events - 如何在 Modelica 中使用 bool 开关来防止将库存消耗到零以下?

annotations - Dymola/Modelica 中的实验注释

attributes - 为什么 Dymola/Modelica 中的属性 min、max 不起作用?

适用于 SAP HANA 和 .Net Core 的 .Net 连接器