如何使用Modelica Standard库的SimpleGenerericrifice在管道中施加压力损失?

发布于 2025-01-24 04:53:19 字数 3128 浏览 0 评论 0原文

我想建模一个液压网络,在其中使用moderica.fluid.fittings.simpleglegleglecleericorifice作为密封件,以便我可以施加管道的压力损失。使用文档中的公式,我可以计算孔口的Zeta系数。

这是一个简化的例子,在这里我试图在管道内施加50 bar的压力损失。因为端口的压力应相等,所以我认为它应该起作用:

“在此处输入图像说明”

但是,我的管道和孔口中没有任何压力损失。

有人知道如何做这项工作吗?

这是示例的代码

model Joints_HD

replaceable package Medium=Modelica.Media.Water.StandardWater constrainedby
    Modelica.Media.Interfaces.PartialMedium;

  Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Medium,diameter = 0.15, length = 1)  annotation(
    Placement(visible = true, transformation(origin = {-38, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  inner Modelica.Fluid.System system annotation(
    Placement(visible = true, transformation(origin = {-70, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  Modelica.Fluid.Sources.Boundary_pT boundary(redeclare package Medium = Medium,T = 328.15, p = 157e5, nPorts = 1)  annotation(
    Placement(visible = true, transformation(origin = {-66, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sources.MassFlowSource_T boundary1(redeclare package Medium = Medium,T = 328.15, m_flow = -0.17, nPorts = 1)  annotation(
    Placement(visible = true, transformation(origin = {72, 10}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
  
  Modelica.Fluid.Pipes.StaticPipe pipe2(redeclare package Medium = Medium,diameter = 0.15, length = 1)  annotation(
    Placement(visible = true, transformation(origin = {44, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  Modelica.Fluid.Fittings.SimpleGenericOrifice orifice(redeclare package Medium = Medium,diameter = 0.15, dp_nominal = 5e+06, m_flow_nominal = 2.34e-9, use_zeta = false)  annotation(
    Placement(visible = true, transformation(origin = {2, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  Modelica.Fluid.Pipes.StaticPipe pipe1(redeclare package Medium = Medium, diameter = 0.15, length = 1)  annotation(
    Placement(visible = true, transformation(origin = {2, -18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

equation
  
  connect(boundary.ports[1], pipe.port_a) annotation(
    Line(points = {{-56, 10}, {-48, 10}}, color = {0, 127, 255}));
  connect(pipe.port_b, orifice.port_a) annotation(
    Line(points = {{-28, 10}, {-8, 10}}, color = {0, 127, 255}));
  connect(pipe2.port_b, boundary1.ports[1]) annotation(
    Line(points = {{54, 10}, {62, 10}}, color = {0, 127, 255}));
  connect(orifice.port_b, pipe2.port_a) annotation(
    Line(points = {{12, 10}, {34, 10}}, color = {0, 127, 255}));
  connect(pipe.port_b, pipe1.port_a) annotation(
    Line(points = {{-28, 10}, {-20, 10}, {-20, -18}, {-8, -18}}, color = {0, 127, 255}));
  connect(pipe1.port_b, pipe2.port_a) annotation(
    Line(points = {{12, -18}, {26, -18}, {26, 10}, {34, 10}}, color = {0, 127, 255}));
  annotation(
    uses(Modelica(version = "3.2.3")));

end Joints_HD;

最好的问候, Maxime

I would like to model an hydraulic network where I use the Modelica.Fluid.Fittings.SimpleGenericOrifice as a seal so I can impose the pressure loss of a pipe. Using the formula in the documentation, I can calculate the zeta coefficient of the orifice.

Here is a simplified example, here I try to impose a pressure loss of 50 bar inside my pipe1. Because the pressure should be equal at the port, I assume that it should work :

enter image description here

However I don't have any pressure loss in the pipe and in the orifice.

Does anyone know how to make this work ?

Here is the code of the example

model Joints_HD

replaceable package Medium=Modelica.Media.Water.StandardWater constrainedby
    Modelica.Media.Interfaces.PartialMedium;

  Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Medium,diameter = 0.15, length = 1)  annotation(
    Placement(visible = true, transformation(origin = {-38, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  inner Modelica.Fluid.System system annotation(
    Placement(visible = true, transformation(origin = {-70, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  Modelica.Fluid.Sources.Boundary_pT boundary(redeclare package Medium = Medium,T = 328.15, p = 157e5, nPorts = 1)  annotation(
    Placement(visible = true, transformation(origin = {-66, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sources.MassFlowSource_T boundary1(redeclare package Medium = Medium,T = 328.15, m_flow = -0.17, nPorts = 1)  annotation(
    Placement(visible = true, transformation(origin = {72, 10}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
  
  Modelica.Fluid.Pipes.StaticPipe pipe2(redeclare package Medium = Medium,diameter = 0.15, length = 1)  annotation(
    Placement(visible = true, transformation(origin = {44, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  Modelica.Fluid.Fittings.SimpleGenericOrifice orifice(redeclare package Medium = Medium,diameter = 0.15, dp_nominal = 5e+06, m_flow_nominal = 2.34e-9, use_zeta = false)  annotation(
    Placement(visible = true, transformation(origin = {2, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  Modelica.Fluid.Pipes.StaticPipe pipe1(redeclare package Medium = Medium, diameter = 0.15, length = 1)  annotation(
    Placement(visible = true, transformation(origin = {2, -18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

equation
  
  connect(boundary.ports[1], pipe.port_a) annotation(
    Line(points = {{-56, 10}, {-48, 10}}, color = {0, 127, 255}));
  connect(pipe.port_b, orifice.port_a) annotation(
    Line(points = {{-28, 10}, {-8, 10}}, color = {0, 127, 255}));
  connect(pipe2.port_b, boundary1.ports[1]) annotation(
    Line(points = {{54, 10}, {62, 10}}, color = {0, 127, 255}));
  connect(orifice.port_b, pipe2.port_a) annotation(
    Line(points = {{12, 10}, {34, 10}}, color = {0, 127, 255}));
  connect(pipe.port_b, pipe1.port_a) annotation(
    Line(points = {{-28, 10}, {-20, 10}, {-20, -18}, {-8, -18}}, color = {0, 127, 255}));
  connect(pipe1.port_b, pipe2.port_a) annotation(
    Line(points = {{12, -18}, {26, -18}, {26, 10}, {34, 10}}, color = {0, 127, 255}));
  annotation(
    uses(Modelica(version = "3.2.3")));

end Joints_HD;

Best regards,
Maxime

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

牵你手 2025-01-31 04:53:19

Pipe1具有“错误”维度(直径,长度,粗糙度等),因为它仅产生很小的压力下降。

要验证该模型的其余部分还可以 - 并且您可以在pipe1 boundard> boundard> boundard> boundard> boundare1 (0.17 kg/s)上的压力下降50 bar(0.17 kg/s) - 临时更改pipe1.flowmodel suminalTurbulentPipeFlow带有m_flow_nominal = 0.17dp_nominal = dp_nominal = 50 bar

随后,将流模型切换回默认(详细)模型,然后调整管道几何形状。

顺便说一句,即使不使用它,您也应该为orifice.zeta提供一个值。

pipe1 has "wrong" dimensions (diameter, length, roughness etc.) since it only creates a very small pressure drop.

To verify that the rest of the model is okay — and that you can have a pressure drop of 50 bar over pipe1 at the flow set in boundary1 (0.17 kg/s) — temporarilly change pipe1.FlowModel to NominalTurbulentPipeFlow with m_flow_nominal=0.17 and dp_nominal=50 bar.

Subsequently, switch the flow model back to the default (detailed) model and adjust the pipe geometry.

By the way, you should provide a value for orifice.zeta even though it is not used.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文