title: How do I fix the error, "Model is structurally singular, error found sorting equations"
body: <p>This is one of the most common errors I receive when working with OpenModelica Software. </p>
  
  <p>I already understand how this error is usually triggered, when system parameters are conflicting and disagree with one another. </p>
  
  <p>I've already tried omitting system parameters that I've deemed not an necessity to my system however nothing seems to fix the error.</p>
  
  <p>My system is already very simple to begin with. Currently, I'm working on a sub-assembly verification process in order to correctly build a working Rankine Power model. The sub assembly focuses on a (1) of (2) heat exchangers that would be used in a dual HX system incorporating a reheat process inbetween the High Pressure and Low Pressure turbines. </p>
  
  <p>This sub assembly is trying to describe water coming from a pump at a condensed liquid state where it will travel through a heat exchanger "super heater" where it will change the state from a compressed liquid to a superheated vapor. This vapor will then be fed into the High Pressure turbine and return into a Pressure Sink.</p>
  
  <p>I've already completed a hand calculated thermodynamic analysis of my system and know outlet temperatures and enthalpies. However, these outlet parameters are some of which I chose to remove for I felt I would let the system solve for them instead of telling it what it should calculate. Removing these values to solve the error did not work as well. </p>
  
  <p>If you have any thoughts, advice or considerations please let me know! Below I've posted the code to what I have been working on. Thanks again!</p>
  
  <p>CODE:</p>
  
  <pre><code>model HX_Pump_2_Superheater_2_HPTurbine
  
  //Heat Exchanger - Steam entering HX (compressed liquid) --&gt; Steam exiting 
  HX (super heated vapor)//
  //Steam Turbine - High Pressure Turbine and is (1) of (2) in series with one 
  another. Exit pressure should be intermediate pressure level before being 
  reheated and directed towards Low Pressure Turbine//
  
  ThermoPower.PowerPlants.HRSG.Components.HE HX(
  FluidPhaseStart = ThermoPower.Choices.FluidPhase.FluidPhases.Liquid, 
  Tstartbar_G (displayUnit = "K") = 787.87, 
  dpnom_F(displayUnit = "Pa") = 0, 
  dpnom_G = 0, 
  exchSurface_F = 4.739, 
  exchSurface_G = 4.739, 
  extSurfaceTub = 9.479, 
  fluidNomFlowRate = 26.397, 
  fluidNomPressure = 8e+06, 
  fluidVol = 0.0296, 
  gasNomFlowRate = 169.755, 
  gasNomPressure = 101325, 
  gasVol = 0.0296, 
  lambda = 20, 
  metalVol = 5, 
  pstart_F = 8e+06, 
  pstart_G = 101325, 
  rhomcm = 1, 
  rhonom_F(displayUnit = "kg/m3") = 0.6, 
  rhonom_G(displayUnit = "kg/m3") = 0.33)  annotation(
  Placement(visible = true, transformation(origin = {-1.9984e-15, 14}, extent 
  = {{-20, -20}, {20, 20}}, rotation = 0)));
  
  ThermoPower.Gas.SinkPressure sinkPressure1(
  redeclare package Medium = ThermoPower.Media.FlueGas, 
  T = 106.86 + 273, 
  p0 = 101325) annotation(
  Placement(visible = true, transformation(origin = {92, 14}, extent = {{-10, 
  -10}, {10, 10}}, rotation = 0)));
  
  ThermoPower.Gas.SensT sensT1(
  redeclare package Medium = ThermoPower.Media.FlueGas, 
  allowFlowReversal = false) annotation(
  Placement(visible = true, transformation(origin = {-50, 18}, extent = {{-10, 
  -10}, {10, 10}}, rotation = 0)));
  
  ThermoPower.Gas.SensT sensT2(
  redeclare package Medium = ThermoPower.Media.FlueGas, 
  allowFlowReversal = false) annotation(
  Placement(visible = true, transformation(origin = {50, 18}, extent = {{-10, 
  -10}, {10, 10}}, rotation = 0)));
  
  ThermoPower.Water.SinkPressure sinkPressure2(
  redeclare package Medium = ThermoPower.Water.StandardWater, 
  T = 165 + 273, 
  h = 2536.2092e5, 
  p0 = 7.0e5) annotation(
  Placement(visible = true, transformation(origin = {92, -60}, extent = {{-10, 
  -10}, {10, 10}}, rotation = 0)));
  
  ThermoPower.Water.SensT sensT3(
  redeclare package Medium = ThermoPower.Water.StandardWater) annotation(
  Placement(visible = true, transformation(origin = {4, 64}, extent = {{-10, 
  -10}, {10, 10}}, rotation = -90)));
  
  ThermoPower.Water.SensT sensT4(
  redeclare package Medium = ThermoPower.Water.StandardWater, 
  allowFlowReversal = false) annotation(
  Placement(visible = true, transformation(origin = {4, -32}, extent = {{-10, 
  -10}, {10, 10}}, rotation = -90)));
  
  inner ThermoPower.System system annotation(
  Placement(visible = true, transformation(origin = {-90, 90}, extent = {{-10, 
  -10}, {10, 10}}, rotation = 0)));
  
  ThermoPower.Gas.SourceMassFlow sourceMassFlow1(
  redeclare package Medium = ThermoPower.Media.FlueGas, 
  T = 514 + 273, 
  p0 = 101325,
  w0 = 169.755) annotation(
  Placement(visible = true, transformation(origin = {-90, 14}, extent = {{-10, 
  -10}, {10, 10}}, rotation = 0)));
  
  ThermoPower.Water.SourceMassFlow sourceMassFlow2(
  redeclare package Medium = ThermoPower.Water.StandardWater, 
  T = 42.88 + 273, 
  h = 183.1e3, 
  p0 = 80e5, 
  use_T = true, 
  w0 = 26.397) annotation(
  Placement(visible = true, transformation(origin = {2, 92}, extent = {{-10, 
  -10}, {10, 10}}, rotation = -90)));
  
  ThermoPower.Water.SteamTurbineStodola steamTurbineStodola1(
  Kt = 0.01328, 
  PRstart = 11.43, 
  explicitIsentropicEnthalpy = false, 
  pnom = 80.0e5, 
  pout(fixed = false), 
  w(fixed = false), 
  wnom = 26.397, 
  wstart = 26.397)  annotation(
  Placement(visible = true, transformation(origin = {12, -72}, extent = {{-14, 
  -14}, {14, 14}}, rotation = 0)));
  
  equation
  connect(sensT2.outlet, sinkPressure1.flange) annotation(
  Line(points = {{56, 14}, {82, 14}}, color = {159, 159, 223}));
  connect(steamTurbineStodola1.outlet, sinkPressure2.flange) annotation(
  Line(points = {{24, -60}, {82, -60}, {82, -60}, {82, -60}}, color = {0, 0, 
  255}));
  connect(sensT4.outlet, steamTurbineStodola1.inlet) annotation(
  Line(points = {{0, -38}, {0, -38}, {0, -60}, {0, -60}}, color = {0, 0, 
  255}));
  connect(HX.waterOut, sensT4.inlet) annotation(
  Line(points = {{0, -6}, {0, -26}}, color = {0, 0, 255}));
  connect(sourceMassFlow1.flange, sensT1.inlet) annotation(
  Line(points = {{-80, 14}, {-56, 14}}, color = {159, 159, 223}));
  connect(sensT3.outlet, HX.waterIn) annotation(
  Line(points = {{0, 58}, {0, 58}, {0, 34}, {0, 34}}, color = {0, 0, 255}));
  connect(sourceMassFlow2.flange, sensT3.inlet) annotation(
  Line(points = {{0, 82}, {0, 70}}, color = {0, 0, 255}));
  connect(HX.gasOut, sensT2.inlet) annotation(
  Line(points = {{20, 14}, {44, 14}, {44, 14}, {44, 14}}, color = {159, 159, 
  223}));
  connect(sensT1.outlet, HX.gasIn) annotation(
  Line(points = {{-44, 14}, {-20, 14}, {-20, 14}, {-20, 14}}, color = {159, 
  159, 223}));
  annotation(
  uses(ThermoPower(version = "3.1"), Modelica(version = "3.2.3")));end 
  HX_Pump_2_Superheater_2_HPTurbine;
  </code></pre>