Skip to content

Commit

Permalink
#2292 first adaption of Modelica library (connectors)
Browse files Browse the repository at this point in the history
closes #2292

Signed-off-by: Florentine Rosiere <[email protected]>
  • Loading branch information
rosiereflo committed Feb 14, 2025
1 parent eca06a6 commit bf9d9fa
Show file tree
Hide file tree
Showing 114 changed files with 417 additions and 404 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ model GridFormingControl_INIT "Initialization model for the grid forming control
parameter Types.CurrentModulePu IMaxVI "Maximum current before activating the virtual impedance in pu (base UNom, SNom)";

Types.PerUnit IdcSourceRef0Pu "Start value of DC current reference in pu (base UdcNom, SNom)";
Types.PerUnit IdcSource0Pu "Start value of DC current in pu (base UdcNom, SNom)";
Types.PerUnit UdcSource0Pu "Start value of DC voltage in pu (base UdcNom)";
Types.PerUnitConnector IdcSource0Pu "Start value of DC current in pu (base UdcNom, SNom)";
Types.PerUnitConnector UdcSource0Pu "Start value of DC voltage in pu (base UdcNom)";
Types.PerUnit UdcSourceRef0Pu "Start value of DC voltage reference in pu (base UdcNom)";
Types.PerUnit UdConv0Pu "Start value of d-axis modulation voltage in pu (base UNom)";
Types.PerUnit UqConv0Pu "Start value of q-axis modulation voltage in pu (base UNom)";
Types.PerUnit IdConv0Pu "Start value of d-axis current in the converter in pu (base UNom, SNom) (generator convention)";
Types.PerUnit IqConv0Pu "Start value of q-axis current in the converter in pu (base UNom, SNom) (generator convention)";
Types.PerUnitConnector UdConv0Pu "Start value of d-axis modulation voltage in pu (base UNom)";
Types.PerUnitConnector UqConv0Pu "Start value of q-axis modulation voltage in pu (base UNom)";
Types.PerUnitConnector IdConv0Pu "Start value of d-axis current in the converter in pu (base UNom, SNom) (generator convention)";
Types.PerUnitConnector IqConv0Pu "Start value of q-axis current in the converter in pu (base UNom, SNom) (generator convention)";
Types.ActivePowerPu PRef0Pu "Start value of the active power reference at the converter's capacitor in pu (base SNom) (generator convention)";
Types.ReactivePowerPu QRef0Pu "Start value of the reactive power reference at the converter's capacitor in pu (base SNom) (generator convention)";
Types.PerUnit IdPcc0Pu "Start value of d-axis current in the grid in pu (base UNom, SNom) (generator convention)";
Types.PerUnit IqPcc0Pu "Start value of q-axis current in the grid in pu (base UNom, SNom) (generator convention)";
Types.PerUnit UdFilter0Pu "Start value of d-axis voltage at the converter's capacitor in pu (base UNom)";
Types.PerUnit UqFilter0Pu "Start value of q-axis voltage at the converter's capacitor in pu (base UNom)";
Types.Angle Theta0 "Start value of phase shift between the converter's rotating frame and the grid rotating frame in rad";
Types.ActivePowerPu PFilter0Pu "Start value of active power generated at the converter's capacitor in pu (base SNom) (generator convention)";
Types.ReactivePowerPu QFilter0Pu "Start value of reactive power generated at the converter's capacitor in pu (base SNom) (generator convention)";
Types.PerUnitConnector IdPcc0Pu "Start value of d-axis current in the grid in pu (base UNom, SNom) (generator convention)";
Types.PerUnitConnector IqPcc0Pu "Start value of q-axis current in the grid in pu (base UNom, SNom) (generator convention)";
Types.PerUnitConnector UdFilter0Pu "Start value of d-axis voltage at the converter's capacitor in pu (base UNom)";
Types.PerUnitConnector UqFilter0Pu "Start value of q-axis voltage at the converter's capacitor in pu (base UNom)";
Types.AngleConnector Theta0 "Start value of phase shift between the converter's rotating frame and the grid rotating frame in rad";
Types.ActivePowerPuConnector PFilter0Pu "Start value of active power generated at the converter's capacitor in pu (base SNom) (generator convention)";
Types.ReactivePowerPuConnector QFilter0Pu "Start value of reactive power generated at the converter's capacitor in pu (base SNom) (generator convention)";
Types.VoltageModulePu UFilterRef0Pu "Start value of voltage module reference at the converter's capacitor in pu (base UNom)";
Types.CurrentModulePu IConvSquare0Pu "Start value of square current in the converter in pu (base UNom, SNom)";
Types.CurrentModulePu DeltaIConvSquare0Pu "Start value of extra square current in the converter in pu (base UNom, SNom)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ within Dynawo.Electrical.Controls.Machines.Governors;
model GovernorPmPGen_INIT "Initialisation model for governors with generated electric active power input PGenPu"
extends AdditionalIcons.Init;

Types.ActivePowerPu PGen0Pu "Initial generated electric active power in pu (base SnRef (system base)) (generator convention)";
Types.ActivePowerPu Pm0Pu "Initial mechanical power in pu (base PNomTurb)";
Types.ActivePowerPuConnector PGen0Pu "Initial generated electric active power in pu (base SnRef (system base)) (generator convention)";
Types.ActivePowerPuConnector Pm0Pu "Initial mechanical power in pu (base PNomTurb)";

annotation(preferredView = "text");
end GovernorPmPGen_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ within Dynawo.Electrical.Controls.Machines.Governors;
model Governor_INIT "Initialisation model for governor"
extends AdditionalIcons.Init;

Types.ActivePowerPu Pm0Pu(start = 1) "Initial mechanical power in pu (base PNomTurb)";
Types.ActivePowerPuConnector Pm0Pu(start = 1) "Initial mechanical power in pu (base PNomTurb)";

annotation(preferredView = "text");
end Governor_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ within Dynawo.Electrical.Controls.Machines.OverExcitationLimiters.Standard;
model Oel23c_INIT "IEEE overexcitation limiter types OEL2C and OEL3C initialization model"
extends AdditionalIcons.Init;

Types.PerUnit Input0Pu "Initial input signal";
Types.PerUnitConnector Input0Pu "Initial input signal";

annotation(preferredView = "text");
end Oel23c_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ within Dynawo.Electrical.Controls.Machines.OverExcitationLimiters.Standard;
model Oel4c_INIT "IEEE overexcitation limiter type OEL4C initialization model"
extends AdditionalIcons.Init;

Types.ReactivePowerPu QGen0Pu "Initial reactive power in pu (base SnRef) (generator convention)";
Types.ReactivePowerPuConnector QGen0Pu "Initial reactive power in pu (base SnRef) (generator convention)";

annotation(preferredView = "text");
end Oel4c_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ within Dynawo.Electrical.Controls.Machines.PowerSystemStabilizers;
model Pss_INIT "Initialization model for power system stabilizer"
extends AdditionalIcons.Init;

Types.ActivePowerPu PGen0Pu "Initial active power in pu (base SnRef) (generator convention)";
Types.ActivePowerPuConnector PGen0Pu "Initial active power in pu (base SnRef) (generator convention)";

annotation(preferredView = "text");
end Pss_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ within Dynawo.Electrical.Controls.Machines.ReactivePowerControlLoops;
model ReactivePowerControlLoop_INIT "Initialisation model for the Reactive Power Control Loop (RPCL)"
extends AdditionalIcons.Init;

Types.VoltageModulePu UStatorRef0Pu "Start value of the generator stator voltage reference in pu (base UNom)";
Types.ReactivePowerPu QStator0Pu "Start value of the generator stator reactive power in pu (base QNomAlt) (generator convention)";
Boolean limUQUp0 "Whether the maximum reactive power limits are reached or not (from generator voltage regulator), start value";
Boolean limUQDown0 "Whether the minimum reactive power limits are reached or not (from generator voltage regulator), start value";
Types.VoltageModulePuConnector UStatorRef0Pu "Start value of the generator stator voltage reference in pu (base UNom)";
Types.ReactivePowerPuConnector QStator0Pu "Start value of the generator stator reactive power in pu (base QNomAlt) (generator convention)";
Modelica.Blocks.Interfaces.BooleanInput limUQUp0 "Whether the maximum reactive power limits are reached or not (from generator voltage regulator), start value";
Modelica.Blocks.Interfaces.BooleanInput limUQDown0 "Whether the minimum reactive power limits are reached or not (from generator voltage regulator), start value";

annotation(preferredView = "text");
end ReactivePowerControlLoop_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ within Dynawo.Electrical.Controls.Machines.StatorCurrentLimiters.Standard;
model Scl1c_INIT "IEEE overexcitation limiter type SCL1C initialization model"
extends AdditionalIcons.Init;

Types.ComplexCurrentPu it0Pu "Initial complex stator current in pu (base SnRef, UNom)";
Types.ReactivePowerPu QGen0Pu "Initial reactive power in pu (base SnRef) (generator convention)";
Types.ComplexVoltagePu ut0Pu "Initial complex stator voltage in pu (base UNom)";
Types.ComplexCurrentPuConnector it0Pu "Initial complex stator current in pu (base SnRef, UNom)";
Types.ReactivePowerPuConnector QGen0Pu "Initial reactive power in pu (base SnRef) (generator convention)";
Types.ComplexVoltagePuConnector ut0Pu "Initial complex stator voltage in pu (base UNom)";

annotation(preferredView = "text");
end Scl1c_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ within Dynawo.Electrical.Controls.Machines.StatorCurrentLimiters.Standard;
model Scl2c_INIT "IEEE overexcitation limiter type SCL2C initialization model"
extends AdditionalIcons.Init;

Types.ComplexCurrentPu it0Pu "Initial complex stator current in pu (base SnRef, UNom)";
Types.ActivePowerPu PGen0Pu "Initial active power in pu (base SnRef) (generator convention)";
Types.ReactivePowerPu QGen0Pu "Initial reactive power in pu (base SnRef) (generator convention)";
Types.ComplexVoltagePu ut0Pu "Initial complex stator voltage in pu (base UNom)";
Types.ComplexCurrentPuConnector it0Pu "Initial complex stator current in pu (base SnRef, UNom)";
Types.ActivePowerPuConnector PGen0Pu "Initial active power in pu (base SnRef) (generator convention)";
Types.ReactivePowerPuConnector QGen0Pu "Initial reactive power in pu (base SnRef) (generator convention)";
Types.ComplexVoltagePuConnector ut0Pu "Initial complex stator voltage in pu (base UNom)";

annotation(preferredView = "text");
end Scl2c_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ within Dynawo.Electrical.Controls.Machines.UnderExcitationLimiters.Standard;
model Uel1_INIT "IEEE overexcitation limiter type UEL1 initialization model"
extends AdditionalIcons.Init;

Types.ComplexCurrentPu it0Pu "Initial complex stator current in pu (base SnRef, UNom)";
Types.ComplexVoltagePu ut0Pu "Initial complex stator voltage in pu (base UNom)";
Types.ComplexCurrentPuConnector it0Pu "Initial complex stator current in pu (base SnRef, UNom)";
Types.ComplexVoltagePuConnector ut0Pu "Initial complex stator voltage in pu (base UNom)";

annotation(preferredView = "text");
end Uel1_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ model Uel2c_INIT "IEEE overexcitation limiter type UEL2C initialization model"
parameter String FPQTableName "Name of table in text file for the reactive power as a function of active power";
parameter String TablesFile "Text file that contains the table for the fpq function";

Types.ActivePowerPu PGen0Pu "Initial active power in pu (base SnRef) (generator convention)";
Types.ReactivePowerPu QGen0Pu "Initial reactive power in pu (base SnRef) (generator convention)";
Types.ActivePowerPuConnector PGen0Pu "Initial active power in pu (base SnRef) (generator convention)";
Types.ReactivePowerPuConnector QGen0Pu "Initial reactive power in pu (base SnRef) (generator convention)";
Types.ReactivePowerPu QRef0Pu "Initial reference reactive power in pu (base SnRef) (generator convention)";
Types.VoltageModulePu U0Pu "Initial voltage amplitude at terminal in pu (base UNom)";
Types.VoltageModulePu UsRef0Pu "Initial reference stator voltage in pu (base UNom)";
Types.ComplexVoltagePu ut0Pu "Initial complex stator voltage in pu (base UNom)";
Types.VoltageModulePuConnector UsRef0Pu "Initial reference stator voltage in pu (base UNom)";
Types.ComplexVoltagePuConnector ut0Pu "Initial complex stator voltage in pu (base UNom)";
Types.VoltageModulePu VBias0Pu "Initial calculated voltage bias in pu (base UNom)";

Modelica.Blocks.Tables.CombiTable1Ds combiTable1DsInit(fileName = TablesFile, tableName = FPQTableName, tableOnFile = true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ within Dynawo.Electrical.Controls.Machines.VoltageRegulators;
model Exciter_INIT "Initialization model for exciter"
extends AdditionalIcons.Init;

Types.VoltageModulePu Efd0Pu "Initial excitation voltage in pu (user-selected base voltage)";
Types.VoltageModulePu Us0Pu "Initial stator voltage in pu (base UNom)";
Types.VoltageModulePuConnector Efd0Pu "Initial excitation voltage in pu (user-selected base voltage)";
Types.VoltageModulePuConnector Us0Pu "Initial stator voltage in pu (base UNom)";

annotation(preferredView = "text");
end Exciter_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ within Dynawo.Electrical.Controls.Machines.VoltageRegulators.Simplified;
model VRNordic_INIT "Voltage regulator initialization model for the Nordic 32 test system used for voltage stability studies"
extends Dynawo.Electrical.Controls.Machines.VoltageRegulators.Exciter_INIT;

Types.CurrentModulePu Ir0Pu "Initial rotor current in pu (base SNom, UNom)";
Types.CurrentModulePuConnector Ir0Pu "Initial rotor current in pu (base SNom, UNom)";

annotation(preferredView = "text");
end VRNordic_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ model VRProportionalIntegral_INIT "Proportional integral voltage regulator initi
parameter Types.VoltageModulePu EfdMinPu "Minimum allowed exciter field voltage in pu (user-selected base voltage)";
parameter Types.PerUnit Gain "Control gain";

Types.VoltageModulePu Efd0PuLF "Initial exciter field voltage from LoadFlow in pu (user-selected base voltage)";
Types.VoltageModulePuConnector Efd0PuLF "Initial exciter field voltage from LoadFlow in pu (user-selected base voltage)";
Types.VoltageModulePu UsRef0Pu "Initial reference stator voltage in pu (base UNom)";
Types.VoltageModulePu yIntegrator0 "Initial integrator output in pu (user-selected base voltage)";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ model VRProportional_INIT "Simple proportional voltage regulator initialization
parameter Types.VoltageModulePu EfdMinPu "Minimum allowed exciter field voltage in pu (user-selected base voltage)";
parameter Types.PerUnit Gain "Control gain";

Types.VoltageModulePu Efd0PuLF "Initial exciter field voltage from LoadFlow in pu (user-selected base voltage)";
Types.VoltageModulePuConnector Efd0PuLF "Initial exciter field voltage from LoadFlow in pu (user-selected base voltage)";
Types.VoltageModulePu UsRef0Pu "Initial reference stator voltage in pu (base UNom)";

LimiterWithLag_INIT limiterWithLag(UMax = EfdMaxPu, UMin = EfdMinPu);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ model Ac168_INIT "IEEE excitation system types AC1C, AC6A, AC6C and AC8B initial
parameter Types.VoltageModulePu VfeMaxPu "Maximum exciter field current signal in pu (user-selected base voltage)";

Types.VoltageModulePu Efe0Pu "Initial output voltage of voltage regulator in pu (user-selected base voltage)";
Types.CurrentModulePu Ir0Pu "Initial rotor current in pu (base SNom, user-selected base voltage)";
Types.CurrentModulePuConnector Ir0Pu "Initial rotor current in pu (base SNom, user-selected base voltage)";
Types.VoltageModulePu Ve0Pu "Initial exciter output voltage in pu (user-selected base voltage)";
Types.VoltageModulePu VeMax0Pu "Maximum exciter output voltage in pu (user-selected base voltage)";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ model Ac7b_INIT "IEEE excitation system type AC7B initialization model"
parameter Types.PerUnit Kp "Potential source gain";

//Input parameters
Types.ComplexCurrentPu it0Pu "Initial complex stator current in pu (base SNom, UNom)";
Types.ComplexVoltagePu ut0Pu "Initial complex voltage in pu (base UNom)";
Types.ComplexCurrentPuConnector it0Pu "Initial complex stator current in pu (base SNom, UNom)";
Types.ComplexVoltagePuConnector ut0Pu "Initial complex voltage in pu (base UNom)";

//Output parameter
Types.VoltageModulePu Vb0Pu "Initial available exciter field voltage in pu (base UNom)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ within Dynawo.Electrical.Controls.Machines.VoltageRegulators.Standard;
model ExAc1_INIT "Initialization model of ExAc1"
extends Dynawo.Electrical.Controls.Machines.VoltageRegulators.Exciter_INIT;

Types.CurrentModulePu Ir0Pu "Initial rotor current in pu (base SNom, user-selected base voltage)";
Types.CurrentModulePuConnector Ir0Pu "Initial rotor current in pu (base SNom, user-selected base voltage)";

annotation(preferredView = "true");
end ExAc1_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ within Dynawo.Electrical.Controls.Machines.VoltageRegulators.Standard;
model MAXEX2_INIT "Initialization model of MAXEX2"
extends AdditionalIcons.Init;

Types.CurrentModulePu Ifd0Pu "Initial generator field current in pu (base SNom, user-selected base voltage)";
Types.CurrentModulePuConnector Ifd0Pu "Initial generator field current in pu (base SNom, user-selected base voltage)";

annotation(preferredView = "text");
end MAXEX2_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ within Dynawo.Electrical.Controls.Machines.VoltageRegulators.Standard;
model SCRX_INIT "Initialization model of SCRX"
extends AdditionalIcons.Init;

Types.VoltageModulePu Efd0Pu "Initial excitation voltage in pu (user-selected base voltage)";
Types.CurrentModulePu IRotor0Pu "Initial rotor current in pu (base SNom, user-selected base voltage)";
Types.VoltageModulePu UStator0Pu "Initial stator voltage in pu (base UNom)";
Types.VoltageModulePu Ut0Pu "Generator terminal initial voltage in pu (base UNom)";
Types.VoltageModulePuConnector Efd0Pu "Initial excitation voltage in pu (user-selected base voltage)";
Types.CurrentModulePuConnector IRotor0Pu "Initial rotor current in pu (base SNom, user-selected base voltage)";
Types.VoltageModulePuConnector UStator0Pu "Initial stator voltage in pu (base UNom)";
Types.VoltageModulePuConnector Ut0Pu "Generator terminal initial voltage in pu (base UNom)";

annotation(preferredView = "text");
end SCRX_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ within Dynawo.Electrical.Controls.Machines.VoltageRegulators.Standard;
model St15c_INIT "IEEE excitation system types ST1C and ST5C initialization model"
extends Dynawo.Electrical.Controls.Machines.VoltageRegulators.Exciter_INIT;

Types.CurrentModulePu Ir0Pu "Initial rotor current in pu (base SNom, user-selected base voltage)";
Types.CurrentModulePuConnector Ir0Pu "Initial rotor current in pu (base SNom, user-selected base voltage)";

annotation(preferredView = "text");
end St15c_INIT;
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ model St7c_INIT "IEEE excitation system type ST7C initialization model"
parameter Types.PerUnit Kia "Voltage regulator feedback gain";
parameter Types.PerUnit Kpa "Voltage regulator proportional gain";

Types.VoltageModulePu UsRef0Pu "Initial reference stator voltage in pu (base UNom)";
Types.VoltageModulePuConnector UsRef0Pu "Initial reference stator voltage in pu (base UNom)";

equation
UsRef0Pu = (1 + Kia) * Efd0Pu / Kpa + Us0Pu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ within Dynawo.Electrical.Controls.Protections.BaseClasses;
* This file is part of Dynawo, an hybrid C++/Modelica open source suite of simulation tools for power systems.
*/

partial model BaseDistanceProtectionLine "Base model for line distance protection"
model BaseDistanceProtectionLine "Base model for line distance protection"
import Modelica.Constants;
import Modelica.Math.BooleanVectors.anyTrue;
import Dynawo.NonElectrical.Logs.Timeline;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ within Dynawo.Electrical.Controls.Protections.BaseClasses;
* This file is part of Dynawo, an hybrid C++/Modelica open source suite of simulation tools for power systems.
*/

partial model BaseUFLS "Base model for under-frequency load shedding relays"
model BaseUFLS "Base model for under-frequency load shedding relays"
import Modelica.Constants;
import Dynawo.NonElectrical.Logs.Timeline;
import Dynawo.NonElectrical.Logs.TimelineKeys;
Expand Down
Loading

0 comments on commit bf9d9fa

Please sign in to comment.