11 #include <dpsim/PFSolver.h>
51 CPS::Real
sol_Vr(CPS::UInt k);
53 CPS::Real
sol_Vi(CPS::UInt k);
55 CPS::Complex
sol_Vcx(CPS::UInt k);
57 CPS::Real
P(CPS::UInt k);
59 CPS::Real
Q(CPS::UInt k);
74 CPS::Real timeStep, CPS::Logger::Level logLevel);
Solver class using the nonlinear powerflow (PF) formulation.
Powerflow solver class considering power mismatch and voltages in polar coordinates.
CPS::Vector sol_P
Solution vector of active power.
void resize_complex_sol(CPS::Int n)
Resize complex solution vector.
void calculateBranchFlow()
Calculate branch flows from current solution and store them in line and transformer components.
void setSolution()
Set final solution.
void calculateQAtPVBuses()
Calculate the reactive power at all PV buses from current solution.
void generateInitialSolution(Real time, bool keep_last_solution=false)
Generate initial solution for current time step.
CPS::VectorComp sol_S_complex
Solution vector of representing sol_P and sol_Q as complex quantity.
PFSolverPowerPolar(CPS::String name, const CPS::SystemTopology &system, CPS::Real timeStep, CPS::Logger::Level logLevel)
Constructor to be used in simulation examples.
void updateSolution()
Update solution in each iteration.
CPS::Vector sol_D
Solution vector of voltage angle.
CPS::Real sol_Vi(CPS::UInt k)
Calculate imaginary part of voltage from sol_V and sol_D.
void calculateJacobian()
Calculate the Jacobian.
void calculatePAndQAtSlackBus()
Calculate P and Q at slack bus from current solution.
CPS::Vector sol_Q
Solution vector of reactive power.
CPS::Real Q(CPS::UInt k)
Calculate the reactive power at a bus from current solution.
CPS::Complex sol_Vcx(CPS::UInt k)
Calculate complex voltage from sol_V and sol_D.
void calculateMismatch()
Calculate mismatch.
void resize_sol(CPS::Int n)
Resize solution vector.
CPS::Real sol_Vr(CPS::UInt k)
Calculate real part of voltage from sol_V and sol_D.
CPS::Real P(CPS::UInt k)
Calculate active power at a bus from current solution.
void calculateNodalInjection()
Calculate nodal power injections and store them in first line or transformer (in case no line is conn...
CPS::Vector sol_V
Solution vector of voltage magnitude.
void calculatePAndQInjectionPQBuses()
Calculate complex power flowing from this node to the other nodes.
CPS::VectorComp sol_V_complex
Solution vector of representing sol_V and sol_D as complex quantity.