How opm/opm-simulators works
Main Components Identification
The system should be divided into these major components:
• Flow Simulator Core
• Linear Solver System
• Models Framework
• Well Management System
• Time Stepping System
• Parallel Computing Infrastructure
• I/O Handling
Component Relationships
a) Core Layer (Center):
• Flow Simulator (BlackoilModel)
• Automatic Differentiation Engine
• Property System
b) Numerical Layer (Surrounding Core):
• Linear Solvers (ISTL-based)
• Preconditioners
• Time Stepping Controllers
• Convergence Handling
c) Physics Layer:
• Black Oil Model
• Compositional Models
• Well Models
• Aquifer Models
d) Infrastructure Layer (Outer):
• Parallel Computing Framework
• I/O Handlers
• Grid Management
• Restart Capability
Specific Implementation Details
• Rectangles: Main components
• Hexagons: Interfaces
Key Subsystems to Highlight
a) Simulator Core:
BlackoilModel <-> AutoDiff Engine <-> Property System
• ↕ ↕ ↕
Linear Solvers <-> Preconditioners <-> Time Stepping
b) Well System:
WellModel <-> WellState <-> WellControls
• ↕ ↕ ↕
Constraints <-> Equations <-> Properties
c) Parallel Computing:
MPI Layer <-> Load Balancing <-> Domain Decomposition
• ↕ ↕ ↕
Data Exchange <-> Synchronization <-> Gathering
Additional Elements
Important aspects:
• External dependencies (DUNE, MPI, etc.)
• File I/O formats (Eclipse format support)
• Configuration interfaces
• Logging and monitoring systems
Performance Critical Paths
• Linear solver iterations
• Well management
• Property calculations
• Parallel synchronization points
Version/Configuration Management
A section showing:
• Configuration management
• Runtime parameters
• Model selection
• Solver options
• Multiple layers
• Export to high-resolution formats
• Easy maintenance and updates