DPsim
Loading...
Searching...
No Matches
CPS::SimNode< VarType > Class Template Reference
Inheritance diagram for CPS::SimNode< VarType >:
[legend]
Collaboration diagram for CPS::SimNode< VarType >:
[legend]

Classes

class  MnaPostStepHarm
 

Public Types

typedef VarType Type
 
typedef std::shared_ptr< SimNode< VarType > > Ptr
 
typedef std::vector< Ptr > List
 
- Public Types inherited from CPS::TopologicalNode
typedef std::shared_ptr< TopologicalNodePtr
 
typedef std::vector< Ptr > List
 
- Public Types inherited from CPS::IdentifiedObject
typedef std::shared_ptr< IdentifiedObjectPtr
 
typedef std::vector< Ptr > List
 

Public Member Functions

 SimNode (String uid, String name, std::vector< UInt > matrixNodeIndex, PhaseType phaseType, const std::vector< Complex > &initialVoltage)
 This very general constructor is used by other constructors.
 
 SimNode (PhaseType phaseType=PhaseType::Single)
 Create ground node if no parameters are given.
 
 SimNode (String name, PhaseType phaseType=PhaseType::Single, const std::vector< Complex > &initialVoltage={0, 0, 0})
 
 SimNode (String uid, String name, UInt matrixNodeIndex, PhaseType phaseType=PhaseType::Single, const std::vector< Complex > &initialVoltage={0, 0, 0})
 
 SimNode (UInt matrixNodeIndex, PhaseType phaseType=PhaseType::Single)
 
void initialize ()
 Initialize mVoltage according to mInitialVoltage.
 
void initialize (Matrix frequencies)
 Initialize state matrices with size according to phase type and frequency number.
 
UInt matrixNodeIndex (PhaseType phaseType=PhaseType::Single) override
 Returns matrix index for specified phase.
 
std::vector< UInt > matrixNodeIndices () override
 Returns all matrix indices.
 
VarType singleVoltage (PhaseType phaseType=PhaseType::Single)
 
MatrixVar< VarType > voltage ()
 
void setMatrixNodeIndex (UInt phase, UInt matrixNodeIndex) override
 
void setVoltage (VarType newVoltage)
 
void setPower (VarType newPower)
 
void mnaUpdateVoltage (const Matrix &leftVector)
 
void mnaInitializeHarm (std::vector< Attribute< Matrix >::Ptr > leftVector)
 
void mnaUpdateVoltageHarm (const Matrix &leftVector, Int freqIdx)
 
const Task::List & mnaTasks ()
 Return list of MNA tasks.
 
void mnaUpdateVoltage (const Matrix &leftVector)
 
void mnaUpdateVoltage (const Matrix &leftVector)
 
void mnaInitializeHarm (std::vector< Attribute< Matrix >::Ptr > leftVector)
 
void setVoltage (Complex newVoltage)
 
void setPower (Complex newPower)
 
- Public Member Functions inherited from CPS::TopologicalNode
 TopologicalNode (String uid, String name, PhaseType phaseType, const std::vector< Complex > &initialVoltage)
 This very general constructor is used by other constructors.
 
Bool isGround () const
 
MatrixComp initialVoltage () const
 
void setInitialVoltage (MatrixComp voltage) const
 
void setInitialVoltage (Complex voltage) const
 
void setInitialVoltage (Complex voltage, Int phaseIndex) const
 
Complex initialSingleVoltage (PhaseType phaseType=PhaseType::Single)
 
PhaseType phaseType () const
 
- Public Member Functions inherited from CPS::IdentifiedObject
 IdentifiedObject (const String &uid, const String &name)
 
 IdentifiedObject (const String &name)
 
AttributeBase::Ptr attribute (const String &name) const
 Return pointer to an attribute.
 
template<typename T>
Attribute< T >::Ptr attributeTyped (const String &name) const
 Return pointer to an attribute.
 
const AttributeBase::Map & attributes () const
 
String name ()
 
String uid ()
 Returns unique id.
 
String type ()
 Get component type (cross-platform)
 
virtual String description ()
 

Public Attributes

const Attribute< MatrixVar< VarType > >::Ptr mVoltage
 
const Attribute< MatrixVar< VarType > >::Ptr mApparentPower
 Power injected at node.
 
- Public Attributes inherited from CPS::TopologicalNode
const Attribute< MatrixComp >::Ptr mInitialVoltage
 
- Public Attributes inherited from CPS::IdentifiedObject
const Attribute< String >::Ptr mName
 Human readable name.
 
const Attribute< String >::Ptr mUID
 Unique identifier.
 

Static Public Attributes

static Ptr GND
 

Protected Attributes

std::vector< UInt > mMatrixNodeIndex = {0}
 
Matrix mFrequencies
 List of considered network harmonics.
 
UInt mNumFreqs = 0
 Number of harmonics.
 
Task::List mMnaTasks
 
- Protected Attributes inherited from CPS::TopologicalNode
PhaseType mPhaseType = PhaseType::Single
 
Bool mIsGround = false
 
- Protected Attributes inherited from CPS::IdentifiedObject
AttributeList::Ptr mAttributes = AttributeList::make()
 Attribute List.
 

Additional Inherited Members

- Static Public Member Functions inherited from SharedFactory< SimNode< VarType > >
static std::shared_ptr< SimNode< VarType > > make (Args &&...args)
 

Detailed Description

template<typename VarType>
class CPS::SimNode< VarType >

Definition at line 17 of file SimNode.h.

Member Typedef Documentation

◆ List

template<typename VarType>
typedef std::vector<Ptr> CPS::SimNode< VarType >::List

Definition at line 33 of file SimNode.h.

◆ Ptr

template<typename VarType>
typedef std::shared_ptr<SimNode<VarType> > CPS::SimNode< VarType >::Ptr

Definition at line 32 of file SimNode.h.

◆ Type

template<typename VarType>
typedef VarType CPS::SimNode< VarType >::Type

Definition at line 31 of file SimNode.h.

Constructor & Destructor Documentation

◆ SimNode() [1/5]

template<typename VarType>
SimNode::SimNode ( String uid,
String name,
std::vector< UInt > matrixNodeIndex,
PhaseType phaseType,
const std::vector< Complex > & initialVoltage )

This very general constructor is used by other constructors.

Definition at line 14 of file SimNode.cpp.

◆ SimNode() [2/5]

template<typename VarType>
SimNode::SimNode ( PhaseType phaseType = PhaseType::Single)

Create ground node if no parameters are given.

Definition at line 34 of file SimNode.cpp.

◆ SimNode() [3/5]

template<typename VarType>
CPS::SimNode< VarType >::SimNode ( String name,
PhaseType phaseType = PhaseType::Single,
const std::vector< Complex > & initialVoltage = {0, 0, 0} )
inline

Create named node and optionally assigns an initial voltage. This should be the constructor called by users in examples.

Definition at line 49 of file SimNode.h.

◆ SimNode() [4/5]

template<typename VarType>
CPS::SimNode< VarType >::SimNode ( String uid,
String name,
UInt matrixNodeIndex,
PhaseType phaseType = PhaseType::Single,
const std::vector< Complex > & initialVoltage = {0, 0, 0} )
inline

Create node with name and node number. This is mostly used by functions.

Definition at line 54 of file SimNode.h.

◆ SimNode() [5/5]

template<typename VarType>
CPS::SimNode< VarType >::SimNode ( UInt matrixNodeIndex,
PhaseType phaseType = PhaseType::Single )
inline

Create node with default name and node number. This is mostly used by functions.

Definition at line 62 of file SimNode.h.

Member Function Documentation

◆ initialize()

template<typename VarType>
void SimNode::initialize ( Matrix frequencies)

Initialize state matrices with size according to phase type and frequency number.

Definition at line 57 of file SimNode.cpp.

◆ matrixNodeIndex()

template<typename VarType>
UInt SimNode::matrixNodeIndex ( PhaseType phaseType = PhaseType::Single)
overridevirtual

Returns matrix index for specified phase.

Implements CPS::TopologicalNode.

Definition at line 75 of file SimNode.cpp.

◆ matrixNodeIndices()

template<typename VarType>
std::vector< UInt > SimNode::matrixNodeIndices ( )
overridevirtual

Returns all matrix indices.

Implements CPS::TopologicalNode.

Definition at line 91 of file SimNode.cpp.

◆ mnaTasks()

template<typename VarType>
const Task::List & SimNode::mnaTasks ( )

Return list of MNA tasks.

Definition at line 111 of file SimNode.cpp.

◆ setMatrixNodeIndex()

template<typename VarType>
void SimNode::setMatrixNodeIndex ( UInt phase,
UInt matrixNodeIndex )
overridevirtual

Implements CPS::TopologicalNode.

Definition at line 107 of file SimNode.cpp.

◆ setPower()

template<typename VarType>
void CPS::SimNode< VarType >::setPower ( VarType newPower)
inline

Definition at line 84 of file SimNode.h.

◆ setVoltage()

template<typename VarType>
void CPS::SimNode< VarType >::setVoltage ( VarType newVoltage)
inline

Definition at line 82 of file SimNode.h.

◆ singleVoltage()

template<typename VarType>
VarType SimNode::singleVoltage ( PhaseType phaseType = PhaseType::Single)

Definition at line 65 of file SimNode.cpp.

◆ voltage()

template<typename VarType>
MatrixVar< VarType > SimNode::voltage ( )

Definition at line 102 of file SimNode.cpp.

Member Data Documentation

◆ GND

template<typename VarType>
Ptr CPS::SimNode< VarType >::GND
static

Definition at line 35 of file SimNode.h.

◆ mApparentPower

template<typename VarType>
const Attribute<MatrixVar<VarType>>::Ptr CPS::SimNode< VarType >::mApparentPower

Power injected at node.

Definition at line 40 of file SimNode.h.

◆ mFrequencies

template<typename VarType>
Matrix CPS::SimNode< VarType >::mFrequencies
protected

List of considered network harmonics.

Definition at line 24 of file SimNode.h.

◆ mMatrixNodeIndex

template<typename VarType>
std::vector<UInt> CPS::SimNode< VarType >::mMatrixNodeIndex = {0}
protected

Definition at line 22 of file SimNode.h.

◆ mMnaTasks

template<typename VarType>
Task::List CPS::SimNode< VarType >::mMnaTasks
protected

Definition at line 28 of file SimNode.h.

◆ mNumFreqs

template<typename VarType>
UInt CPS::SimNode< VarType >::mNumFreqs = 0
protected

Number of harmonics.

Definition at line 26 of file SimNode.h.

◆ mVoltage

template<typename VarType>
const Attribute<MatrixVar<VarType>>::Ptr CPS::SimNode< VarType >::mVoltage

Definition at line 38 of file SimNode.h.


The documentation for this class was generated from the following files: