在 OpenModelica 中模拟闭式水力循环 [英] Modeling closed hydraulic cycle in OpenModelica

查看:43
本文介绍了在 OpenModelica 中模拟闭式水力循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想模拟一个封闭的液压循环,就像在 Modelica 标准库/流体/示例/加热系统中可以找到的那样.对于加热系统以及我的(极简)示例,我遇到了同样的问题:系统过度确定.您可以在接下来的讲座中发现加热系统是一个坏例子",所以我想这是一个众所周知的问题,但我并没有真正明白这一点.http:///www.modprod.liu.se/MODPROD2011/1.252944/modprod2011-day2-talk3-Keynote-Francesco-Casella-Control-and-Modelica.pdf(第 20 页)

I'd like to model a closed hydraulic cycle as one can find in the Modelica Standard Library/Fluid/Examples/HeatingSystem. With the heating system as well as with my (minimalistic) example I've got the same problem: The system is overdetermined. You can find the HeatingSystem as a "bad example" in the following lecture, so I guess this is a well known problem, but I don't really get the point. http://www.modprod.liu.se/MODPROD2011/1.252944/modprod2011-day2-talk3-Keynote-Francesco-Casella-Control-and-Modelica.pdf (page 20)

我的例子是:

一个泵

model producer
  pipe_flange w,k;
  parameter Real a,b,c;
equation
  w.p = k.p + a * k.Vp ^ 2 + b * k.Vp + c;
end producer;

抵抗

model consumer
  pipe_flange w,k;
  parameter Real rho;
  parameter Real d_i;
  parameter Real zeta;
equation
  k.p = w.p - rho / 2 * ((w.Vp * 4) / 3.14 * d_i ^ 2) ^ 2 * zeta;
end consumer;

它们与一个连接

connector pipe_flange
  Real p;
  flow Real Vp;
end pipe_flange;

整个系统是:

model System
  consumer consumer1(rho = 1000, d_i = 0.06, zeta = 0.5);
  producer producer1(a = -740741, b = -19630, c = 1070);
equation
  connect(consumer1.w,producer1.w);
  connect(consumer1.k,producer1.k);
end System;

谁能告诉我问题出在哪里?

Can anybody give me a hint what the problem is all about?

推荐答案

您确定您的系统过度确定?我是;不确定这是怎么回事,因为您的 producerconsumer 模型都未确定.

Are you sure your system is overdetermined? I'm; not sure how this can be since both your producer and consumer models are underdetermined.

作为一般规则,您在一个组件中需要的方程数量将等于其所有连接器上的流变量数量 + 内部变量数量(参数不计算在内)+ 输出数量.

As a general rule, the number of equations you need in a component will be equal to the number of flow variables across all its connectors + the number of internal variables (parameters do not count) + the number of outputs.

通过这种方法,您的 producer 模型应该有 2 个方程(因为它的所有连接器都有 2 个流变量).同样,您的 consumer 模型应该有 2 个方程(因为它的所有连接器都有两个流变量).所以我不明白你怎么能生成太多的方程.

By this method, your producer model should have 2 equations (because it has 2 flow variable across all its connectors). Similarly, your consumer model should have 2 equations (Because it has two flow variables across all its connectors). So I don't see how you can generate too many equations.

您的模型也很棘手,因为您正在对通过系统的动量流动进行建模(通过连接器上存在的速度作为流动变量来表示).但你的潜在变量是压力.您的问题中没有跟踪质量(通常是这样).

Your model is also tricky because you are modeling the flow of momentum through your system (indicated by the presence of velocity on your connector as a flow variable). But your potential variable is pressure. There is no tracking of mass in your problem (as there usually is).

因此,总而言之,您的组件模型肯定存在问题,因为它们不平衡"(根据 Modelica 规范),因为它们没有正确数量的方程.但即使在物理"层面上,根据我的经验,您的公式(压力和速度)也很不寻常,而且在我看来,一旦方程平衡问题得到解决,它也可能导致问题.

So, in summary, your component models definitely have an issue because they are "unbalanced" (according to the Modelica Specification) since they do not have the right number of equations. But even on a "physical" level, your formulation (pressure and velocity) is unusual in my experience and it seems to me that it could lead to problems as well once the equation balance issue is overcome.

这篇关于在 OpenModelica 中模拟闭式水力循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆