Skip to content

Commit b6f96fc

Browse files
Extend azimuth angle range to [-180°, 180°] for PV inputs
1 parent 4fb7159 commit b6f96fc

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313
- Updated dependabot workflow and added CODEOWNERS [#1328](https://github.com/ie3-institute/PowerSystemDataModel/issues/1328)
14+
- Extend azimuth angle range to [-180°, 180°] for PV inputs [#1330](https://github.com/ie3-institute/PowerSystemDataModel/issues/1330)
1415

1516
## [7.0.0] - 2025-05-08
1617

docs/readthedocs/models/input/participant/pv.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ Detailed model of a photovoltaic power plant.
4444
4545
* - azimuth
4646
- °
47-
- Inclination in a compass direction
48-
South = 0°, West = 90°, East = -90°
47+
- South = 0°, West = 90°, East = -90°, North = +/- 180°
4948
5049
* - etaConv
5150
- %

src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ private static List<Try<Void, InvalidEntityException>> checkLoad(LoadInput loadI
393393
* <ul>
394394
* <li>its rated apparent power is not negative
395395
* <li>its albedo value of the plant's surrounding is between 0 and 1
396-
* <li>its inclination in a compass direction (azimuth) is between -90° and 90°
396+
* <li>its inclination in a compass direction (azimuth) is between -180° and 180°
397397
* <li>its efficiency of the asset's inverter (etaConv) is between 0% and 100%
398398
* <li>its tilted inclination from horizontal (elevation angle) is between 0° and 90°
399399
* <li>its rated power factor is between 0 and 1
@@ -431,17 +431,17 @@ private static void checkAlbedo(PvInput pvInput) throws InvalidEntityException {
431431
}
432432

433433
/**
434-
* Check if azimuth angle of pvInput is between -90° and 90°
434+
* Check if azimuth angle of pvInput is between -180° and 180°
435435
*
436436
* @param pvInput PvInput to validate
437437
*/
438438
private static void checkAzimuth(PvInput pvInput) throws InvalidEntityException {
439-
if (pvInput.getAzimuth().isLessThan(Quantities.getQuantity(-90d, AZIMUTH))
440-
|| pvInput.getAzimuth().isGreaterThan(Quantities.getQuantity(90d, AZIMUTH)))
439+
if (pvInput.getAzimuth().isLessThan(Quantities.getQuantity(-180d, AZIMUTH))
440+
|| pvInput.getAzimuth().isGreaterThan(Quantities.getQuantity(180d, AZIMUTH)))
441441
throw new InvalidEntityException(
442442
"Azimuth angle of "
443443
+ pvInput.getClass().getSimpleName()
444-
+ " must be between -90° (east) and 90° (west)",
444+
+ " must be between 0° (south), 90° (west), -90° (east), +/- 180° (north)",
445445
pvInput);
446446
}
447447

src/test/groovy/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtilsTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ class SystemParticipantValidationUtilsTest extends Specification {
365365
invalidPV || expectedSize || expectedException
366366
SystemParticipantTestData.pvInput.copy().sRated(Quantities.getQuantity(-25d, ACTIVE_POWER_IN)).build() || 1 || new InvalidEntityException("The following quantities have to be zero or positive: -25 kVA", invalidPV)
367367
SystemParticipantTestData.pvInput.copy().albedo(2).build() || 1 || new InvalidEntityException("Albedo of the plant's surrounding of PvInput must be between 0 and 1", invalidPV)
368-
SystemParticipantTestData.pvInput.copy().azimuth(Quantities.getQuantity(-100d, AZIMUTH)).build() || 1 || new InvalidEntityException("Azimuth angle of PvInput must be between -90° (east) and 90° (west)", invalidPV)
368+
SystemParticipantTestData.pvInput.copy().azimuth(Quantities.getQuantity(-181d, AZIMUTH)).build() || 1 || new InvalidEntityException("Azimuth angle of PvInput must be between -90° (east) and 90° (west)", invalidPV)
369369
SystemParticipantTestData.pvInput.copy().etaConv(Quantities.getQuantity(110d, EFFICIENCY)).build() || 1 || new InvalidEntityException("Efficiency of the converter of PvInput must be between 0% and 100%", invalidPV)
370370
SystemParticipantTestData.pvInput.copy().elevationAngle(Quantities.getQuantity(100d, SOLAR_ELEVATION_ANGLE)).build() || 1 || new InvalidEntityException("Tilted inclination from horizontal of PvInput must be between 0° and 90°", invalidPV)
371371
SystemParticipantTestData.pvInput.copy().cosPhiRated(2).build() || 1 || new InvalidEntityException("Rated power factor of PvInput must be between 0 and 1", invalidPV)

0 commit comments

Comments
 (0)