Skip to content

Commit c402e79

Browse files
committed
Removed the parameter prefix from record components
- Parameter records should be declared as parameter rather than each field being a parameter (because you can then assign to these components in functions other than the record constructor) - Note that previous changes added the parameter prefix to the declaration of the components (since a record where all fields are parameters is not a parameter)
1 parent 425fc8b commit c402e79

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

PowerSystems/AC1ph_DC/Machines.mo

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,11 @@ package Parameters "Parameter data for interactive use"
562562
record DCser "DC machine parameters series excited"
563563
extends Basic.Nominal.NominalDataDC(w_nom=157.079632679489661923);
564564

565-
parameter Integer pp=2 "pole-pair nb";
566-
parameter SIpu.Inductance l_fd=0.15 "inductance field (d-axis)";
567-
parameter SIpu.Resistance r_fd=0.01 "resistance field (d-axis)";
568-
parameter SIpu.Inductance l_q=0.5 "inductance armature+ (q-axis)";
569-
parameter SIpu.Resistance r_q=0.05 "resistance armature+ (q-axis)";
565+
Integer pp=2 "pole-pair nb";
566+
SIpu.Inductance l_fd=0.15 "inductance field (d-axis)";
567+
SIpu.Resistance r_fd=0.01 "resistance field (d-axis)";
568+
SIpu.Inductance l_q=0.5 "inductance armature+ (q-axis)";
569+
SIpu.Resistance r_q=0.05 "resistance armature+ (q-axis)";
570570

571571
annotation (defaultComponentName="dc_serPar",
572572
Window(
@@ -592,13 +592,13 @@ end DCser;
592592
record DCpar "DC machine parameters parallel excited"
593593
extends Basic.Nominal.NominalDataDC(w_nom=157.079632679489661923);
594594

595-
parameter SI.Voltage Vf_nom=1 "nom field voltage"
595+
SI.Voltage Vf_nom=1 "nom field voltage"
596596
annotation(Evaluate=true, Dialog(group="Nominal"));
597-
parameter Integer pp=2 "pole-pair nb";
598-
parameter SIpu.Inductance l_fd=100*pi "inductance field (d-axis)";
599-
parameter SIpu.Resistance r_fd=100 "resistance field (d-axis)";
600-
parameter SIpu.Inductance l_q=0.5 "inductance armature+ (q-axis)";
601-
parameter SIpu.Resistance r_q=0.05 "resistance armature+ (q-axis)";
597+
Integer pp=2 "pole-pair nb";
598+
SIpu.Inductance l_fd=100*pi "inductance field (d-axis)";
599+
SIpu.Resistance r_fd=100 "resistance field (d-axis)";
600+
SIpu.Inductance l_q=0.5 "inductance armature+ (q-axis)";
601+
SIpu.Resistance r_q=0.05 "resistance armature+ (q-axis)";
602602

603603
annotation (defaultComponentName="dc_parPar",
604604
Window(
@@ -624,9 +624,9 @@ end DCpar;
624624
record DCpm "DC machine parameters permanent magnet excited"
625625
extends Basic.Nominal.NominalDataDC(w_nom=157.079632679489661923);
626626

627-
parameter Integer pp=2 "pole-pair nb";
628-
parameter SIpu.Inductance l_aq=0.5 "inductance armature (q-axis)";
629-
parameter SIpu.Resistance r_aq=0.05 "resistance armature (q-axis)";
627+
Integer pp=2 "pole-pair nb";
628+
SIpu.Inductance l_aq=0.5 "inductance armature (q-axis)";
629+
SIpu.Resistance r_aq=0.05 "resistance armature (q-axis)";
630630

631631
annotation (defaultComponentName="dc_pmPar",
632632
Window(
@@ -672,10 +672,10 @@ package Coefficients "Coefficient matrices of machine equations"
672672
record DCser "Coefficients of DC machine series excited"
673673
extends Modelica.Icons.Record;
674674

675-
final parameter SI.Inductance L "series inductance";
676-
final parameter SI.Resistance[2] R
675+
SI.Inductance L "series inductance";
676+
SI.Resistance[2] R
677677
"resistance {d (field), q (armature)} axis";
678-
final parameter SI.Inductance L_md "mutual inductance";
678+
SI.Inductance L_md "mutual inductance";
679679

680680
annotation (defaultComponentName="data",
681681
Window(
@@ -701,11 +701,11 @@ end DCser;
701701
record DCpar "Coefficients of DC machine parallel excited"
702702
extends Modelica.Icons.Record;
703703

704-
final parameter SI.Inductance[2] L
704+
SI.Inductance[2] L
705705
"inductance {d (field), q (armature)} axis";
706-
final parameter SI.Resistance[2] R
706+
SI.Resistance[2] R
707707
"resistance {d (field), q (armature)} axis";
708-
final parameter SI.Inductance L_md "mutual inductance";
708+
SI.Inductance L_md "mutual inductance";
709709

710710
annotation (defaultComponentName="data",
711711
Window(
@@ -731,9 +731,9 @@ end DCpar;
731731
record DCpm "Coefficients of DC machine permanent magnet excited"
732732
extends Modelica.Icons.Record;
733733

734-
final parameter SI.Resistance R "resistance";
735-
final parameter SI.Inductance L "inductance";
736-
final parameter SI.MagneticFlux Psi_pm "flux permanent magnet";
734+
SI.Resistance R "resistance";
735+
SI.Inductance L "inductance";
736+
SI.MagneticFlux Psi_pm "flux permanent magnet";
737737

738738
annotation (defaultComponentName="data",
739739
Window(

PowerSystems/Basic/Nominal.mo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ end NominalDC;
119119

120120
record NominalData "Units and nominal data"
121121
extends Modelica.Icons.Record;
122-
parameter Boolean puUnits = true
122+
Boolean puUnits = true
123123
"= true, if scaled with nom. values (pu), else scaled with 1 (SI)"
124124
annotation(Evaluate=true, Dialog(group="Parameter Scaling"));
125125

126-
parameter SI.Voltage V_nom(final min=0)=1 "nominal Voltage (= base for pu)"
126+
SI.Voltage V_nom(final min=0)=1 "nominal Voltage (= base for pu)"
127127
annotation(Evaluate=true, Dialog(group="Nominal"));
128128

129-
parameter SI.ApparentPower S_nom(final min=0)=1
129+
SI.ApparentPower S_nom(final min=0)=1
130130
"nominal Power (= base for pu)"
131131
annotation(Evaluate=true, Dialog(group="Nominal"));
132132

0 commit comments

Comments
 (0)