Skip to content

Feature: Create partitioning of a system #323

@alexander-novo

Description

@alexander-novo

For co-simulation methods, it's necessary to partition a system and evaluate the residuals and Jacobians of the partitions separately.

For the proof-of-concept version of the co-simulation methods, this is how we did the partitioning:

  1. A full system is constructed normally.
  2. A "partitioning" routine takes the full system, as well as a list of component IDs and node IDs that we want to be in each partition. This routine creates duplicates of all of the components/nodes and creates new systems for each partition. Each system contains the components and nodes that are assigned to it through the lists of component IDs and node IDs.
  3. The routine identifies components/nodes which are connected to components/nodes in other partitions and creates additional copies of these components to be inserted into those systems without increasing the system size of those systems. It does this through a system similar, but distinct from, the reference/ground nodes (setting the system mapping to -1). We'll call these "forcing components/nodes" as they are responsible for introducing the coupling forcing into each system.
  4. A separate partitioning manager keeps track of the forcing components/nodes, as well as the mapping to/from the overall system vector between all of the partitions.

When an integrator asks for the residual or Jacobian evaluation for a particular partition, it updates the internal variables for all of the forcing components and voltages for each forcing node, then evaluates the residual or Jacobian for the system belonging to that partition.

If we wanted to implement partitioning this way, these were the changes we made to GridKit to support it:

  • a clone_component() virtual function which allows creation of a duplicate component (used for forcing components)
  • a way to keep track of forcing components/nodes that works similarly to reference nodes (in that you can set their values and they do not contribute to overall system vector) but can perhaps be distinct from reference nodes
  • currently, reference nodes are zero-d out every time distributeVectors() is called. This should not be the case for forcing components/nodes.

Let me know if we want to go with this design or if we want to go a different way @pelesh @nkoukpaizan

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions