Skip to content

Commit 400ef18

Browse files
Merge branch 'refs/heads/df/#1123_remove_thermal_storage_minimum_level' into df/#1131-psdm-update-for-tap-water-demand
# Conflicts: # src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java # src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java # src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java # src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtilsTest.groovy
2 parents ea750dd + 13cb4fb commit 400ef18

File tree

12 files changed

+13
-88
lines changed

12 files changed

+13
-88
lines changed

CHANGELOG.md

+1
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
### Fixed
1212

1313
### Changed
14+
- Storage minimum level parameter removed from cylindrical thermal storage [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1123)
1415

1516
## [5.1.0] - 2024-06-24
1617

docs/readthedocs/models/input/thermal/cylindricalstorage.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ Model of a cylindrical thermal storage using a fluent to store thermal energy.
3838
3939
* - storageVolumeLvl
4040
- m³
41-
- Overall available storage volume
42-
43-
* - storageVolumeLvlMin
44-
- m³
45-
- Minimum permissible storage volume
41+
- Overall usable storage volume
4642
4743
* - inletTemp
4844
- °C

docs/uml/main/input/ThermalDatamodelConcept.puml

-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ package models {
115115

116116
class CylindricalStorageInput {
117117
- storageVolumeLvl: ComparableQuantity<Volume> [m³]
118-
- storageVolumeLvlMin: ComparableQuantity<Volume> [m³]
119118
- inletTemp: ComparableQuantity<Temperature> [°C]
120119
- returnTemp: ComparableQuantity<Temperature> [°C]
121120
- c: ComparableQuantity<SpecificHeatCapacity> [kWh/(K*m³)]

src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java

+3-17
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
public class CylindricalStorageInputFactory
2121
extends AssetInputEntityFactory<CylindricalStorageInput, ThermalUnitInputEntityData> {
2222
private static final String STORAGE_VOLUME_LVL = "storageVolumeLvl";
23-
private static final String STORAGE_VOLUME_LVL_MIN = "storageVolumeLvlMin";
2423
private static final String INLET_TEMP = "inletTemp";
2524
private static final String RETURN_TEMP = "returnTemp";
2625
private static final String C = "c";
@@ -32,9 +31,7 @@ public CylindricalStorageInputFactory() {
3231

3332
@Override
3433
protected String[] getAdditionalFields() {
35-
return new String[] {
36-
STORAGE_VOLUME_LVL, STORAGE_VOLUME_LVL_MIN, INLET_TEMP, RETURN_TEMP, C, P_THERMAL_MAX
37-
};
34+
return new String[] {STORAGE_VOLUME_LVL, INLET_TEMP, RETURN_TEMP, C, P_THERMAL_MAX};
3835
}
3936

4037
@Override
@@ -47,8 +44,6 @@ protected CylindricalStorageInput buildModel(
4744
final ThermalBusInput bus = data.getBusInput();
4845
final ComparableQuantity<Volume> storageVolumeLvl =
4946
data.getQuantity(STORAGE_VOLUME_LVL, StandardUnits.VOLUME);
50-
final ComparableQuantity<Volume> storageVolumeLvlMin =
51-
data.getQuantity(STORAGE_VOLUME_LVL_MIN, StandardUnits.VOLUME);
5247
final ComparableQuantity<Temperature> inletTemp =
5348
data.getQuantity(INLET_TEMP, StandardUnits.TEMPERATURE);
5449
final ComparableQuantity<Temperature> returnTemp =
@@ -58,16 +53,7 @@ protected CylindricalStorageInput buildModel(
5853
final ComparableQuantity<Power> pThermalMax =
5954
data.getQuantity(P_THERMAL_MAX, StandardUnits.ACTIVE_POWER_IN);
6055
return new CylindricalStorageInput(
61-
uuid,
62-
id,
63-
operator,
64-
operationTime,
65-
bus,
66-
storageVolumeLvl,
67-
storageVolumeLvlMin,
68-
inletTemp,
69-
returnTemp,
70-
c,
71-
pThermalMax);
56+
uuid, id, operator, operationTime, bus, storageVolumeLvl, inletTemp, returnTemp, c,
57+
pThermalMax);
7258
}
7359
}

src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java

+2-34
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
public class CylindricalStorageInput extends ThermalStorageInput {
2121
/** Available storage volume (typically in m³) */
2222
private final ComparableQuantity<Volume> storageVolumeLvl;
23-
/** Minimum permissible storage volume (typically in m³) */
24-
private final ComparableQuantity<Volume> storageVolumeLvlMin;
2523
/** Temperature of the inlet (typically in C) */
2624
private final ComparableQuantity<Temperature> inletTemp;
2725
/** Temperature of the outlet (typically in C) */
@@ -38,7 +36,6 @@ public class CylindricalStorageInput extends ThermalStorageInput {
3836
* @param operationTime operation time of the asset
3937
* @param bus Thermal bus, a thermal unit is connected to
4038
* @param storageVolumeLvl Available storage volume
41-
* @param storageVolumeLvlMin Minimum permissible storage volume
4239
* @param inletTemp Temperature of the inlet
4340
* @param returnTemp Temperature of the outlet
4441
* @param c Specific heat capacity of the storage medium
@@ -51,14 +48,12 @@ public CylindricalStorageInput(
5148
OperationTime operationTime,
5249
ThermalBusInput bus,
5350
ComparableQuantity<Volume> storageVolumeLvl,
54-
ComparableQuantity<Volume> storageVolumeLvlMin,
5551
ComparableQuantity<Temperature> inletTemp,
5652
ComparableQuantity<Temperature> returnTemp,
5753
ComparableQuantity<SpecificHeatCapacity> c,
5854
ComparableQuantity<Power> pThermalMax) {
5955
super(uuid, id, operator, operationTime, bus);
6056
this.storageVolumeLvl = storageVolumeLvl.to(StandardUnits.VOLUME);
61-
this.storageVolumeLvlMin = storageVolumeLvlMin.to(StandardUnits.VOLUME);
6257
this.inletTemp = inletTemp.to(StandardUnits.TEMPERATURE);
6358
this.returnTemp = returnTemp.to(StandardUnits.TEMPERATURE);
6459
this.c = c.to(StandardUnits.SPECIFIC_HEAT_CAPACITY);
@@ -70,7 +65,6 @@ public CylindricalStorageInput(
7065
* @param id Identifier of the thermal unit
7166
* @param bus Thermal bus, a thermal unit is connected to
7267
* @param storageVolumeLvl Available storage volume
73-
* @param storageVolumeLvlMin Minimum permissible storage volume
7468
* @param inletTemp Temperature of the inlet
7569
* @param returnTemp Temperature of the outlet
7670
* @param c Specific heat capacity of the storage medium
@@ -81,14 +75,12 @@ public CylindricalStorageInput(
8175
String id,
8276
ThermalBusInput bus,
8377
ComparableQuantity<Volume> storageVolumeLvl,
84-
ComparableQuantity<Volume> storageVolumeLvlMin,
8578
ComparableQuantity<Temperature> inletTemp,
8679
ComparableQuantity<Temperature> returnTemp,
8780
ComparableQuantity<SpecificHeatCapacity> c,
8881
ComparableQuantity<Power> pThermalMax) {
8982
super(uuid, id, bus);
9083
this.storageVolumeLvl = storageVolumeLvl.to(StandardUnits.VOLUME);
91-
this.storageVolumeLvlMin = storageVolumeLvlMin.to(StandardUnits.VOLUME);
9284
this.inletTemp = inletTemp.to(StandardUnits.TEMPERATURE);
9385
this.returnTemp = returnTemp.to(StandardUnits.TEMPERATURE);
9486
this.c = c.to(StandardUnits.SPECIFIC_HEAT_CAPACITY);
@@ -99,10 +91,6 @@ public ComparableQuantity<Volume> getStorageVolumeLvl() {
9991
return storageVolumeLvl;
10092
}
10193

102-
public ComparableQuantity<Volume> getStorageVolumeLvlMin() {
103-
return storageVolumeLvlMin;
104-
}
105-
10694
public ComparableQuantity<Temperature> getInletTemp() {
10795
return inletTemp;
10896
}
@@ -130,7 +118,6 @@ public boolean equals(Object o) {
130118
if (!(o instanceof CylindricalStorageInput that)) return false;
131119
if (!super.equals(o)) return false;
132120
return storageVolumeLvl.equals(that.storageVolumeLvl)
133-
&& storageVolumeLvlMin.equals(that.storageVolumeLvlMin)
134121
&& inletTemp.equals(that.inletTemp)
135122
&& returnTemp.equals(that.returnTemp)
136123
&& c.equals(that.c)
@@ -139,14 +126,7 @@ public boolean equals(Object o) {
139126

140127
@Override
141128
public int hashCode() {
142-
return Objects.hash(
143-
super.hashCode(),
144-
storageVolumeLvl,
145-
storageVolumeLvlMin,
146-
inletTemp,
147-
returnTemp,
148-
c,
149-
pThermalMax);
129+
return Objects.hash(super.hashCode(), storageVolumeLvl, inletTemp, returnTemp, c, pThermalMax););
150130
}
151131

152132
@Override
@@ -164,8 +144,6 @@ public String toString() {
164144
+ getThermalBus().getUuid()
165145
+ ", storageVolumeLvl="
166146
+ storageVolumeLvl
167-
+ ", storageVolumeLvlMin="
168-
+ storageVolumeLvlMin
169147
+ ", inletTemp="
170148
+ inletTemp
171149
+ ", returnTemp="
@@ -186,7 +164,6 @@ public static class CylindricalStorageInputCopyBuilder
186164
extends ThermalStorageInputCopyBuilder<CylindricalStorageInputCopyBuilder> {
187165

188166
private ComparableQuantity<Volume> storageVolumeLvl;
189-
private ComparableQuantity<Volume> storageVolumeLvlMin;
190167
private ComparableQuantity<Temperature> inletTemp;
191168
private ComparableQuantity<Temperature> returnTemp;
192169
private ComparableQuantity<SpecificHeatCapacity> c;
@@ -195,7 +172,6 @@ public static class CylindricalStorageInputCopyBuilder
195172
private CylindricalStorageInputCopyBuilder(CylindricalStorageInput entity) {
196173
super(entity);
197174
this.storageVolumeLvl = entity.getStorageVolumeLvl();
198-
this.storageVolumeLvlMin = entity.getStorageVolumeLvlMin();
199175
this.inletTemp = entity.getInletTemp();
200176
this.returnTemp = entity.getReturnTemp();
201177
this.c = entity.getC();
@@ -208,12 +184,6 @@ public CylindricalStorageInputCopyBuilder storageVolumeLvl(
208184
return this;
209185
}
210186

211-
public CylindricalStorageInputCopyBuilder storageVolumeLvlMin(
212-
ComparableQuantity<Volume> storageVolumeLvlMin) {
213-
this.storageVolumeLvlMin = storageVolumeLvlMin;
214-
return this;
215-
}
216-
217187
public CylindricalStorageInputCopyBuilder inletTemp(ComparableQuantity<Temperature> inletTemp) {
218188
this.inletTemp = inletTemp;
219189
return this;
@@ -238,8 +208,7 @@ public CylindricalStorageInputCopyBuilder pThermalMax(ComparableQuantity<Power>
238208
@Override
239209
public CylindricalStorageInputCopyBuilder scale(Double factor) {
240210
storageVolumeLvl(storageVolumeLvl.multiply(factor));
241-
storageVolumeLvlMin(storageVolumeLvlMin.multiply(factor));
242-
pThermalMax(pThermalMax.multiply(factor));
211+
pThermalMax(pThermalMax.multiply(factor));
243212
return this;
244213
}
245214

@@ -252,7 +221,6 @@ public CylindricalStorageInput build() {
252221
getOperationTime(),
253222
getThermalBus(),
254223
storageVolumeLvl,
255-
storageVolumeLvlMin,
256224
inletTemp,
257225
returnTemp,
258226
c,

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

+1-16
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ private static boolean isValidHousingType(String housingType) {
209209
* <ul>
210210
* <li>it is not null
211211
* <li>its available storage volume is positive
212-
* <li>its minimum permissible storage volume is positive and not greater than the available
213-
* storage volume
214212
* <li>its inlet temperature is equal/greater than the outlet temperature
215213
* <li>its specific heat capacity is positive
216214
* </ul>
@@ -240,26 +238,13 @@ private static List<Try<Void, InvalidEntityException>> checkCylindricalStorage(
240238
new InvalidEntityException(
241239
"Inlet temperature of the cylindrical storage cannot be lower than outlet temperature",
242240
cylindricalStorageInput)));
243-
// Check if minimum permissible storage volume is lower than overall available storage volume
244-
exceptions.add(
245-
Try.ofVoid(
246-
cylindricalStorageInput
247-
.getStorageVolumeLvlMin()
248-
.isGreaterThan(cylindricalStorageInput.getStorageVolumeLvl()),
249-
() ->
250-
new InvalidEntityException(
251-
"Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume",
252-
cylindricalStorageInput)));
253241

254242
exceptions.add(
255243
Try.ofVoid(
256244
() ->
257245
detectZeroOrNegativeQuantities(
258246
new Quantity<?>[] {
259-
cylindricalStorageInput.getStorageVolumeLvl(),
260-
cylindricalStorageInput.getStorageVolumeLvlMin(),
261-
cylindricalStorageInput.getC(),
262-
cylindricalStorageInput.getpThermalMax()
247+
cylindricalStorageInput.getStorageVolumeLvl(), cylindricalStorageInput.getC(), cylindricalStorageInput.getpThermalMax()
263248
},
264249
cylindricalStorageInput),
265250
InvalidEntityException.class));

src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto
5454
assert id == parameter["id"]
5555
assert thermalBus == thermalBusInput
5656
assert storageVolumeLvl == getQuant(parameter["storagevolumelvl"], StandardUnits.VOLUME)
57-
assert storageVolumeLvlMin == getQuant(parameter["storagevolumelvlmin"], StandardUnits.VOLUME)
5857
assert inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE)
5958
assert returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE)
6059
assert c == getQuant(parameter["c"], StandardUnits.SPECIFIC_HEAT_CAPACITY)

src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy

-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta {
6666
operationTime == sptd.thermalStorage.operationTime
6767
thermalBus == sptd.thermalStorage.thermalBus
6868
storageVolumeLvl == sptd.storageVolumeLvl
69-
storageVolumeLvlMin == sptd.storageVolumeLvlMin
7069
inletTemp == sptd.inletTemp
7170
returnTemp == sptd.returnTemp
7271
c == sptd.c
@@ -86,7 +85,6 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta {
8685
operationTime == sptd.thermalStorage.operationTime
8786
thermalBus == sptd.thermalStorage.thermalBus
8887
storageVolumeLvl == sptd.storageVolumeLvl
89-
storageVolumeLvlMin == sptd.storageVolumeLvlMin
9088
inletTemp == sptd.inletTemp
9189
returnTemp == sptd.returnTemp
9290
c == sptd.c

src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class CylindricalStorageInputTest extends Specification {
1717

1818
when:
1919
def alteredUnit = cylindricalStorageInput.copy().storageVolumeLvl(ThermalUnitInputTestData.storageVolumeLvl)
20-
.storageVolumeLvlMin(ThermalUnitInputTestData.storageVolumeLvlMin).inletTemp(ThermalUnitInputTestData.inletTemp)
20+
.inletTemp(ThermalUnitInputTestData.inletTemp)
2121
.returnTemp(ThermalUnitInputTestData.returnTemp).c(ThermalUnitInputTestData.c)
2222
.thermalBus(ThermalUnitInputTestData.thermalBus).build()
2323

@@ -30,7 +30,6 @@ class CylindricalStorageInputTest extends Specification {
3030
assert operationTime == cylindricalStorageInput.operationTime
3131
assert thermalBus == cylindricalStorageInput.thermalBus
3232
assert storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl
33-
assert storageVolumeLvlMin == ThermalUnitInputTestData.storageVolumeLvlMin
3433
assert inletTemp == ThermalUnitInputTestData.inletTemp
3534
assert returnTemp == ThermalUnitInputTestData.returnTemp
3635
assert c == ThermalUnitInputTestData.c
@@ -52,7 +51,6 @@ class CylindricalStorageInputTest extends Specification {
5251
assert operationTime == cylindricalStorageInput.operationTime
5352
assert thermalBus == cylindricalStorageInput.thermalBus
5453
assert storageVolumeLvl == cylindricalStorageInput.storageVolumeLvl * 2d
55-
assert storageVolumeLvlMin == cylindricalStorageInput.storageVolumeLvlMin * 2d
5654
assert inletTemp == cylindricalStorageInput.inletTemp
5755
assert returnTemp == cylindricalStorageInput.returnTemp
5856
assert c == cylindricalStorageInput.c

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class ThermalUnitValidationUtilsTest extends Specification {
5050

5151
// Specific data for thermal cylindric storage input
5252
private static final ComparableQuantity<Volume> storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME)
53-
private static final ComparableQuantity<Volume> storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME)
5453
private static final ComparableQuantity<Temperature> inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE)
5554
private static final ComparableQuantity<Temperature> returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE)
5655
private static final ComparableQuantity<SpecificHeatCapacity> c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY)
@@ -114,9 +113,9 @@ class ThermalUnitValidationUtilsTest extends Specification {
114113
ex.message == expectedException.message
115114

116115
where:
117-
invalidCylindricalStorage || expectedSize || expectedException
118-
new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, storageVolumeLvl, storageVolumeLvlMin, Quantities.getQuantity(100, StandardUnits.TEMPERATURE), Quantities.getQuantity(200, StandardUnits.TEMPERATURE), c, pThermalMax) || 1 || new InvalidEntityException("Inlet temperature of the cylindrical storage cannot be lower than outlet temperature", invalidCylindricalStorage)
119-
new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(100, StandardUnits.VOLUME), Quantities.getQuantity(200, StandardUnits.VOLUME), inletTemp, returnTemp, c, pThermalMax) || 1 || new InvalidEntityException("Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume", invalidCylindricalStorage)
120-
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), Quantities.getQuantity(-20, PowerSystemUnits.KILOWATT)) || 1 || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -200 ㎥, -1.05 kWh/K*m³, -20 kW", invalidCylindricalStorage)
116+
invalidCylindricalStorage || expectedSize || expectedException
117+
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)
118+
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)
119+
new CylindricalStorageInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, Quantities.getQuantity(-100, StandardUnits.VOLUME), inletTemp, returnTemp, Quantities.getQuantity(-1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY), Quantities.getQuantity(-20, PowerSystemUnits.KILOWATT)) || 1 || new InvalidEntityException("The following quantities have to be positive: -100 ㎥, -200 ㎥, -1.05 kWh/K*m³, -20 kW", invalidCylindricalStorage)
121120
}
122121
}

src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy

-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ class SystemParticipantTestData {
170170
operationTime
171171
)
172172
public static final ComparableQuantity<Volume> storageVolumeLvl = Quantities.getQuantity(1.039154027, VOLUME)
173-
public static final ComparableQuantity<Volume> storageVolumeLvlMin = Quantities.getQuantity(0.3, VOLUME)
174173
public static final ComparableQuantity<Temperature> inletTemp = Quantities.getQuantity(110, TEMPERATURE)
175174
public static final ComparableQuantity<Temperature> returnTemp = Quantities.getQuantity(80, TEMPERATURE)
176175
public static final ComparableQuantity<SpecificHeatCapacity> c = Quantities.getQuantity(
@@ -185,7 +184,6 @@ class SystemParticipantTestData {
185184
OperationTime.notLimited(),
186185
thermalBus,
187186
storageVolumeLvl,
188-
storageVolumeLvlMin,
189187
inletTemp,
190188
returnTemp,
191189
c,

0 commit comments

Comments
 (0)