OpenModelica -Connector生成的其他方程式超过预期
我正在尝试在OpenModelica中实现一个简单的模型,但是我得到了由连接器引起的一系列方程式。
工具由三个项目组成:
第一个是连接器,其中仅定义了流量:
```
connector ConnectorMassFlow
flow Real G "Rate [kg/s]";
end ConnectorMassFlow;
```
第二个是压缩机模型,其中定义了1个连接器:
```
model ModelCompressor
ConnectorMassFlow MassFlowIn;
equation
end ModelCompressor;
```
然后,定义了压缩机,然后将电路模型定义为另一个连接器也是:
```
model ModelConditioner
ConnectorMassFlow MassFlowIn;
ModelCompressor Compressor;
equation
MassFlowIn.G = 1.0;
connect(Compressor.MassFlowIn,MassFlowIn);
end ModelConditioner;
```
问题是,即使只有2个方程,即:
compressor.massflowin.g -MassFlowin.g = 0.0
;massflowin.g = 1.0
;
OpenModelica添加了另一个方程式,即:
massFlowin.g = 0.0
;
此外,在第一个方程式中应该有两个术语之间的A +,而不是负等式...
有人可以帮我吗?
I'm trying to implement a simple model in OpenModelica, but I got an overnumber of equations caused by the connector.
The tools is composed by three items:
The first is the connector, in which only a flow is defined:
```
connector ConnectorMassFlow
flow Real G "Rate [kg/s]";
end ConnectorMassFlow;
```
The second is a compressor model, in which 1 connector is defined:
```
model ModelCompressor
ConnectorMassFlow MassFlowIn;
equation
end ModelCompressor;
```
And then the circuit model, in which the compressor is defined, and another connector as well:
```
model ModelConditioner
ConnectorMassFlow MassFlowIn;
ModelCompressor Compressor;
equation
MassFlowIn.G = 1.0;
connect(Compressor.MassFlowIn,MassFlowIn);
end ModelConditioner;
```
The problem is that, even if there should be only 2 equations, i.e.:
Compressor.MassFlowIn.G - MassFlowIn.G = 0.0
;MassFlowIn.G = 1.0
;
OpenModelica is adding another equation, that is:
MassFlowIn.G = 0.0
;
In addition, in the first equation there should be a + between the two terms, and not a minus...
Can someone help me please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论