11#include <dpsim-models/Base/Base_Ph1_Resistor.h>
12#include <dpsim-models/Definitions.h>
13#include <dpsim-models/Logger.h>
14#include <dpsim-models/MNASimPowerComp.h>
15#include <dpsim-models/Solver/MNATearInterface.h>
16#include <dpsim-models/Solver/PFSolverInterfaceBranch.h>
30 Real mBaseApparentPower;
41 Real mResistancePerUnit;
43 Real mConductancePerUnit;
48 Logger::Level logLevel = Logger::Level::off);
50 Resistor(String name, Logger::Level logLevel = Logger::Level::off)
53 SimPowerComp<Complex>::Ptr
clone(String name);
69 void mnaCompInitialize(Real omega, Real timeStep,
70 Attribute<Matrix>::Ptr leftVector);
79 Attribute<Matrix>::Ptr &leftVector);
83 AttributeBase::List &attributeDependencies,
84 AttributeBase::List &modifiedAttributes,
85 Attribute<Matrix>::Ptr &leftVector);
88 void mnaTearApplyMatrixStamp(SparseMatrixRow &tearMatrix);
String uid()
Returns unique id.
MNASimPowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
Common base class of all Component templates.
void mnaCompUpdateCurrent(const Matrix &leftVector)
Update interface current from MNA system result.
void mnaCompAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector)
add MNA pre and post step dependencies
SimPowerComp< Complex >::Ptr clone(String name)
Returns a modified copy of the component with the given suffix added to the name and without.
void mnaCompPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector)
MNA pre and post step operations.
void mnaCompUpdateVoltage(const Matrix &leftVector)
Update interface voltage from MNA system result.
Resistor(String name, Logger::Level logLevel=Logger::Level::off)
Defines name and logging level.
void setBaseVoltage(Real baseVoltage)
Set base voltage.
Resistor(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Defines UID, name and logging level.
void initializeFromNodesAndTerminals(Real frequency)
Initializes component from power flow data.
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix)
Stamps system matrix.
void pfApplyAdmittanceMatrixStamp(SparseMatrixCompRow &Y)
Stamps admittance matrix.
void calculatePerUnitParameters(Real baseApparentPower)
Initializes component from power flow data.