-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: multiple streams in system (#242)
Multiple streams can be used to handle crossover streams individually in a train. Currently no additional streams can be given, as the system does not support providing several rates/streams per consumer.
- Loading branch information
Showing
13 changed files
with
342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/libecalc/fixtures/cases/consumer_system_v2_multiple_streams/data/compressor1.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DATE, rate | ||
2022-01-01, 0 | ||
2024-01-01, 0 | ||
2025-01-01, 0 | ||
2026-01-01, 4000000 |
7 changes: 7 additions & 0 deletions
7
...ibecalc/fixtures/cases/consumer_system_v2_multiple_streams/data/compressor_sampled_1d.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
RATE,FUEL,POWER | ||
0,0,0 | ||
1000000,10000,1.0 | ||
2000000,11000,2.0 | ||
3000000,12000,3.0 | ||
4000000,13000,4.0 | ||
|
120 changes: 120 additions & 0 deletions
120
src/libecalc/fixtures/cases/consumer_system_v2_multiple_streams/data/consumer_system_v2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
START: 2022-01-01 | ||
END: 2026-01-01 | ||
|
||
FUEL_TYPES: | ||
- NAME: fuel_gas | ||
PRICE: 1.5 # NOK/Sm3 | ||
CATEGORY: FUEL-GAS | ||
EMISSIONS: | ||
- NAME: co2 | ||
FACTOR: "2.20" #kg/Sm3 | ||
TAX: 1.51 # NOK/Sm3 | ||
|
||
FACILITY_INPUTS: | ||
- NAME: compressor_sampled_1d | ||
FILE: compressor_sampled_1d.csv | ||
TYPE: COMPRESSOR_TABULAR | ||
|
||
TIME_SERIES: | ||
- NAME: compressor1 | ||
TYPE: DEFAULT | ||
FILE: 'compressor1.csv' | ||
|
||
VARIABLES: | ||
compressor1: | ||
VALUE: "compressor1;rate" | ||
|
||
MODELS: | ||
- NAME: medium_gas | ||
TYPE: FLUID | ||
FLUID_MODEL_TYPE: PREDEFINED | ||
EOS_MODEL: SRK | ||
GAS_TYPE: MEDIUM | ||
- NAME: rich_gas | ||
TYPE: FLUID | ||
FLUID_MODEL_TYPE: PREDEFINED | ||
EOS_MODEL: SRK | ||
GAS_TYPE: RICH | ||
- NAME: predefined_compressor_chart_curves_from_file | ||
TYPE: COMPRESSOR_CHART | ||
CHART_TYPE: VARIABLE_SPEED | ||
UNITS: | ||
RATE: AM3_PER_HOUR | ||
HEAD: M # M or KJ_PER_KG | ||
EFFICIENCY: FRACTION | ||
CURVES: | ||
FILE: einput/predefined_compressor_chart_curves.csv | ||
- NAME: advanced_variable_speed_compressor_train | ||
TYPE: VARIABLE_SPEED_COMPRESSOR_TRAIN_MULTIPLE_STREAMS_AND_PRESSURES | ||
STREAMS: # TODO: Not possible to define other streams than crossover (at least ingoing) as we don't allow several rates in system per consumer | ||
- NAME: in_stream_stage_1 | ||
TYPE: INGOING | ||
FLUID_MODEL: rich_gas | ||
- NAME: in_stream_crossover_from_2 | ||
TYPE: INGOING | ||
FLUID_MODEL: medium_gas | ||
- NAME: in_stream_crossover_from_3 | ||
TYPE: INGOING | ||
FLUID_MODEL: medium_gas # TODO: Requiring fluid model for crossover streams does not make sense here, should be part of the stream definition in compressor 3 or optional. Use a simplified mix if not provided maybe? | ||
STAGES: | ||
- INLET_TEMPERATURE: 30 # TODO: INLET_TEMPERATURE should be part of the stream definition also, riiight? | ||
COMPRESSOR_CHART: predefined_compressor_chart_curves_from_file | ||
STREAM: | ||
- in_stream_stage_1 | ||
- in_stream_crossover_from_2 | ||
- INLET_TEMPERATURE: 30 | ||
COMPRESSOR_CHART: predefined_compressor_chart_curves_from_file | ||
STREAM: | ||
- in_stream_crossover_from_3 | ||
- INLET_TEMPERATURE: 30 | ||
COMPRESSOR_CHART: predefined_compressor_chart_curves_from_file | ||
- INLET_TEMPERATURE: 30 | ||
COMPRESSOR_CHART: predefined_compressor_chart_curves_from_file | ||
PRESSURE_CONTROL: INDIVIDUAL_ASV_RATE | ||
POWER_ADJUSTMENT_CONSTANT: 1 | ||
- NAME: turbine | ||
TYPE: TURBINE | ||
LOWER_HEATING_VALUE: 38 # MJ/Sm3 | ||
TURBINE_LOADS: [ 0, 2.352, 4.589, 6.853, 9.125, 11.399, 13.673, 15.947, 18.223, 20.496, 22.767 ] # MW | ||
TURBINE_EFFICIENCIES: [ 0, 0.138, 0.210, 0.255, 0.286, 0.310, 0.328, 0.342, 0.353, 0.360, 0.362 ] | ||
POWER_ADJUSTMENT_CONSTANT: 1 | ||
- NAME: compressor_with_turbine | ||
TYPE: COMPRESSOR_WITH_TURBINE | ||
COMPRESSOR_MODEL: advanced_variable_speed_compressor_train | ||
TURBINE_MODEL: turbine | ||
|
||
|
||
INSTALLATIONS: | ||
- NAME: installation | ||
HCEXPORT: 17 | ||
FUEL: fuel_gas | ||
CATEGORY: FIXED | ||
FUELCONSUMERS: | ||
- NAME: compressor_system_v2 | ||
CATEGORY: COMPRESSOR | ||
TYPE: COMPRESSOR_SYSTEM@v2 | ||
CONSUMERS: | ||
- NAME: compressor1 | ||
ENERGY_USAGE_MODEL: compressor_with_turbine | ||
- NAME: compressor2 | ||
ENERGY_USAGE_MODEL: compressor_sampled_1d | ||
- NAME: compressor3 | ||
ENERGY_USAGE_MODEL: compressor_sampled_1d | ||
COMPONENT_CONDITIONS: | ||
CROSSOVER: | ||
- NAME: in_stream_crossover_1 | ||
FROM: compressor2 | ||
TO: compressor1 | ||
- NAME: in_stream_crossover_from_3 | ||
FROM: compressor3 | ||
TO: compressor1 | ||
OPERATIONAL_SETTINGS: | ||
- RATES: [ 1000000, 6000000, 7000000 ] | ||
INLET_PRESSURE: 50 | ||
OUTLET_PRESSURE: 250 | ||
- RATES: [ "$var.compressor1", 6000000, 7000000 ] | ||
INLET_PRESSURE: 50 | ||
OUTLET_PRESSURE: 125 | ||
- RATES: [ 1000000, 6000000, 7000000 ] | ||
INLET_PRESSURE: 50 | ||
OUTLET_PRESSURE: 125 |
37 changes: 37 additions & 0 deletions
37
...es/consumer_system_v2_multiple_streams/data/einput/predefined_compressor_chart_curves.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
SPEED,RATE,HEAD,EFFICIENCY | ||
7689,2900.0666,8412.9156,0.723 | ||
7689,3503.8068,7996.2541,0.7469 | ||
7689,4002.5554,7363.8161,0.7449 | ||
7689,4595.0148,6127.1702,0.7015 | ||
8787,3305.5723,10950.9557,0.7241 | ||
8787,4000.1546,10393.3867,0.7449 | ||
8787,4499.2342,9707.491,0.7464 | ||
8787,4996.8728,8593.8586,0.722 | ||
8787,5241.9892,7974.6002,0.7007 | ||
9886,3708.8713,13845.3808,0.723 | ||
9886,4502.2531,13182.6922,0.7473 | ||
9886,4993.5959,12425.3699,0.748 | ||
9886,5507.8114,11276.3984,0.7306 | ||
9886,5924.3308,10054.3539,0.704 | ||
10435,3928.0389,15435.484,0.7232 | ||
10435,4507.4654,14982.7351,0.7437 | ||
10435,5002.1249,14350.2222,0.7453 | ||
10435,5498.9912,13361.3245,0.7414 | ||
10435,6248.5937,11183.0276,0.701 | ||
10984,4138.6974,17078.8952,0.7226 | ||
10984,5002.4758,16274.9249,0.7462 | ||
10984,5494.3704,15428.5063,0.7468 | ||
10984,6008.6962,14261.7156,0.7349 | ||
10984,6560.148,12382.7538,0.7023 | ||
11533,4327.9175,18882.3055,0.7254 | ||
11533,4998.517,18235.1912,0.7444 | ||
11533,5505.8851,17531.6259,0.745 | ||
11533,6027.6167,16489.7195,0.7466 | ||
11533,6506.9064,15037.1474,0.7266 | ||
11533,6908.2832,13618.7919,0.7019 | ||
10767,4052.9057,16447,0.724 | ||
10767,4500.6637,16081,0.738 | ||
10767,4999.41,15546,0.7479 | ||
10767,5492.822,14640,0.74766 | ||
10767,6000.6263,13454,0.7298 | ||
10767,6439.4876,11973,0.7014 |
Oops, something went wrong.