![]() |
deltaFlow
|
Newton-Raphson power flow solver implementing the ISolver interface. More...
#include <NewtonRaphson.H>


Public Member Functions | |
| bool | solve (SolverContext &ctx) override |
| Run the Newton-Raphson solver using the given context. | |
| const char * | name () const override |
| Human-readable solver name (e.g. | |
Public Member Functions inherited from ISolver | |
| virtual | ~ISolver ()=default |
Static Public Member Functions | |
| static bool | run (const Eigen::MatrixXd &G, const Eigen::MatrixXd &B, const Eigen::VectorXd &Ps, const Eigen::VectorXd &Qs, Eigen::VectorXd &V, Eigen::VectorXd &delta, int n_bus, int n_pq, const std::vector< int > &pq_bus_id, int maxIter=1024, double tolerance=1E-8, std::vector< std::pair< int, double > > *iterHistory=nullptr, ISolverObserver *observer=nullptr) |
| Solves the power flow equations using the Newton-Raphson iterative method. | |
Newton-Raphson power flow solver implementing the ISolver interface.
Takes G, B matrices, scheduled power, initial voltage/angle guesses, and bus classification. It modifies V and delta in-place.
Definition at line 96 of file NewtonRaphson.H.
|
inlineoverridevirtual |
Human-readable solver name (e.g.
for logging/output).
Implements ISolver.
Definition at line 105 of file NewtonRaphson.H.
|
static |
Solves the power flow equations using the Newton-Raphson iterative method.
| G | Conductance matrix (real part of $$ Y_{bus} $$). |
| B | Susceptance matrix (imaginary part of $$ Y_{bus} $$). |
| Ps | Scheduled active power injections (Pg - Pl) [p.u.]. |
| Qs | Scheduled reactive power injections (Qg - Ql) [p.u.]. |
| V | (in/out) Voltage magnitudes [p.u.]. |
| delta | (in/out) Voltage angles [rad]. |
| n_bus | Total number of buses. |
| n_pq | Number of PQ buses. |
| pq_bus_id | 0-based indices of PQ buses. |
| maxIter | Maximum number of iterations (default: 1024). |
| tolerance | Convergence tolerance for power mismatches (default: $$ 1 \times 10^{-8} $$). |
| iterHistory | Optional pointer to store iteration number and error at each step. |
| observer | Optional injected progress/log observer (DIP); nullptr means silent (pure solve). |
Definition at line 55 of file NewtonRaphson.C.
References PowerMismatch::compute(), Jacobian::compute(), ISolverObserver::onFinished(), and ISolverObserver::onIteration().


|
overridevirtual |
Run the Newton-Raphson solver using the given context.
| ctx | Solver context (in/out parameters; see SolverContext). |
Implements ISolver.
Definition at line 37 of file NewtonRaphson.C.
References SolverContext::B, SolverContext::delta, SolverContext::G, SolverContext::iterHistory, SolverContext::maxIter, SolverContext::N, SolverContext::n_pq, SolverContext::observer, SolverContext::P, SolverContext::pq_bus_id, SolverContext::Q, run(), SolverContext::tolerance, and SolverContext::V.
