diff --git a/CHANGELOG.md b/CHANGELOG.md index 083590698..288162525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Changed +- Storage minimum level parameter removed from cylindrical thermal storage [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1123) ## [5.1.0] - 2024-06-24 diff --git a/docs/readthedocs/models/input/thermal/cylindricalstorage.md b/docs/readthedocs/models/input/thermal/cylindricalstorage.md index 553f63d3e..98358479a 100644 --- a/docs/readthedocs/models/input/thermal/cylindricalstorage.md +++ b/docs/readthedocs/models/input/thermal/cylindricalstorage.md @@ -38,11 +38,7 @@ Model of a cylindrical thermal storage using a fluent to store thermal energy. * - storageVolumeLvl - m³ - - Overall available storage volume - - * - storageVolumeLvlMin - - m³ - - Minimum permissible storage volume + - Overall usable storage volume * - inletTemp - °C diff --git a/docs/uml/main/input/ThermalDatamodelConcept.puml b/docs/uml/main/input/ThermalDatamodelConcept.puml index 0a9801329..3f275bc5b 100644 --- a/docs/uml/main/input/ThermalDatamodelConcept.puml +++ b/docs/uml/main/input/ThermalDatamodelConcept.puml @@ -115,7 +115,6 @@ package models { class CylindricalStorageInput { - storageVolumeLvl: ComparableQuantity [m³] - - storageVolumeLvlMin: ComparableQuantity [m³] - inletTemp: ComparableQuantity [°C] - returnTemp: ComparableQuantity [°C] - c: ComparableQuantity [kWh/(K*m³)] diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java index 3b423465c..08545acd5 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java @@ -19,7 +19,6 @@ public class CylindricalStorageInputFactory extends AssetInputEntityFactory { private static final String STORAGE_VOLUME_LVL = "storageVolumeLvl"; - private static final String STORAGE_VOLUME_LVL_MIN = "storageVolumeLvlMin"; private static final String INLET_TEMP = "inletTemp"; private static final String RETURN_TEMP = "returnTemp"; private static final String C = "c"; @@ -30,7 +29,7 @@ public CylindricalStorageInputFactory() { @Override protected String[] getAdditionalFields() { - return new String[] {STORAGE_VOLUME_LVL, STORAGE_VOLUME_LVL_MIN, INLET_TEMP, RETURN_TEMP, C}; + return new String[] {STORAGE_VOLUME_LVL, INLET_TEMP, RETURN_TEMP, C}; } @Override @@ -43,8 +42,6 @@ protected CylindricalStorageInput buildModel( final ThermalBusInput bus = data.getBusInput(); final ComparableQuantity storageVolumeLvl = data.getQuantity(STORAGE_VOLUME_LVL, StandardUnits.VOLUME); - final ComparableQuantity storageVolumeLvlMin = - data.getQuantity(STORAGE_VOLUME_LVL_MIN, StandardUnits.VOLUME); final ComparableQuantity inletTemp = data.getQuantity(INLET_TEMP, StandardUnits.TEMPERATURE); final ComparableQuantity returnTemp = @@ -52,15 +49,6 @@ protected CylindricalStorageInput buildModel( final ComparableQuantity c = data.getQuantity(C, StandardUnits.SPECIFIC_HEAT_CAPACITY); return new CylindricalStorageInput( - uuid, - id, - operator, - operationTime, - bus, - storageVolumeLvl, - storageVolumeLvlMin, - inletTemp, - returnTemp, - c); + uuid, id, operator, operationTime, bus, storageVolumeLvl, inletTemp, returnTemp, c); } } diff --git a/src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java b/src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java index 611c48e0a..3b1c2c473 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java @@ -19,8 +19,6 @@ public class CylindricalStorageInput extends ThermalStorageInput { /** Available storage volume (typically in m³) */ private final ComparableQuantity storageVolumeLvl; - /** Minimum permissible storage volume (typically in m³) */ - private final ComparableQuantity storageVolumeLvlMin; /** Temperature of the inlet (typically in C) */ private final ComparableQuantity inletTemp; /** Temperature of the outlet (typically in C) */ @@ -35,7 +33,6 @@ public class CylindricalStorageInput extends ThermalStorageInput { * @param operationTime operation time of the asset * @param bus Thermal bus, a thermal unit is connected to * @param storageVolumeLvl Available storage volume - * @param storageVolumeLvlMin Minimum permissible storage volume * @param inletTemp Temperature of the inlet * @param returnTemp Temperature of the outlet * @param c Specific heat capacity of the storage medium @@ -47,13 +44,11 @@ public CylindricalStorageInput( OperationTime operationTime, ThermalBusInput bus, ComparableQuantity storageVolumeLvl, - ComparableQuantity storageVolumeLvlMin, ComparableQuantity inletTemp, ComparableQuantity returnTemp, ComparableQuantity c) { super(uuid, id, operator, operationTime, bus); this.storageVolumeLvl = storageVolumeLvl.to(StandardUnits.VOLUME); - this.storageVolumeLvlMin = storageVolumeLvlMin.to(StandardUnits.VOLUME); this.inletTemp = inletTemp.to(StandardUnits.TEMPERATURE); this.returnTemp = returnTemp.to(StandardUnits.TEMPERATURE); this.c = c.to(StandardUnits.SPECIFIC_HEAT_CAPACITY); @@ -64,7 +59,6 @@ public CylindricalStorageInput( * @param id Identifier of the thermal unit * @param bus Thermal bus, a thermal unit is connected to * @param storageVolumeLvl Available storage volume - * @param storageVolumeLvlMin Minimum permissible storage volume * @param inletTemp Temperature of the inlet * @param returnTemp Temperature of the outlet * @param c Specific heat capacity of the storage medium @@ -74,13 +68,11 @@ public CylindricalStorageInput( String id, ThermalBusInput bus, ComparableQuantity storageVolumeLvl, - ComparableQuantity storageVolumeLvlMin, ComparableQuantity inletTemp, ComparableQuantity returnTemp, ComparableQuantity c) { super(uuid, id, bus); this.storageVolumeLvl = storageVolumeLvl.to(StandardUnits.VOLUME); - this.storageVolumeLvlMin = storageVolumeLvlMin.to(StandardUnits.VOLUME); this.inletTemp = inletTemp.to(StandardUnits.TEMPERATURE); this.returnTemp = returnTemp.to(StandardUnits.TEMPERATURE); this.c = c.to(StandardUnits.SPECIFIC_HEAT_CAPACITY); @@ -90,10 +82,6 @@ public ComparableQuantity getStorageVolumeLvl() { return storageVolumeLvl; } - public ComparableQuantity getStorageVolumeLvlMin() { - return storageVolumeLvlMin; - } - public ComparableQuantity getInletTemp() { return inletTemp; } @@ -117,7 +105,6 @@ public boolean equals(Object o) { if (!(o instanceof CylindricalStorageInput that)) return false; if (!super.equals(o)) return false; return storageVolumeLvl.equals(that.storageVolumeLvl) - && storageVolumeLvlMin.equals(that.storageVolumeLvlMin) && inletTemp.equals(that.inletTemp) && returnTemp.equals(that.returnTemp) && c.equals(that.c); @@ -125,8 +112,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash( - super.hashCode(), storageVolumeLvl, storageVolumeLvlMin, inletTemp, returnTemp, c); + return Objects.hash(super.hashCode(), storageVolumeLvl, inletTemp, returnTemp, c); } @Override @@ -144,8 +130,6 @@ public String toString() { + getThermalBus().getUuid() + ", storageVolumeLvl=" + storageVolumeLvl - + ", storageVolumeLvlMin=" - + storageVolumeLvlMin + ", inletTemp=" + inletTemp + ", returnTemp=" @@ -164,7 +148,6 @@ public static class CylindricalStorageInputCopyBuilder extends ThermalStorageInputCopyBuilder { private ComparableQuantity storageVolumeLvl; - private ComparableQuantity storageVolumeLvlMin; private ComparableQuantity inletTemp; private ComparableQuantity returnTemp; private ComparableQuantity c; @@ -172,7 +155,6 @@ public static class CylindricalStorageInputCopyBuilder private CylindricalStorageInputCopyBuilder(CylindricalStorageInput entity) { super(entity); this.storageVolumeLvl = entity.getStorageVolumeLvl(); - this.storageVolumeLvlMin = entity.getStorageVolumeLvlMin(); this.inletTemp = entity.getInletTemp(); this.returnTemp = entity.getReturnTemp(); this.c = entity.getC(); @@ -184,12 +166,6 @@ public CylindricalStorageInputCopyBuilder storageVolumeLvl( return this; } - public CylindricalStorageInputCopyBuilder storageVolumeLvlMin( - ComparableQuantity storageVolumeLvlMin) { - this.storageVolumeLvlMin = storageVolumeLvlMin; - return this; - } - public CylindricalStorageInputCopyBuilder inletTemp(ComparableQuantity inletTemp) { this.inletTemp = inletTemp; return this; @@ -209,7 +185,6 @@ public CylindricalStorageInputCopyBuilder c(ComparableQuantity> checkThermalHouse( *
    *
  • it is not null *
  • its available storage volume is positive - *
  • its minimum permissible storage volume is positive and not greater than the available - * storage volume *
  • its inlet temperature is equal/greater than the outlet temperature *
  • its specific heat capacity is positive *
@@ -213,25 +211,13 @@ private static List> checkCylindricalStorage( new InvalidEntityException( "Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", cylindricalStorageInput))); - // Check if minimum permissible storage volume is lower than overall available storage volume - exceptions.add( - Try.ofVoid( - cylindricalStorageInput - .getStorageVolumeLvlMin() - .isGreaterThan(cylindricalStorageInput.getStorageVolumeLvl()), - () -> - new InvalidEntityException( - "Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", - cylindricalStorageInput))); exceptions.add( Try.ofVoid( () -> detectZeroOrNegativeQuantities( new Quantity[] { - cylindricalStorageInput.getStorageVolumeLvl(), - cylindricalStorageInput.getStorageVolumeLvlMin(), - cylindricalStorageInput.getC() + cylindricalStorageInput.getStorageVolumeLvl(), cylindricalStorageInput.getC() }, cylindricalStorageInput), InvalidEntityException.class)); diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy index cf75e1188..20e516f8e 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy @@ -32,10 +32,9 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto "uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", "id" : "TestID", "storagevolumelvl" : "3", - "storagevolumelvlmin": "4", - "inlettemp" : "5", - "returntemp" : "6", - "c" : "7" + "inlettemp" : "4", + "returntemp" : "5", + "c" : "6" ] def inputClass = CylindricalStorageInput def thermalBusInput = Mock(ThermalBusInput) @@ -53,7 +52,6 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto assert id == parameter["id"] assert thermalBus == thermalBusInput assert storageVolumeLvl == getQuant(parameter["storagevolumelvl"], StandardUnits.VOLUME) - assert storageVolumeLvlMin == getQuant(parameter["storagevolumelvlmin"], StandardUnits.VOLUME) assert inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE) assert returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE) assert c == getQuant(parameter["c"], StandardUnits.SPECIFIC_HEAT_CAPACITY) diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy index 7351cf1a2..915046bb6 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy @@ -65,7 +65,6 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { operationTime == sptd.thermalStorage.operationTime thermalBus == sptd.thermalStorage.thermalBus storageVolumeLvl == sptd.storageVolumeLvl - storageVolumeLvlMin == sptd.storageVolumeLvlMin inletTemp == sptd.inletTemp returnTemp == sptd.returnTemp c == sptd.c @@ -84,7 +83,6 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { operationTime == sptd.thermalStorage.operationTime thermalBus == sptd.thermalStorage.thermalBus storageVolumeLvl == sptd.storageVolumeLvl - storageVolumeLvlMin == sptd.storageVolumeLvlMin inletTemp == sptd.inletTemp returnTemp == sptd.returnTemp c == sptd.c diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy index 815876368..eee911126 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy @@ -17,7 +17,7 @@ class CylindricalStorageInputTest extends Specification { when: def alteredUnit = cylindricalStorageInput.copy().storageVolumeLvl(ThermalUnitInputTestData.storageVolumeLvl) - .storageVolumeLvlMin(ThermalUnitInputTestData.storageVolumeLvlMin).inletTemp(ThermalUnitInputTestData.inletTemp) + .inletTemp(ThermalUnitInputTestData.inletTemp) .returnTemp(ThermalUnitInputTestData.returnTemp).c(ThermalUnitInputTestData.c) .thermalBus(ThermalUnitInputTestData.thermalBus).build() @@ -30,7 +30,6 @@ class CylindricalStorageInputTest extends Specification { assert operationTime == cylindricalStorageInput.operationTime assert thermalBus == cylindricalStorageInput.thermalBus assert storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl - assert storageVolumeLvlMin == ThermalUnitInputTestData.storageVolumeLvlMin assert inletTemp == ThermalUnitInputTestData.inletTemp assert returnTemp == ThermalUnitInputTestData.returnTemp assert c == ThermalUnitInputTestData.c @@ -52,7 +51,6 @@ class CylindricalStorageInputTest extends Specification { assert operationTime == cylindricalStorageInput.operationTime assert thermalBus == cylindricalStorageInput.thermalBus assert storageVolumeLvl == cylindricalStorageInput.storageVolumeLvl * 2d - assert storageVolumeLvlMin == cylindricalStorageInput.storageVolumeLvlMin * 2d assert inletTemp == cylindricalStorageInput.inletTemp assert returnTemp == cylindricalStorageInput.returnTemp assert c == cylindricalStorageInput.c diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy index 5c1de7967..e903bdbfc 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy @@ -46,7 +46,6 @@ class ThermalUnitValidationUtilsTest extends Specification { // Specific data for thermal cylindric storage input private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) - private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) @@ -108,8 +107,7 @@ class ThermalUnitValidationUtilsTest extends Specification { where: invalidCylindricalStorage || expectedSize || expectedException - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, storageVolumeLvl, storageVolumeLvlMin, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c) || 1 || new InvalidEntityException("Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", invalidCylindricalStorage) - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(100, StandardUnits.VOLUME), Quantities.getQuantity(200, StandardUnits.VOLUME), inletTemp, returnTemp, c) || 1 || new InvalidEntityException("Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", invalidCylindricalStorage) - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-100, StandardUnits.VOLUME), Quantities.getQuantity(-200, StandardUnits.VOLUME), inletTemp, returnTemp, Quantities.getQuantity(-1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY)) || 1 || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -200 ㎥, -1.05 kWh/K*m³", invalidCylindricalStorage) + new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, storageVolumeLvl, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c) || 1 || new InvalidEntityException("Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", invalidCylindricalStorage) + new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-100, StandardUnits.VOLUME), inletTemp, returnTemp, Quantities.getQuantity(-1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY)) || 1 || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -1.05 kWh/K*m³", invalidCylindricalStorage) } } diff --git a/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy b/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy index eca3b3d39..e77913cee 100644 --- a/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy @@ -169,7 +169,6 @@ class SystemParticipantTestData { operationTime ) public static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(1.039154027, VOLUME) - public static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(0.3, VOLUME) public static final ComparableQuantity inletTemp = Quantities.getQuantity(110, TEMPERATURE) public static final ComparableQuantity returnTemp = Quantities.getQuantity(80, TEMPERATURE) public static final ComparableQuantity c = Quantities.getQuantity( @@ -181,7 +180,6 @@ class SystemParticipantTestData { OperationTime.notLimited(), thermalBus, storageVolumeLvl, - storageVolumeLvlMin, inletTemp, returnTemp, c diff --git a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy index 2802dc2da..bf3f6a521 100644 --- a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy @@ -50,7 +50,6 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { // thermal cylindric storage input private static final ComparableQuantity storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME) - private static final ComparableQuantity storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME) private static final ComparableQuantity inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE) private static final ComparableQuantity returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE) private static final ComparableQuantity c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY) @@ -62,7 +61,6 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { operationTime, thermalBus, storageVolumeLvl, - storageVolumeLvlMin, inletTemp, returnTemp, c)