-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement OffsetTransformer as another generator model #92
base: dev
Are you sure you want to change the base?
Conversation
982b08e
to
658091f
Compare
658091f
to
efde1a0
Compare
|
f8d0b49
to
2679760
Compare
@tobirieper this is the PR that includes the new OffsetGenerator feature. |
It is not possible to activate a generator with efficiency curve which does not have minimal loading. The simulation runs though, but the efficiency curve is not applied. This needs to be checked, a test written, and fixed. |
- Change `tests/test_basic.py`: - Remove pytests for black, as they do not work - Update `test_execution_not_terminated` - Update `tests/inputs/pytest_test.xlsx`
… settings - Add `GENSET_WITH_EFFICIENCY_CURVE` to `constants.py` - Process new parameter `GENSET_WITH_EFFICIENCY_CURVE` from excel input in `B` with new function `B.process_generator_settings`: Check possible and impossible combinations of input settings and turn warnings or error messages if invalid combination of `GENSET_WITH_MINIMAL_LOADING`, `GENSET_WITH_MINIMAL_LOADING` or `GENSET_WITH_MINIMAL_LOADING` is chosen. - Added pytest for the new function `B.process_generator_settings`
- Refactor `G2a.genset_fix` to `G2a.genset_fix_capacity_fix_efficiency_no_minload` - Refactor `G2a.genset_fix_minload` to `G2a.genset_fix_capacity_fix_efficiency_with_minload` - Refactor `G2a.genset_oem` to `G2a.genset_oem_fix_efficiency_no_minload`
To ease pytests in the future, add global constants: `LOG_MESSAGE_GENSET_FIX_CAPACITY_FIX_EFFICIENCY_NO_MINLOAD`, `LOG_MESSAGE_GENSET_FIX_CAPACITY_FIX_EFFICIENCY_WITH_MINLOAD`, `LOG_MESSAGE_GENSET_OEM_FIX_EFFICIENCY_NO_MINLOAD`
…del building - Change `F.update_dict` so that new parameter `GENSET_WITH_EFFICIENCY_CURVE` is parsed - Expand elif-statements in `G1` to choose appropriate generator model - Add new option of OffsetTransformer (`G2a.genset_fix_capacity_efficiency_curve_and_minimal_loading`) - Note: Efficiency of the new OffSet Transformer with efficiency curve uses the `GENSET_EFFICIENCY` as maximum efficiency, and `GENSET_EFFICIENCY/2` as minimal part-load efficiency
…rmer) - Add folder `tests/benchmark_tests` and `tests/benchmark_tests/timeseries/test_site.csv` to serve future tests - Add input file `tests/benchmark_tests/generator_with_efficiency_curve.xlsx` including a base case with optimization of the diesel generator and a follow-up case which uses that capacities to simulate a diesel generator with efficiency with the same capacities at the same location. Test only ensures that no termination takes place, but does not test anything else.
- Add `CONSUMPTION_FUEL_TIMESERIES_KWH` to `constants.py` - Change `G3.get_fuel()` to also store the `CONSUMPTION_FUEL_TIMESERIES_KWH` to `e_flows_df` - Ensure that `CONSUMPTION_FUEL_TIMESERIES_KWH` is stored into the `electricity_mg`-csv output, but not in the plot
- Add `EFFICIENCY_GENSET_TIMESERIES` to `constants.py - Create function `G3.get_efficiency_genset` to calculate the effective generator efficiency. In case that multiple generators are present, it represents the average efficiency, as it is based on the aggregated generator dispatch. - Store timeseries to `electricity-mg`-csv but exclude from energy dispatch plot - If `GENSET_WITH_EFFICIENCY_CURVE==True` store additionally a plot of the generator efficiency curve over the installed capacity. This curve is only exact if a single generator is used!
4aa9230
to
47c6714
Compare
Fixed the fuel price issue and rebased. @tobirieper this now also features the operational hours of the diesel generator. |
PR #90 must be merged first, in case that this branch is merged at all
This introduces the offsetTransformer from oemof solph, which required oemof to be updated to oemof-solph v4.0
Homer might be an interesting comparison: Generator model Homer
This is placed on hold due to more urgent issues.
Changes applied in this pull request:
constants.py
GENSET_WITH_EFFICIENCY_CURVE
to inputsB.process_generator_settings
to evaluate different generator settingsG2a
andG1
to make them explicitG2a.genset_fix_capacity_efficiency_curve_and_minimal_loading
. Note: Efficiency of the new OffSet Transformer with efficiency curve uses theGENSET_EFFICIENCY
as maximum efficiency, andGENSET_EFFICIENCY/2
as minimal part-load efficiencyCONSUMPTION_FUEL_TIMESERIES_KWH
from simulation results and store to csvEFFICIENCY_GENSET_TIMESERIES
), store to csvGENSET_WITH_EFFICIENCY_CURVE==True