Power Flow#

Network class methods#

pypsa.Network.calculate_dependent_values()

Calculate per unit impedances and append voltages to lines and shunt impedances.

pypsa.Network.lpf([snapshots, skip_pre])

Linear power flow for generic network.

pypsa.Network.pf([snapshots, skip_pre, ...])

Full non-linear power flow for generic network.

SubNetwork class methods#

pypsa.SubNetwork.lpf([snapshots, skip_pre])

Linear power flow for connected sub-network.

pypsa.SubNetwork.pf([snapshots, skip_pre, ...])

Non-linear power flow for connected sub-network.

pypsa.SubNetwork.find_bus_controls()

Find slack and all PV and PQ buses for a sub_network.

pypsa.SubNetwork.find_slack_bus()

Find the slack bus in a connected sub-network.

pypsa.SubNetwork.calculate_Y([skip_pre, ...])

Calculate bus admittance matrices for AC sub-networks.

pypsa.SubNetwork.calculate_PTDF([skip_pre])

Calculate the Power Transfer Distribution Factor (PTDF) for sub_network.

pypsa.SubNetwork.calculate_B_H([skip_pre])

Calculate B and H matrices for AC or DC sub-networks.

Other#

pypsa.pf.aggregate_multi_graph(sub_network)

Aggregate branches between same buses and replace with a single branch with aggregated properties (e.g. s_nom is summed, length is averaged).

pypsa.pf.apply_line_types(n)

Calculate line electrical parameters x, r, b, g from standard types.

pypsa.pf.apply_transformer_t_model(n)

Convert given T-model parameters to PI-model parameters using wye-delta transformation.

pypsa.pf.apply_transformer_types(n)

Calculate transformer electrical parameters x, r, b, g from standard types.

pypsa.pf.find_cycles(sub_network[, weight])

Find all cycles in the sub_network and record them in sub_network.C.

pypsa.pf.find_tree(sub_network[, weight])

Get the spanning tree of the graph, choose the node with the highest degree as a central "tree slack" and then see for each branch which paths from the slack to each node go through the branch.

pypsa.pf.network_batch_lpf(n[, snapshots])

Batched linear power flow with numpy.dot for several snapshots.

pypsa.pf.network_lpf(n[, snapshots, skip_pre])

Linear power flow for generic network.

pypsa.pf.network_pf(n[, snapshots, ...])

Full non-linear power flow for generic network.

pypsa.pf.newton_raphson_sparse(f, guess, dfdx)

Solve f(x) = 0 with initial guess for x and dfdx(x).

pypsa.pf.sub_network_pf_singlebus(sub_network)

Non-linear power flow for a sub-network consiting of a single bus.

pypsa.pf.wye_to_delta(z1, z2, z3)

Follows http://home.earthlink.net/~w6rmk/math/wyedelta.html.