# byron-piper/final-year-project architecture

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

- Interactive diagram: https://gitdiagram.com/byron-piper/final-year-project
- Repository: https://github.com/byron-piper/final-year-project

## Overview

This repository is a research workflow for generating aerofoil CFD results and using them to train and inspect flowfield models. The main path runs from CAD geometry through meshing and Fluent simulation, then dataset preprocessing, model training, and evaluation or visualisation. The excerpts support several imports and processing steps; links between some standalone engineering scripts are shown only as unverified. The README provides no additional capability documentation.

Main entry points: [`sample/helper.py`](https://github.com/byron-piper/final-year-project/blob/main/sample/helper.py) (Workflow helpers), [`model/train.py`](https://github.com/byron-piper/final-year-project/blob/main/model/train.py) (Model training), [`model/visualise.py`](https://github.com/byron-piper/final-year-project/blob/main/model/visualise.py) (Flowfield visualisation), [`ansys/fluent-mesh-gen.py`](https://github.com/byron-piper/final-year-project/blob/main/ansys/fluent-mesh-gen.py) (Mesh generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_engineering["CFD engineering"]
  node_geometry["CAD geometry"]
  node_meshing["Mesh generation<br/>[fluent-mesh-gen.py]"]
  node_simulation["Fluent simulation"]
end

subgraph group_data["Dataset preparation"]
  node_helper["Workflow helpers<br/>[helper.py]"]
  node_preprocessing["Flowfield preprocessing<br/>[datasets.py]"]
  node_dataset[("Flowfield datasets<br/>[datasets.py]")]
  node_sample_validation["Sample validation<br/>[validation.py]"]
  node_sample_generation["Sample data generation<br/>[model_data_gen.py]"]
  node_aerofoil_utils["Aerofoil utilities<br/>[aerofoil_utils.py]"]
end

subgraph group_learning["Model learning"]
  node_training["Model training<br/>[train.py]"]
  node_architectures["Model architectures<br/>[models.py]"]
  node_checkpoint["Checkpoint utilities<br/>[utils.py]"]
end

subgraph group_analysis["Evaluation and visualisation"]
  node_evaluation["Model evaluation<br/>[evaluate.py]"]
  node_visualisation["Flowfield visualisation<br/>[visualise.py]"]
end

node_user(("Research user"))
node_ansys["Ansys software"]
node_parameters["Workflow parameters<br/>[parameters.json]"]

node_user -->|"initiates"| node_geometry
node_user -->|"trains"| node_training
node_geometry -->|"uses CAD API"| node_ansys
node_meshing -->|"uses meshing API"| node_ansys
node_simulation -->|"launches solver"| node_ansys
node_parameters -.->|"configures"| node_geometry
node_geometry -.->|"provides geometry"| node_meshing
node_meshing -.->|"provides mesh"| node_simulation
node_simulation -.->|"writes CFD results"| node_preprocessing
node_preprocessing -->|"creates datasets"| node_dataset
node_preprocessing -->|"imports helpers"| node_helper
node_simulation -->|"imports helpers"| node_helper
node_meshing -.->|"imports helpers"| node_helper
node_training -->|"loads data"| node_dataset
node_training -->|"uses models"| node_architectures
node_training -.->|"imports helpers"| node_helper
node_training -.->|"uses utilities"| node_checkpoint
node_evaluation -->|"loads data"| node_dataset
node_evaluation -->|"fetches model"| node_checkpoint
node_evaluation -->|"imports helpers"| node_helper
node_visualisation -->|"loads data"| node_dataset
node_visualisation -->|"imports models"| node_architectures
node_visualisation -->|"imports utilities"| node_checkpoint
node_visualisation -->|"imports helpers"| node_helper
node_user -.->|"inspects results"| node_evaluation
node_user -.->|"views results"| node_visualisation

click node_geometry "https://github.com/byron-piper/final-year-project/blob/main/ansys/spaceclaim-geom-gen.py"
click node_meshing "https://github.com/byron-piper/final-year-project/blob/main/ansys/fluent-mesh-gen.py"
click node_simulation "https://github.com/byron-piper/final-year-project/blob/main/ansys/fluent-solver-run.py"
click node_parameters "https://github.com/byron-piper/final-year-project/blob/main/parameters.json"
click node_helper "https://github.com/byron-piper/final-year-project/blob/main/sample/helper.py"
click node_preprocessing "https://github.com/byron-piper/final-year-project/blob/main/model/datasets.py"
click node_dataset "https://github.com/byron-piper/final-year-project/blob/main/model/datasets.py"
click node_training "https://github.com/byron-piper/final-year-project/blob/main/model/train.py"
click node_architectures "https://github.com/byron-piper/final-year-project/blob/main/model/models.py"
click node_checkpoint "https://github.com/byron-piper/final-year-project/blob/main/model/utils.py"
click node_evaluation "https://github.com/byron-piper/final-year-project/blob/main/model/evaluate.py"
click node_visualisation "https://github.com/byron-piper/final-year-project/blob/main/model/visualise.py"
click node_sample_validation "https://github.com/byron-piper/final-year-project/blob/main/sample/validation.py"
click node_sample_generation "https://github.com/byron-piper/final-year-project/blob/main/sample/model_data_gen.py"
click node_aerofoil_utils "https://github.com/byron-piper/final-year-project/blob/main/sample/aerofoil_utils.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_geometry,node_meshing,node_simulation,node_user toneBlue
class node_helper,node_preprocessing,node_dataset,node_sample_validation,node_sample_generation,node_aerofoil_utils toneAmber
class node_training,node_architectures,node_checkpoint toneMint
class node_evaluation,node_visualisation toneRose
class node_ansys toneIndigo
class node_parameters toneTeal
```

## Components

### CFD engineering

- [CAD geometry](https://github.com/byron-piper/final-year-project/blob/main/ansys/spaceclaim-geom-gen.py): `ansys/spaceclaim-geom-gen.py`
- [Mesh generation](https://github.com/byron-piper/final-year-project/blob/main/ansys/fluent-mesh-gen.py): `ansys/fluent-mesh-gen.py`
- [Fluent simulation](https://github.com/byron-piper/final-year-project/blob/main/ansys/fluent-solver-run.py): `ansys/fluent-solver-run.py`

### Dataset preparation

- [Workflow helpers](https://github.com/byron-piper/final-year-project/blob/main/sample/helper.py): `sample/helper.py`
- [Flowfield preprocessing](https://github.com/byron-piper/final-year-project/blob/main/model/datasets.py): `model/datasets.py`
- [Flowfield datasets](https://github.com/byron-piper/final-year-project/blob/main/model/datasets.py): `model/datasets.py`
- [Sample validation](https://github.com/byron-piper/final-year-project/blob/main/sample/validation.py): `sample/validation.py`
- [Sample data generation](https://github.com/byron-piper/final-year-project/blob/main/sample/model_data_gen.py): `sample/model_data_gen.py`
- [Aerofoil utilities](https://github.com/byron-piper/final-year-project/blob/main/sample/aerofoil_utils.py): `sample/aerofoil_utils.py`

### Model learning

- [Model training](https://github.com/byron-piper/final-year-project/blob/main/model/train.py): `model/train.py`
- [Model architectures](https://github.com/byron-piper/final-year-project/blob/main/model/models.py): `model/models.py`
- [Checkpoint utilities](https://github.com/byron-piper/final-year-project/blob/main/model/utils.py): `model/utils.py`

### Evaluation and visualisation

- [Model evaluation](https://github.com/byron-piper/final-year-project/blob/main/model/evaluate.py): `model/evaluate.py`
- [Flowfield visualisation](https://github.com/byron-piper/final-year-project/blob/main/model/visualise.py): `model/visualise.py`

### Other components

- **Research user**
- **Ansys software**
- [Workflow parameters](https://github.com/byron-piper/final-year-project/blob/main/parameters.json): `parameters.json`

## Connections

- Research user → CAD geometry: initiates
- Research user → Model training: trains
- CAD geometry → Ansys software: uses CAD API (evidence: `ansys/spaceclaim-geom-gen.py`)
- Mesh generation → Ansys software: uses meshing API (evidence: `ansys/fluent-mesh-gen.py`)
- Fluent simulation → Ansys software: launches solver (evidence: `ansys/fluent-solver-run.py`)
- Workflow parameters → CAD geometry: configures
- CAD geometry → Mesh generation: provides geometry
- Mesh generation → Fluent simulation: provides mesh
- Fluent simulation → Flowfield preprocessing: writes CFD results
- Flowfield preprocessing → Flowfield datasets: creates datasets (evidence: `model/datasets.py`)
- Flowfield preprocessing → Workflow helpers: imports helpers (evidence: `model/datasets.py`)
- Fluent simulation → Workflow helpers: imports helpers (evidence: `ansys/fluent-solver-run.py`)
- Mesh generation → Workflow helpers: imports helpers (evidence: `ansys/fluent-mesh-gen.py`)
- Model training → Flowfield datasets: loads data (evidence: `model/train.py`)
- Model training → Model architectures: uses models (evidence: `model/train.py`)
- Model training → Workflow helpers: imports helpers (evidence: `model/train.py`)
- Model training → Checkpoint utilities: uses utilities (evidence: `model/train.py`)
- Model evaluation → Flowfield datasets: loads data (evidence: `model/evaluate.py`)
- Model evaluation → Checkpoint utilities: fetches model (evidence: `model/evaluate.py`)
- Model evaluation → Workflow helpers: imports helpers (evidence: `model/evaluate.py`)
- Flowfield visualisation → Flowfield datasets: loads data (evidence: `model/visualise.py`)
- Flowfield visualisation → Model architectures: imports models (evidence: `model/visualise.py`)
- Flowfield visualisation → Checkpoint utilities: imports utilities (evidence: `model/visualise.py`)
- Flowfield visualisation → Workflow helpers: imports helpers (evidence: `model/visualise.py`)
- Research user → Model evaluation: inspects results
- Research user → Flowfield visualisation: views results
