# girijashankar69/sih-2026-oil architecture

> Architecture diagram of the GitHub repository girijashankar69/sih-2026-oil, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/girijashankar69/sih-2026-oil
- Repository: https://github.com/girijashankar69/sih-2026-oil

## Overview

This is a Streamlit engineering dashboard for Baghewala heavy-oil CSS and sucker-rod operations. Users inspect a multi-well field and a selected well’s cycle state, compare baseline and optimized CSS/SRP schedules, and review equipment-health and dynamometer diagnostics. The digital twin combines reservoir, wellbore, and rod calculations; the optimizer evaluates joint cycle choices, while UI components render engineering visualizations. README documents surrogate evaluation, maintenance forecasting, and closed-loop VFD control; those capabilities are represented, but unsampled wiring is not assumed. Edges reflect only calls or data use supported by the excerpts or README.

Main entry points: [`app.py`](https://github.com/girijashankar69/sih-2026-oil/blob/main/app.py) (Streamlit dashboard), [`core/twin/digital_twin.py`](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/twin/digital_twin.py) (Well digital twin), [`core/ml/joint_optimizer.py`](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/joint_optimizer.py) (Joint CSS-SRP optimizer), [`core/physics/sucker_rod_dynamics.py`](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/sucker_rod_dynamics.py) (Rod-wave dynamics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Dashboard workflow"]
  node_dashboard["Streamlit dashboard<br/>[app.py]"]
  node_visuals["Engineering visualizations<br/>[components.py]"]
end

subgraph group_models["Physics models"]
  node_thermal["CSS reservoir model"]
  node_rheology["Heavy-oil rheology<br/>[fluid_rheology.py]"]
  node_hydraulics["Wellbore hydraulics"]
  node_rod["Rod-wave dynamics"]
end

subgraph group_analytics["AI and optimization"]
  node_optimizer["Joint CSS-SRP optimizer<br/>[joint_optimizer.py]"]
  node_surrogate["Cycle surrogate<br/>[surrogate_model.py]"]
  node_classifier["Dyno-card diagnostics"]
  node_maintenance["Predictive maintenance"]
end

subgraph group_field["Field twin and data"]
  node_twin["Well digital twin<br/>[digital_twin.py]"]
  node_fielddata["Field sample data"]
  node_vfd["Autonomous VFD control<br/>[digital_twin.py]"]
end

node_operator(("Field engineer"))

node_operator -->|"operates"| node_dashboard
node_dashboard -->|"reads well state"| node_twin
node_dashboard -->|"runs comparison"| node_optimizer
node_dashboard -->|"renders charts"| node_visuals
node_twin -->|"simulates cycle"| node_thermal
node_twin -->|"computes profile"| node_hydraulics
node_twin -->|"solves dynamics"| node_rod
node_hydraulics -->|"evaluates fluid"| node_rheology
node_optimizer -->|"simulates cycles"| node_thermal
node_optimizer -->|"evaluates candidates"| node_surrogate
node_optimizer -->|"solves dynamics"| node_rod
node_classifier -->|"uses rod model"| node_rod
node_twin -->|"loads well metadata"| node_fielddata
node_twin -->|"selects SPM"| node_vfd
node_dashboard -.->|"diagnoses cards"| node_classifier
node_dashboard -.->|"shows health forecasts"| node_maintenance

click node_dashboard "https://github.com/girijashankar69/sih-2026-oil/blob/main/app.py"
click node_visuals "https://github.com/girijashankar69/sih-2026-oil/blob/main/ui/components.py"
click node_thermal "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/thermal_reservoir.py"
click node_rheology "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/fluid_rheology.py"
click node_hydraulics "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/wellbore_hydraulics.py"
click node_rod "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/sucker_rod_dynamics.py"
click node_optimizer "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/joint_optimizer.py"
click node_surrogate "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/surrogate_model.py"
click node_classifier "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/dyno_card_classifier.py"
click node_maintenance "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/predictive_maintenance.py"
click node_twin "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/twin/digital_twin.py"
click node_fielddata "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/data/sample_data_generator.py"
click node_vfd "https://github.com/girijashankar69/sih-2026-oil/blob/main/core/twin/digital_twin.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_visuals toneBlue
class node_thermal,node_rheology,node_hydraulics,node_rod toneAmber
class node_optimizer,node_surrogate,node_classifier,node_maintenance toneMint
class node_twin,node_fielddata,node_vfd toneRose
class node_operator toneIndigo
```

## Components

### Dashboard workflow

- [Streamlit dashboard](https://github.com/girijashankar69/sih-2026-oil/blob/main/app.py): `app.py`
- [Engineering visualizations](https://github.com/girijashankar69/sih-2026-oil/blob/main/ui/components.py): `ui/components.py`

### Physics models

- [CSS reservoir model](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/thermal_reservoir.py): `core/physics/thermal_reservoir.py`
- [Heavy-oil rheology](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/fluid_rheology.py): `core/physics/fluid_rheology.py`
- [Wellbore hydraulics](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/wellbore_hydraulics.py): `core/physics/wellbore_hydraulics.py`
- [Rod-wave dynamics](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/physics/sucker_rod_dynamics.py): `core/physics/sucker_rod_dynamics.py`

### AI and optimization

- [Joint CSS-SRP optimizer](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/joint_optimizer.py): `core/ml/joint_optimizer.py`
- [Cycle surrogate](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/surrogate_model.py): `core/ml/surrogate_model.py`
- [Dyno-card diagnostics](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/dyno_card_classifier.py): `core/ml/dyno_card_classifier.py`
- [Predictive maintenance](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/ml/predictive_maintenance.py): `core/ml/predictive_maintenance.py`

### Field twin and data

- [Well digital twin](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/twin/digital_twin.py): `core/twin/digital_twin.py`
- [Field sample data](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/data/sample_data_generator.py): `core/data/sample_data_generator.py`
- [Autonomous VFD control](https://github.com/girijashankar69/sih-2026-oil/blob/main/core/twin/digital_twin.py): `core/twin/digital_twin.py`

### Other components

- **Field engineer**

## Connections

- Field engineer → Streamlit dashboard: operates
- Streamlit dashboard → Well digital twin: reads well state
- Streamlit dashboard → Joint CSS-SRP optimizer: runs comparison
- Streamlit dashboard → Engineering visualizations: renders charts
- Well digital twin → CSS reservoir model: simulates cycle
- Well digital twin → Wellbore hydraulics: computes profile
- Well digital twin → Rod-wave dynamics: solves dynamics
- Wellbore hydraulics → Heavy-oil rheology: evaluates fluid
- Joint CSS-SRP optimizer → CSS reservoir model: simulates cycles
- Joint CSS-SRP optimizer → Cycle surrogate: evaluates candidates
- Joint CSS-SRP optimizer → Rod-wave dynamics: solves dynamics
- Dyno-card diagnostics → Rod-wave dynamics: uses rod model
- Well digital twin → Field sample data: loads well metadata
- Well digital twin → Autonomous VFD control: selects SPM
- Streamlit dashboard → Dyno-card diagnostics: diagnoses cards
- Streamlit dashboard → Predictive maintenance: shows health forecasts
