Template Class MicrogridLine
Defined in File MicrogridLine.hpp
Inheritance Relationships
Base Type
public GridKit::CircuitComponent< ScalarT, IdxT >(Template Class CircuitComponent)
Class Documentation
-
template<class ScalarT, typename IdxT>
class MicrogridLine : public GridKit::CircuitComponent<ScalarT, IdxT> Declaration of a MicrogridLine class.
Public Functions
-
MicrogridLine(IdxT id, RealT R, RealT L, NodeT *node_ref, NodeT *bus1, NodeT *bus2)
Constructor for a constant MicrogridLine model.
Calls default ModelEvaluatorImpl constructor.
Model
is from paper: “Modeling, Analysis and Testing of Autonomous Operation
of an Inverter-Based Microgrid”, Nagaraju Pogaku, Milan Prodanovic, and Timothy C. Green, Section C
- Todo:
Consider having \omegaref as a global constant, not a node variable.
-
virtual int initialize()
Initialization of the grid model
-
virtual int allocate() final
Allocates all of the internal buffers for the component. If a components needs a more specialized allocation (such as by having additional internal buffers), it should override this function and then call it in the body to ensure it stays up-to-date with new implementations.
- Pre:
nnz_ and size_ must be set. Typically these are set by the child object in its constructor.
- Returns:
An error code, or 0 if success
-
virtual int evaluateInternalResidual() final
Evaluate residual of microgrid line.
-
virtual int evaluateExternalResidual() final
Evaluate all of the residuals of external variables of the component, modifying f_.
- Returns:
An error code, or 0 if successful.
-
virtual int evaluateJacobian()
Generate Jacobian for Microgrid Line.
- Template Parameters:
ScalarT –
IdxT –
- Returns:
int
-
MicrogridLine(IdxT id, RealT R, RealT L, NodeT *node_ref, NodeT *bus1, NodeT *bus2)