diff --git a/Application Examples/TwoAreas/Data/PF1.mo b/Application Examples/TwoAreas/Data/PF1.mo index 2463088cc..08f6dae67 100644 --- a/Application Examples/TwoAreas/Data/PF1.mo +++ b/Application Examples/TwoAreas/Data/PF1.mo @@ -1,6 +1,6 @@ within TwoAreas.Data; record PF1 - extends PF_TwoAreas( + extends Support.PF_TwoAreas( voltages( V1=1.03, A1=20.2473, diff --git a/Application Examples/TwoAreas/Data/PF2.mo b/Application Examples/TwoAreas/Data/PF2.mo index dbf6efc7e..b782dd8dc 100644 --- a/Application Examples/TwoAreas/Data/PF2.mo +++ b/Application Examples/TwoAreas/Data/PF2.mo @@ -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, diff --git a/Application Examples/TwoAreas/Data/PF3.mo b/Application Examples/TwoAreas/Data/PF3.mo new file mode 100644 index 000000000..7b77ec700 --- /dev/null +++ b/Application Examples/TwoAreas/Data/PF3.mo @@ -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; diff --git a/Application Examples/TwoAreas/Data/PF4.mo b/Application Examples/TwoAreas/Data/PF4.mo new file mode 100644 index 000000000..0f6af6cc8 --- /dev/null +++ b/Application Examples/TwoAreas/Data/PF4.mo @@ -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=" +
Not working
+")); +end PF4; diff --git a/Application Examples/TwoAreas/Data/package.order b/Application Examples/TwoAreas/Data/package.order index 9716bb65b..f6d23c985 100644 --- a/Application Examples/TwoAreas/Data/package.order +++ b/Application Examples/TwoAreas/Data/package.order @@ -1,3 +1,4 @@ -PF_TwoAreas PF1 PF2 +PF3 +PF4 diff --git a/Application Examples/TwoAreas/Groups/PSAT/G1.mo b/Application Examples/TwoAreas/Groups/PSAT/G1.mo index 4d4230037..6895d65ae 100644 --- a/Application Examples/TwoAreas/Groups/PSAT/G1.mo +++ b/Application Examples/TwoAreas/Groups/PSAT/G1.mo @@ -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, @@ -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=" diff --git a/Application Examples/TwoAreas/Groups/PSAT/G2.mo b/Application Examples/TwoAreas/Groups/PSAT/G2.mo index 006baf39f..1ff1ca4a3 100644 --- a/Application Examples/TwoAreas/Groups/PSAT/G2.mo +++ b/Application Examples/TwoAreas/Groups/PSAT/G2.mo @@ -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, @@ -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=" diff --git a/Application Examples/TwoAreas/Groups/PSAT/G3.mo b/Application Examples/TwoAreas/Groups/PSAT/G3.mo index b7e9c98b0..a6aa37eeb 100644 --- a/Application Examples/TwoAreas/Groups/PSAT/G3.mo +++ b/Application Examples/TwoAreas/Groups/PSAT/G3.mo @@ -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, @@ -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=" diff --git a/Application Examples/TwoAreas/Groups/PSAT/G4.mo b/Application Examples/TwoAreas/Groups/PSAT/G4.mo index 383a484de..af67dd38d 100644 --- a/Application Examples/TwoAreas/Groups/PSAT/G4.mo +++ b/Application Examples/TwoAreas/Groups/PSAT/G4.mo @@ -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, @@ -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=" diff --git a/Application Examples/TwoAreas/Groups/PSSE/AVR/G1.mo b/Application Examples/TwoAreas/Groups/PSSE/AVR/G1.mo index 328365ae0..789c807f6 100644 --- a/Application Examples/TwoAreas/Groups/PSSE/AVR/G1.mo +++ b/Application Examples/TwoAreas/Groups/PSSE/AVR/G1.mo @@ -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, @@ -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="Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
diff --git a/Application Examples/TwoAreas/Groups/PSSE/AVR/G2.mo b/Application Examples/TwoAreas/Groups/PSSE/AVR/G2.mo index dac1eecf5..952065d78 100644 --- a/Application Examples/TwoAreas/Groups/PSSE/AVR/G2.mo +++ b/Application Examples/TwoAreas/Groups/PSSE/AVR/G2.mo @@ -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, @@ -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="Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
diff --git a/Application Examples/TwoAreas/Groups/PSSE/AVR/G3.mo b/Application Examples/TwoAreas/Groups/PSSE/AVR/G3.mo index 238e5cc7c..c324a9224 100644 --- a/Application Examples/TwoAreas/Groups/PSSE/AVR/G3.mo +++ b/Application Examples/TwoAreas/Groups/PSSE/AVR/G3.mo @@ -1,6 +1,6 @@ within TwoAreas.Groups.PSSE.AVR; model G3 - extends iPSL.Electrical.Essentials.pfComponent; + extends TwoAreas.Support.Generator; iPSL.Electrical.Machines.PSSE.GENROU.GENROU g3( Tpd0=8, @@ -26,8 +26,6 @@ model G3 Xpq=0.55, Tpq0=0.4) annotation (Placement(transformation(extent={{12,-18},{44,22}}))); - iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{60,-10},{80,10}}), iconTransformation(extent={{60,-10},{80,10}}))); - iPSL.Electrical.Controls.PSSE.ES.SEXS.SEXS sEXS( T_AT_B=0.1, T_B=10, @@ -35,30 +33,26 @@ model G3 T_E=0.1, E_MIN=0, E_MAX=4, - Ec0=1) annotation (Placement(transformation(extent={{-38,-16},{0,0}}))); - Modelica.Blocks.Sources.Constant const(k=0) annotation (Placement(transformation(extent={{-56,4},{-50,10}}))); + Ec0=V_0) annotation (Placement(transformation(extent={{-38,-16},{0,0}}))); + Modelica.Blocks.Sources.Constant const(k=0) annotation (Placement(transformation(extent={{-66,4},{-60,10}}))); equation connect(g3.PMECH, g3.PMECH0) annotation (Line(points={{12.32,12},{-24,12},{-24,44},{54,44},{54,-4},{45.28,-4}}, color={0,0,127})); connect(g3.p, pwPin) annotation (Line(points={{45.6,2},{46.5,2},{46.5,0},{70,0}}, color={0,0,255})); connect(sEXS.EFD, g3.EFD) annotation (Line(points={{1.14,-8},{12.32,-8}}, color={0,0,127})); - connect(sEXS.VOEL, const.y) annotation (Line(points={{-36.86,-8},{-44,-8},{-44,7},{-49.7,7}}, color={0,0,127})); + connect(sEXS.VOEL, const.y) annotation (Line(points={{-36.86,-8},{-52,-8},{-52,7},{-59.7,7}}, color={0,0,127})); connect(sEXS.EFD0, g3.EFD0) annotation (Line(points={{-36.86,-13},{-44,-13},{-44,-24},{50,-24},{50,-12},{45.28,-12}}, color={0,0,127})); - connect(sEXS.VUEL, const.y) annotation (Line(points={{-36.86,-11},{-44,-11},{-44,7},{-49.7,7}}, color={0,0,127})); - connect(sEXS.VOTHSG, const.y) annotation (Line(points={{-36.86,-5},{-44,-5},{-44,7},{-49.7,7}}, color={0,0,127})); - connect(sEXS.ECOMP, const.y) annotation (Line(points={{-36.86,-3},{-44,-3},{-44,7},{-49.7,7}}, color={0,0,127})); + connect(sEXS.VUEL, const.y) annotation (Line(points={{-36.86,-11},{-52,-11},{-52,7},{-59.7,7}}, color={0,0,127})); + connect(sEXS.VOTHSG, const.y) annotation (Line(points={{-36.86,-5},{-52,-5},{-52,7},{-59.7,7}}, color={0,0,127})); + connect(g3.ETERM, sEXS.ECOMP) annotation (Line(points={{45.28,12},{52,12},{52,-26},{-46,-26},{-46,-3},{-36.86,-3}}, 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={{-22,-24},{18,-54}}, - lineColor={28,108,200}, - textString="G3")}), + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + initialScale=0.1)), Documentation(revisions="Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
diff --git a/Application Examples/TwoAreas/Groups/PSSE/AVR/G4.mo b/Application Examples/TwoAreas/Groups/PSSE/AVR/G4.mo index eb114bdf5..1d1199f5e 100644 --- a/Application Examples/TwoAreas/Groups/PSSE/AVR/G4.mo +++ b/Application Examples/TwoAreas/Groups/PSSE/AVR/G4.mo @@ -1,8 +1,7 @@ within TwoAreas.Groups.PSSE.AVR; model G4 - 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 gENSAL( Tpd0=8, Tppd0=0.03, @@ -42,30 +41,26 @@ model G4 E_2=2, S_EE_1=0.0164, S_EE_2=0.0481) annotation (Placement(transformation(extent={{-32,-16},{0,-2}}))); - Modelica.Blocks.Sources.Constant const(k=0) annotation (Placement(transformation(extent={{-52,8},{-44,16}}))); + Modelica.Blocks.Sources.Constant const(k=0) annotation (Placement(transformation(extent={{-62,2},{-54,10}}))); equation connect(gENSAL.p, pwPin) annotation (Line(points={{46,0},{42,0},{70,0}}, color={0,0,255})); connect(gENSAL.PMECH, gENSAL.PMECH0) annotation (Line(points={{4.4,9},{2,9},{2,14},{-8,14},{-8,32},{50,32},{50,-5.4},{45.6,-5.4}}, color={0,0,127})); connect(eSDC1A.EFD, gENSAL.EFD) annotation (Line(points={{0.888889,-9},{0.888889,-9},{2,-9},{4.4,-9}}, color={0,0,127})); connect(eSDC1A.EFD0, gENSAL.EFD0) annotation (Line(points={{-19.5556,-14.95},{-19.5556,-22},{50,-22},{50,-12.6},{45.6,-12.6}}, color={0,0,127})); - connect(const.y, eSDC1A.VUEL) annotation (Line(points={{-43.6,12},{-38,12},{-38,-14.25},{-31.1111,-14.25}}, color={0,0,127})); - connect(eSDC1A.VOEL, eSDC1A.VUEL) annotation (Line(points={{-31.1111,-10.75},{-38,-10.75},{-38,-14.25},{-31.1111,-14.25}}, color={0,0,127})); - connect(eSDC1A.VOTHSG, eSDC1A.VUEL) annotation (Line(points={{-31.1111,-7.25},{-38,-7.25},{-38,-14.25},{-31.1111,-14.25}}, color={0,0,127})); - connect(eSDC1A.ECOMP, eSDC1A.VUEL) annotation (Line(points={{-31.1111,-3.925},{-38,-3.925},{-38,-14.25},{-31.1111,-14.25}}, color={0,0,127})); + connect(const.y, eSDC1A.VUEL) annotation (Line(points={{-53.6,6},{-44,6},{-44,-14.25},{-31.1111,-14.25}}, color={0,0,127})); + connect(eSDC1A.VOEL, eSDC1A.VUEL) annotation (Line(points={{-31.1111,-10.75},{-44,-10.75},{-44,-14.25},{-31.1111,-14.25}}, color={0,0,127})); + connect(eSDC1A.VOTHSG, eSDC1A.VUEL) annotation (Line(points={{-31.1111,-7.25},{-44,-7.25},{-44,-14.25},{-31.1111,-14.25}}, color={0,0,127})); + connect(gENSAL.ETERM, eSDC1A.ECOMP) annotation (Line(points={{45.6,9},{52,9},{52,-24},{-38,-24},{-38,-3.925},{-31.1111,-3.925}}, 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={{-24,-22},{18,-52}}, - lineColor={28,108,200}, - textString="G4")}), + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + initialScale=0.1)), Documentation(revisions="Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
diff --git a/Application Examples/TwoAreas/Groups/PSSE/AVR/package.mo b/Application Examples/TwoAreas/Groups/PSSE/AVR/package.mo index 28b05823c..39afc263a 100644 --- a/Application Examples/TwoAreas/Groups/PSSE/AVR/package.mo +++ b/Application Examples/TwoAreas/Groups/PSSE/AVR/package.mo @@ -1,3 +1,17 @@ within TwoAreas.Groups.PSSE; package AVR +annotation (Documentation(revisions=" + +Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
+The authors can be contacted by email: info@itesla-ipsl.org
+ +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
+")); end AVR; diff --git a/Application Examples/TwoAreas/Groups/PSSE/No_Controls.mo b/Application Examples/TwoAreas/Groups/PSSE/No_Controls.mo index d615f9f0a..69901d1d0 100644 --- a/Application Examples/TwoAreas/Groups/PSSE/No_Controls.mo +++ b/Application Examples/TwoAreas/Groups/PSSE/No_Controls.mo @@ -1,9 +1,7 @@ within TwoAreas.Groups.PSSE; package No_Controls model G1 - extends iPSL.Electrical.Essentials.pfComponent; - - iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{60,-10},{80,10}}), iconTransformation(extent={{60,-10},{80,10}}))); + extends TwoAreas.Support.Generator; iPSL.Electrical.Machines.PSSE.GENSAL.GENSAL gENSAL( Tpd0=8, Tppd0=0.03, @@ -30,23 +28,34 @@ package No_Controls connect(gENSAL.EFD0, gENSAL.EFD) annotation (Line(points={{25.6,-8.6},{26,-8.6},{26,-20},{-18,-20},{-18,-5},{-15.6,-5}}, color={0,0,127})); connect(gENSAL.PMECH, gENSAL.PMECH0) annotation (Line(points={{-15.6,13},{-18,13},{-18,30},{24,30},{24,-1.4},{25.6,-1.4}}, color={0,0,127})); connect(gENSAL.p, pwPin) annotation (Line(points={{26,4},{42,4},{42,0},{70,0}}, color={0,0,255})); - annotation (Diagram(coordinateSystem( + annotation ( + Diagram(coordinateSystem( preserveAspectRatio=false, - extent={{-60,-60},{60,60}}, - initialScale=0.1)), Icon(coordinateSystem( + 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")})); + extent={{-100,-100},{100,100}}, + initialScale=0.1)), + Documentation(revisions=" + +Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
+The authors can be contacted by email: info@itesla-ipsl.org
+ +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
+")); end G1; 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.GENSAL.GENSAL gENSAL( Tpd0=8, Tppd0=0.03, @@ -73,21 +82,33 @@ package No_Controls connect(gENSAL.EFD, gENSAL.EFD0) annotation (Line(points={{-15.6,-5},{-26,-5},{-26,-30},{26,-30},{26,-8.6},{25.6,-8.6}}, color={0,0,127})); connect(gENSAL.PMECH, gENSAL.PMECH0) annotation (Line(points={{-15.6,13},{-26,13},{-26,34},{28,34},{28,-1.4},{25.6,-1.4}}, color={0,0,127})); connect(gENSAL.p, pwPin) annotation (Line(points={{26,4},{44,4},{44,0},{70,0}}, color={0,0,255})); - annotation (Diagram(coordinateSystem( + annotation ( + Diagram(coordinateSystem( preserveAspectRatio=false, - extent={{-60,-60},{60,60}}, - 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")})); + extent={{-100,-100},{100,100}}, + initialScale=0.1)), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + initialScale=0.1)), + Documentation(revisions=" + +Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
+The authors can be contacted by email: info@itesla-ipsl.org
+ +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
+")); end G2; model G3 - extends iPSL.Electrical.Essentials.pfComponent; + extends TwoAreas.Support.Generator; iPSL.Electrical.Machines.PSSE.GENSAL.GENSAL gENSAL( Tpd0=8, @@ -111,29 +132,38 @@ package No_Controls Q_0=Q_0, angle_0=angle_0) annotation (Placement(transformation(extent={{-30,-30},{30,36}}))); - iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{60,-10},{80,10}}), iconTransformation(extent={{60,-10},{80,10}}))); - equation connect(gENSAL.PMECH, gENSAL.PMECH0) annotation (Line(points={{-29.4,19.5},{-40,19.5},{-40,44},{30,44},{30,-6.9},{32.4,-6.9}}, color={0,0,127})); connect(gENSAL.EFD0, gENSAL.EFD) annotation (Line(points={{32.4,-20.1},{38,-20.1},{38,-40},{-38,-40},{-38,0},{-38,-13.5},{-29.4,-13.5}}, color={0,0,127})); connect(gENSAL.p, pwPin) annotation (Line(points={{33,3},{46.5,3},{46.5,0},{70,0}}, color={0,0,255})); - annotation (Diagram(coordinateSystem( + annotation ( + Diagram(coordinateSystem( preserveAspectRatio=false, - extent={{-60,-60},{60,60}}, - 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")})); + extent={{-100,-100},{100,100}}, + initialScale=0.1)), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + initialScale=0.1)), + Documentation(revisions=" + +Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
+The authors can be contacted by email: info@itesla-ipsl.org
+ +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
+")); end G3; model G4 - 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.GENSAL.GENSAL gENSAL( Tpd0=8, Tppd0=0.03, @@ -160,16 +190,42 @@ package No_Controls connect(gENSAL.p, pwPin) annotation (Line(points={{26,4},{42,4},{42,0},{70,0}}, color={0,0,255})); connect(gENSAL.EFD0, gENSAL.EFD) annotation (Line(points={{25.6,-8.6},{34,-8.6},{34,-20},{-24,-20},{-24,-5},{-15.6,-5}}, color={0,0,127})); connect(gENSAL.PMECH, gENSAL.PMECH0) annotation (Line(points={{-15.6,13},{-14,13},{-14,12},{-24,12},{-24,30},{34,30},{34,-1.4},{25.6,-1.4}}, color={0,0,127})); - annotation (Diagram(coordinateSystem( + annotation ( + Diagram(coordinateSystem( preserveAspectRatio=false, - extent={{-60,-60},{60,60}}, - 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")})); + extent={{-100,-100},{100,100}}, + initialScale=0.1)), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + initialScale=0.1)), + Documentation(revisions=" + +Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
+The authors can be contacted by email: info@itesla-ipsl.org
+ +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
+")); end G4; + annotation (Documentation(revisions=" + +Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
+The authors can be contacted by email: info@itesla-ipsl.org
+ +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
+")); end No_Controls; diff --git a/Application Examples/TwoAreas/Support/Generator.mo b/Application Examples/TwoAreas/Support/Generator.mo new file mode 100644 index 000000000..ba690f85e --- /dev/null +++ b/Application Examples/TwoAreas/Support/Generator.mo @@ -0,0 +1,37 @@ +within TwoAreas.Support; +partial model Generator + extends iPSL.Electrical.Essentials.pfComponent; + + iPSL.Connectors.PwPin pwPin annotation (Placement(transformation(extent={{60,-10},{80,10}}), iconTransformation(extent={{100,-10},{120,10}}))); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ + Ellipse( + extent={{-100,100},{100,-100}}, + lineColor={0,0,0}, + fillColor={215,215,215}, + fillPattern=FillPattern.Solid), + Line( + points={{20,-20},{50,-40},{80,0}}, + color={0,0,0}, + thickness=0.5), + Text( + extent={{-40,20},{40,-20}}, + lineColor={0,0,0}, + textString="%name"), + Line( + points={{-20,20},{-50,40},{-80,0}}, + color={0,0,0}, + thickness=0.5)}), Documentation(revisions=" + +Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
+The authors can be contacted by email: info@itesla-ipsl.org
+ +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
+")); +end Generator; diff --git a/Application Examples/TwoAreas/Data/PF_TwoAreas.mo b/Application Examples/TwoAreas/Support/PF_TwoAreas.mo similarity index 98% rename from Application Examples/TwoAreas/Data/PF_TwoAreas.mo rename to Application Examples/TwoAreas/Support/PF_TwoAreas.mo index 7074fd800..293c2372d 100644 --- a/Application Examples/TwoAreas/Data/PF_TwoAreas.mo +++ b/Application Examples/TwoAreas/Support/PF_TwoAreas.mo @@ -1,4 +1,4 @@ -within TwoAreas.Data; +within TwoAreas.Support; partial record PF_TwoAreas record Voltages // Bus number 1 diff --git a/Application Examples/TwoAreas/Support/package.mo b/Application Examples/TwoAreas/Support/package.mo new file mode 100644 index 000000000..900bc0354 --- /dev/null +++ b/Application Examples/TwoAreas/Support/package.mo @@ -0,0 +1,4 @@ +within TwoAreas; +package Support + +end Support; diff --git a/Application Examples/TwoAreas/Support/package.order b/Application Examples/TwoAreas/Support/package.order new file mode 100644 index 000000000..6249c651c --- /dev/null +++ b/Application Examples/TwoAreas/Support/package.order @@ -0,0 +1,2 @@ +PF_TwoAreas +Generator diff --git a/Application Examples/TwoAreas/Two_Areas_PSAT.mo b/Application Examples/TwoAreas/Two_Areas_PSAT.mo index 4cd6a4a33..3f9676904 100644 --- a/Application Examples/TwoAreas/Two_Areas_PSAT.mo +++ b/Application Examples/TwoAreas/Two_Areas_PSAT.mo @@ -5,7 +5,7 @@ model Two_Areas_PSAT parameter Real r=0.0001; parameter Real x=0.001; parameter Real b=0.00175*0.5; - replaceable Data.PF1 PF_results constrainedby Data.PF_TwoAreas annotation (Placement(transformation(extent={{-220,-40},{-200,-20}}))); + replaceable Data.PF1 PF_results constrainedby Support.PF_TwoAreas annotation (Placement(transformation(extent={{-220,-40},{-200,-20}}))); iPSL.Electrical.Buses.Bus bus1 annotation (Placement(transformation(extent={{-190,20},{-170,40}}))); iPSL.Electrical.Buses.Bus bus2 annotation (Placement(transformation(extent={{-190,-10},{-170,10}}))); iPSL.Electrical.Buses.Bus bus3 annotation (Placement(transformation(extent={{170,20},{190,40}}))); diff --git a/Application Examples/TwoAreas/Two_Areas_PSSE.mo b/Application Examples/TwoAreas/Two_Areas_PSSE.mo index c56925ca2..e7f92e809 100644 --- a/Application Examples/TwoAreas/Two_Areas_PSSE.mo +++ b/Application Examples/TwoAreas/Two_Areas_PSSE.mo @@ -4,8 +4,9 @@ model Two_Areas_PSSE parameter Real r=0.0001; parameter Real x=0.001; parameter Real b=0.00175*0.5; + replaceable Data.PF3 PF_results constrainedby Support.PF_TwoAreas annotation (Placement(transformation(extent={{-220,-40},{-200,-20}}))); iPSL.Electrical.Buses.Bus bus1 annotation (Placement(transformation(extent={{-190,20},{-170,40}}))); - iPSL.Electrical.Buses.Bus bus2 annotation (Placement(transformation(extent={{-190,-20},{-170,0}}))); + iPSL.Electrical.Buses.Bus bus2 annotation (Placement(transformation(extent={{-190,-10},{-170,10}}))); iPSL.Electrical.Buses.Bus bus3 annotation (Placement(transformation(extent={{170,20},{190,40}}))); iPSL.Electrical.Buses.Bus bus4 annotation (Placement(transformation(extent={{170,-20},{190,0}}))); iPSL.Electrical.Buses.Bus bus5 annotation (Placement(transformation(extent={{-150,20},{-130,40}}))); @@ -16,28 +17,28 @@ model Two_Areas_PSSE iPSL.Electrical.Buses.Bus bus10 annotation (Placement(transformation(extent={{90,20},{110,40}}))); iPSL.Electrical.Buses.Bus bus11 annotation (Placement(transformation(extent={{130,20},{150,40}}))); TwoAreas.Groups.PSSE.No_Controls.G1 g1( - V_0=1.03, - angle_0=20.27066, - P_0=700, - Q_0=185.0296) annotation (Placement(transformation(extent={{-214,24},{-202,36}}))); + V_0=PF_results.voltages.V1, + angle_0=PF_results.voltages.A1, + P_0=PF_results.machines.P1_1, + Q_0=PF_results.machines.Q1_1) annotation (Placement(transformation(extent={{-214,24},{-202,36}}))); TwoAreas.Groups.PSSE.No_Controls.G2 g2( - V_0=1.01, - angle_0=10.50628, - P_0=700, - Q_0=234.6113) annotation (Placement(transformation(extent={{-214,-16},{-202,-4}}))); + V_0=PF_results.voltages.V2, + angle_0=PF_results.voltages.A2, + P_0=PF_results.machines.P2_1, + Q_0=PF_results.machines.Q2_1) annotation (Placement(transformation(extent={{-214,-6},{-202,6}}))); TwoAreas.Groups.PSSE.No_Controls.G3 g3( - V_0=1.03, - angle_0=-6.8, - P_0=719.0941, - Q_0=176.0262) annotation (Placement(transformation( + V_0=PF_results.voltages.V3, + angle_0=PF_results.voltages.A3, + P_0=PF_results.machines.P3_1, + Q_0=PF_results.machines.Q3_1) annotation (Placement(transformation( extent={{-6,-6},{6,6}}, rotation=180, origin={208,30}))); TwoAreas.Groups.PSSE.No_Controls.G4 g4( - V_0=1.01, - angle_0=-16.9921, - P_0=700, - Q_0=202.0827) annotation (Placement(transformation( + V_0=PF_results.voltages.V4, + angle_0=PF_results.voltages.A4, + P_0=PF_results.machines.P4_1, + Q_0=PF_results.machines.Q4_1) annotation (Placement(transformation( extent={{-6,-6},{6,6}}, rotation=180, origin={208,-10}))); @@ -97,16 +98,16 @@ model Two_Areas_PSSE iPSL.Electrical.Loads.PSSE.Load Load7( PQBRAK=0.7, - V_0=0.9610106, - angle_0=-4.68651, - P_0=967, - Q_0=-84.70) annotation (Placement(transformation(extent={{-76,-12},{-50,0}}))); + V_0=PF_results.voltages.V7, + angle_0=PF_results.voltages.A7, + P_0=PF_results.loads.PL7_1, + Q_0=PF_results.loads.QL7_1) annotation (Placement(transformation(extent={{-78,-26},{-50,0}}))); iPSL.Electrical.Loads.PSSE.Load Load9( PQBRAK=0.7, - V_0=0.9713628, - angle_0=-32.15403, - P_0=1767, - Q_0=-230.2) annotation (Placement(transformation(extent={{80,-12},{50,0}}))); + V_0=PF_results.voltages.V9, + angle_0=PF_results.voltages.A9, + P_0=PF_results.loads.PL9_1, + Q_0=PF_results.loads.QL9_1) annotation (Placement(transformation(extent={{80,-26},{50,0}}))); iPSL.Electrical.Branches.PwLine Line5_1( G=0, R=0, @@ -116,7 +117,7 @@ model Two_Areas_PSSE G=0, R=0, X=0.01667, - B=0) annotation (Placement(transformation(extent={{-170,-20},{-150,0}}))); + B=0) annotation (Placement(transformation(extent={{-170,-10},{-150,10}}))); iPSL.Electrical.Branches.PwLine Line5_3( G=0, R=0, @@ -129,8 +130,8 @@ model Two_Areas_PSSE B=0) annotation (Placement(transformation(extent={{150,-20},{170,0}}))); inner iPSL.Electrical.SystemBase SysData(fn=60) annotation (Placement(transformation(extent={{-220,48},{-172,62}}))); equation - connect(g1.pwPin, bus1.p) annotation (Line(points={{-201,30},{-190.5,30},{-180,30}}, color={0,0,255})); - connect(g2.pwPin, bus2.p) annotation (Line(points={{-201,-10},{-190.5,-10},{-180,-10}}, color={0,0,255})); + connect(g1.pwPin, bus1.p) annotation (Line(points={{-201.4,30},{-201.4,30},{-180,30}}, color={0,0,255})); + connect(g2.pwPin, bus2.p) annotation (Line(points={{-201.4,0},{-201.4,0},{-180,0}}, color={0,0,255})); connect(Line6_7.n, bus7.p) annotation (Line(points={{-68.3333,30},{-68.3333,30},{-60,30}}, color={0,0,255})); connect(Line6_7.p, bus6.p) annotation (Line(points={{-91.6667,30},{-91.6667,30},{-100,30}}, color={0,0,255})); connect(Line5_6.n, bus6.p) annotation (Line(points={{-108.333,30},{-108.333,30},{-100,30}}, color={0,0,255})); @@ -147,15 +148,15 @@ equation connect(Line9_10.n, bus10.p) annotation (Line(points={{91.6667,30},{91.6667,30},{100,30}}, color={0,0,255})); connect(bus10.p, Line10_11.p) annotation (Line(points={{100,30},{108.333,30}}, color={0,0,255})); connect(Line10_11.n, bus11.p) annotation (Line(points={{131.667,30},{131.667,30},{140,30}}, color={0,0,255})); - connect(g4.pwPin, bus4.p) annotation (Line(points={{201,-10},{201,-10},{180,-10}}, color={0,0,255})); - connect(g3.pwPin, bus3.p) annotation (Line(points={{201,30},{180,30}}, color={0,0,255})); - connect(Load7.p, bus7.p) annotation (Line(points={{-63,0.6},{-64,0.6},{-64,30},{-60,30}}, color={0,0,255})); - connect(Load9.p, Line9_10.p) annotation (Line(points={{65,0.6},{66,0.6},{66,30},{68.3333,30}}, color={0,0,255})); + connect(g4.pwPin, bus4.p) annotation (Line(points={{201.4,-10},{201.4,-10},{180,-10}}, color={0,0,255})); + connect(g3.pwPin, bus3.p) annotation (Line(points={{201.4,30},{180,30}}, color={0,0,255})); + connect(Load7.p, bus7.p) annotation (Line(points={{-64,1.3},{-64,1.3},{-64,30},{-60,30}}, color={0,0,255})); + connect(Load9.p, Line9_10.p) annotation (Line(points={{65,1.3},{66,1.3},{66,30},{68.3333,30}}, color={0,0,255})); connect(pwFault.p, bus8.p) annotation (Line(points={{2,-4.33333},{2,30},{0,30}}, color={0,0,255})); connect(bus1.p, Line5_1.p) annotation (Line(points={{-180,30},{-171.667,30}}, color={0,0,255})); connect(bus5.p, Line5_1.n) annotation (Line(points={{-140,30},{-148.333,30}}, color={0,0,255})); - connect(bus2.p, Line5_2.p) annotation (Line(points={{-180,-10},{-171.667,-10},{-171.667,-10}}, color={0,0,255})); - connect(Line5_2.n, bus6.p) annotation (Line(points={{-148.333,-10},{-104,-10},{-104,30},{-100,30}}, color={0,0,255})); + connect(bus2.p, Line5_2.p) annotation (Line(points={{-180,0},{-171.667,0}}, color={0,0,255})); + connect(Line5_2.n, bus6.p) annotation (Line(points={{-148.333,0},{-104,0},{-104,30},{-100,30}}, color={0,0,255})); connect(bus11.p, Line5_3.p) annotation (Line(points={{140,30},{148.333,30}}, color={0,0,255})); connect(Line5_3.n, bus3.p) annotation (Line(points={{171.667,30},{171.667,30},{180,30}}, color={0,0,255})); connect(bus4.p, Line5_4.n) annotation (Line(points={{180,-10},{171.667,-10}}, color={0,0,255})); diff --git a/Application Examples/TwoAreas/Two_Areas_PSSE_AVR.mo b/Application Examples/TwoAreas/Two_Areas_PSSE_AVR.mo index 833e03c1c..ec7331773 100644 --- a/Application Examples/TwoAreas/Two_Areas_PSSE_AVR.mo +++ b/Application Examples/TwoAreas/Two_Areas_PSSE_AVR.mo @@ -4,8 +4,9 @@ model Two_Areas_PSSE_AVR parameter Real r=0.0001; parameter Real x=0.001; parameter Real b=0.00175*0.5; + replaceable Data.PF3 PF_results constrainedby Support.PF_TwoAreas annotation (Placement(transformation(extent={{-220,-40},{-200,-20}}))); iPSL.Electrical.Buses.Bus bus1 annotation (Placement(transformation(extent={{-190,20},{-170,40}}))); - iPSL.Electrical.Buses.Bus bus2 annotation (Placement(transformation(extent={{-190,-20},{-170,0}}))); + iPSL.Electrical.Buses.Bus bus2 annotation (Placement(transformation(extent={{-190,-10},{-170,10}}))); iPSL.Electrical.Buses.Bus bus3 annotation (Placement(transformation(extent={{170,20},{190,40}}))); iPSL.Electrical.Buses.Bus bus4 annotation (Placement(transformation(extent={{170,-20},{190,0}}))); iPSL.Electrical.Buses.Bus bus5 annotation (Placement(transformation(extent={{-150,20},{-130,40}}))); @@ -16,32 +17,28 @@ model Two_Areas_PSSE_AVR iPSL.Electrical.Buses.Bus bus10 annotation (Placement(transformation(extent={{90,20},{110,40}}))); iPSL.Electrical.Buses.Bus bus11 annotation (Placement(transformation(extent={{130,20},{150,40}}))); Groups.PSSE.AVR.G1 g1( - P_0=1100.0000, - V_0=1.02999997139, - angle_0=39.419670105, - Q_0=187.957901001, - V_b=34.5) annotation (Placement(transformation(extent={{-214,24},{-202,36}}))); + V_0=PF_results.voltages.V1, + angle_0=PF_results.voltages.A1, + P_0=PF_results.machines.P1_1, + Q_0=PF_results.machines.Q1_1) annotation (Placement(transformation(extent={{-214,24},{-202,36}}))); Groups.PSSE.AVR.G2 g2( - P_0=700, - V_0=1.04999995232, - angle_0=22.7480773926, - Q_0=260.817138672, - V_b=34.5) annotation (Placement(transformation(extent={{-214,-16},{-202,-4}}))); + V_0=PF_results.voltages.V2, + angle_0=PF_results.voltages.A2, + P_0=PF_results.machines.P2_1, + Q_0=PF_results.machines.Q2_1) annotation (Placement(transformation(extent={{-214,-6},{-202,6}}))); Groups.PSSE.AVR.G3 g3( - V_0=1.02999997139, - angle_0=-7.00000047684, - P_0=757.885437012, - Q_0=218.426849365, - V_b=34.5) annotation (Placement(transformation( + V_0=PF_results.voltages.V3, + angle_0=PF_results.voltages.A3, + P_0=PF_results.machines.P3_1, + Q_0=PF_results.machines.Q3_1) annotation (Placement(transformation( extent={{-6,-6},{6,6}}, rotation=180, origin={208,30}))); Groups.PSSE.AVR.G4 g4( - P_0=300, - V_0=1.00999999046, - angle_0=-17.5402793884, - Q_0=112.58140564, - V_b=34.5) annotation (Placement(transformation( + V_0=PF_results.voltages.V4, + angle_0=PF_results.voltages.A4, + P_0=PF_results.machines.P4_1, + Q_0=PF_results.machines.Q4_1) annotation (Placement(transformation( extent={{-6,-6},{6,6}}, rotation=180, origin={208,-10}))); @@ -101,18 +98,16 @@ model Two_Areas_PSSE_AVR iPSL.Electrical.Loads.PSSE.Load Load7( PQBRAK=0.7, - V_0=1.01935839653, - angle_0=6.56502771378, - P_0=1166.999877934, - Q_0=-523.4548797604, - V_b=500) annotation (Placement(transformation(extent={{-82,-28},{-58,0}}))); + V_0=PF_results.voltages.V7, + angle_0=PF_results.voltages.A7, + P_0=PF_results.loads.PL7_1, + Q_0=PF_results.loads.QL7_1) annotation (Placement(transformation(extent={{-78,-26},{-50,0}}))); iPSL.Electrical.Loads.PSSE.Load Load9( PQBRAK=0.7, - P_0=1567.0, - V_0=0.960842967033, - angle_0=-31.4690284729, - Q_0=-223.1267089844, - V_b=500) annotation (Placement(transformation(extent={{72,-20},{56,-2}}))); + V_0=PF_results.voltages.V9, + angle_0=PF_results.voltages.A9, + P_0=PF_results.loads.PL9_1, + Q_0=PF_results.loads.QL9_1) annotation (Placement(transformation(extent={{80,-26},{50,0}}))); iPSL.Electrical.Branches.PwLine Line5_1( G=0, R=0, @@ -122,7 +117,7 @@ model Two_Areas_PSSE_AVR G=0, R=0, X=0.01667, - B=0) annotation (Placement(transformation(extent={{-170,-20},{-150,0}}))); + B=0) annotation (Placement(transformation(extent={{-170,-10},{-150,10}}))); iPSL.Electrical.Branches.PwLine Line5_3( G=0, R=0, @@ -135,8 +130,8 @@ model Two_Areas_PSSE_AVR B=0) annotation (Placement(transformation(extent={{150,-20},{170,0}}))); inner iPSL.Electrical.SystemBase SysData(fn=60) annotation (Placement(transformation(extent={{-220,48},{-172,62}}))); equation - connect(g1.pwPin, bus1.p) annotation (Line(points={{-201,30},{-190.5,30},{-180,30}}, color={0,0,255})); - connect(g2.pwPin, bus2.p) annotation (Line(points={{-201,-10},{-190.5,-10},{-180,-10}}, color={0,0,255})); + connect(g1.pwPin, bus1.p) annotation (Line(points={{-201.4,30},{-201.4,30},{-180,30}}, color={0,0,255})); + connect(g2.pwPin, bus2.p) annotation (Line(points={{-201.4,0},{-201.4,0},{-180,0}}, color={0,0,255})); connect(Line6_7.n, bus7.p) annotation (Line(points={{-68.3333,30},{-68.3333,30},{-60,30}}, color={0,0,255})); connect(Line6_7.p, bus6.p) annotation (Line(points={{-91.6667,30},{-91.6667,30},{-100,30}}, color={0,0,255})); connect(Line5_6.n, bus6.p) annotation (Line(points={{-108.333,30},{-108.333,30},{-100,30}}, color={0,0,255})); @@ -153,21 +148,25 @@ equation connect(Line9_10.n, bus10.p) annotation (Line(points={{91.6667,30},{91.6667,30},{100,30}}, color={0,0,255})); connect(bus10.p, Line10_11.p) annotation (Line(points={{100,30},{108.333,30}}, color={0,0,255})); connect(Line10_11.n, bus11.p) annotation (Line(points={{131.667,30},{131.667,30},{140,30}}, color={0,0,255})); - connect(g4.pwPin, bus4.p) annotation (Line(points={{201,-10},{201,-10},{180,-10}}, color={0,0,255})); - connect(g3.pwPin, bus3.p) annotation (Line(points={{201,30},{180,30}}, color={0,0,255})); - connect(Load7.p, bus7.p) annotation (Line(points={{-70,1.4},{-70,1.4},{-70,30},{-60,30}}, color={0,0,255})); - connect(Load9.p, Line9_10.p) annotation (Line(points={{64,-1.1},{65,-1.1},{65,30},{68.3333,30}}, color={0,0,255})); + connect(g4.pwPin, bus4.p) annotation (Line(points={{201.4,-10},{201.4,-10},{180,-10}}, color={0,0,255})); + connect(g3.pwPin, bus3.p) annotation (Line(points={{201.4,30},{180,30}}, color={0,0,255})); + connect(Load7.p, bus7.p) annotation (Line(points={{-64,1.3},{-64,1.3},{-64,30},{-60,30}}, color={0,0,255})); + connect(Load9.p, Line9_10.p) annotation (Line(points={{65,1.3},{66,1.3},{66,30},{68.3333,30}}, color={0,0,255})); connect(pwFault.p, bus8.p) annotation (Line(points={{2,-4.33333},{2,30},{0,30}}, color={0,0,255})); - connect(bus1.p, Line5_1.p) annotation (Line(points={{-180,30},{-171.667,30},{-171.667,30}}, color={0,0,255})); - connect(bus5.p, Line5_1.n) annotation (Line(points={{-140,30},{-148.333,30},{-148.333,30}}, color={0,0,255})); - connect(bus2.p, Line5_2.p) annotation (Line(points={{-180,-10},{-171.667,-10},{-171.667,-10}}, color={0,0,255})); - connect(Line5_2.n, bus6.p) annotation (Line(points={{-148.333,-10},{-104,-10},{-104,30},{-100,30}}, color={0,0,255})); + connect(bus1.p, Line5_1.p) annotation (Line(points={{-180,30},{-171.667,30}}, color={0,0,255})); + connect(bus5.p, Line5_1.n) annotation (Line(points={{-140,30},{-148.333,30}}, color={0,0,255})); + connect(bus2.p, Line5_2.p) annotation (Line(points={{-180,0},{-171.667,0}}, color={0,0,255})); + connect(Line5_2.n, bus6.p) annotation (Line(points={{-148.333,0},{-104,0},{-104,30},{-100,30}}, color={0,0,255})); connect(bus11.p, Line5_3.p) annotation (Line(points={{140,30},{148.333,30}}, color={0,0,255})); connect(Line5_3.n, bus3.p) annotation (Line(points={{171.667,30},{171.667,30},{180,30}}, color={0,0,255})); connect(bus4.p, Line5_4.n) annotation (Line(points={{180,-10},{171.667,-10}}, color={0,0,255})); connect(Line5_4.p, Line10_11.p) annotation (Line(points={{148.333,-10},{104,-10},{104,30},{108.333,30}}, color={0,0,255})); annotation ( - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220,-40},{220,60}})), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220,-40},{220,60}}), graphics={Text( + extent={{-70,-30},{52,-38}}, + lineColor={28,108,200}, + textString="Two-Area System +Prabha Kundur, \"Power System Stability and Control\", Example 12.6, page 813")}), Icon(coordinateSystem(extent={{-220,-40},{220,60}})), Documentation(revisions=" @@ -190,7 +189,7 @@ equationLast update
Author