How gridoptics/gridpack works
And highlight the main components
• HPC Core & Framework: Since GridPACK is built for distributed (parallel) computing, include a core block representing the “core simulation engine” which incorporates many of the distributed computing utilities. This includes components under directories like “src/parallel,” “src/math/petsc,” and “src/utilities.”
• Simulation & Analysis Modules: Show separate subcomponents for simulation applications (found in “src/applications” and “src/modules”). Within these, note modules for AC power flow, dynamic simulation, contingency analysis, state estimation, and others. It is also useful to indicate the building blocks (e.g., bus/branch models, network partitioning, mapping) often used to develop these simulations.
• Mathematical & Solver Libraries: Represent the math libraries and solver implementations, including the linear and nonlinear solvers implemented in “src/math” and interfaced with PETSc. This is the computational workhorse responsible for executing the numerical simulation.
• Data Input/Output & Parsing: Include the I/O and parser components (found in “src/parser,” “src/serial_io,” “src/export”) which handle reading grid data from various formats (e.g., PSSE, PTI formats) and streaming simulation results.
• Infrastructure & Configuration: Components in “src/configuration,” “src/factory,” “src/mapper,” “src/network,” and “src/partition” should be identified as essential parts of the framework that handle graph partitioning, network mapping, factory methods for module instantiation, and overall configuration management.
• Documentation & Examples: Although not part of runtime, note that extensive docs (in “docs”) and examples (in “src/applications/examples” and “python/src/example”) help understand and demonstrate GridPACK’s usage.
Interactions and relationships between components
• The core simulation engine must interface with solver libraries to process the equations arising from the grid network.
• Data flows from input modules (parsers and file I/O) into network creation and partitioning (via “src/partition” and “src/mapper”) before being fed into the simulation modules.
• Simulation applications (or “apps”) leverage building blocks from the “modules” directory to compute the simulation’s results, which are then exported through I/O and visualization components.
• The python wrappers serve as a high-level interface layer calling into the C++ backend, allowing for scripting of simulation setups and analyses.
Architectural patterns and design principles
• Modular and Layered: The project’s structure is very modular – separating concerns among data input, computational core (solvers and math libraries), and application-level simulations.
• Extensible Framework: GridPACK is designed as a framework with clearly identifiable building blocks (e.g., component factories, configuration modules) so that developers can plug in new components without reworking the entire system.
• Parallel and Distributed Processing: With dedicated directories (e.g., “src/parallel,” “src/partition”), the design emphasizes efficient distributed computing typical in HPC frameworks.
Relevant tools and technologies
• C++ (core engine) with extensive use of HPC libraries like PETSc.
• Python wrappers, which enable a high-level interface.
• Build and configuration tools (CMake is used extensively as seen in many CMakeLists.txt files).
• External libraries (Boost, Doxygen for documentation, and other numerical libraries as referenced in “docs/markdown/required”).