Skip to content

Commit

Permalink
Application Examples : 2Area System
Browse files Browse the repository at this point in the history
Implementation of PF_results as a data record to hold the PF results
  • Loading branch information
Maxime Baudette authored and Maxime Baudette committed Mar 1, 2016
1 parent 22f2690 commit cf7c90e
Show file tree
Hide file tree
Showing 17 changed files with 245 additions and 111 deletions.
41 changes: 41 additions & 0 deletions Application Examples/TwoAreas/Data/PF1.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
within TwoAreas.Data;
record PF1
extends PF_TwoAreas(
voltages(
V1=1.03,
A1=20.2473,
V2=1.01,
A2=10.4897,
V3=1.03,
A3=-6.8,
V4=1.01,
A4=-16.9776,
V5=1.0069,
A5=13.7881,
V6=0.97914,
A6=3.7146,
V7=0.96283,
A7=-4.6748,
V8=0.94828,
A8=-18.5131,
V9=0.97386,
A9=-32.1004,
V10=0.98486,
A10=-23.7131,
V11=1.0088,
A11=-13.4215),
machines(
P1_1=700,
Q1_1=182.450226027067,
P2_1=700,
Q2_1=228.434194888742,
P3_1=718.906215107731,
Q3_1=172.421333322957,
P4_1=700,
Q4_1=193.556043309309),
loads(
PL7_1=967,
QL7_1=-100,
PL9_1=1767,
QL9_1=-250));
end PF1;
42 changes: 42 additions & 0 deletions Application Examples/TwoAreas/Data/PF2.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
within TwoAreas.Data;
record PF2
import Modelica.Constants.pi;
extends PF_TwoAreas(
voltages(
V1=1.03,
A1=0.353381617759011*180/pi,
V2=1.01,
A2=0.183079867930759*180/pi,
V3=1.03,
A3=-0.118682400000000*180/pi,
V4=1.01,
A4=-0.296314118513724*180/pi,
V5=1.0069,
A5=13.7881,
V6=0.97914,
A6=3.7146,
V7=0.96283,
A7=-0.0815909472281613*180/pi,
V8=0.94828,
A8=-18.5131,
V9=0.973864710338689,
A9=-0.560256955944523*180/pi,
V10=0.98486,
A10=-23.7131,
V11=1.0088,
A11=-13.4215),
machines(
P1_1=700,
Q1_1=182.450226027067,
P2_1=700,
Q2_1=228.434194888742,
P3_1=718.906215107731,
Q3_1=172.421333322957,
P4_1=700,
Q4_1=193.556043309309),
loads(
PL7_1=967,
QL7_1=-100,
PL9_1=1767,
QL9_1=-250));
end PF2;
67 changes: 67 additions & 0 deletions Application Examples/TwoAreas/Data/PF_TwoAreas.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
within TwoAreas.Data;
partial record PF_TwoAreas
record Voltages
// Bus number 1
parameter Real V1;
parameter Real A1;
// Bus number 2
parameter Real V2;
parameter Real A2;
// Bus number 3
parameter Real V3;
parameter Real A3;
// Bus number 4
parameter Real V4;
parameter Real A4;
// Bus number 5
parameter Real V5;
parameter Real A5;
// Bus number 6
parameter Real V6;
parameter Real A6;
// Bus number 7
parameter Real V7;
parameter Real A7;
// Bus number 8
parameter Real V8;
parameter Real A8;
// Bus number 9
parameter Real V9;
parameter Real A9;
// Bus number 10
parameter Real V10;
parameter Real A10;
// Bus number 11
parameter Real V11;
parameter Real A11;
end Voltages;

record Machines
// Gen at bus 1
parameter Real P1_1;
parameter Real Q1_1;
// Gen at bus 2
parameter Real P2_1;
parameter Real Q2_1;
// Gen at bus 3
parameter Real P3_1;
parameter Real Q3_1;
// Gen at bus 4
parameter Real P4_1;
parameter Real Q4_1;
end Machines;

record Loads
// Gen at bus 1
parameter Real PL7_1;
parameter Real QL7_1;
// Gen at bus 2
parameter Real PL9_1;
parameter Real QL9_1;
end Loads;

Voltages voltages;
Machines machines;
Loads loads;

end PF_TwoAreas;
3 changes: 3 additions & 0 deletions Application Examples/TwoAreas/Data/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
within TwoAreas;
package Data
end Data;
3 changes: 3 additions & 0 deletions Application Examples/TwoAreas/Data/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PF_TwoAreas
PF1
PF2
2 changes: 1 addition & 1 deletion Application Examples/TwoAreas/Groups/PSAT/package.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within TwoAreas.Groups;
package PSAT
package PSAT
annotation (Documentation(revisions="<html>
<!--DISCLAIMER-->
<p>Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)</p>
Expand Down
7 changes: 2 additions & 5 deletions Application Examples/TwoAreas/Groups/PSSE/AVR/G1.mo
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ equation
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(
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")}),
Expand Down
7 changes: 2 additions & 5 deletions Application Examples/TwoAreas/Groups/PSSE/AVR/G2.mo
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,8 @@ equation
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(
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")}),
Expand Down
7 changes: 2 additions & 5 deletions Application Examples/TwoAreas/Groups/PSSE/AVR/G3.mo
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ equation
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(
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={{-22,-24},{18,-54}},
lineColor={28,108,200},
textString="G3")}),
Expand Down
7 changes: 2 additions & 5 deletions Application Examples/TwoAreas/Groups/PSSE/AVR/G4.mo
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,8 @@ equation
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(
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={{-24,-22},{18,-52}},
lineColor={28,108,200},
textString="G4")}),
Expand Down
2 changes: 1 addition & 1 deletion Application Examples/TwoAreas/Groups/PSSE/AVR/package.mo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
within TwoAreas.Groups.PSSE;
package AVR
package AVR
end AVR;
52 changes: 20 additions & 32 deletions Application Examples/TwoAreas/Groups/PSSE/No_Controls.mo
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ package No_Controls
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")}));
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")}));
end G1;

model G2
Expand Down Expand Up @@ -82,14 +79,11 @@ package No_Controls
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")}));
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")}));
end G2;

model G3
Expand Down Expand Up @@ -129,14 +123,11 @@ package No_Controls
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={{-22,-24},{18,-54}},
lineColor={28,108,200},
textString="G3")}));
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={{-22,-24},{18,-54}},
lineColor={28,108,200},
textString="G3")}));
end G3;

model G4
Expand Down Expand Up @@ -175,13 +166,10 @@ package No_Controls
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={{-24,-22},{18,-52}},
lineColor={28,108,200},
textString="G4")}));
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={{-24,-22},{18,-52}},
lineColor={28,108,200},
textString="G4")}));
end G4;
end No_Controls;
2 changes: 1 addition & 1 deletion Application Examples/TwoAreas/Groups/PSSE/package.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within TwoAreas.Groups;
package PSSE
package PSSE
annotation (Documentation(revisions="<html>
<!--DISCLAIMER-->
<p>Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)</p>
Expand Down
2 changes: 1 addition & 1 deletion Application Examples/TwoAreas/Groups/package.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within TwoAreas;
package Groups
package Groups


annotation (Documentation(revisions="<html>
Expand Down
Loading

0 comments on commit cf7c90e

Please sign in to comment.