# manuvarkey/gelectrical architecture

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

- Interactive diagram: https://gitdiagram.com/manuvarkey/gelectrical
- Repository: https://github.com/manuvarkey/gelectrical

## Overview

GElectrical is a desktop application for modeling and analyzing LV/MV electrical distribution networks. Engineers create a schematic, configure network elements and load profiles, then run network and protection analyses and review or export results. The README documents capabilities beyond the sampled excerpts, including time-series studies, voltage drop, short circuit, rules checking, and PDF/report output; those documented branches are included, while their unsampled internal wiring is not inferred.

Main entry points: [`gelectrical/model/project.py`](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/project.py) (Project orchestration), [`gelectrical/model/pandapower.py`](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/pandapower.py) (Pandapower studies), [`gelectrical/elementmodel/element.py`](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/element.py) (Network elements), [`gelectrical/view/drawing.py`](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/drawing.py) (Schematic editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interaction"]
  node_application["Application UI<br/>[__init__.py]"]
  node_drawing_view["Schematic editor<br/>[drawing.py]"]
  node_field_view["Property editor<br/>[field.py]"]
  node_database_view["Equipment browser<br/>[database.py]"]
end

subgraph group_model["Network modeling"]
  node_drawing_model["Drawing model<br/>[drawing.py]"]
  node_element_model["Network elements<br/>[element.py]"]
  node_lines["Line elements<br/>[line.py]"]
  node_loads["Load elements<br/>[load.py]"]
  node_switches["Protection devices<br/>[switch.py]"]
  node_project["Project orchestration<br/>[project.py]"]
  node_equipment_data[("Equipment data")]
end

subgraph group_analysis["Engineering analysis"]
  node_network_model["Network model<br/>[networkmodel.py]"]
  node_pandapower["Pandapower studies<br/>[pandapower.py]"]
  node_protection["Coordination curves<br/>[protection.py]"]
  node_rules["Electrical rules<br/>[rulescheck.py]"]
end

subgraph group_results["Results and output"]
  node_analysis_view["Analysis display<br/>[analysis.py]"]
  node_protection_view["Protection display<br/>[protection.py]"]
  node_graph_view["Graphs<br/>[graph.py]"]
  node_report["Reports and export<br/>[project.py]"]
end

node_engineer(("Engineer"))

node_engineer -->|"starts"| node_application
node_engineer -->|"edits schematic"| node_drawing_view
node_drawing_view -.->|"edits drawing"| node_drawing_model
node_engineer -->|"configures elements"| node_field_view
node_field_view -.->|"selects equipment"| node_database_view
node_database_view -.->|"browses data"| node_equipment_data
node_drawing_model -.->|"holds elements"| node_element_model
node_element_model -->|"specialized as"| node_lines
node_element_model -->|"specialized as"| node_loads
node_element_model -->|"specialized as"| node_switches
node_project -->|"uses drawing"| node_drawing_model
node_project -->|"builds network"| node_network_model
node_project -->|"runs studies"| node_pandapower
node_project -->|"checks conformity"| node_rules
node_project -->|"opens coordination"| node_protection_view
node_network_model -->|"supplies model"| node_pandapower
node_pandapower -.->|"presents results"| node_analysis_view
node_pandapower -.->|"plots results"| node_graph_view
node_switches -->|"uses curves"| node_protection
node_protection_view -.->|"displays curves"| node_protection
node_protection_view -->|"shows graphs"| node_graph_view
node_project -->|"generates reports"| node_report
node_drawing_view -->|"exports PDF"| node_report
node_engineer -->|"sets load profiles"| node_project
node_project -->|"runs time series"| node_pandapower

click node_application "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/__init__.py"
click node_drawing_view "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/drawing.py"
click node_field_view "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/field.py"
click node_database_view "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/database.py"
click node_drawing_model "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/drawing.py"
click node_element_model "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/element.py"
click node_lines "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/line.py"
click node_loads "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/load.py"
click node_switches "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/switch.py"
click node_project "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/project.py"
click node_equipment_data "https://github.com/manuvarkey/gelectrical/tree/master/gelectrical/database"
click node_network_model "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/networkmodel.py"
click node_pandapower "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/pandapower.py"
click node_protection "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/protection.py"
click node_rules "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/rulescheck.py"
click node_analysis_view "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/analysis.py"
click node_protection_view "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/protection.py"
click node_graph_view "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/graph.py"
click node_report "https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/project.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_application,node_drawing_view,node_field_view,node_database_view toneBlue
class node_drawing_model,node_element_model,node_lines,node_loads,node_switches,node_project,node_equipment_data toneAmber
class node_network_model,node_pandapower,node_protection,node_rules toneMint
class node_analysis_view,node_protection_view,node_graph_view,node_report toneRose
class node_engineer toneIndigo
```

## Components

### Desktop interaction

- [Application UI](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/__init__.py): `gelectrical/__init__.py`
- [Schematic editor](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/drawing.py): `gelectrical/view/drawing.py`
- [Property editor](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/field.py): `gelectrical/view/field.py`
- [Equipment browser](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/database.py): `gelectrical/view/database.py`

### Network modeling

- [Drawing model](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/drawing.py): `gelectrical/model/drawing.py`
- [Network elements](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/element.py): `gelectrical/elementmodel/element.py`
- [Line elements](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/line.py): `gelectrical/elementmodel/line.py`
- [Load elements](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/load.py): `gelectrical/elementmodel/load.py`
- [Protection devices](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/elementmodel/switch.py): `gelectrical/elementmodel/switch.py`
- [Project orchestration](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/project.py): `gelectrical/model/project.py`
- [Equipment data](https://github.com/manuvarkey/gelectrical/tree/master/gelectrical/database): `gelectrical/database`

### Engineering analysis

- [Network model](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/networkmodel.py): `gelectrical/model/networkmodel.py`
- [Pandapower studies](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/pandapower.py): `gelectrical/model/pandapower.py`
- [Coordination curves](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/protection.py): `gelectrical/model/protection.py`
- [Electrical rules](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/rulescheck.py): `gelectrical/model/rulescheck.py`

### Results and output

- [Analysis display](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/analysis.py): `gelectrical/view/analysis.py`
- [Protection display](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/protection.py): `gelectrical/view/protection.py`
- [Graphs](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/view/graph.py): `gelectrical/view/graph.py`
- [Reports and export](https://github.com/manuvarkey/gelectrical/blob/master/gelectrical/model/project.py): `gelectrical/model/project.py`

### Other components

- **Engineer**

## Connections

- Engineer → Application UI: starts (evidence: `README.md`)
- Engineer → Schematic editor: edits schematic (evidence: `README.md`)
- Schematic editor → Drawing model: edits drawing
- Engineer → Property editor: configures elements (evidence: `README.md`)
- Property editor → Equipment browser: selects equipment
- Equipment browser → Equipment data: browses data
- Drawing model → Network elements: holds elements (evidence: `gelectrical/model/drawing.py`)
- Network elements → Line elements: specialized as (evidence: `gelectrical/elementmodel/line.py`)
- Network elements → Load elements: specialized as (evidence: `gelectrical/elementmodel/load.py`)
- Network elements → Protection devices: specialized as (evidence: `gelectrical/elementmodel/switch.py`)
- Project orchestration → Drawing model: uses drawing (evidence: `gelectrical/model/project.py`)
- Project orchestration → Network model: builds network (evidence: `gelectrical/model/project.py`)
- Project orchestration → Pandapower studies: runs studies (evidence: `gelectrical/model/project.py`)
- Project orchestration → Electrical rules: checks conformity (evidence: `gelectrical/model/project.py`)
- Project orchestration → Protection display: opens coordination (evidence: `gelectrical/model/project.py`)
- Network model → Pandapower studies: supplies model (evidence: `README.md`)
- Pandapower studies → Analysis display: presents results
- Pandapower studies → Graphs: plots results
- Protection devices → Coordination curves: uses curves (evidence: `gelectrical/elementmodel/switch.py`)
- Protection display → Coordination curves: displays curves
- Protection display → Graphs: shows graphs (evidence: `gelectrical/view/protection.py`)
- Project orchestration → Reports and export: generates reports (evidence: `README.md`)
- Schematic editor → Reports and export: exports PDF (evidence: `README.md`)
- Engineer → Project orchestration: sets load profiles (evidence: `README.md`)
- Project orchestration → Pandapower studies: runs time series (evidence: `README.md`)
