Modeling closed hydraulic cycle in OpenModelica

穿精又带淫゛_ 提交于 2019-12-01 05:46:07

问题


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)

My example is:

a pump

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;

a resistence

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;

they are connected with a

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

The whole system is:

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?


回答1:


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.

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).

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.




回答2:


Maybe it helps to introduce a so called loop-breaker component. For a closed hydraulic cycle this could be an expansion vessel or storage tank with a variable level (such a component will also exist in reality).



来源:https://stackoverflow.com/questions/10946041/modeling-closed-hydraulic-cycle-in-openmodelica

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!