-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
- Loading branch information
1 parent
9328e3c
commit 0c6f33a
Showing
20 changed files
with
550 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...dm-extensions/src/main/java/com/powsybl/iidm/network/extensions/AbstractShortCircuit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.extensions; | ||
|
||
import com.powsybl.commons.extensions.Extendable; | ||
import com.powsybl.commons.extensions.Extension; | ||
|
||
/** | ||
* | ||
* @author Coline Piloquet {@literal <coline.piloquet@rte-france.fr>} | ||
*/ | ||
public interface AbstractShortCircuit<T extends Extendable<T>> extends Extension<T> { | ||
|
||
/** | ||
* Get the direct-axis sub-transient reactance (also known as X''d) | ||
*/ | ||
double getDirectSubtransX(); | ||
|
||
/** | ||
* Set the direct-axis sub-transient reactance (also known as X''d) | ||
*/ | ||
AbstractShortCircuit<T> setDirectSubtransX(double directSubtransX); | ||
|
||
/** | ||
* Get the direct-axis transient reactance (also known as X'd) | ||
*/ | ||
double getDirectTransX(); | ||
|
||
/** | ||
* Set the direct-axis transient reactance (also known as X'd) | ||
*/ | ||
AbstractShortCircuit<T> setDirectTransX(double directTransX); | ||
|
||
/** | ||
* Get the step-up transformer reactance if the generator has a non-modeled step-up transformer. | ||
*/ | ||
double getStepUpTransformerX(); | ||
|
||
/** | ||
* Set the step-up transformer reactance | ||
*/ | ||
AbstractShortCircuit<T> setStepUpTransformerX(double setUpTransformerX); | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...tensions/src/main/java/com/powsybl/iidm/network/extensions/AbstractShortCircuitAdder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright (c) 2021, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.extensions; | ||
|
||
import com.powsybl.commons.PowsyblException; | ||
import com.powsybl.commons.extensions.Extendable; | ||
import com.powsybl.commons.extensions.ExtensionAdder; | ||
|
||
/** | ||
* | ||
* @author Coline Piloquet {@literal <coline.piloquet@rte-france.fr>} | ||
*/ | ||
public interface AbstractShortCircuitAdder<T extends Extendable<T>, C extends AbstractShortCircuit<T>> extends ExtensionAdder<T, C> { | ||
|
||
@Override | ||
default Class<C> getExtensionClass() { | ||
throw new PowsyblException("Not yet implemented"); | ||
} | ||
|
||
AbstractShortCircuitAdder<T, C> withDirectTransX(double directTransX); | ||
|
||
AbstractShortCircuitAdder<T, C> withDirectSubtransX(double direcSubtransX); | ||
|
||
AbstractShortCircuitAdder<T, C> withStepUpTransformerX(double stepUpTransformerX); | ||
} |
23 changes: 23 additions & 0 deletions
23
...idm-extensions/src/main/java/com/powsybl/iidm/network/extensions/BatteryShortCircuit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.extensions; | ||
|
||
import com.powsybl.iidm.network.Battery; | ||
|
||
/** | ||
* @author Coline Piloquet {@literal <coline.piloquet@rte-france.fr>} | ||
*/ | ||
public interface BatteryShortCircuit extends AbstractShortCircuit<Battery> { | ||
|
||
String NAME = "batteryShortCircuit"; | ||
|
||
@Override | ||
default String getName() { | ||
return NAME; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...xtensions/src/main/java/com/powsybl/iidm/network/extensions/BatteryShortCircuitAdder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.extensions; | ||
|
||
import com.powsybl.iidm.network.Battery; | ||
|
||
/** | ||
* @author Coline Piloquet {@literal <coline.piloquet@rte-france.fr>} | ||
*/ | ||
public interface BatteryShortCircuitAdder extends AbstractShortCircuitAdder<Battery, BatteryShortCircuit> { | ||
|
||
@Override | ||
default Class<BatteryShortCircuit> getExtensionClass() { | ||
return BatteryShortCircuit.class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...impl/src/main/java/com/powsybl/iidm/network/impl/extensions/AbstractShortCircuitImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* Copyright (c) 2021, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
package com.powsybl.iidm.network.impl.extensions; | ||
|
||
import com.powsybl.commons.PowsyblException; | ||
import com.powsybl.commons.extensions.AbstractExtension; | ||
import com.powsybl.commons.extensions.Extendable; | ||
import com.powsybl.iidm.network.extensions.AbstractShortCircuit; | ||
|
||
/** | ||
* | ||
* @author Coline Piloquet {@literal <coline.piloquet@rte-france.fr>} | ||
*/ | ||
public abstract class AbstractShortCircuitImpl<T extends Extendable<T>> extends AbstractExtension<T> | ||
implements AbstractShortCircuit<T> { | ||
|
||
private double directSubtransX; // X''d | ||
private double directTransX; // X'd | ||
private double stepUpTransformerX; // Reactance of the step-up transformer | ||
|
||
protected AbstractShortCircuitImpl(T extendable, double directSubtransX, double directTransX, | ||
double stepUpTransformerX) { | ||
super(extendable); | ||
this.directSubtransX = directSubtransX; | ||
this.directTransX = directTransX; | ||
this.stepUpTransformerX = stepUpTransformerX; | ||
} | ||
|
||
@Override | ||
public double getDirectSubtransX() { | ||
return directSubtransX; | ||
} | ||
|
||
@Override | ||
public AbstractShortCircuitImpl<T> setDirectSubtransX(double directSubtransX) { | ||
this.directSubtransX = directSubtransX; | ||
return this; | ||
} | ||
|
||
@Override | ||
public double getDirectTransX() { | ||
return directTransX; | ||
} | ||
|
||
@Override | ||
public AbstractShortCircuitImpl<T> setDirectTransX(double directTransX) { | ||
if (Double.isNaN(directTransX)) { | ||
throw new PowsyblException("Undefined directTransX"); | ||
} | ||
this.directTransX = directTransX; | ||
return this; | ||
} | ||
|
||
@Override | ||
public double getStepUpTransformerX() { | ||
return stepUpTransformerX; | ||
} | ||
|
||
@Override | ||
public AbstractShortCircuitImpl<T> setStepUpTransformerX(double stepUpTransformerX) { | ||
this.stepUpTransformerX = stepUpTransformerX; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.