DPsim
Loading...
Searching...
No Matches
DPsim::Solver Class Referenceabstract

Base class for more specific solvers such as MNA, ODE or IDA. More...

#include <Solver.h>

Inheritance diagram for DPsim::Solver:
[legend]

Public Types

enum  Behaviour { Initialization , Simulation }
 
enum class  Type { MNA , DAE , NRP }
 
typedef std::shared_ptr< SolverPtr
 
typedef std::vector< Ptr > List
 

Public Member Functions

 Solver (String name, CPS::Logger::Level logLevel)
 
void setTimeStep (Real timeStep)
 
void doFrequencyParallelization (Bool freqParallel)
 
virtual void setSystem (const CPS::SystemTopology &system)
 
void doSystemMatrixRecomputation (Bool value)
 
void setLogSolveTimes (Bool value)
 
virtual void initialize ()
 
void doSteadyStateInit (Bool f)
 activate steady state initialization
 
void setSteadStIniTimeLimit (Real v)
 set steady state initialization time limit
 
void setSteadStIniAccLimit (Real v)
 set steady state initialization accuracy limit
 
virtual void setSolverAndComponentBehaviour (Solver::Behaviour behaviour)
 set solver and component to initialization or simulation behaviour
 
void doInitFromNodesAndTerminals (Bool f)
 activate powerflow initialization
 
virtual void setDirectLinearSolverConfiguration (DirectLinearSolverConfiguration &)
 set direct linear solver configuration (only available in MNA for now)
 
virtual void logLUTimes ()
 log LU decomposition times, if applicable
 
virtual CPS::Task::List getTasks ()=0
 Get tasks for scheduler.
 
virtual void log (Real time, Int timeStepCount)
 Log results.
 
void setMaxNumberOfIterations (int maxIterations)
 

Public Attributes

int mMaxIterations = 10
 

Protected Attributes

String mName
 Name for logging.
 
CPS::Logger::Level mLogLevel
 Logging level.
 
Bool mLogSolveTimes = true
 Collect step time for logging.
 
CPS::Logger::Log mSLog
 Logger.
 
Real mTimeStep
 Time step for fixed step solvers.
 
Bool mFrequencyParallel = false
 Activates parallelized computation of frequencies.
 
Real mSteadStIniTimeLimit = 10
 steady state initialization time limit
 
Real mSteadStIniAccLimit = 0.0001
 steady state initialization accuracy limit
 
Bool mSteadyStateInit = false
 Activates steady state initialization.
 
Bool mIsInInitialization = false
 Determines if solver is in initialization phase, which requires different behavior.
 
Bool mInitFromNodesAndTerminals = true
 
Bool mSystemMatrixRecomputation = false
 Enable recomputation of system matrix during simulation.
 
Behaviour mBehaviour = Solver::Behaviour::Simulation
 Solver behaviour initialization or simulation.
 

Detailed Description

Base class for more specific solvers such as MNA, ODE or IDA.

Definition at line 30 of file Solver.h.

Member Typedef Documentation

◆ List

typedef std::vector<Ptr> DPsim::Solver::List

Definition at line 33 of file Solver.h.

◆ Ptr

typedef std::shared_ptr<Solver> DPsim::Solver::Ptr

Definition at line 32 of file Solver.h.

Member Enumeration Documentation

◆ Behaviour

enum DPsim::Solver::Behaviour

Definition at line 35 of file Solver.h.

◆ Type

enum class DPsim::Solver::Type
strong

Solver types: Modified Nodal Analysis, Differential Algebraic, Newton Raphson

Definition at line 80 of file Solver.h.

Constructor & Destructor Documentation

◆ Solver()

DPsim::Solver::Solver ( String name,
CPS::Logger::Level logLevel )
inline

Definition at line 70 of file Solver.h.

◆ ~Solver()

virtual DPsim::Solver::~Solver ( )
inlinevirtual

Definition at line 75 of file Solver.h.

Member Function Documentation

◆ doFrequencyParallelization()

void DPsim::Solver::doFrequencyParallelization ( Bool freqParallel)
inline

Definition at line 84 of file Solver.h.

◆ doInitFromNodesAndTerminals()

void DPsim::Solver::doInitFromNodesAndTerminals ( Bool f)
inline

activate powerflow initialization

Definition at line 108 of file Solver.h.

◆ doSteadyStateInit()

void DPsim::Solver::doSteadyStateInit ( Bool f)
inline

activate steady state initialization

Definition at line 100 of file Solver.h.

◆ doSystemMatrixRecomputation()

void DPsim::Solver::doSystemMatrixRecomputation ( Bool value)
inline

Definition at line 90 of file Solver.h.

◆ getTasks()

virtual CPS::Task::List DPsim::Solver::getTasks ( )
pure virtual

◆ initialize()

virtual void DPsim::Solver::initialize ( )
inlinevirtual

◆ log()

virtual void DPsim::Solver::log ( Real time,
Int timeStepCount )
inlinevirtual

Log results.

Reimplemented in DPsim::MnaSolver< VarType >.

Definition at line 123 of file Solver.h.

◆ logLUTimes()

virtual void DPsim::Solver::logLUTimes ( )
inlinevirtual

log LU decomposition times, if applicable

Reimplemented in DPsim::MnaSolverDirect< VarType >.

Definition at line 115 of file Solver.h.

◆ setDirectLinearSolverConfiguration()

virtual void DPsim::Solver::setDirectLinearSolverConfiguration ( DirectLinearSolverConfiguration & )
inlinevirtual

set direct linear solver configuration (only available in MNA for now)

Reimplemented in DPsim::MnaSolverDirect< VarType >.

Definition at line 111 of file Solver.h.

◆ setLogSolveTimes()

void DPsim::Solver::setLogSolveTimes ( Bool value)
inline

Definition at line 94 of file Solver.h.

◆ setMaxNumberOfIterations()

void DPsim::Solver::setMaxNumberOfIterations ( int maxIterations)
inline

Definition at line 127 of file Solver.h.

◆ setSolverAndComponentBehaviour()

virtual void DPsim::Solver::setSolverAndComponentBehaviour ( Solver::Behaviour behaviour)
inlinevirtual

set solver and component to initialization or simulation behaviour

Reimplemented in DPsim::PFSolver.

Definition at line 106 of file Solver.h.

◆ setSteadStIniAccLimit()

void DPsim::Solver::setSteadStIniAccLimit ( Real v)
inline

set steady state initialization accuracy limit

Definition at line 104 of file Solver.h.

◆ setSteadStIniTimeLimit()

void DPsim::Solver::setSteadStIniTimeLimit ( Real v)
inline

set steady state initialization time limit

Definition at line 102 of file Solver.h.

◆ setSystem()

virtual void DPsim::Solver::setSystem ( const CPS::SystemTopology & system)
inlinevirtual

Definition at line 88 of file Solver.h.

◆ setTimeStep()

void DPsim::Solver::setTimeStep ( Real timeStep)
inline

Definition at line 82 of file Solver.h.

Member Data Documentation

◆ mBehaviour

Behaviour DPsim::Solver::mBehaviour = Solver::Behaviour::Simulation
protected

Solver behaviour initialization or simulation.

Definition at line 67 of file Solver.h.

◆ mFrequencyParallel

Bool DPsim::Solver::mFrequencyParallel = false
protected

Activates parallelized computation of frequencies.

Definition at line 49 of file Solver.h.

◆ mInitFromNodesAndTerminals

Bool DPsim::Solver::mInitFromNodesAndTerminals = true
protected

Activates powerflow initialization If this is false, all voltages are initialized with zero

Definition at line 62 of file Solver.h.

◆ mIsInInitialization

Bool DPsim::Solver::mIsInInitialization = false
protected

Determines if solver is in initialization phase, which requires different behavior.

Definition at line 59 of file Solver.h.

◆ mLogLevel

CPS::Logger::Level DPsim::Solver::mLogLevel
protected

Logging level.

Definition at line 41 of file Solver.h.

◆ mLogSolveTimes

Bool DPsim::Solver::mLogSolveTimes = true
protected

Collect step time for logging.

Definition at line 43 of file Solver.h.

◆ mMaxIterations

int DPsim::Solver::mMaxIterations = 10

SynGen Interface

Definition at line 126 of file Solver.h.

◆ mName

String DPsim::Solver::mName
protected

Name for logging.

Definition at line 39 of file Solver.h.

◆ mSLog

CPS::Logger::Log DPsim::Solver::mSLog
protected

Logger.

Definition at line 45 of file Solver.h.

◆ mSteadStIniAccLimit

Real DPsim::Solver::mSteadStIniAccLimit = 0.0001
protected

steady state initialization accuracy limit

Definition at line 55 of file Solver.h.

◆ mSteadStIniTimeLimit

Real DPsim::Solver::mSteadStIniTimeLimit = 10
protected

steady state initialization time limit

Definition at line 53 of file Solver.h.

◆ mSteadyStateInit

Bool DPsim::Solver::mSteadyStateInit = false
protected

Activates steady state initialization.

Definition at line 57 of file Solver.h.

◆ mSystemMatrixRecomputation

Bool DPsim::Solver::mSystemMatrixRecomputation = false
protected

Enable recomputation of system matrix during simulation.

Definition at line 64 of file Solver.h.

◆ mTimeStep

Real DPsim::Solver::mTimeStep
protected

Time step for fixed step solvers.

Definition at line 47 of file Solver.h.


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