Network model

The network model is largely implemented in PyPSA it is recommend to read the full PyPSA documentation first. Wich can be found at ..

Components

Below you will find the components used in the web application, this list is a narrow sub list of the PyPSA documentation

component list_name description
Network networks Container for all components and functions which act upon the whole network.
Bus buses Electrically fundamental node where x-port objects attach.
Line lines Lines include distribution and transmission lines, overhead lines and cables.
LineType line_types Standard line types with per length values for impedances.
Link links Link between two buses with controllable active power - can be used for a transport power flow model OR as a simplified version of point-to-point DC connection OR as a lossy energy converter. NB: for a lossless bi-directional HVDC or transport link, set p_min_pu = -1 and efficiency = 1. NB: It is assumed that the links neither produce nor consume reactive power.
Load loads PQ power consumer.
Generator generators Power generator.

Network

The Network is the overall container for all components.

attribute type unit default description status
name string n/a n/a Unique name Input (required)
snapshots list or pandas.Index n/a [“now”] List of snapshots or time steps. All time-dependent series quantities are indexed by network.snapshots. To reset the snapshots, call network.set_snapshots(new_snapshots). Input (optional)
buses pandas.DataFrame n/a n/a All static bus information compiled by PyPSA from inputs. Index is bus names, columns are bus attributes. Output
buses_t dictionary of pandas.DataFrames n/a n/a All time-dependent bus information compiled by PyPSA from inputs. Dictionary keys are time-dependent series attributes, index is network.snapshots, columns are bus names. Output
lines pandas.DataFrame n/a n/a All static line information compiled by PyPSA from inputs. Index is line names, columns are line attributes. Output
lines_t dictionary of pandas.DataFrames n/a n/a All time-dependent line information compiled by PyPSA from inputs. Dictionary keys are time-dependent series attributes, index is network.snapshots, columns are line names. Output
components pandas.DataFrame n/a n/a For each component type (buses, lines, etc.): static component information compiled by PyPSA from inputs. Index is component names, columns are component attributes. Output
components_t dictionary of pandas.DataFrames n/a n/a For each component type (buses, lines, etc.): time-dependent component information compiled by PyPSA from inputs. Dictionary keys are time-dependent series attributes, index is network.snapshots, columns are component names. Output
branches() pandas.DataFrame n/a n/a Dynamically generated concatenation of branch DataFrames: network.lines, network.transformers and network.links. Note that this is a copy and therefore changing entries will NOT update the original. Output

Bus

The bus is the fundamental node of the network, to which components like loads, generators and transmission lines attach. It enforces energy conservation for all elements feeding in and out of it (i.e. like Kirchhoff’s Current Law).

attribute type unit default description status
name string n/a n/a Unique name Input (required)
v_nom float kV
Nominal voltage Input (optional)
type string n/a n/a Placeholder for bus type. Not yet implemented. Input (optional)
v_mag_pu_set static or series per unit
Voltage magnitude set point, per unit of v_nom. Input (optional)
v_mag_pu_min float per unit
Minimum desired voltage, per unit of v_nom Input (optional)
v_mag_pu_max float per unit inf Maximum desired voltage, per unit of v_nom Input (optional)
control string n/a PQ P,Q,V control strategy for PF, must be “PQ”, “PV” or “Slack”. Note that this attribute is an output inherited from the controls of the generators attached to the bus; setting it directly on the bus will not have any effect. Output
sub_network string n/a n/a Name of connected sub-network to which bus belongs. This attribute is set by PyPSA in the function network.determine_network_topology(); do not set it directly by hand. Output
p series MW
active power at bus (positive if net generation at bus) Output
q series MVar
reactive power (positive if net generation at bus) Output
v_mag_pu series per unit
Voltage magnitude, per unit of v_nom Output
v_ang series radians
Voltage angle Output
marginal_price series currency
Locational marginal price from LOPF from power balance constraint Output

Generator

attribute type unit default description status
name string n/a n/a Unique name Input (required)
bus string n/a n/a name of bus to which generator is attached Input (required)
control string n/a PQ P,Q,V control strategy for PF, must be “PQ”, “PV” or “Slack”. Input (optional)
p_nom float MW
Nominal power for limits in OPF. Input (optional)
p_min_pu static or series per unit
The minimum output for each snapshot per unit of p_nom for the OPF (e.g. for variable renewable generators this can change due to weather conditions and compulsory feed-in; for conventional generators it represents a minimal dispatch). Note that if comittable is False and p_min_pu > 0, this represents a must-run condition. Input (optional)
p_max_pu static or series per unit
The maximum output for each snapshot per unit of p_nom for the OPF (e.g. for varialbe renewable generators this can change due to weather conditions; for conventional generators it represents a maximum dispatch). Input (optional)
p_set static or series MW
active power set point (for PF) Input (optional)
q_set static or series MVar
reactive power set point (for PF) Input (optional)
sign float n/a
power sign Input (optional)
marginal_cost float currency/MWh
Marginal cost of production of 1 MWh. Input (optional)
capital_cost float currency/MW
Capital cost of extending p_nom by 1 MW. Input (optional)
efficiency float per unit
Ratio between primary energy and electrical energy, e.g. takes value 0.4 MWh_elec/MWh_thermal for gas. This is important for determining CO2 emissions per MWh. Input (optional)
start_up_cost float currency
Cost to start up the generator. Only read if committable is True. Input (optional)
shut_down_cost float currency
Cost to shut down the generator. Only read if committable is True. Input (optional)
min_up_time int snapshots 0 Minimum number of snapshots for status to be 1. Only read if committable is True. Input (optional)
min_down_time int snapshots 0 Minimum number of snapshots for status to be 0. Only read if committable is True. Input (optional)
initial_status int n/a 1 Initial status. Only read if committable is True. Input (optional)
ramp_limit_up float per unit NaN Maximum active power increase from one snapshot to the next, per unit of the nominal power. Ignored if NaN. Input (optional)
ramp_limit_down float per unit NaN Maximum active power decrease from one snapshot to the next, per unit of the nominal power. Ignored if NaN. Input (optional)
p series MW
active power at bus (positive if net generation) Output
q series MVar
reactive power (positive if net generation) Output
p_nom_opt float MW
Optimised nominal power. Output
status series n/a 1 Status (1 is on, 0 is off). Only outputted if committable is True. Output

Lines

attribute type unit default description status
name string n/a n/a Unique name Input (required)
bus0 string n/a n/a Name of first bus to which branch is attached. Input (required)
bus1 string n/a n/a Name of second bus to which branch is attached. Input (required)
type string n/a n/a Name of line standard type. If this is not an empty string “”, then the line standard type impedance parameters are multiplied with the line length and divided/multiplied by num_parallel to compute x, r, etc. This will override any values set in r, x, and b. If the string is empty, PyPSA will simply read r, x, etc. Input (optional)
x float Ohm
Series reactance; must be non-zero for AC branch in linear power flow. If the line has series inductance \(L\) in Henries then \(x = 2\pi f L\) where \(f\) is the frequency in Hertz. Series impedance \(z = r + jx\) must be non-zero for the non-linear power flow. Ignored if type defined. Input (required)
r float Ohm
Series resistance; must be non-zero for DC branch in linear power flow. Series impedance \(z = r + jx\) must be non-zero for the non-linear power flow. Ignored if type defined. Input (required)
g float Siemens
Shunt conductivity. Shunt admittance is \(y = g + jb\). Input (optional)
b float Siemens
Shunt susceptance. If the line has shunt capacitance \(C\) in Farads then \(b = 2\pi f C\) where \(f\) is the frequency in Hertz. Shunt admittance is \(y = g + jb\). Ignored if type defined. Input (optional)
s_nom float MVA
Limit of apparent power which can pass through branch. Input (optional)
capital_cost float currency/MVA
Capital cost of extending s_nom by 1 MVA. Input (optional)
length float km
Length of line used when “type” is set, also useful for calculating the capital cost. Input (optional)
terrain_factor float per unit
Terrain factor for increasing capital cost. Input (optional)
v_ang_min float Degrees -inf Minimum voltage angle difference across the line. Input (optional)
v_ang_max float Degrees inf Maximum voltage angle difference across the line. Input (optional)
sub_network string n/a n/a Name of connected sub-network to which lines belongs. This attribute is set by PyPSA in the function network.determine_network_topology(); do not set it directly by hand. Output
p0 series MW
Active power at bus0 (positive if branch is withdrawing power from bus0). Output
q0 series MVar
Reactive power at bus0 (positive if branch is withdrawing power from bus0). Output
p1 series MW
Active power at bus1 (positive if branch is withdrawing power from bus1). Output
q1 series MVar
Reactive power at bus1 (positive if branch is withdrawing power from bus1). Output
x_pu float per unit
Per unit series reactance calculated by PyPSA from x and bus.v_nom. Output
r_pu float per unit
Per unit series resistance calculated by PyPSA from r and bus.v_nom Output
g_pu float per unit
Per unit shunt conductivity calculated by PyPSA from g and bus.v_nom Output
b_pu float per unit
Per unit shunt susceptance calculated by PyPSA from b and bus.v_nom Output
s_nom_opt float MVA
Optimised capacity for apparent power. Output

Loads

attribute type unit default description status
name string n/a n/a Unique name Input (required)
bus string n/a n/a Name of bus to which load is attached. Input (required)
type string n/a n/a Placeholder for load type. Not yet implemented. Input (optional)
p_set static or series MW
Active power consumption (positive if the load is consuming power). Input (optional)
q_set static or series MVar
Reactive power consumption (positive if the load is inductive). Input (optional)
sign float n/a -1. power sign (opposite sign to generator) Input (optional)
p series MW
active power at bus (positive if net load) Output
q series MVar
reactive power (positive if net load) Output