# kth-flowai/fcn-turbulence-predictions-from-wall-quantities architecture

> Architecture diagram of the GitHub repository kth-flowai/fcn-turbulence-predictions-from-wall-quantities, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities
- Repository: https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities

## Overview

This repository trains and evaluates fully convolutional networks that reconstruct velocity-fluctuation fields in turbulent channel flow from wall quantities. The main workflow is to read configured TFRecord samples, preprocess inputs and targets, train the FCN, then load a trained model to predict and save test results. WallRecon and OuterRecon are configuration profiles for the prediction problem. The README documents these capabilities; sampled excerpts show the training and evaluation orchestration, but some dataset-processing details are omitted.

Main entry points: [`src/train.py`](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/train.py) (Training entrypoint), [`src/evaluate.py`](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/evaluate.py) (Evaluation entrypoint), [`conf/config_sample.py`](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/conf/config_sample.py) (Problem settings), [`src/training_utils.py`](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/training_utils.py) (Training utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_config["Problem settings<br/>[config_sample.py]"]
  node_records["TFRecord datasets"]
  node_loader["Dataset loader<br/>[tfrecord_utils.py]"]
end

subgraph group_model["Reconstruction model"]
  node_network["FCN architecture<br/>[fcn.py]"]
end

subgraph group_train["Training"]
  node_training_helpers["Training utilities<br/>[training_utils.py]"]
  node_trainer["Training entrypoint<br/>[train.py]"]
  node_model_store[("Saved models")]
end

subgraph group_infer["Inference"]
  node_evaluator["Evaluation entrypoint<br/>[evaluate.py]"]
  node_predictions["Prediction results"]
end

node_operator(("Research user"))

node_operator -->|"starts training"| node_trainer
node_operator -->|"starts inference"| node_evaluator
node_config -->|"configures"| node_trainer
node_config -->|"configures"| node_evaluator
node_config -->|"sets data options"| node_loader
node_config -->|"sets model options"| node_network
node_records -->|"provides samples"| node_loader
node_trainer -->|"requests train data"| node_loader
node_evaluator -->|"requests test data"| node_loader
node_trainer -->|"builds model"| node_training_helpers
node_training_helpers -->|"creates FCN"| node_network
node_trainer -->|"fits model"| node_network
node_trainer -->|"saves model"| node_model_store
node_evaluator -->|"loads trained model"| node_training_helpers
node_training_helpers -->|"reads checkpoint or model"| node_model_store
node_evaluator -->|"predicts fields"| node_network
node_evaluator -->|"saves test and predicted fields"| node_predictions

click node_config "https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/conf/config_sample.py"
click node_loader "https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/tfrecord_utils.py"
click node_network "https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/models/fcn.py"
click node_training_helpers "https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/training_utils.py"
click node_trainer "https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/train.py"
click node_evaluator "https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/evaluate.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_config,node_records,node_loader,node_operator toneBlue
class node_network toneAmber
class node_training_helpers,node_trainer,node_model_store toneMint
class node_evaluator,node_predictions toneRose
```

## Components

### Data preparation

- [Problem settings](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/conf/config_sample.py): `conf/config_sample.py`
- **TFRecord datasets**
- [Dataset loader](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/tfrecord_utils.py): `src/tfrecord_utils.py`

### Reconstruction model

- [FCN architecture](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/models/fcn.py): `models/fcn.py`

### Training

- [Training utilities](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/training_utils.py): `src/training_utils.py`
- [Training entrypoint](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/train.py): `src/train.py`
- **Saved models**

### Inference

- [Evaluation entrypoint](https://github.com/kth-flowai/fcn-turbulence-predictions-from-wall-quantities/blob/master/src/evaluate.py): `src/evaluate.py`
- **Prediction results**

### Other components

- **Research user**

## Connections

- Research user → Training entrypoint: starts training
- Research user → Evaluation entrypoint: starts inference
- Problem settings → Training entrypoint: configures
- Problem settings → Evaluation entrypoint: configures
- Problem settings → Dataset loader: sets data options
- Problem settings → FCN architecture: sets model options
- TFRecord datasets → Dataset loader: provides samples
- Training entrypoint → Dataset loader: requests train data
- Evaluation entrypoint → Dataset loader: requests test data
- Training entrypoint → Training utilities: builds model
- Training utilities → FCN architecture: creates FCN
- Training entrypoint → FCN architecture: fits model
- Training entrypoint → Saved models: saves model
- Evaluation entrypoint → Training utilities: loads trained model
- Training utilities → Saved models: reads checkpoint or model
- Evaluation entrypoint → FCN architecture: predicts fields
- Evaluation entrypoint → Prediction results: saves test and predicted fields
