0
번역 경고와 관련된 오류가 발생했습니다. 다음 코드가 있습니다. 나는 탱크에서 파이프와 싱크대로 유체를 펌핑하기 위해 스윕 볼륨을 사용하고 있습니다. 어떤 도움을 주시면 감사하겠습니다.열린 볼륨을 통해 MOdelica 펌핑 유체를 엽니 다.
model Trial2 "Model of a pumping system"
import Modelica.Fluid;
inner Modelica.Fluid.System system annotation(
Placement(visible = true, transformation(origin = {30, -42}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, allowFlowReversal = true, diameter = 0.3, height_ab = 100, length = 100) annotation(
Placement(visible = true, transformation(origin = {46, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Sensors.Pressure pressuretranducer annotation(
Placement(visible = true, transformation(origin = {37, 29}, extent = {{-11, -11}, {11, 11}}, rotation = 0)));
Modelica.Fluid.Sources.FixedBoundary sink(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, nPorts = 1, p = 0, use_p = true) annotation(
Placement(visible = true, transformation(origin = {48, 66}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
Modelica.Fluid.Machines.SweptVolume sweptVolume1(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, T_start = system.T_start, clearance = 5, nPorts = 2, pistonCrossArea = 50, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.3), Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.3)}, use_HeatTransfer = false, use_T_start = true, use_portsData = true) annotation(
Placement(visible = true, transformation(origin = {6, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Sine sine1(amplitude = 50, freqHz = 5) annotation(
Placement(visible = true, transformation(origin = {-62, 62}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.Translational.Sources.Force force1(useSupport = false) annotation(
Placement(visible = true, transformation(origin = {-18, 62}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Vessels.OpenTank tank(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, crossArea = 50, height = 60, level(start = 50), level_start = 50, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.3)}, use_HeatTransfer = false, use_T_start = true, use_portsData = true) annotation(
Placement(visible = true, transformation(origin = {-37, 23}, extent = {{-9, -9}, {9, 9}}, rotation = 0)));
equation
connect(tank.ports[1], sweptVolume1.ports[1]) annotation(
Line(points = {{-37, 14}, {4, 14}, {4, 20}, {6, 20}}, color = {0, 127, 255}, thickness = 0.5));
connect(pressuretranducer.port, pipe.port_a) annotation(
Line(points = {{37, 18}, {16, 18}, {16, -6}, {36, -6}}, color = {0, 127, 255}));
connect(force1.flange, sweptVolume1.flange) annotation(
Line(points = {{-8, 62}, {6, 62}, {6, 40}, {6, 40}}, color = {0, 127, 0}));
connect(sine1.y, force1.f) annotation(
Line(points = {{-50, 62}, {-30, 62}, {-30, 62}, {-30, 62}}, color = {0, 0, 127}));
connect(pipe.port_b, sink.ports[1]) annotation(
Line(points = {{56, -6}, {73, -6}, {73, 66}, {38, 66}}, color = {0, 127, 255}));
connect(sweptVolume1.ports[2], pipe.port_a) annotation(
Line(points = {{6, 20}, {9, 20}, {9, -6}, {36, -6}}, color = {0, 127, 255}, thickness = 0.5));
annotation(
uses(Modelica(version = "3.2.2")));
end Trial2;