sogno-platform/dpsim

Review and document initialization procedures

Opened this issue · 1 comments

Current state (02.12.21):

  • MnaSolver::initialize
    • identifyTopologyObjects
      • classification of power/signal comps and variable comps
    • MnaSolver::createEmptySystemMatrix
      • is abstract and implementd by MnaSolverEigenDense and MnaSolverEigenSparse
        • creates empty matrices mSwitchedMatrices and mLuFactorizations (number depends on number of switches)
        • MnaSolverEigenSparse::createEmptySystemMatrix additionally creates mBaseSystemMatrix (number also depends on number of switches)
    • MnaSolver::initializeComponents
      • initializeFromNodesAndTerminals
      • initialize (here only signal comps, currently initialize of SimPowerComps in SystemTopology)
      • mnaInitialize
    • MnaSolver::initializeSystem
      • calls either initializeSystemWithParallelFrequencies or initializeSystemWithPrecomputedMatrices
        • MnaSolver::initializeSystemWithPrecomputedMatrices: stamps static elements by calling switchedMatrixStamp (implemented by Sparse or Dense)
          • MnaSolverEigenSparse::switchedMatrixStamp stamps all static elements to mSwitchedMatrices and calculates corresponding mLuFactorizations
      • called and extended by MnaSolverSysRecomp
        • saves static switch matrices as base matrices
        • add variable elements to currently active mSwitchedMatrices according to mCurrentSwitchStatus
        • recalculates correspondingly mLuFactorizations according to mCurrentSwitchStatus
  • PFSolver::initialize
    • PFSolver::initializeComponents
      • initializeFromNodesAndTerminals
      • calculatePerUnitParameters
    • PFSolver::determinePFBusType

@m-mirz

Results from first discussion:
We should clarify what should be initialized/instantiated in which method.

Available methods:

  • Constructor
  • initializeFromNodesAndTerminals
  • mnaInitialize
    • Instantiate and parametrise subcomponents here?

Besides, we should prevent that components override initialize(Matrix frequencies). The content should be moved to abovementioned methods. Besides, SimPowerComp<Complex>::initialize(frequencies) should be renamed.