Skip to content

Commit

Permalink
remove overdetermined initialization of PowerWorld example by checkin…
Browse files Browse the repository at this point in the history
…g for isRoot
  • Loading branch information
rfranke committed Oct 19, 2014
1 parent d3d9c3b commit d65ace2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions PowerSystems/Examples/PowerWorld/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ package PowerWorld "Demonstrate stabilization of wind power in Eurosyslib work p
annotation (Placement(transformation(extent={{-36,-6},{-24,6}})));
PowerSystems.Generic.VoltageConverter distribution(ratio=380/50)
annotation (Placement(transformation(extent={{44,-46},{56,-34}})));
PowerSystems.Generic.Inverter HVDC
PowerSystems.Generic.Inverter HVDC(potentialReference=false)
annotation (Placement(transformation(extent={{-16,34},{-4,46}})));
Components.HydroPlant hydroPlant(primaryControlMax=200)
annotation (Placement(transformation(extent={{80,20},{60,40}})));
Expand All @@ -45,7 +45,7 @@ package PowerWorld "Demonstrate stabilization of wind power in Eurosyslib work p
rotation=-90,
origin={40,-10})));
Modelica.Blocks.Sources.RealExpression frequency(y=system.omega/2/pi)
"Average frequency" annotation (Placement(
"Average frequency" annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=-90,
Expand Down Expand Up @@ -153,7 +153,7 @@ The following switches/features are provided:

model PowerPlant "Thermal Power Plant with primary and secondary control"
extends PowerSystems.Generic.Ports.PartialSource(
final potentialReference=true, final definiteReference=false);
final potentialReference=true);

parameter Boolean Modakond = false "Install Modakond for condensate stop"
annotation(Dialog(group="Features"));
Expand Down Expand Up @@ -264,7 +264,7 @@ The following switches/features are provided:
Interfaces.Sender sender(w=generator.w, H=0.5*rotor.J*rotor.w^2/800e6)
annotation (Placement(transformation(extent={{66,6},{74,14}})));
initial equation
if potentialReference then
if Connections.isRoot(generator.terminal.theta) then
if system.steadyIni then
rotor.a = 0;
else
Expand Down Expand Up @@ -452,7 +452,7 @@ The following switches/features are provided:

model HydroPlant
extends PowerSystems.Generic.Ports.PartialSource(
final potentialReference=true, final definiteReference=false);
final potentialReference=true);

parameter Real primaryControlMax(unit="MW") = 200
"Maximum power for primary frequency control"
Expand Down Expand Up @@ -520,7 +520,7 @@ The following switches/features are provided:
Interfaces.Sender sender(w=generator.w, H=0.5*rotor.J*rotor.w^2/200e6)
annotation (Placement(transformation(extent={{66,16},{74,24}})));
initial equation
if potentialReference then
if Connections.isRoot(generator.terminal.theta) then
if system.steadyIni then
rotor.a = 0;
else
Expand Down

0 comments on commit d65ace2

Please sign in to comment.