# GridPACK DemoApp PowerFlow

Steady state powerflow analysis is a method of solving a general power system problem where the currents and voltages on the buses (nodes) and branches (lines) of an electric network are computed based on the impedances, current and power injections at nodes (if any), the boundary voltages (if any) and the topology of the network.

Power system applications provide this information to a solver in the form of a matrix of bus admittance (called Y), bus injections (called S) and boundary conditions (e.g., V).

Because the problem is essentially non-linear, various iterative solution methods are employed to obtain the solution to this flow problem. They include

- Gauss-Seidel (GS)
- This method is the simplest to describe and implement. It is guaranteed to converge for any network for which a solution exists, but it converges quite slowly. It is sometimes used to initialize other faster solution methods that can converge reliably (such as Newton-Raphson). The method is implicitly parallel.

- Newton-Raphson (NR)
- This method requires that a Jacobian be computed and maintained for the current system. It is not guaranteed to converge but when it does converge it is quite fast. The method is not readily parallelized.

- Forward-Backsweep (FBS)
- This method works only on radial flow models but it is extremely fast and can be readily parallelized for more networks.

- Conjugate-Gradient (CG)
- Yousu Chen TODO.

A demonstration case showing that the GridPACK can solve power flow problem using Newton-Raphson algorithm is provided with the GridPACK distribution. The power system input format is PTI v23 and the power flow results should match commercial tool results with the maximum difference less than 10^-6. Some specs are listed below:

- Input: Power system model in PSSE PTI V23 version format (IEEE-14 bus system is provided in GridPACK distribution)
- Outputs:
- Required: bus voltage, phase angle, line power flow (real and reactive)
- Optional: Ybus matrix

- To be enhanced (current limitation):
- Zero-impedance branch