openego / eDisGo

Optimization of flexibility options and grid expansion for distribution grids based on PyPSA
GNU Affero General Public License v3.0
38 stars 14 forks source link

Problems with calculation of reactive power #345

Closed maike93he closed 1 year ago

maike93he commented 1 year ago

When calculating the reactive power values with the function edisgo.set_time_series_reactive_power_control(), reactive power values of heat pumps and charging points are calculated incorrectly. This is due to the fact that the function edisgo.timeseries.fixed_cosphi() doesn't account for HPs and CPs yet and the wrong power factors are retrieved from config.

To Reproduce

from edisgo.edisgo import import_edisgo_from_files

directory = str("/path/to/grid/2534")
edisgo = import_edisgo_from_files(directory, import_topology=True,
                                             import_timeseries=True,
                                             import_electromobility=True,
                                             import_heat_pump=True,
                                             import_dsm=False)
edisgo.set_time_series_reactive_power_control()

Expected behavior Reactive power of HP and CP components (edisgo.timeseries.loads_reactive_power) should all be 0 as their power factor is 1.

birgits commented 1 year ago

Thanks for reporting @maike93he! Should be fixed in PR #346.