Developer Guide

How the simulator is built, for readers extending or debugging it.

These pages describe how DPsim is built rather than what it computes. They are the background for adding a component, changing a solver, or working out why a simulation behaves as it does. For the physics and the numerical methods, see concepts.

Two ideas run through the codebase and are worth reading first. Attributes expose component parameters and state to the logger, the Python bindings and the scheduler. Tasks carry declared attribute dependencies, and those declarations are what the scheduler uses to order and parallelise a timestep.


Architecture and Conventions

What DPsim is built from, and the rules the code follows.

Attributes and Scheduling

The attribute system, and how it decides the order everything runs in.

Writing a Model

Adding a component, interfacing it with the solver, and finding out why it is wrong.

Solvers

The solvers below the nodal one, the linear backends, and state-space extraction.

Model Implementations

How each model family is arranged in code, paired with its equations under Concepts.