diff --git a/CHANGELOG.md b/CHANGELOG.md index 5528cbbec..e7fe0d31b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Copy methods for container classes [#726](https://github.com/ie3-institute/PowerSystemDataModel/issues/726) - Allow hierarchic grid structure for JointGridContainer [#768](https://github.com/ie3-institute/PowerSystemDataModel/issues/768) +- Add rate of change for thermal storages [#679](https://github.com/ie3-institute/PowerSystemDataModel/issues/679) ### Fixed -- Fixed wrong rated power unit hint [#804](https://github.com/ie3-institute/PowerSystemDataModel/issues/804) ### Changed diff --git a/docs/readthedocs/models/input/participant/cylindricalstorage.rst b/docs/readthedocs/models/input/participant/cylindricalstorage.rst index feaed6c3d..efe877672 100644 --- a/docs/readthedocs/models/input/participant/cylindricalstorage.rst +++ b/docs/readthedocs/models/input/participant/cylindricalstorage.rst @@ -29,6 +29,10 @@ Attributes, Units and Remarks +---------------------+----------------------------+----------------------------------------------+ | c | kWh / (K :math:`\cdot` m³) | Specific heat capacity of the storage medium | +---------------------+----------------------------+----------------------------------------------+ +| inletFlowRate | m³ / h | flowrate of the inlet | ++---------------------+----------------------------+----------------------------------------------+ +| outletFlowRate | m³ / h | flowrate of the outlet | ++---------------------+----------------------------+----------------------------------------------+ Caveats ^^^^^^^ 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 cd517423c..a4cf63d25 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 @@ -11,6 +11,7 @@ import edu.ie3.datamodel.models.input.thermal.CylindricalStorageInput; import edu.ie3.datamodel.models.input.thermal.ThermalBusInput; import edu.ie3.util.quantities.interfaces.SpecificHeatCapacity; +import edu.ie3.util.quantities.interfaces.VolumetricFlowRate; import java.util.UUID; import javax.measure.quantity.Temperature; import javax.measure.quantity.Volume; @@ -23,6 +24,8 @@ public class CylindricalStorageInputFactory private static final String INLET_TEMP = "inlettemp"; private static final String RETURN_TEMP = "returntemp"; private static final String C = "c"; + private static final String INLET_FLOW_RATE = "inletflowrate"; + private static final String OUTLET_FLOW_RATE = "outletflowrate"; public CylindricalStorageInputFactory() { super(CylindricalStorageInput.class); @@ -30,7 +33,15 @@ 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, + STORAGE_VOLUME_LVL_MIN, + INLET_TEMP, + RETURN_TEMP, + C, + INLET_FLOW_RATE, + OUTLET_FLOW_RATE + }; } @Override @@ -51,6 +62,11 @@ protected CylindricalStorageInput buildModel( data.getQuantity(RETURN_TEMP, StandardUnits.TEMPERATURE); final ComparableQuantity c = data.getQuantity(C, StandardUnits.SPECIFIC_HEAT_CAPACITY); + final ComparableQuantity inletFlowRate = + data.getQuantity(INLET_FLOW_RATE, StandardUnits.VOLUMETRIC_FLOW_RATE); + final ComparableQuantity outletFlowRate = + data.getQuantity(OUTLET_FLOW_RATE, StandardUnits.VOLUMETRIC_FLOW_RATE); + return new CylindricalStorageInput( uuid, id, @@ -61,6 +77,8 @@ protected CylindricalStorageInput buildModel( storageVolumeLvlMin, inletTemp, returnTemp, - c); + c, + inletFlowRate, + outletFlowRate); } } diff --git a/src/main/java/edu/ie3/datamodel/models/StandardUnits.java b/src/main/java/edu/ie3/datamodel/models/StandardUnits.java index e8c8d96f7..a139775f1 100644 --- a/src/main/java/edu/ie3/datamodel/models/StandardUnits.java +++ b/src/main/java/edu/ie3/datamodel/models/StandardUnits.java @@ -137,6 +137,8 @@ public class StandardUnits { /** Length of a line in km */ public static final Unit LINE_LENGTH = KILOMETRE; + public static final Unit VOLUMETRIC_FLOW_RATE = CUBIC_METRE_PER_SECOND; + private StandardUnits() { throw new IllegalStateException("This is an Utility Class and not meant to be instantiated"); } 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 478b8ddf8..b88bd36f4 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 @@ -9,6 +9,7 @@ import edu.ie3.datamodel.models.StandardUnits; import edu.ie3.datamodel.models.input.OperatorInput; import edu.ie3.util.quantities.interfaces.SpecificHeatCapacity; +import edu.ie3.util.quantities.interfaces.VolumetricFlowRate; import java.util.Objects; import java.util.UUID; import javax.measure.quantity.Temperature; @@ -27,6 +28,10 @@ public class CylindricalStorageInput extends ThermalStorageInput { private final ComparableQuantity returnTemp; /** Specific heat capacity of the storage medium (typically in kWh/K*m³) */ private final ComparableQuantity c; + /** Flow rate of the inlet and outlet (typically in m³/s) */ + private final ComparableQuantity inletFlowRate; + /** Flow rate of the outlet and outlet (typically in m³/s) */ + private final ComparableQuantity outletFlowRate; /** * @param uuid Unique identifier of a cylindrical storage @@ -39,6 +44,8 @@ public class CylindricalStorageInput extends ThermalStorageInput { * @param inletTemp Temperature of the inlet * @param returnTemp Temperature of the outlet * @param c Specific heat capacity of the storage medium + * @param inletFlowRate flow rate of the inlet + * @param outletFlowRate flow rate of the outlet */ public CylindricalStorageInput( UUID uuid, @@ -50,13 +57,17 @@ public CylindricalStorageInput( ComparableQuantity storageVolumeLvlMin, ComparableQuantity inletTemp, ComparableQuantity returnTemp, - ComparableQuantity c) { + ComparableQuantity c, + ComparableQuantity inletFlowRate, + ComparableQuantity outletFlowRate) { 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); + this.inletFlowRate = inletFlowRate.to(StandardUnits.VOLUMETRIC_FLOW_RATE); + this.outletFlowRate = outletFlowRate.to(StandardUnits.VOLUMETRIC_FLOW_RATE); } /** @@ -68,6 +79,8 @@ public CylindricalStorageInput( * @param inletTemp Temperature of the inlet * @param returnTemp Temperature of the outlet * @param c Specific heat capacity of the storage medium + * @param inletFlowRate flow rate of the inlet + * @param outletFlowRate flow rate of the outlet */ public CylindricalStorageInput( UUID uuid, @@ -77,13 +90,17 @@ public CylindricalStorageInput( ComparableQuantity storageVolumeLvlMin, ComparableQuantity inletTemp, ComparableQuantity returnTemp, - ComparableQuantity c) { + ComparableQuantity c, + ComparableQuantity inletFlowRate, + ComparableQuantity outletFlowRate) { 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); + this.inletFlowRate = inletFlowRate.to(StandardUnits.VOLUMETRIC_FLOW_RATE); + this.outletFlowRate = outletFlowRate.to(StandardUnits.VOLUMETRIC_FLOW_RATE); } public ComparableQuantity getStorageVolumeLvl() { @@ -106,6 +123,14 @@ public ComparableQuantity getC() { return c; } + public ComparableQuantity getInletFlowRate() { + return inletFlowRate; + } + + public ComparableQuantity getOutletFlowRate() { + return outletFlowRate; + } + @Override public CylindricalStorageInputCopyBuilder copy() { return new CylindricalStorageInputCopyBuilder(this); @@ -120,13 +145,22 @@ public boolean equals(Object o) { && storageVolumeLvlMin.equals(that.storageVolumeLvlMin) && inletTemp.equals(that.inletTemp) && returnTemp.equals(that.returnTemp) - && c.equals(that.c); + && c.equals(that.c) + && inletFlowRate.equals(that.inletFlowRate) + && outletFlowRate.equals(that.outletFlowRate); } @Override public int hashCode() { return Objects.hash( - super.hashCode(), storageVolumeLvl, storageVolumeLvlMin, inletTemp, returnTemp, c); + super.hashCode(), + storageVolumeLvl, + storageVolumeLvlMin, + inletTemp, + returnTemp, + c, + inletFlowRate, + outletFlowRate); } @Override @@ -152,6 +186,10 @@ public String toString() { + returnTemp + ", c=" + c + + ", inletFlowRate =" + + inletFlowRate + + ", outletFlowPower =" + + outletFlowRate + '}'; } @@ -168,6 +206,8 @@ public static class CylindricalStorageInputCopyBuilder private ComparableQuantity inletTemp; private ComparableQuantity returnTemp; private ComparableQuantity c; + private ComparableQuantity inletFlowRate; + private ComparableQuantity outletFlowRate; private CylindricalStorageInputCopyBuilder(CylindricalStorageInput entity) { super(entity); @@ -176,6 +216,8 @@ private CylindricalStorageInputCopyBuilder(CylindricalStorageInput entity) { this.inletTemp = entity.getInletTemp(); this.returnTemp = entity.getReturnTemp(); this.c = entity.getC(); + this.inletFlowRate = entity.getInletFlowRate(); + this.outletFlowRate = entity.getOutletFlowRate(); } @Override @@ -190,7 +232,9 @@ public CylindricalStorageInput build() { storageVolumeLvlMin, inletTemp, returnTemp, - c); + c, + inletFlowRate, + outletFlowRate); } public CylindricalStorageInputCopyBuilder storageVolumeLvl( @@ -221,6 +265,18 @@ public CylindricalStorageInputCopyBuilder c(ComparableQuantity inletFlowRate) { + this.inletFlowRate = inletFlowRate; + return this; + } + + public CylindricalStorageInputCopyBuilder outletFlowRate( + ComparableQuantity outletFlowRate) { + this.outletFlowRate = outletFlowRate; + return this; + } + @Override protected CylindricalStorageInputCopyBuilder childInstance() { return this; 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 e7d5caa21..049884e85 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 @@ -33,7 +33,9 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto "storagevolumelvlmin": "4", "inlettemp" : "5", "returntemp" : "6", - "c" : "7" + "c" : "7", + "inletflowrate" : "8", + "outletflowrate" : "9" ] def inputClass = CylindricalStorageInput def thermalBusInput = Mock(ThermalBusInput) @@ -55,6 +57,8 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto assert inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE) assert returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE) assert c == getQuant(parameter["c"], StandardUnits.SPECIFIC_HEAT_CAPACITY) + assert inletFlowRate == getQuant(parameter["inletflowrate"], StandardUnits.VOLUMETRIC_FLOW_RATE) + assert outletFlowRate == getQuant(parameter["outletflowrate"], StandardUnits.VOLUMETRIC_FLOW_RATE) } } } 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 e8b8f57b4..93fe66d9a 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 @@ -71,6 +71,8 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { resultingCylindricalStorageWoOperator.first().inletTemp == sptd.inletTemp resultingCylindricalStorageWoOperator.first().returnTemp == sptd.returnTemp resultingCylindricalStorageWoOperator.first().c == sptd.c + resultingCylindricalStorageWoOperator.first().inletFlowRate == sptd.inletFlowRate + resultingCylindricalStorageWoOperator.first().outletFlowRate == sptd.outletFlowRate //test method when operators and thermal buses are provided as constructor parameters when: @@ -88,6 +90,8 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta { resultingCylindricalStorage.first().inletTemp == sptd.inletTemp resultingCylindricalStorage.first().returnTemp == sptd.returnTemp resultingCylindricalStorage.first().c == sptd.c + resultingCylindricalStorage.first().inletFlowRate == sptd.inletFlowRate + resultingCylindricalStorage.first().outletFlowRate == sptd.outletFlowRate } def "A CsvThermalSource should build thermal unit input entity from valid and invalid input data as expected"() { 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 21e707d69..298628dc0 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 @@ -5,6 +5,7 @@ */ package edu.ie3.datamodel.models.input.thermal +import edu.ie3.datamodel.models.StandardUnits import edu.ie3.test.common.ThermalUnitInputTestData import spock.lang.Specification @@ -16,10 +17,17 @@ class CylindricalStorageInputTest extends Specification { def cylindricalStorageInput = ThermalUnitInputTestData.cylindricStorageInput when: - def alteredUnit = cylindricalStorageInput.copy().storageVolumeLvl(ThermalUnitInputTestData.storageVolumeLvl) - .storageVolumeLvlMin(ThermalUnitInputTestData.storageVolumeLvlMin).inletTemp(ThermalUnitInputTestData.inletTemp) - .returnTemp(ThermalUnitInputTestData.returnTemp).c(ThermalUnitInputTestData.c) - .thermalBus(ThermalUnitInputTestData.thermalBus).build() + def alteredUnit = cylindricalStorageInput + .copy() + .storageVolumeLvl(ThermalUnitInputTestData.storageVolumeLvl) + .storageVolumeLvlMin(ThermalUnitInputTestData.storageVolumeLvlMin) + .inletTemp(ThermalUnitInputTestData.inletTemp) + .returnTemp(ThermalUnitInputTestData.returnTemp) + .c(ThermalUnitInputTestData.c) + .thermalBus(ThermalUnitInputTestData.thermalBus) + .inletFlowRate(ThermalUnitInputTestData.inletFlowRate) + .outletFlowRate(ThermalUnitInputTestData.outletFlowRate) + .build() then: @@ -34,6 +42,8 @@ class CylindricalStorageInputTest extends Specification { assert inletTemp == ThermalUnitInputTestData.inletTemp assert returnTemp == ThermalUnitInputTestData.returnTemp assert c == ThermalUnitInputTestData.c + assert inletFlowRate == ThermalUnitInputTestData.inletFlowRate + assert outletFlowRate == ThermalUnitInputTestData.outletFlowRate } } } 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 e2a4a43f3..fa55f7578 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy @@ -17,6 +17,7 @@ import edu.ie3.util.TimeUtil import edu.ie3.util.quantities.interfaces.HeatCapacity import edu.ie3.util.quantities.interfaces.SpecificHeatCapacity import edu.ie3.util.quantities.interfaces.ThermalConductance +import edu.ie3.util.quantities.interfaces.VolumetricFlowRate import spock.lang.Specification import tech.units.indriya.ComparableQuantity import tech.units.indriya.quantity.Quantities @@ -48,6 +49,10 @@ class ThermalUnitValidationUtilsTest extends Specification { 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) + private static final ComparableQuantity inletFlowRate = Quantities.getQuantity(0.2, StandardUnits.VOLUMETRIC_FLOW_RATE) + private static final ComparableQuantity outletFlowRate = Quantities.getQuantity(1.2, StandardUnits.VOLUMETRIC_FLOW_RATE) + + // Thermal House @@ -104,8 +109,8 @@ class ThermalUnitValidationUtilsTest extends Specification { where: invalidCylindricalStorage || expectedException - new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, storageVolumeLvl, storageVolumeLvlMin, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c) || 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) || 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)) || 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, storageVolumeLvlMin, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c, inletFlowRate, outletFlowRate) || 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, inletFlowRate, outletFlowRate) || 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), inletFlowRate, outletFlowRate) || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -200 ㎥, -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 bfafb5d6b..4448abba9 100644 --- a/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy @@ -6,6 +6,7 @@ package edu.ie3.test.common import edu.ie3.datamodel.models.OperationTime +import edu.ie3.datamodel.models.StandardUnits import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.input.OperatorInput import edu.ie3.datamodel.models.input.container.SystemParticipants @@ -151,6 +152,8 @@ class SystemParticipantTestData { public static final ComparableQuantity returnTemp = Quantities.getQuantity(80, TEMPERATURE) public static final ComparableQuantity c = Quantities.getQuantity( 1, SPECIFIC_HEAT_CAPACITY) + private static final ComparableQuantity inletFlowRate = Quantities.getQuantity(0.2, StandardUnits.VOLUMETRIC_FLOW_RATE) + private static final ComparableQuantity outletFlowRate = Quantities.getQuantity(1.2, StandardUnits.VOLUMETRIC_FLOW_RATE) public static final ThermalStorageInput thermalStorage = new CylindricalStorageInput( UUID.fromString("8851813b-3a7d-4fee-874b-4df9d724e4b3"), "test_cylindricThermalStorage", @@ -159,7 +162,9 @@ class SystemParticipantTestData { storageVolumeLvlMin, inletTemp, returnTemp, - c + c, + inletFlowRate, + outletFlowRate ) public static final ChpInput chpInput = new ChpInput( diff --git a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy index c5b7f61a8..b1a1a745b 100644 --- a/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/ThermalUnitInputTestData.groovy @@ -14,6 +14,7 @@ import edu.ie3.util.TimeUtil import edu.ie3.util.quantities.interfaces.HeatCapacity import edu.ie3.util.quantities.interfaces.SpecificHeatCapacity import edu.ie3.util.quantities.interfaces.ThermalConductance +import edu.ie3.util.quantities.interfaces.VolumetricFlowRate import tech.units.indriya.ComparableQuantity import tech.units.indriya.quantity.Quantities @@ -54,6 +55,8 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { 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) + private static final ComparableQuantity inletFlowRate = Quantities.getQuantity(0.1, StandardUnits.VOLUMETRIC_FLOW_RATE) + private static final ComparableQuantity outletFlowRate = Quantities.getQuantity(0.2, StandardUnits.VOLUMETRIC_FLOW_RATE) public static final cylindricStorageInput = new CylindricalStorageInput( thermalUnitUuid, @@ -65,5 +68,8 @@ class ThermalUnitInputTestData extends SystemParticipantTestData { storageVolumeLvlMin, inletTemp, returnTemp, - c) + c, + inletFlowRate, + outletFlowRate + ) } diff --git a/src/test/resources/edu/ie3/datamodel/io/source/csv/_participants/cylindrical_storage_input.csv b/src/test/resources/edu/ie3/datamodel/io/source/csv/_participants/cylindrical_storage_input.csv index 7d9de239a..42e01d1fd 100644 --- a/src/test/resources/edu/ie3/datamodel/io/source/csv/_participants/cylindrical_storage_input.csv +++ b/src/test/resources/edu/ie3/datamodel/io/source/csv/_participants/cylindrical_storage_input.csv @@ -1,2 +1,2 @@ -uuid,c,id,inlet_temp,operates_from,operates_until,operator,return_temp,storage_volume_lvl,storage_volume_lvl_min,thermal_bus -8851813b-3a7d-4fee-874b-4df9d724e4b3,1.0,test_cylindricThermalStorage,110.0,,,7d6f1763-0c1d-4266-a76f-59163ad3808b,80.0,1.039154027,0.3,0d95d7f2-49fb-4d49-8636-383a5220384e +uuid,c,id,inlet_flow_rate,inlet_temp,operates_from,operates_until,operator,return_temp,outlet_flow_rate,storage_volume_lvl,storage_volume_lvl_min,thermal_bus +8851813b-3a7d-4fee-874b-4df9d724e4b3,1.0,test_cylindricThermalStorage,0.2,110.0,,,7d6f1763-0c1d-4266-a76f-59163ad3808b,80.0,1.2,1.039154027,0.3,0d95d7f2-49fb-4d49-8636-383a5220384e diff --git a/src/test/resources/edu/ie3/datamodel/io/source/csv/_thermal/cylindrical_storage_input.csv b/src/test/resources/edu/ie3/datamodel/io/source/csv/_thermal/cylindrical_storage_input.csv index 7d9de239a..fcda7134f 100644 --- a/src/test/resources/edu/ie3/datamodel/io/source/csv/_thermal/cylindrical_storage_input.csv +++ b/src/test/resources/edu/ie3/datamodel/io/source/csv/_thermal/cylindrical_storage_input.csv @@ -1,2 +1,2 @@ -uuid,c,id,inlet_temp,operates_from,operates_until,operator,return_temp,storage_volume_lvl,storage_volume_lvl_min,thermal_bus -8851813b-3a7d-4fee-874b-4df9d724e4b3,1.0,test_cylindricThermalStorage,110.0,,,7d6f1763-0c1d-4266-a76f-59163ad3808b,80.0,1.039154027,0.3,0d95d7f2-49fb-4d49-8636-383a5220384e +uuid,c,id,inlet_flow_rate,inlet_temp,operates_from,operates_until,operator,return_temp,outlet_flow_rate,storage_volume_lvl,storage_volume_lvl_min,thermal_bus +8851813b-3a7d-4fee-874b-4df9d724e4b3,1.0,test_cylindricThermalStorage,0.2,110.0,,,7d6f1763-0c1d-4266-a76f-59163ad3808b,80.0,1.2,1.039154027,0.3,0d95d7f2-49fb-4d49-8636-383a5220384e \ No newline at end of file