Skip to content

Commit

Permalink
Application Examples: 2Areas
Browse files Browse the repository at this point in the history
- Addition of a Support package containing the partial models
- Cosmetic changes for the generators
- Adding a template for the power flow record
- Including several examples of power flow results (PF4 is not fully checked)
- Fixing PSSE_AVR model:
   - Correction of connections of the AVR
  • Loading branch information
MaximeBaudette committed Mar 1, 2016
1 parent cf7c90e commit 9d3ba0d
Show file tree
Hide file tree
Showing 23 changed files with 383 additions and 267 deletions.
2 changes: 1 addition & 1 deletion Application Examples/TwoAreas/Data/PF1.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
within TwoAreas.Data;
record PF1
extends PF_TwoAreas(
extends Support.PF_TwoAreas(
voltages(
V1=1.03,
A1=20.2473,
Expand Down
2 changes: 1 addition & 1 deletion Application Examples/TwoAreas/Data/PF2.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
within TwoAreas.Data;
record PF2
import Modelica.Constants.pi;
extends PF_TwoAreas(
extends Support.PF_TwoAreas(
voltages(
V1=1.03,
A1=0.353381617759011*180/pi,
Expand Down
42 changes: 42 additions & 0 deletions Application Examples/TwoAreas/Data/PF3.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
within TwoAreas.Data;
record PF3
import Modelica.Constants.pi;
extends Support.PF_TwoAreas(
voltages(
V1=1.03,
A1=20.27066,
V2=1.01,
A2=10.50628,
V3=1.03,
A3=-6.8,
V4=1.01,
A4=-16.9921,
V5=1.0069,
A5=13.7881,
V6=0.97914,
A6=3.7146,
V7=0.9610106,
A7=-4.68651,
V8=0.94828,
A8=-18.5131,
V9=0.9713628,
A9=-32.15403,
V10=0.98486,
A10=-23.7131,
V11=1.0088,
A11=-13.4215),
machines(
P1_1=700,
Q1_1=185.0296,
P2_1=700,
Q2_1=234.6113,
P3_1=719.0941,
Q3_1=176.0262,
P4_1=700,
Q4_1=202.0827),
loads(
PL7_1=967,
QL7_1=-84.70,
PL9_1=1767,
QL9_1=-230.2));
end PF3;
44 changes: 44 additions & 0 deletions Application Examples/TwoAreas/Data/PF4.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
within TwoAreas.Data;
record PF4
extends Support.PF_TwoAreas(
voltages(
V1=1.02999997139,
A1=39.419670105,
V2=1.04999995232,
A2=22.7480773926,
V3=1.02999997139,
A3=-7.00000047684,
V4=1.00999999046,
A4=-17.5402793884,
V5=1.0069,
A5=13.7881,
V6=0.97914,
A6=3.7146,
V7=1.01935839653,
A7=6.56502771378,
V8=0.94828,
A8=-18.5131,
V9=0.960842967033,
A9=-31.4690284729,
V10=0.98486,
A10=-23.7131,
V11=1.0088,
A11=-13.4215),
machines(
P1_1=1100.0000,
Q1_1=187.957901001,
P2_1=700,
Q2_1=260.817138672,
P3_1=757.885437012,
Q3_1=218.426849365,
P4_1=300,
Q4_1=112.58140564),
loads(
PL7_1=1166.999877934,
QL7_1=-523.4548797604,
PL9_1=1567.0,
QL9_1=-223.1267089844));
annotation (Documentation(info="<html>
<p>Not working</p>
</html>"));
end PF4;
3 changes: 2 additions & 1 deletion Application Examples/TwoAreas/Data/package.order
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
PF_TwoAreas
PF1
PF2
PF3
PF4
22 changes: 3 additions & 19 deletions Application Examples/TwoAreas/Groups/PSAT/G1.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
within TwoAreas.Groups.PSAT;
model G1
extends iPSL.Electrical.Essentials.pfComponent;
iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{100,-10},{120,10}}), iconTransformation(extent={{100,-10},{120,10}})));
extends TwoAreas.Support.Generator;

iPSL.Electrical.Machines.PSAT.SixthOrder.Order6 order6_1(
Sn=900,
Expand All @@ -25,26 +24,11 @@ model G1
P_0=P_0,
Q_0=Q_0) annotation (Placement(transformation(extent={{-34,-54},{78,56}})));
equation
connect(order6_1.p, pwPin) annotation (Line(points={{83.6,1.27302},{94.8,1.27302},{94.8,0},{110,0}}, color={0,0,255}));
connect(order6_1.p, pwPin) annotation (Line(points={{83.6,1.27302},{94.8,1.27302},{94.8,0},{70,0}}, color={0,0,255}));
connect(order6_1.vf0, order6_1.vf) annotation (Line(points={{-22.8,61.5},{-22.8,72},{-46,72},{-46,28.5},{-34,28.5}}, color={0,0,127}));
connect(order6_1.pm0, order6_1.pm) annotation (Line(points={{-22.8,-59.5},{-22.8,-76},{-22.8,-84},{-48,-84},{-48,-26.5},{-34,-26.5}}, color={0,0,127}));
annotation (
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={
Ellipse(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(
points={{-48,2},{-20,56},{2,4},{24,-28},{48,22}},
color={0,0,0},
smooth=Smooth.Bezier),
Text(
extent={{-52,-18},{56,-66}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
textString="%name")}),
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Documentation(revisions="<html>
<!--DISCLAIMER-->
Expand Down
22 changes: 3 additions & 19 deletions Application Examples/TwoAreas/Groups/PSAT/G2.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
within TwoAreas.Groups.PSAT;
model G2
extends iPSL.Electrical.Essentials.pfComponent;
iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{100,-10},{120,10}}), iconTransformation(extent={{100,-10},{120,10}})));
extends TwoAreas.Support.Generator;

iPSL.Electrical.Machines.PSAT.SixthOrder.Order6 order6_1(
Sn=900,
Expand All @@ -25,26 +24,11 @@ model G2
P_0=P_0,
Q_0=Q_0) annotation (Placement(transformation(extent={{-34,-54},{78,56}})));
equation
connect(order6_1.p, pwPin) annotation (Line(points={{83.6,1.27302},{94.8,1.27302},{94.8,0},{110,0}}, color={0,0,255}));
connect(order6_1.p, pwPin) annotation (Line(points={{83.6,1.27302},{94.8,1.27302},{94.8,0},{70,0}}, color={0,0,255}));
connect(order6_1.vf0, order6_1.vf) annotation (Line(points={{-22.8,61.5},{-22.8,72},{-46,72},{-46,28.5},{-34,28.5}}, color={0,0,127}));
connect(order6_1.pm0, order6_1.pm) annotation (Line(points={{-22.8,-59.5},{-22.8,-76},{-22.8,-84},{-48,-84},{-48,-26.5},{-34,-26.5}}, color={0,0,127}));
annotation (
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={
Ellipse(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(
points={{-48,2},{-20,56},{2,4},{24,-28},{48,22}},
color={0,0,0},
smooth=Smooth.Bezier),
Text(
extent={{-52,-18},{56,-66}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
textString="%name")}),
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Documentation(revisions="<html>
<!--DISCLAIMER-->
Expand Down
22 changes: 3 additions & 19 deletions Application Examples/TwoAreas/Groups/PSAT/G3.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
within TwoAreas.Groups.PSAT;
model G3
extends iPSL.Electrical.Essentials.pfComponent;
iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{100,-10},{120,10}}), iconTransformation(extent={{100,-10},{120,10}})));
extends TwoAreas.Support.Generator;

iPSL.Electrical.Machines.PSAT.SixthOrder.Order6 order6_1(
Sn=900,
Expand All @@ -25,26 +24,11 @@ model G3
Q_0=Q_0,
M=12.35) annotation (Placement(transformation(extent={{-34,-54},{78,56}})));
equation
connect(order6_1.p, pwPin) annotation (Line(points={{83.6,1.27302},{94.8,1.27302},{94.8,0},{110,0}}, color={0,0,255}));
connect(order6_1.p, pwPin) annotation (Line(points={{83.6,1.27302},{94.8,1.27302},{94.8,0},{70,0}}, color={0,0,255}));
connect(order6_1.vf0, order6_1.vf) annotation (Line(points={{-22.8,61.5},{-22.8,72},{-46,72},{-46,28.5},{-34,28.5}}, color={0,0,127}));
connect(order6_1.pm0, order6_1.pm) annotation (Line(points={{-22.8,-59.5},{-22.8,-76},{-22.8,-84},{-48,-84},{-48,-26.5},{-34,-26.5}}, color={0,0,127}));
annotation (
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={
Ellipse(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(
points={{-48,2},{-20,56},{2,4},{24,-28},{48,22}},
color={0,0,0},
smooth=Smooth.Bezier),
Text(
extent={{-52,-18},{56,-66}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
textString="%name")}),
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Documentation(revisions="<html>
<!--DISCLAIMER-->
Expand Down
22 changes: 3 additions & 19 deletions Application Examples/TwoAreas/Groups/PSAT/G4.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
within TwoAreas.Groups.PSAT;
model G4
extends iPSL.Electrical.Essentials.pfComponent;
iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{100,-10},{120,10}}), iconTransformation(extent={{100,-10},{120,10}})));
extends TwoAreas.Support.Generator;

iPSL.Electrical.Machines.PSAT.SixthOrder.Order6 order6_1(
Sn=900,
Expand All @@ -25,26 +24,11 @@ model G4
Q_0=Q_0,
M=12.35) annotation (Placement(transformation(extent={{-34,-54},{78,56}})));
equation
connect(order6_1.p, pwPin) annotation (Line(points={{83.6,1.27302},{94.8,1.27302},{94.8,0},{110,0}}, color={0,0,255}));
connect(order6_1.p, pwPin) annotation (Line(points={{83.6,1.27302},{94.8,1.27302},{94.8,0},{70,0}}, color={0,0,255}));
connect(order6_1.vf0, order6_1.vf) annotation (Line(points={{-22.8,61.5},{-22.8,72},{-46,72},{-46,28.5},{-34,28.5}}, color={0,0,127}));
connect(order6_1.pm0, order6_1.pm) annotation (Line(points={{-22.8,-59.5},{-22.8,-76},{-22.8,-84},{-48,-84},{-48,-26.5},{-34,-26.5}}, color={0,0,127}));
annotation (
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={
Ellipse(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(
points={{-48,2},{-20,56},{2,4},{24,-28},{48,22}},
color={0,0,0},
smooth=Smooth.Bezier),
Text(
extent={{-52,-18},{56,-66}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
textString="%name")}),
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Documentation(revisions="<html>
<!--DISCLAIMER-->
Expand Down
27 changes: 11 additions & 16 deletions Application Examples/TwoAreas/Groups/PSSE/AVR/G1.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
within TwoAreas.Groups.PSSE.AVR;
model G1
extends iPSL.Electrical.Essentials.pfComponent;
extends TwoAreas.Support.Generator;

iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{60,-10},{80,10}}), iconTransformation(extent={{60,-10},{80,10}})));
iPSL.Electrical.Machines.PSSE.GENROU.GENROU g1(
Tpd0=8,
Tppd0=0.03,
Expand Down Expand Up @@ -33,31 +32,27 @@ model G1
T_E=0.01,
E_MIN=0,
E_MAX=4,
Ec0=1) annotation (Placement(transformation(extent={{-42,-18},{-8,0}})));
Modelica.Blocks.Sources.Constant const(k=0) annotation (Placement(transformation(extent={{-56,18},{-46,28}})));
Ec0=V_0) annotation (Placement(transformation(extent={{-42,-18},{-8,0}})));
Modelica.Blocks.Sources.Constant const(k=0) annotation (Placement(transformation(extent={{-68,-2},{-58,8}})));
equation

connect(g1.PMECH, g1.PMECH0) annotation (Line(points={{-1.6,9},{-6,9},{-12,9},{-12,10},{-12,26},{44,26},{44,-5.4},{39.6,-5.4}}, color={0,0,127}));
connect(g1.p, pwPin) annotation (Line(points={{40,0},{40,0},{70,0}}, color={0,0,255}));
connect(sEXS.EFD, g1.EFD) annotation (Line(points={{-6.98,-9},{-6.98,-9},{-1.6,-9}}, color={0,0,127}));
connect(sEXS.EFD0, g1.EFD0) annotation (Line(points={{-40.98,-14.625},{-46,-14.625},{-46,-26},{46,-26},{46,-12.6},{39.6,-12.6}}, color={0,0,127}));
connect(sEXS.VOEL, const.y) annotation (Line(points={{-40.98,-9},{-40.98,-9.5},{-45.5,-9.5},{-45.5,23}}, color={0,0,127}));
connect(sEXS.VOTHSG, const.y) annotation (Line(points={{-40.98,-5.625},{-40.98,-6.1875},{-45.5,-6.1875},{-45.5,23}}, color={0,0,127}));
connect(sEXS.ECOMP, const.y) annotation (Line(points={{-40.98,-3.375},{-40.98,-3.3125},{-45.5,-3.3125},{-45.5,23}}, color={0,0,127}));
connect(sEXS.VUEL, const.y) annotation (Line(points={{-40.98,-12.375},{-40.98,-12.1875},{-45.5,-12.1875},{-45.5,23}}, color={0,0,127}));
connect(sEXS.VOEL, const.y) annotation (Line(points={{-40.98,-9},{-40.98,-9.5},{-57.5,-9.5},{-57.5,3}}, color={0,0,127}));
connect(sEXS.VOTHSG, const.y) annotation (Line(points={{-40.98,-5.625},{-40.98,-6.1875},{-57.5,-6.1875},{-57.5,3}}, color={0,0,127}));
connect(sEXS.VUEL, const.y) annotation (Line(points={{-40.98,-12.375},{-40.98,-12.1875},{-57.5,-12.1875},{-57.5,3}}, color={0,0,127}));
connect(g1.ETERM, sEXS.ECOMP) annotation (Line(points={{39.6,9},{50,9},{50,-30},{-50,-30},{-50,-3.375},{-40.98,-3.375}}, color={0,0,127}));
annotation (
Diagram(coordinateSystem(
preserveAspectRatio=false,
extent={{-60,-60},{60,60}},
extent={{-100,-100},{100,100}},
initialScale=0.1)),
Icon(coordinateSystem(
preserveAspectRatio=true,
extent={{-60,-60},{60,60}},
initialScale=0.1), graphics={Ellipse(extent={{-60,60},{60,-60}}, lineColor={28,108,200}),Line(points={{-40,0},{-20,20}}, color={28,108,200}),Line(points={{-20,20},{20,-20},{40,0}}, color={28,
108,200}),Text(
extent={{-20,-24},{16,-54}},
lineColor={28,108,200},
textString="%name")}),
preserveAspectRatio=false,
extent={{-100,-100},{100,100}},
initialScale=0.1)),
Documentation(revisions="<html>
<!--DISCLAIMER-->
<p>Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)</p>
Expand Down
17 changes: 6 additions & 11 deletions Application Examples/TwoAreas/Groups/PSSE/AVR/G2.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
within TwoAreas.Groups.PSSE.AVR;
model G2
extends iPSL.Electrical.Essentials.pfComponent;
extends TwoAreas.Support.Generator;

iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{60,-10},{80,10}}), iconTransformation(extent={{60,-10},{80,10}})));
iPSL.Electrical.Machines.PSSE.GENROU.GENROU g2(
Tpd0=8,
Tppd0=0.03,
Expand Down Expand Up @@ -52,20 +51,16 @@ equation
connect(const.y, eSDC1A.VUEL) annotation (Line(points={{-47.6,8},{-42,8},{-42,-15.75},{-37.0556,-15.75}}, color={0,0,127}));
connect(eSDC1A.VOEL, eSDC1A.VUEL) annotation (Line(points={{-37.0556,-11.25},{-42,-11.25},{-42,-15.75},{-37.0556,-15.75}}, color={0,0,127}));
connect(eSDC1A.VOTHSG, eSDC1A.VUEL) annotation (Line(points={{-37.0556,-6.75},{-42,-6.75},{-42,-15.75},{-37.0556,-15.75}}, color={0,0,127}));
connect(eSDC1A.ECOMP, eSDC1A.VUEL) annotation (Line(points={{-37.0556,-2.475},{-42,-2.475},{-42,-15.75},{-37.0556,-15.75}}, color={0,0,127}));
connect(g2.ETERM, eSDC1A.ECOMP) annotation (Line(points={{47.6,9},{58,9},{58,-26},{-40,-26},{-40,-2.475},{-37.0556,-2.475}}, color={0,0,127}));
annotation (
Diagram(coordinateSystem(
preserveAspectRatio=false,
extent={{-60,-60},{60,60}},
extent={{-100,-100},{100,100}},
initialScale=0.1)),
Icon(coordinateSystem(
preserveAspectRatio=true,
extent={{-60,-60},{60,60}},
initialScale=0.1), graphics={Ellipse(extent={{-60,60},{60,-60}}, lineColor={28,108,200}),Line(points={{-40,0},{-20,20}}, color={28,108,200}),Line(points={{-20,20},{20,-20},{40,0}}, color={28,
108,200}),Text(
extent={{-20,-22},{16,-52}},
lineColor={28,108,200},
textString="G2")}),
preserveAspectRatio=false,
extent={{-100,-100},{100,100}},
initialScale=0.1)),
Documentation(revisions="<html>
<!--DISCLAIMER-->
<p>Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)</p>
Expand Down
Loading

0 comments on commit 9d3ba0d

Please sign in to comment.