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

comitimetabe and splitter

comitimetabe and splitter

Hello,

I try to simulate a fluid system using the Buildings library.
I have tried to use a CombiTimeTable as input of a three way valve and it works, if there is no splitter in the model.
If I add a splitter the simulation starts and stands forever at 0%.
If I use a ramp instead of the CombiTimeTable it works.

Can anyone help me with this problem?

Thanks in advance

Simon

Here is aexample:

model Valve_Calibration_1
  package Medium = Modelica.Media.Water.StandardWaterOnePhase;
  inner Modelica.Fluid.System system(m_flow_start = 50) annotation(Placement(visible = true, transformation(origin = {80,80}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  Buildings.Fluid.Sources.Boundary_pT boundary_pt2(redeclare package Medium = Medium, p = system.p_start + 50000, nPorts = 2, T = 293.15) annotation(Placement(visible = true, transformation(origin = {-100,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  Buildings.Fluid.Sources.Boundary_pT boundary_pt1(redeclare package Medium = Medium, p = system.p_start + 50000, nPorts = 2, T = 293.15) annotation(Placement(visible = true, transformation(origin = {-100,0}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  Buildings.Fluid.FixedResistances.SplitterFixedResistanceDpM spl(redeclare package Medium = Medium, m_flow_nominal = {10,-10,-10}, dp_nominal = {0,-(system.p_start + 46000),-(system.p_start + 46000)}, p_start = val.p_start) annotation(Placement(visible = true, transformation(origin = {20,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  Buildings.Fluid.Sources.Boundary_pT bou(redeclare package Medium = Medium, p = system.p_start, nPorts = 2, T = 293.15) annotation(Placement(visible = true, transformation(origin = {-100,-40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinear val(redeclare package Medium = Medium, l = {1e-006,1e-006}, filteredOpening = false, m_flow_nominal = 4, dpValve_nominal = 4000, p_start = boundary_pt2.p - 4000 - 4000, rhoStd = Medium.density_pTX(Medium.p_default, Medium.T_default, Medium.X_default), R = 50, y_start = 0.01, delta0 = 0.01, fraK = 0.7, riseTime = 120, T_start = 293.15) annotation(Placement(visible = true, transformation(origin = {-20,40}, extent = {{-7.5,-7.5},{7.5,7.5}}, rotation = 0)));
  //  Modelica.Blocks.Sources.Ramp ramp1(duration = 10, startTime = 1) annotation(Placement(visible = true, transformation(origin = {-80,80}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  Modelica.Blocks.Sources.CombiTimeTable combitimetable1(tableOnFile = false, fileName = "D:/sib/table.mat", tableName = "tab1", table = [0,0;10,1]) annotation(Placement(visible = true, transformation(origin = {-60,80}, extent = {{-10,-10},{10,10}}, rotation = 0)));
equation
  connect(combitimetable1.y[1],val.y) annotation(Line(points = {{-49,80},{-19.3424,80},{-19.3424,49.9033},{-19.3424,49.9033}}));
  connect(boundary_pt1.ports[1],val.port_3) annotation(Line(points = {{-90,0},{-19.7129,0},{-20,30.3106},{-20,32.5}}));
  connect(spl.port_2,bou.ports[2]) annotation(Line(points = {{30,40},{48.3559,40},{48.3559,-42.94},{-90.1354,-42.94},{-90.1354,-42.94}}));
  connect(spl.port_3,bou.ports[1]) annotation(Line(points = {{20,30},{20.1161,30},{20.1161,-37.911},{-89.3617,-37.911},{-89.3617,-37.911}}));
  connect(boundary_pt2.ports[1],val.port_1) annotation(Line(points = {{-90,40},{-38.2998,40},{-27.5,39.7516},{-27.5,40}}));
  connect(val.port_2,spl.port_1) annotation(Line(points = {{-12.5,40},{10.4449,40},{10.4449,40.2321},{10.4449,40.2321}}));
  annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), experiment(StartTime = 0, StopTime = 2000, Tolerance = 1e-006, Interval = 4));
end Valve_Calibration_1;

There are 0 guests and 0 other users also viewing this topic