如何使用 Modelica 标准库的 SimpleGenericOrifice 在管道中施加压力损失?
How can I use the SimpleGenericOrifice of the Modelica Standard Library to impose pressure loss in a pipe?
我想模拟一个液压管网,我在其中使用 Modelica.Fluid.Fittings.SimpleGenericOrifice
作为密封件,这样我就可以施加管道的压力损失。使用文档中的公式,我可以计算出孔口的 zeta 系数。
这是一个简化的例子,在这里我尝试在我的管道 1 内施加 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;
此致,
马克西姆
pipe1
尺寸(直径、长度、粗糙度等)“错误”,因为它只会产生非常小的压降。
验证模型的其余部分是否正常 - 并且在 boundary1
(0.17 kg/s 中设置的流量下,您可以在 pipe1
上压降 50 巴) — 使用 m_flow_nominal=0.17
和 dp_nominal=50 bar
.
暂时将 pipe1.FlowModel
更改为 NominalTurbulentPipeFlow
随后,将流模型切换回默认(详细)模型并调整管道几何形状。
顺便说一句,即使未使用,您也应该为 orifice.zeta
提供一个值。
我想模拟一个液压管网,我在其中使用 Modelica.Fluid.Fittings.SimpleGenericOrifice
作为密封件,这样我就可以施加管道的压力损失。使用文档中的公式,我可以计算出孔口的 zeta 系数。
这是一个简化的例子,在这里我尝试在我的管道 1 内施加 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;
此致, 马克西姆
pipe1
尺寸(直径、长度、粗糙度等)“错误”,因为它只会产生非常小的压降。
验证模型的其余部分是否正常 - 并且在 boundary1
(0.17 kg/s 中设置的流量下,您可以在 pipe1
上压降 50 巴) — 使用 m_flow_nominal=0.17
和 dp_nominal=50 bar
.
pipe1.FlowModel
更改为 NominalTurbulentPipeFlow
随后,将流模型切换回默认(详细)模型并调整管道几何形状。
顺便说一句,即使未使用,您也应该为 orifice.zeta
提供一个值。