# mooghanem/aerodune architecture

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

- Interactive diagram: https://gitdiagram.com/mooghanem/aerodune
- Repository: https://github.com/mooghanem/aerodune

## Overview

AeroDune is a Streamlit application for exploring North Sinai sand movement, highway exposure, virtual windbreaks, and silica-sand economics. The principal workflow loads elevation, wind, and road data, then presents simulation and hazard results alongside a separate economic valuation. The dashboard excerpt is partial: its imports and visible calls support the main subsystem links, but not every internal dashboard action. The economics and fallback data behavior are supported by sampled source; external data links are included only where the source or README supports them.

Main entry points: [`app/dashboard.py`](https://github.com/mooghanem/aerodune/blob/main/app/dashboard.py) (Simulation dashboard), [`core/infrastructure.py`](https://github.com/mooghanem/aerodune/blob/main/core/infrastructure.py) (Highway rasterization), [`main.py`](https://github.com/mooghanem/aerodune/blob/main/main.py) (App launcher), [`core/dem_handler.py`](https://github.com/mooghanem/aerodune/blob/main/core/dem_handler.py) (DEM loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application interface"]
  node_launcher["App launcher<br/>[main.py]"]
  node_dashboard["Simulation dashboard<br/>[dashboard.py]"]
end

subgraph group_inputs["Terrain and forcing"]
  node_dem["DEM loading<br/>[dem_handler.py]"]
  node_wind["Wind parsing<br/>[wind_parser.py]"]
  node_roads["Highway rasterization<br/>[infrastructure.py]"]
end

subgraph group_simulation["Hazard simulation"]
  node_barrier["Virtual windbreak mask<br/>[dashboard.py]"]
  node_solver["Sand transport solver<br/>[physics_engine.py]"]
  node_hazard["Road hazard assessment<br/>[dashboard.py]"]
end

subgraph group_economics["Resource economics"]
  node_valuation["Silica value-add engine<br/>[economic_engine.py]"]
  node_projection["Ten-year projection<br/>[economic_engine.py]"]
end

node_user(("Analyst"))
node_elevation["Elevation raster files"]
node_windfile["Wind CSV data"]
node_osm["OpenStreetMap roads"]

node_user -->|"starts"| node_launcher
node_launcher -->|"launches"| node_dashboard
node_user -->|"configures"| node_dashboard
node_dashboard -->|"loads terrain"| node_dem
node_dashboard -->|"loads winds"| node_wind
node_dashboard -->|"loads highways"| node_roads
node_dem -->|"reads tiles"| node_elevation
node_wind -->|"reads CSV"| node_windfile
node_roads -->|"fetches network"| node_osm
node_dashboard -->|"configures mask"| node_barrier
node_dashboard -->|"runs simulation"| node_solver
node_barrier -.->|"modifies flux"| node_solver
node_dashboard -->|"evaluates encroachment"| node_hazard
node_roads -->|"provides road mask"| node_hazard
node_dashboard -->|"calculates value-add"| node_valuation
node_valuation -->|"projects returns"| node_projection

click node_launcher "https://github.com/mooghanem/aerodune/blob/main/main.py"
click node_dashboard "https://github.com/mooghanem/aerodune/blob/main/app/dashboard.py"
click node_dem "https://github.com/mooghanem/aerodune/blob/main/core/dem_handler.py"
click node_wind "https://github.com/mooghanem/aerodune/blob/main/core/wind_parser.py"
click node_roads "https://github.com/mooghanem/aerodune/blob/main/core/infrastructure.py"
click node_barrier "https://github.com/mooghanem/aerodune/blob/main/app/dashboard.py"
click node_solver "https://github.com/mooghanem/aerodune/blob/main/core/physics_engine.py"
click node_hazard "https://github.com/mooghanem/aerodune/blob/main/app/dashboard.py"
click node_valuation "https://github.com/mooghanem/aerodune/blob/main/core/economic_engine.py"
click node_projection "https://github.com/mooghanem/aerodune/blob/main/core/economic_engine.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_launcher,node_dashboard toneBlue
class node_dem,node_wind,node_roads toneAmber
class node_barrier,node_solver,node_hazard toneMint
class node_valuation,node_projection toneRose
class node_user,node_elevation,node_windfile,node_osm toneIndigo
```

## Components

### Application interface

- [App launcher](https://github.com/mooghanem/aerodune/blob/main/main.py): `main.py`
- [Simulation dashboard](https://github.com/mooghanem/aerodune/blob/main/app/dashboard.py): `app/dashboard.py`

### Terrain and forcing

- [DEM loading](https://github.com/mooghanem/aerodune/blob/main/core/dem_handler.py): `core/dem_handler.py`
- [Wind parsing](https://github.com/mooghanem/aerodune/blob/main/core/wind_parser.py): `core/wind_parser.py`
- [Highway rasterization](https://github.com/mooghanem/aerodune/blob/main/core/infrastructure.py): `core/infrastructure.py`

### Hazard simulation

- [Virtual windbreak mask](https://github.com/mooghanem/aerodune/blob/main/app/dashboard.py): `app/dashboard.py`
- [Sand transport solver](https://github.com/mooghanem/aerodune/blob/main/core/physics_engine.py): `core/physics_engine.py`
- [Road hazard assessment](https://github.com/mooghanem/aerodune/blob/main/app/dashboard.py): `app/dashboard.py`

### Resource economics

- [Silica value-add engine](https://github.com/mooghanem/aerodune/blob/main/core/economic_engine.py): `core/economic_engine.py`
- [Ten-year projection](https://github.com/mooghanem/aerodune/blob/main/core/economic_engine.py): `core/economic_engine.py`

### Other components

- **Analyst**
- **Elevation raster files**
- **Wind CSV data**
- **OpenStreetMap roads**

## Connections

- Analyst → App launcher: starts (evidence: `main.py`)
- App launcher → Simulation dashboard: launches (evidence: `main.py`)
- Analyst → Simulation dashboard: configures (evidence: `app/dashboard.py`)
- Simulation dashboard → DEM loading: loads terrain (evidence: `app/dashboard.py`)
- Simulation dashboard → Wind parsing: loads winds (evidence: `app/dashboard.py`)
- Simulation dashboard → Highway rasterization: loads highways (evidence: `app/dashboard.py`)
- DEM loading → Elevation raster files: reads tiles (evidence: `core/dem_handler.py`)
- Wind parsing → Wind CSV data: reads CSV (evidence: `core/wind_parser.py`)
- Highway rasterization → OpenStreetMap roads: fetches network (evidence: `core/infrastructure.py`)
- Simulation dashboard → Virtual windbreak mask: configures mask (evidence: `app/dashboard.py`)
- Simulation dashboard → Sand transport solver: runs simulation (evidence: `README.md`)
- Virtual windbreak mask → Sand transport solver: modifies flux (evidence: `app/dashboard.py`)
- Simulation dashboard → Road hazard assessment: evaluates encroachment (evidence: `README.md`)
- Highway rasterization → Road hazard assessment: provides road mask (evidence: `app/dashboard.py`)
- Simulation dashboard → Silica value-add engine: calculates value-add (evidence: `app/dashboard.py`)
- Silica value-add engine → Ten-year projection: projects returns (evidence: `core/economic_engine.py`)
