🏗️ Architecture

ThermX system design, components, and data flow.

High-Level Overview

ThermX uses a modular design separating concerns into distinct layers:

Core Components

Model (src/model/)

Project — Root data structure containing:

Physics (physics.ts) — Constants and utilities:

Solver (src/solver/)

Authentication (src/auth/)

tokenStore — localStorage-based token management:

API (src/api/)

auth.ts — Backend integration:

Data Flow

Project Model
    ↓
Geometry + Materials + BCs
    ↓
Mesh Generation
    ↓
FEM Solver (2D) OR ISO 15099 (glazing) OR Pipe Heat Transfer
    ↓
Temperature & Heat Flux Results
    ↓
Visualization (color maps, isotherms, arrows)
    ↓
Export (PDF, CSV, DXF)

Build & Dependencies

Testing

All modules include unit tests in tests/ directory. Run tests with:

npm test