﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3822	Over-determined system	PierreBonnet	Adeel Asghar	"Hi Modelica communitie !
I'm pretty new around here. I have been starting to use OMEdit and openmodelica for 1 months now. And i still don't get to simulate one of my model. I'm using mainly the fluid librairie, my goal is to simulate some closing and opnening valve. I get an over-determined system with 191 equations and 187 variables. 
Let's see if someone can help me, would be so helpfull.

My ModelicaCode (created with the Omedit software) :

""model SimuVanneOM
  import SI = Modelica.SIunits;
  import Modelica.Fluid.Types.Dynamics;
  replaceable package Medium = Modelica.Media.Water.StandardWater;
  Modelica.Blocks.Math.MultiProduct multiProduct1(nu = 2) annotation(Placement(visible = true, transformation(origin = {-66, -12}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant const1(k = 1) annotation(Placement(visible = true, transformation(origin = {-30, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant const(k = -1) annotation(Placement(visible = true, transformation(origin = {-67, -69}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
  Modelica.Blocks.Sources.Ramp ramp1(duration = 1) annotation(Placement(visible = true, transformation(origin = {-89, -27}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
  Modelica.Blocks.Math.Sum sum1(nin = 2) annotation(Placement(visible = true, transformation(origin = {-20, -22}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Fittings.TeeJunctionIdeal teeJunctionIdeal1 annotation(Placement(visible = true, transformation(origin = {-12, 28}, extent = {{-10, 10}, {10, -10}}, rotation = 0)));
  Modelica.Fluid.Vessels.OpenTank tank(height = 10, crossArea = 1, p_ambient = 50000, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.01)}, redeclare package Medium = Medium) annotation(Placement(visible = true, transformation(origin = {16, -72}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
  Modelica.Blocks.Sources.Ramp ramp2(duration = 1) annotation(Placement(visible = true, transformation(origin = {36, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Vessels.OpenTank tank1(height = 10, crossArea = 1, p_ambient = 50000, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.01)}, redeclare package Medium = Medium) annotation(Placement(visible = true, transformation(origin = {80, 50}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
  Modelica.Fluid.Valves.ValveLinear valveLinear1(m_flow_nominal = 1, dp_nominal = 10000, allowFlowReversal = true) annotation(Placement(visible = true, transformation(origin = {40, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Valves.ValveLinear valveLinear2(m_flow_nominal = 1, dp_nominal = 10000, allowFlowReversal = true) annotation(Placement(visible = true, transformation(origin = {14, -22}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  inner Modelica.Fluid.System system annotation(Placement(visible = true, transformation(origin = {-20, 80}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sources.MassFlowSource_T boundary(m_flow = 1, nPorts = 1, redeclare package Medium = Medium) annotation(Placement(visible = true, transformation(origin = {-78, 28}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(boundary.ports[1], teeJunctionIdeal1.port_1) annotation(Line(points = {{-68, 28}, {-24, 28}, {-24, 28}, {-24, 28}}, color = {0, 127, 255}));
  connect(valveLinear2.port_b, tank.ports[1]) annotation(Line(points = {{14, -32}, {54, -32}, {54, -98}, {16, -98}, {16, -94}, {16, -94}}, color = {0, 127, 255}));
  connect(sum1.y, valveLinear2.opening) annotation(Line(points = {{-9, -22}, {22, -22}}, color = {0, 0, 127}));
  connect(teeJunctionIdeal1.port_3, valveLinear2.port_a) annotation(Line(points = {{-12, 18}, {14, 18}, {14, -12}}, color = {0, 127, 255}));
  connect(valveLinear1.port_b, tank1.ports[1]) annotation(Line(points = {{50, 20}, {76, 20}, {76, 30}, {76, 30}}, color = {0, 127, 255}));
  connect(ramp2.y, valveLinear1.opening) annotation(Line(points = {{47, 70}, {40, 70}, {40, 28}}, color = {0, 0, 127}));
  connect(teeJunctionIdeal1.port_2, valveLinear1.port_a) annotation(Line(points = {{-2, 28}, {14, 28}, {14, 20}, {30, 20}}, color = {0, 127, 255}));
  connect(multiProduct1.y, sum1.u[1]) annotation(Line(points = {{-54, -12}, {-48, -12}, {-48, -22}, {-32, -22}}, color = {0, 0, 127}));
  connect(const1.y, sum1.u[2]) annotation(Line(points = {{-19, -70}, {-44, -70}, {-44, -22}, {-32, -22}}, color = {0, 0, 127}));
  connect(ramp1.y, multiProduct1.u[1]) annotation(Line(points = {{-81, -27}, {-76, -27}, {-76, -12}}, color = {0, 0, 127}));
  connect(const.y, multiProduct1.u[2]) annotation(Line(points = {{-59, -69}, {-76, -69}, {-76, -12}}, color = {0, 0, 127}));
  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})));
end SimuVanneOM;""

And while simulating, i get these messages :

""[1] 16:51:34 Symbolique Erreur
Too many equations, over-determined system. The model has 191 equation(s) and 187 variable(s).

[2] 16:51:34 Traduction Erreur
pre-optimization module clockPartitioning failed.
""
"	defect	closed	high		OMEdit	v1.9.3	invalid	OMEdit ; error ; beginner	
