ding0.grid.lv_grid package

Submodules

ding0.grid.lv_grid.build_grid module

ding0.grid.lv_grid.build_grid.build_lv_graph_residential(lvgd, selected_string_df)[source]

Builds nxGraph based on the LV grid model

Parameters:

Note

To understand what is happening in this method a few data table columns are explained here

  • count house branch: number of houses connected to a string
  • distance house branch: distance on a string between two house branches
  • string length: total length of a string
  • length house branch A|B: cable from string to connection point of a house

A|B in general brings some variation in to the typified model grid and refer to different length of house branches and different cable types respectively different cable widths.

ding0.grid.lv_grid.build_grid.build_lv_graph_ria(lvgd, grid_model_params)[source]

Build graph for LV grid of sectors retail/industrial and agricultural

Based on structural description of LV grid topology for sectors retail/industrial and agricultural (RIA) branches for these sectors are created and attached to the LV grid’s MV-LV substation bus bar.

LV loads of the sectors retail/industrial and agricultural are located in separat branches for each sector (in case of large load multiple of these). These loads are distributed across the branches by an equidistant distribution.

This function accepts the dict grid_model_params with particular structure

>>> grid_model_params = {
>>> ... 'agricultural': {
>>> ...     'max_loads_per_branch': 2
>>> ...     'single_peak_load': 140,
>>> ...     'full_branches': 2,
>>> ...     'remaining_loads': 1,
>>> ...     'load_distance': 800/3,
>>> ...     'load_distance_remaining': 400}}
Parameters:
  • lvgd (LVGridDistrictDing0) – Low-voltage grid district object
  • grid_model_params (dict) –

    Dict of structural information of sectoral LV grid branchwith particular structure, e.g.:

    grid_model_params = {
        'agricultural': {
            'max_loads_per_branch': 2
            'single_peak_load': 140,
            'full_branches': 2,
            'remaining_loads': 1,
            'load_distance': 800/3,
            'load_distance_remaining': 400
        }
    }
    

Note

We assume a distance from the load to the branch it is connected to of 30 m. This assumption is defined in the config files.

ding0.grid.lv_grid.build_grid.build_residential_branches(lvgd)[source]

Based on population and identified peak load data, the according grid topology for residential sector is determined and attached to the grid graph

Parameters:lvgd (LVGridDistrictDing0) – Low-voltage grid district object
ding0.grid.lv_grid.build_grid.build_ret_ind_agr_branches(lvgd)[source]

Determine topology of LV grid for retail/industrial and agricultural sector and create representative graph of the grid

Parameters:lvgd (LVGridDistrictDing0) – Low-voltage grid district object
ding0.grid.lv_grid.build_grid.grid_model_params_ria(lvgd)[source]

Determine grid model parameters for LV grids of sectors retail/industrial and agricultural

Parameters:lvgd (LVGridDistrictDing0) – Low-voltage grid district object
Returns:dict – Structural description of (parts of) LV grid topology
ding0.grid.lv_grid.build_grid.select_grid_model_residential(lvgd)[source]

Selects typified model grid based on population

Parameters:lvgd (LVGridDistrictDing0) – Low-voltage grid district object
Returns:

Note

In total 196 distinct LV grid topologies are available that are chosen by population in the LV grid district. Population is translated to number of house branches. Each grid model fits a number of house branches. If this number exceeds 196, still the grid topology of 196 house branches is used. The peak load of the LV grid district is uniformly distributed across house branches.

ding0.grid.lv_grid.build_grid.select_grid_model_ria(lvgd, sector)[source]

Select a typified grid for retail/industrial and agricultural

Parameters:
Returns:

dict – Parameters that describe branch lines of a sector

ding0.grid.lv_grid.build_grid.select_transformers(grid, s_max=None)[source]

Selects LV transformer according to peak load of LV grid district.

The transformers are chosen according to max. of load case and feedin-case considering load factors and power factor. The MV-LV transformer with the next higher available nominal apparent power is chosen. Therefore, a max. allowed transformer loading of 100% is implicitly assumed. If the peak load exceeds the max. power of a single available transformer, multiple transformer are build.

By default peak_load and peak_generation are taken from grid instance. The behavior can be overridden providing s_max as explained in Arguments.

Parameters:
  • grid (LVGridDing0) – LV grid data
  • s_max (dict) –

    dict containing maximum apparent power of load or generation case and str describing the case. For example

    {
        's_max': 480,
        'case': 'load'
    }
    

    or

    {
        's_max': 120,
        'case': 'gen'
    }
    

    s_max passed overrides grid.grid_district.peak_load respectively grid.station().peak_generation.

Returns:

Note

The LV transformer with the next higher available nominal apparent power is chosen. Therefore, a max. allowed transformer loading of 100% is implicitly assumed. If the peak load exceeds the max. power of a single available transformer, use multiple trafos.

ding0.grid.lv_grid.build_grid.transformer(grid)[source]

Choose transformer and add to grid’s station

Parameters:
  • grid (LVGridDing0) – LV grid data
  • s_max_from_buildings (boolean) – new approach if s_max_from_buildings

ding0.grid.lv_grid.check module

ding0.grid.lv_grid.check.get_branches(grid)[source]

Individual graphs of sectoral loads

Parameters:geid
Returns:
ding0.grid.lv_grid.check.overloading(graph)[source]

Check a grid for line overloading due to current exceeding I_th_max

Parameters:graph (networkx.Graph) – Graph structure as container for a grid topology including its equipment
Returns:overloaded (tuple) – Pairwise edges of graph a maximum occuring current

ding0.grid.lv_grid.lv_connect module

ding0.grid.lv_grid.lv_connect.lv_connect_generators(mv_grid, graph, debug=False)[source]

Connect LV generators to LV grid

Parameters:
  • lv_grid_district (LVGridDistrictDing0) – LVGridDistrictDing0 object for which the connection process has to be done
  • graph (NetworkX Graph Obj) – NetworkX graph object with nodes
  • debug (bool, defaults to False) – If True, information is printed during process
Returns:

NetworkX Graph Obj – NetworkX graph object with nodes and newly created branches

Module contents