Skip to content

Commit

Permalink
Add more synchronous generators (#176)
Browse files Browse the repository at this point in the history
Signed-off-by: Gautier Bureau <gautier.bureau@rte-france.com>
  • Loading branch information
gautierbureau authored Feb 17, 2023
1 parent 03a6ff7 commit 5fe3c06
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 32 deletions.
16 changes: 15 additions & 1 deletion dynawaltz-dsl/src/main/resources/synchronous_generators.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
synchronousGeneratorsLibs {
GeneratorSynchronousFourWindings
GeneratorSynchronousFourWindingsGoverPropVRPropInt
GeneratorSynchronousFourWindingsGovSteam1ExcIEEEST4B
GeneratorSynchronousFourWindingsGovSteam1ExcIEEEST4BPssIEEE2B
GeneratorSynchronousFourWindingsPmConstVRNordic
GeneratorSynchronousFourWindingsPmConstVRNordicTfo
GeneratorSynchronousFourWindingsProportionalRegulations
GeneratorSynchronousFourWindingsProportionalRegulationsStepPm
GeneratorSynchronousFourWindingsTGov1Sexs
GeneratorSynchronousFourWindingsTGov1SexsPss2A
GeneratorSynchronousFourWindingsVRKundur
GeneratorSynchronousFourWindingsVRKundurPssKundur
GeneratorSynchronousProportionalRegulationsInternalParameters
GeneratorSynchronousThreeWindings
GeneratorSynchronousThreeWindingsGoverNordicVRNordic
GeneratorSynchronousThreeWindingsGoverNordicVRNordicTfo
GeneratorSynchronousThreeWindingsGoverPropVRPropInt
GeneratorSynchronousThreeWindingsPmConstVRNordic
GeneratorSynchronousThreeWindingsPmConstVRNordicTfo
GeneratorSynchronousThreeWindingsProportionalRegulations
}
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,6 @@ private void validateGeneratorSynchronous(GeneratorSynchronous generatorSynchron
assertEquals("BBM_" + identifiable.getId(), generatorSynchronous.getDynamicModelId());
assertEquals("GSFWPR", generatorSynchronous.getParameterSetId());
assertTrue(identifiable instanceof Generator);
} else if (generatorSynchronous.getLib().equals("GeneratorSynchronousFourWindingsProportionalRegulationsStepPm")) {
Identifiable<?> identifiable = network.getIdentifiable(generatorSynchronous.getStaticId().orElse(null));
assertEquals("BBM_" + identifiable.getId(), generatorSynchronous.getDynamicModelId());
assertEquals("GSFWPRSP", generatorSynchronous.getParameterSetId());
assertTrue(identifiable instanceof Generator);
} else if (generatorSynchronous.getLib().equals("GeneratorSynchronousThreeWindings")) {
Identifiable<?> identifiable = network.getIdentifiable(generatorSynchronous.getStaticId().orElse(null));
assertEquals("BBM_" + identifiable.getId(), generatorSynchronous.getDynamicModelId());
Expand Down
6 changes: 0 additions & 6 deletions dynawaltz-dsl/src/test/resources/dynamicModels.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ for (Generator gen : network.generators) {
dynamicModelId "BBM_" + gen.id
parameterSetId "GSTW"
}
} else if (gen.id == "GEN5") {
GeneratorSynchronousFourWindingsProportionalRegulationsStepPm {
staticId gen.id
dynamicModelId "BBM_" + gen.id
parameterSetId "GSFWPRSP"
}
} else if (gen.id == "GEN6") {
GeneratorFictitious {
staticId gen.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ public void setup() {
dynamicModels.add(new GeneratorSynchronous("BBM_" + g.getId(), g.getId(), "GSFW", "GeneratorSynchronousFourWindings"));
} else if (g.getId().equals("GEN4")) {
dynamicModels.add(new GeneratorSynchronous("BBM_" + g.getId(), g.getId(), "GSTW", "GeneratorSynchronousThreeWindings"));
} else if (g.getId().equals("GEN5")) {
dynamicModels.add(new GeneratorSynchronous("BBM_" + g.getId(), g.getId(), "GSFWPRSP", "GeneratorSynchronousFourWindingsProportionalRegulationsStepPm"));
} else if (g.getId().equals("GEN6")) {
dynamicModels.add(new GeneratorFictitious("BBM_" + g.getId(), g.getId(), "GF"));
} else {
Expand Down
22 changes: 4 additions & 18 deletions dynawaltz/src/test/resources/dyd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<dyn:blackBoxModel id="BBM_GEN4" lib="GeneratorSynchronousThreeWindings" parFile="models.par" parId="GSTW" staticId="GEN4">
<dyn:macroStaticRef id="MSR_GeneratorSynchronousThreeWindings"/>
</dyn:blackBoxModel>
<dyn:blackBoxModel id="BBM_GEN5" lib="GeneratorSynchronousFourWindingsProportionalRegulationsStepPm" parFile="models.par" parId="GSFWPRSP" staticId="GEN5">
<dyn:macroStaticRef id="MSR_GeneratorSynchronousFourWindingsProportionalRegulationsStepPm"/>
<dyn:blackBoxModel id="BBM_GEN5" lib="GeneratorSynchronousThreeWindingsProportionalRegulations" parFile="models.par" parId="GSTWPR" staticId="GEN5">
<dyn:macroStaticRef id="MSR_GeneratorSynchronousThreeWindingsProportionalRegulations"/>
</dyn:blackBoxModel>
<dyn:blackBoxModel id="BBM_GEN6" lib="GeneratorFictitious" parFile="models.par" parId="GF" staticId="GEN6">
<dyn:macroStaticRef id="MSR_GeneratorFictitious"/>
Expand Down Expand Up @@ -58,10 +58,6 @@
<dyn:connect var1="generator_terminal" var2="@NAME@_ACPIN"/>
<dyn:connect var1="generator_switchOffSignal1" var2="@NAME@_switchOff"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_GeneratorSynchronousFourWindingsProportionalRegulationsStepPm-NetworkBus">
<dyn:connect var1="generator_terminal" var2="@NAME@_ACPIN"/>
<dyn:connect var1="generator_switchOffSignal1" var2="@NAME@_switchOff"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_GeneratorFictitious-NetworkBus">
<dyn:connect var1="generator_terminal" var2="@NAME@_ACPIN"/>
<dyn:connect var1="generator_switchOffSignal1" var2="@NAME@_switchOff"/>
Expand Down Expand Up @@ -104,11 +100,6 @@
<dyn:connect var1="omegaRef_grp_@INDEX@" var2="generator_omegaRefPu"/>
<dyn:connect var1="running_grp_@INDEX@" var2="generator_running"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_DYNModelOmegaRef-GeneratorSynchronousFourWindingsProportionalRegulationsStepPm">
<dyn:connect var1="omega_grp_@INDEX@" var2="generator_omegaPu"/>
<dyn:connect var1="omegaRef_grp_@INDEX@" var2="generator_omegaRefPu"/>
<dyn:connect var1="running_grp_@INDEX@" var2="generator_running"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_DYNModelOmegaRef-NetworkBus">
<dyn:connect var1="numcc_node_@INDEX@" var2="@NAME@_numcc"/>
</dyn:macroConnector>
Expand Down Expand Up @@ -145,11 +136,6 @@
<dyn:staticRef var="generator_QGenPu" staticVar="q"/>
<dyn:staticRef var="generator_state" staticVar="state"/>
</dyn:macroStaticReference>
<dyn:macroStaticReference id="MSR_GeneratorSynchronousFourWindingsProportionalRegulationsStepPm">
<dyn:staticRef var="generator_PGenPu" staticVar="p"/>
<dyn:staticRef var="generator_QGenPu" staticVar="q"/>
<dyn:staticRef var="generator_state" staticVar="state"/>
</dyn:macroStaticReference>
<dyn:macroStaticReference id="MSR_GeneratorFictitious">
<dyn:staticRef var="generator_PGenPu" staticVar="p"/>
<dyn:staticRef var="generator_QGenPu" staticVar="q"/>
Expand All @@ -161,7 +147,7 @@
<dyn:macroConnect connector="MC_GeneratorSynchronousFourWindingsProportionalRegulations-NetworkBus" id1="BBM_GEN2" id2="NETWORK" name2="NGEN"/>
<dyn:macroConnect connector="MC_GeneratorSynchronousFourWindings-NetworkBus" id1="BBM_GEN3" id2="NETWORK" name2="NGEN"/>
<dyn:macroConnect connector="MC_GeneratorSynchronousThreeWindings-NetworkBus" id1="BBM_GEN4" id2="NETWORK" name2="NGEN"/>
<dyn:macroConnect connector="MC_GeneratorSynchronousFourWindingsProportionalRegulationsStepPm-NetworkBus" id1="BBM_GEN5" id2="NETWORK" name2="NGEN"/>
<dyn:macroConnect connector="MC_GeneratorSynchronousThreeWindingsProportionalRegulations-NetworkBus" id1="BBM_GEN5" id2="NETWORK" name2="NGEN"/>
<dyn:macroConnect connector="MC_GeneratorFictitious-NetworkBus" id1="BBM_GEN6" id2="NETWORK" name2="NGEN"/>
<dyn:macroConnect connector="MC_GeneratorSynchronousThreeWindingsProportionalRegulations-Bus" id1="BBM_NHV1_1" id2="BBM_NHV1" name2="NHV1"/>
<dyn:macroConnect connector="MC_Line-Bus" id1="Line_NHV1_NHV2_1" id2="BBM_NHV1" name2="NHV1"/>
Expand All @@ -172,7 +158,7 @@
<dyn:macroConnect connector="MC_DYNModelOmegaRef-GeneratorSynchronousFourWindingsProportionalRegulations" id1="OMEGA_REF" index1="1" id2="BBM_GEN2"/>
<dyn:macroConnect connector="MC_DYNModelOmegaRef-GeneratorSynchronousFourWindings" id1="OMEGA_REF" index1="2" id2="BBM_GEN3"/>
<dyn:macroConnect connector="MC_DYNModelOmegaRef-GeneratorSynchronousThreeWindings" id1="OMEGA_REF" index1="3" id2="BBM_GEN4"/>
<dyn:macroConnect connector="MC_DYNModelOmegaRef-GeneratorSynchronousFourWindingsProportionalRegulationsStepPm" id1="OMEGA_REF" index1="4" id2="BBM_GEN5"/>
<dyn:macroConnect connector="MC_DYNModelOmegaRef-GeneratorSynchronousThreeWindingsProportionalRegulations" id1="OMEGA_REF" index1="4" id2="BBM_GEN5"/>
<dyn:macroConnect connector="MC_DYNModelOmegaRef-GeneratorSynchronousThreeWindingsProportionalRegulations" id1="OMEGA_REF" index1="5" id2="BBM_NHV1_1"/>
<dyn:macroConnect connector="MC_DYNModelOmegaRef-NetworkBus" id1="OMEGA_REF" index1="0" id2="NETWORK" name2="NGEN"/>
<dyn:macroConnect connector="MC_DYNModelOmegaRef-NetworkBus" id1="OMEGA_REF" index1="1" id2="NETWORK" name2="NGEN"/>
Expand Down

0 comments on commit 5fe3c06

Please sign in to comment.