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

3 tank model

3 tank model

simulation debugger: "Process failed to start: No such file or directory GDB arguments are "-q -nw -i mi --args C:/Users/DELL_W~1/AppData/Local/Temp/OpenModelica/OMEdit/T4.exe""

why???


model T4 "Demonstrating the usage of SimpleTank"
  import Modelica.Fluid;
  // replaceable package Medium = Modelica.Fluid.Media.Water.ConstantPropertyLiquidWater extends
  // replaceable package Medium = Modelica.Media.Water.StandardWaterOnePhase extends
  // replaceable package Medium = Modelica.Media.Incompressible.Examples.Glycol47 extends
  replaceable package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater constrainedby Modelica.Media.Interfaces.PartialMedium "Medium in the component" annotation(choicesAllMatching = true);
  Modelica.Fluid.Vessels.OpenTank tank1(redeclare package Medium = Medium, crossArea = 1, height = 12, level_start = 12, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.1)}, use_portsData = true) annotation(Placement(visible = true, transformation(extent = {{-100, 60}, {-60, 100}}, rotation = 0)));
  Modelica.Fluid.Vessels.OpenTank tank2(redeclare package Medium = Medium, crossArea = 1, height = 12, level_start = 2, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.1)}, use_portsData = true) annotation(Placement(visible = true, transformation(extent = {{-24, 60}, {16, 100}}, rotation = 0)));
  inner Modelica.Fluid.System system(energyDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial) annotation(Placement(visible = true, transformation(extent = {{106, 70}, {126, 90}}, rotation = 0)));
  Modelica.Fluid.Vessels.OpenTank tank3(crossArea = 1, redeclare package Medium = Medium, use_portsData = true, height = 12, level_start = 3, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.1)}) annotation(Placement(visible = true, transformation(extent = {{40, 60}, {80, 100}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe pipe1(redeclare package Medium = Medium, allowFlowReversal = true, height_ab = 2, length = 2, diameter = 0.1) annotation(Placement(visible = true, transformation(origin = {-80, 24}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Fluid.Pipes.StaticPipe pipe2(redeclare package Medium = Medium, allowFlowReversal = true, height_ab = 2, length = 2, diameter = 0.1) annotation(Placement(visible = true, transformation(origin = {-4, 24}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Fluid.Pipes.StaticPipe pipe3(redeclare package Medium = Medium, allowFlowReversal = true, height_ab = -1, length = 2, diameter = 0.1) annotation(Placement(visible = true, transformation(origin = {60, 24}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Fluid.Valves.ValveDiscrete valveDiscrete1(redeclare package Medium = Medium, m_flow_nominal = 1) annotation(Placement(visible = true, transformation(origin = {-80, -9}, extent = {{-9, -8}, {9, 8}}, rotation = -90)));
  Modelica.Fluid.Valves.ValveDiscrete valveDiscrete2(redeclare package Medium = Medium, m_flow_nominal = 1) annotation(Placement(visible = true, transformation(origin = {-4, -9}, extent = {{-9, -8}, {9, 8}}, rotation = -90)));
  Modelica.Fluid.Valves.ValveDiscrete valveDiscrete3(redeclare package Medium = Medium, m_flow_nominal = 1) annotation(Placement(visible = true, transformation(origin = {60, -9}, extent = {{-9, -8}, {9, 8}}, rotation = -90)));
  Modelica.Fluid.Pipes.StaticPipe pipe4(redeclare package Medium = Medium, diameter = 0.1, length = 10) annotation(Placement(visible = true, transformation(origin = {-80, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Fluid.Pipes.StaticPipe pipe5(redeclare package Medium = Medium, diameter = 0.1, length = 10) annotation(Placement(visible = true, transformation(origin = {-4, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Fluid.Pipes.StaticPipe pipe6(redeclare package Medium = Medium, diameter = 0.1, length = 10) annotation(Placement(visible = true, transformation(origin = {60, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Blocks.Sources.BooleanStep booleanStep1(startTime = 2) annotation(Placement(visible = true, transformation(origin = {-50, -2.22045e-16}, extent = {{8, -8}, {-8, 8}}, rotation = 0)));
  Modelica.Blocks.Sources.BooleanStep booleanStep2(startTime = 1) annotation(Placement(visible = true, transformation(origin = {27, -3}, extent = {{9, -9}, {-9, 9}}, rotation = 0)));
  Modelica.Blocks.Sources.BooleanStep booleanStep3(startTime = 6) annotation(Placement(visible = true, transformation(origin = {102, 12}, extent = {{8, -8}, {-8, 8}}, rotation = 0)));
equation
  connect(valveDiscrete3.open, booleanStep3.y) annotation(Line(points = {{66, -8}, {77, -8}, {77, 12}, {93, 12}}, color = {255, 0, 255}));
  connect(booleanStep2.y, valveDiscrete2.open) annotation(Line(points = {{17, -3}, {2, -3}, {2, -8}}, color = {255, 0, 255}));
  connect(valveDiscrete1.open, booleanStep1.y) annotation(Line(points = {{-74, -8}, {-66.5, -8}, {-66.5, 0}, {-59, 0}}, color = {255, 0, 255}));
  connect(pipe5.port_a, pipe6.port_a) annotation(Line(points = {{-4, -60}, {60, -60}, {60, -60}, {60, -60}}, color = {0, 127, 255}));
  connect(pipe4.port_a, pipe5.port_a) annotation(Line(points = {{-80, -60}, {-4, -60}, {-4, -60}, {-4, -60}}, color = {0, 127, 255}));
  connect(valveDiscrete3.port_b, pipe6.port_b) annotation(Line(points = {{60, -18}, {60, -18}, {60, -40}, {60, -40}}, color = {0, 127, 255}));
  connect(valveDiscrete2.port_b, pipe5.port_b) annotation(Line(points = {{-4, -18}, {-4, -18}, {-4, -40}, {-4, -40}}, color = {0, 127, 255}));
  connect(valveDiscrete1.port_b, pipe4.port_b) annotation(Line(points = {{-80, -18}, {-80, -18}, {-80, -40}, {-80, -40}}, color = {0, 127, 255}));
  connect(pipe3.port_a, valveDiscrete3.port_a) annotation(Line(points = {{60, 14}, {60, 14}, {60, 0}, {60, 0}}, color = {0, 127, 255}));
  connect(pipe2.port_a, valveDiscrete2.port_a) annotation(Line(points = {{-4, 14}, {-4, 14}, {-4, 0}, {-4, 0}}, color = {0, 127, 255}));
  connect(pipe1.port_a, valveDiscrete1.port_a) annotation(Line(points = {{-80, 14}, {-80, 14}, {-80, 0}, {-80, 0}}, color = {0, 127, 255}));
  connect(pipe2.port_b, tank2.ports[1]) annotation(Line(points = {{-4, 34}, {-4, 60}}, color = {0, 127, 255}));
  connect(pipe3.port_b, tank3.ports[1]) annotation(Line(points = {{60, 34}, {60, 60}}, color = {0, 127, 255}));
  connect(pipe1.port_b, tank1.ports[1]) annotation(Line(points = {{-80, 34}, {-80, 60}}, color = {0, 127, 255}));
  annotation(experiment(StopTime = 200), __Dymola_Commands(file = "modelica://Modelica/Resources/Scripts/Dymola/Fluid/ThreeTanks/plot level and port.m_flow.mos" "plot level and port.m_flow"), Documentation(info = "<html>

<img src=\"modelica://Modelica/Resources/Images/Fluid/Examples/ThreeTanks.png\" border=\"1\"
   alt=\"ThreeTanks.png\">
</html>"), uses(Modelica(version = "3.2.2")));
end T4;

Re: 3 tank model

Update your GDB path in "Tools->Options->Debugger->GDB Path".

Adeel.

Re: 3 tank model

i update the path, no message error, the simulation start but there are graphical results ( for example mass flow in pipes or tank liquid level) only with no valve in the circuit? why valve don't open?

Edited by: claudio34 - Dec-26-16 09:51:22
There are 0 guests and 0 other users also viewing this topic