Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Outflow management from closed volume

Outflow management from closed volume

Hi everyone,
i'd like to make a model where water is pumpt in a closed volume.
From there, the water should flow (equally spreaded) in two open tanks.
Is this even possible to do? I hope anyone can help.
Here's a try of mine that didnt work properly:

model Test_Abfueller2
  inner Modelica.Fluid.System system annotation(
    Placement(visible = true, transformation(origin = {-80, 78}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sources.Boundary_pT boundary(redeclare package Medium = Modelica.Media.CompressibleLiquids.LinearColdWater,nPorts = 1, p = 600000)  annotation(
    Placement(visible = true, transformation(origin = {-84, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Modelica.Media.CompressibleLiquids.LinearColdWater,diameter = 0.05, length = 1)  annotation(
    Placement(visible = true, transformation(origin = {-46, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Vessels.ClosedVolume volume(redeclare package Medium = Modelica.Media.CompressibleLiquids.LinearColdWater,V = 10, nPorts = 3)  annotation(
    Placement(visible = true, transformation(origin = {-30, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Vessels.OpenTank tank(redeclare package Medium = Modelica.Media.CompressibleLiquids.LinearColdWater, crossArea = 1, height = 10, level_start = 0, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.05)})  annotation(
    Placement(visible = true, transformation(origin = {52, 62}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
  Modelica.Fluid.Vessels.OpenTank tank1(redeclare package Medium = Modelica.Media.CompressibleLiquids.LinearColdWater, crossArea = 1, height = 10, level_start = 0, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.05)})  annotation(
    Placement(visible = true, transformation(origin = {46, -22}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
equation
  connect(volume.ports[2], tank.ports[1]) annotation(
    Line(points = {{-30, 40}, {-14, 40}, {-14, 22}, {54, 22}, {54, 42}, {52, 42}}, color = {0, 127, 255}, thickness = 0.5));
  connect(volume.ports[3], tank1.ports[1]) annotation(
    Line(points = {{-30, 40}, {-2, 40}, {-2, -64}, {46, -64}, {46, -42}, {46, -42}}, color = {0, 127, 255}, thickness = 0.5));
  connect(pipe.port_a, boundary.ports[1]) annotation(
    Line(points = {{-56, -32}, {-74, -32}}, color = {0, 127, 255}));
  connect(pipe.port_b, volume.ports[1]) annotation(
    Line(points = {{-36, -32}, {-30, -32}, {-30, 40}}, color = {0, 127, 255}));
  annotation(
    uses(Modelica(version = "3.2.2")));
end Test_Abfueller2;

Thanks,
lwinklmann

There are 0 guests and 0 other users also viewing this topic
You are here: