Skip to content

Commit 13cb4fb

Browse files
remove parameter storage minimum level from cylindrical thermal storage
1 parent c35b5cf commit 13cb4fb

File tree

12 files changed

+9
-76
lines changed

12 files changed

+9
-76
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

+2-14
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
public class CylindricalStorageInputFactory
2020
extends AssetInputEntityFactory<CylindricalStorageInput, ThermalUnitInputEntityData> {
2121
private static final String STORAGE_VOLUME_LVL = "storageVolumeLvl";
22-
private static final String STORAGE_VOLUME_LVL_MIN = "storageVolumeLvlMin";
2322
private static final String INLET_TEMP = "inletTemp";
2423
private static final String RETURN_TEMP = "returnTemp";
2524
private static final String C = "c";
@@ -30,7 +29,7 @@ public CylindricalStorageInputFactory() {
3029

3130
@Override
3231
protected String[] getAdditionalFields() {
33-
return new String[] {STORAGE_VOLUME_LVL, STORAGE_VOLUME_LVL_MIN, INLET_TEMP, RETURN_TEMP, C};
32+
return new String[] {STORAGE_VOLUME_LVL, INLET_TEMP, RETURN_TEMP, C};
3433
}
3534

3635
@Override
@@ -43,24 +42,13 @@ protected CylindricalStorageInput buildModel(
4342
final ThermalBusInput bus = data.getBusInput();
4443
final ComparableQuantity<Volume> storageVolumeLvl =
4544
data.getQuantity(STORAGE_VOLUME_LVL, StandardUnits.VOLUME);
46-
final ComparableQuantity<Volume> storageVolumeLvlMin =
47-
data.getQuantity(STORAGE_VOLUME_LVL_MIN, StandardUnits.VOLUME);
4845
final ComparableQuantity<Temperature> inletTemp =
4946
data.getQuantity(INLET_TEMP, StandardUnits.TEMPERATURE);
5047
final ComparableQuantity<Temperature> returnTemp =
5148
data.getQuantity(RETURN_TEMP, StandardUnits.TEMPERATURE);
5249
final ComparableQuantity<SpecificHeatCapacity> c =
5350
data.getQuantity(C, StandardUnits.SPECIFIC_HEAT_CAPACITY);
5451
return new CylindricalStorageInput(
55-
uuid,
56-
id,
57-
operator,
58-
operationTime,
59-
bus,
60-
storageVolumeLvl,
61-
storageVolumeLvlMin,
62-
inletTemp,
63-
returnTemp,
64-
c);
52+
uuid, id, operator, operationTime, bus, storageVolumeLvl, inletTemp, returnTemp, c);
6553
}
6654
}

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

+1-27
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
public class CylindricalStorageInput extends ThermalStorageInput {
2020
/** Available storage volume (typically in m³) */
2121
private final ComparableQuantity<Volume> storageVolumeLvl;
22-
/** Minimum permissible storage volume (typically in m³) */
23-
private final ComparableQuantity<Volume> storageVolumeLvlMin;
2422
/** Temperature of the inlet (typically in C) */
2523
private final ComparableQuantity<Temperature> inletTemp;
2624
/** Temperature of the outlet (typically in C) */
@@ -35,7 +33,6 @@ public class CylindricalStorageInput extends ThermalStorageInput {
3533
* @param operationTime operation time of the asset
3634
* @param bus Thermal bus, a thermal unit is connected to
3735
* @param storageVolumeLvl Available storage volume
38-
* @param storageVolumeLvlMin Minimum permissible storage volume
3936
* @param inletTemp Temperature of the inlet
4037
* @param returnTemp Temperature of the outlet
4138
* @param c Specific heat capacity of the storage medium
@@ -47,13 +44,11 @@ public CylindricalStorageInput(
4744
OperationTime operationTime,
4845
ThermalBusInput bus,
4946
ComparableQuantity<Volume> storageVolumeLvl,
50-
ComparableQuantity<Volume> storageVolumeLvlMin,
5147
ComparableQuantity<Temperature> inletTemp,
5248
ComparableQuantity<Temperature> returnTemp,
5349
ComparableQuantity<SpecificHeatCapacity> c) {
5450
super(uuid, id, operator, operationTime, bus);
5551
this.storageVolumeLvl = storageVolumeLvl.to(StandardUnits.VOLUME);
56-
this.storageVolumeLvlMin = storageVolumeLvlMin.to(StandardUnits.VOLUME);
5752
this.inletTemp = inletTemp.to(StandardUnits.TEMPERATURE);
5853
this.returnTemp = returnTemp.to(StandardUnits.TEMPERATURE);
5954
this.c = c.to(StandardUnits.SPECIFIC_HEAT_CAPACITY);
@@ -64,7 +59,6 @@ public CylindricalStorageInput(
6459
* @param id Identifier of the thermal unit
6560
* @param bus Thermal bus, a thermal unit is connected to
6661
* @param storageVolumeLvl Available storage volume
67-
* @param storageVolumeLvlMin Minimum permissible storage volume
6862
* @param inletTemp Temperature of the inlet
6963
* @param returnTemp Temperature of the outlet
7064
* @param c Specific heat capacity of the storage medium
@@ -74,13 +68,11 @@ public CylindricalStorageInput(
7468
String id,
7569
ThermalBusInput bus,
7670
ComparableQuantity<Volume> storageVolumeLvl,
77-
ComparableQuantity<Volume> storageVolumeLvlMin,
7871
ComparableQuantity<Temperature> inletTemp,
7972
ComparableQuantity<Temperature> returnTemp,
8073
ComparableQuantity<SpecificHeatCapacity> c) {
8174
super(uuid, id, bus);
8275
this.storageVolumeLvl = storageVolumeLvl.to(StandardUnits.VOLUME);
83-
this.storageVolumeLvlMin = storageVolumeLvlMin.to(StandardUnits.VOLUME);
8476
this.inletTemp = inletTemp.to(StandardUnits.TEMPERATURE);
8577
this.returnTemp = returnTemp.to(StandardUnits.TEMPERATURE);
8678
this.c = c.to(StandardUnits.SPECIFIC_HEAT_CAPACITY);
@@ -90,10 +82,6 @@ public ComparableQuantity<Volume> getStorageVolumeLvl() {
9082
return storageVolumeLvl;
9183
}
9284

93-
public ComparableQuantity<Volume> getStorageVolumeLvlMin() {
94-
return storageVolumeLvlMin;
95-
}
96-
9785
public ComparableQuantity<Temperature> getInletTemp() {
9886
return inletTemp;
9987
}
@@ -117,16 +105,14 @@ public boolean equals(Object o) {
117105
if (!(o instanceof CylindricalStorageInput that)) return false;
118106
if (!super.equals(o)) return false;
119107
return storageVolumeLvl.equals(that.storageVolumeLvl)
120-
&& storageVolumeLvlMin.equals(that.storageVolumeLvlMin)
121108
&& inletTemp.equals(that.inletTemp)
122109
&& returnTemp.equals(that.returnTemp)
123110
&& c.equals(that.c);
124111
}
125112

126113
@Override
127114
public int hashCode() {
128-
return Objects.hash(
129-
super.hashCode(), storageVolumeLvl, storageVolumeLvlMin, inletTemp, returnTemp, c);
115+
return Objects.hash(super.hashCode(), storageVolumeLvl, inletTemp, returnTemp, c);
130116
}
131117

132118
@Override
@@ -144,8 +130,6 @@ public String toString() {
144130
+ getThermalBus().getUuid()
145131
+ ", storageVolumeLvl="
146132
+ storageVolumeLvl
147-
+ ", storageVolumeLvlMin="
148-
+ storageVolumeLvlMin
149133
+ ", inletTemp="
150134
+ inletTemp
151135
+ ", returnTemp="
@@ -164,15 +148,13 @@ public static class CylindricalStorageInputCopyBuilder
164148
extends ThermalStorageInputCopyBuilder<CylindricalStorageInputCopyBuilder> {
165149

166150
private ComparableQuantity<Volume> storageVolumeLvl;
167-
private ComparableQuantity<Volume> storageVolumeLvlMin;
168151
private ComparableQuantity<Temperature> inletTemp;
169152
private ComparableQuantity<Temperature> returnTemp;
170153
private ComparableQuantity<SpecificHeatCapacity> c;
171154

172155
private CylindricalStorageInputCopyBuilder(CylindricalStorageInput entity) {
173156
super(entity);
174157
this.storageVolumeLvl = entity.getStorageVolumeLvl();
175-
this.storageVolumeLvlMin = entity.getStorageVolumeLvlMin();
176158
this.inletTemp = entity.getInletTemp();
177159
this.returnTemp = entity.getReturnTemp();
178160
this.c = entity.getC();
@@ -184,12 +166,6 @@ public CylindricalStorageInputCopyBuilder storageVolumeLvl(
184166
return this;
185167
}
186168

187-
public CylindricalStorageInputCopyBuilder storageVolumeLvlMin(
188-
ComparableQuantity<Volume> storageVolumeLvlMin) {
189-
this.storageVolumeLvlMin = storageVolumeLvlMin;
190-
return this;
191-
}
192-
193169
public CylindricalStorageInputCopyBuilder inletTemp(ComparableQuantity<Temperature> inletTemp) {
194170
this.inletTemp = inletTemp;
195171
return this;
@@ -209,7 +185,6 @@ public CylindricalStorageInputCopyBuilder c(ComparableQuantity<SpecificHeatCapac
209185
@Override
210186
public CylindricalStorageInputCopyBuilder scale(Double factor) {
211187
storageVolumeLvl(storageVolumeLvl.multiply(factor));
212-
storageVolumeLvlMin(storageVolumeLvlMin.multiply(factor));
213188
return this;
214189
}
215190

@@ -222,7 +197,6 @@ public CylindricalStorageInput build() {
222197
getOperationTime(),
223198
getThermalBus(),
224199
storageVolumeLvl,
225-
storageVolumeLvlMin,
226200
inletTemp,
227201
returnTemp,
228202
c);

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

+1-15
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ private static List<Try<Void, InvalidEntityException>> checkThermalHouse(
182182
* <ul>
183183
* <li>it is not null
184184
* <li>its available storage volume is positive
185-
* <li>its minimum permissible storage volume is positive and not greater than the available
186-
* storage volume
187185
* <li>its inlet temperature is equal/greater than the outlet temperature
188186
* <li>its specific heat capacity is positive
189187
* </ul>
@@ -213,25 +211,13 @@ private static List<Try<Void, InvalidEntityException>> checkCylindricalStorage(
213211
new InvalidEntityException(
214212
"Inlet temperature of the cylindrical storage cannot be lower than outlet temperature",
215213
cylindricalStorageInput)));
216-
// Check if minimum permissible storage volume is lower than overall available storage volume
217-
exceptions.add(
218-
Try.ofVoid(
219-
cylindricalStorageInput
220-
.getStorageVolumeLvlMin()
221-
.isGreaterThan(cylindricalStorageInput.getStorageVolumeLvl()),
222-
() ->
223-
new InvalidEntityException(
224-
"Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume",
225-
cylindricalStorageInput)));
226214

227215
exceptions.add(
228216
Try.ofVoid(
229217
() ->
230218
detectZeroOrNegativeQuantities(
231219
new Quantity<?>[] {
232-
cylindricalStorageInput.getStorageVolumeLvl(),
233-
cylindricalStorageInput.getStorageVolumeLvlMin(),
234-
cylindricalStorageInput.getC()
220+
cylindricalStorageInput.getStorageVolumeLvl(), cylindricalStorageInput.getC()
235221
},
236222
cylindricalStorageInput),
237223
InvalidEntityException.class));

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

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto
5353
assert id == parameter["id"]
5454
assert thermalBus == thermalBusInput
5555
assert storageVolumeLvl == getQuant(parameter["storagevolumelvl"], StandardUnits.VOLUME)
56-
assert storageVolumeLvlMin == getQuant(parameter["storagevolumelvlmin"], StandardUnits.VOLUME)
5756
assert inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE)
5857
assert returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE)
5958
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
@@ -65,7 +65,6 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta {
6565
operationTime == sptd.thermalStorage.operationTime
6666
thermalBus == sptd.thermalStorage.thermalBus
6767
storageVolumeLvl == sptd.storageVolumeLvl
68-
storageVolumeLvlMin == sptd.storageVolumeLvlMin
6968
inletTemp == sptd.inletTemp
7069
returnTemp == sptd.returnTemp
7170
c == sptd.c
@@ -84,7 +83,6 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta {
8483
operationTime == sptd.thermalStorage.operationTime
8584
thermalBus == sptd.thermalStorage.thermalBus
8685
storageVolumeLvl == sptd.storageVolumeLvl
87-
storageVolumeLvlMin == sptd.storageVolumeLvlMin
8886
inletTemp == sptd.inletTemp
8987
returnTemp == sptd.returnTemp
9088
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

+2-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class ThermalUnitValidationUtilsTest extends Specification {
4646

4747
// Specific data for thermal cylindric storage input
4848
private static final ComparableQuantity<Volume> storageVolumeLvl = Quantities.getQuantity(100, StandardUnits.VOLUME)
49-
private static final ComparableQuantity<Volume> storageVolumeLvlMin = Quantities.getQuantity(10, StandardUnits.VOLUME)
5049
private static final ComparableQuantity<Temperature> inletTemp = Quantities.getQuantity(100, StandardUnits.TEMPERATURE)
5150
private static final ComparableQuantity<Temperature> returnTemp = Quantities.getQuantity(80, StandardUnits.TEMPERATURE)
5251
private static final ComparableQuantity<SpecificHeatCapacity> c = Quantities.getQuantity(1.05, StandardUnits.SPECIFIC_HEAT_CAPACITY)
@@ -108,8 +107,7 @@ class ThermalUnitValidationUtilsTest extends Specification {
108107

109108
where:
110109
invalidCylindricalStorage || expectedSize || expectedException
111-
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)
112-
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)
113-
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)
110+
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)
111+
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)
114112
}
115113
}

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

-2
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ class SystemParticipantTestData {
169169
operationTime
170170
)
171171
public static final ComparableQuantity<Volume> storageVolumeLvl = Quantities.getQuantity(1.039154027, VOLUME)
172-
public static final ComparableQuantity<Volume> storageVolumeLvlMin = Quantities.getQuantity(0.3, VOLUME)
173172
public static final ComparableQuantity<Temperature> inletTemp = Quantities.getQuantity(110, TEMPERATURE)
174173
public static final ComparableQuantity<Temperature> returnTemp = Quantities.getQuantity(80, TEMPERATURE)
175174
public static final ComparableQuantity<SpecificHeatCapacity> c = Quantities.getQuantity(
@@ -181,7 +180,6 @@ class SystemParticipantTestData {
181180
OperationTime.notLimited(),
182181
thermalBus,
183182
storageVolumeLvl,
184-
storageVolumeLvlMin,
185183
inletTemp,
186184
returnTemp,
187185
c

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

-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class ThermalUnitInputTestData extends SystemParticipantTestData {
5050

5151
// 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)
@@ -62,7 +61,6 @@ class ThermalUnitInputTestData extends SystemParticipantTestData {
6261
operationTime,
6362
thermalBus,
6463
storageVolumeLvl,
65-
storageVolumeLvlMin,
6664
inletTemp,
6765
returnTemp,
6866
c)

0 commit comments

Comments
 (0)