# fraunhoferiwes/foxes architecture

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

- Interactive diagram: https://gitdiagram.com/fraunhoferiwes/foxes
- Repository: https://github.com/fraunhoferiwes/foxes

## Overview

FOXES is a modular wind-farm and wake-modelling package. The README’s example workflow supplies wind states and a farm layout, runs a Downwind algorithm, and obtains farm results; the package also provides iterative and sequential algorithms, model choices, distributed execution, input formats, and analysis outputs. Source excerpts show algorithm model collection and calculation entry points, but much of the model and input wiring was not sampled, so those relationships are shown as unverified rather than asserted.

Main entry points: [`foxes/algorithms/downwind/downwind.py`](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/downwind/downwind.py) (Downwind algorithm), [`foxes/core/algorithm.py`](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/algorithm.py) (Algorithm core), [`foxes/core/wind_farm.py`](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/wind_farm.py) (Wind farm), [`foxes/models/turbine_models`](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/turbine_models) (Turbine models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Farm and wind inputs"]
  node_layout["Farm layout"]
  node_states["Wind states"]
  node_yaml["YAML inputs"]
end

subgraph group_simulation["Simulation algorithms"]
  node_farm["Wind farm<br/>[wind_farm.py]"]
  node_downwind["Downwind algorithm<br/>[downwind.py]"]
  node_iterative["Iterative algorithm<br/>[iterative.py]"]
  node_sequential["Sequential algorithm<br/>[sequential.py]"]
  node_algorithm["Algorithm core<br/>[algorithm.py]"]
end

subgraph group_physics["Wake and turbine models"]
  node_wake["Wake models"]
  node_wakeframe["Wake frames"]
  node_turbines["Turbine models"]
  node_types["Turbine types"]
  node_rotors["Rotor models"]
  node_controllers["Farm controllers<br/>[farm_controller.py]"]
end

subgraph group_runtime["Calculation runtime"]
  node_data["Calculation data<br/>[data.py]"]
  node_engine["Execution engine<br/>[engine.py]"]
  node_numpy["NumPy engine<br/>[numpy.py]"]
end

subgraph group_analysis["Results and analysis"]
  node_farmresults["Farm results"]
  node_pointresults["Point calculations<br/>[downwind.py]"]
  node_flow["Flow plots<br/>[flow_plots.py]"]
  node_grids["Calculation grids<br/>[grids.py]"]
  node_outputs["Output tools<br/>[output.py]"]
end

node_user(("Engineer"))

node_user -->|"provides"| node_states
node_user -->|"creates"| node_farm
node_user -->|"loads layout"| node_layout
node_user -->|"runs"| node_downwind
node_states -->|"supplies states"| node_downwind
node_farm -->|"simulates"| node_downwind
node_layout -->|"populates"| node_farm
node_downwind -->|"returns results"| node_farmresults
node_yaml -.->|"configures"| node_farm
node_iterative -.->|"extends"| node_algorithm
node_sequential -.->|"extends"| node_algorithm
node_downwind -.->|"uses core"| node_algorithm
node_algorithm -.->|"manages data"| node_data
node_algorithm -.->|"dispatches work"| node_engine
node_engine -.->|"selects engine"| node_numpy
node_downwind -.->|"evaluates wakes"| node_wake
node_downwind -.->|"orders wakes"| node_wakeframe
node_downwind -.->|"evaluates turbines"| node_turbines
node_turbines -.->|"uses turbine types"| node_types
node_turbines -.->|"uses rotor models"| node_rotors
node_downwind -.->|"collects models"| node_controllers
node_downwind -.->|"calculates points"| node_pointresults
node_pointresults -.->|"feeds plots"| node_flow
node_grids -.->|"supports plotting"| node_flow
node_farmresults -.->|"supports analysis"| node_outputs

click node_layout "https://github.com/fraunhoferiwes/foxes/tree/main/foxes/input/farm_layout"
click node_states "https://github.com/fraunhoferiwes/foxes/tree/main/foxes/input/states"
click node_yaml "https://github.com/fraunhoferiwes/foxes/tree/main/foxes/input/yaml"
click node_farm "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/wind_farm.py"
click node_downwind "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/downwind/downwind.py"
click node_iterative "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/iterative/iterative.py"
click node_sequential "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/sequential/sequential.py"
click node_algorithm "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/algorithm.py"
click node_wake "https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/wake_models"
click node_wakeframe "https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/wake_frames"
click node_turbines "https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/turbine_models"
click node_types "https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/turbine_types"
click node_rotors "https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/rotor_models"
click node_controllers "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/farm_controller.py"
click node_data "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/data.py"
click node_engine "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/engine.py"
click node_numpy "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/engines/numpy.py"
click node_farmresults "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/output/farm_results_eval.py"
click node_pointresults "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/downwind/downwind.py"
click node_flow "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/output/flow_plots_2d/flow_plots.py"
click node_grids "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/output/grids.py"
click node_outputs "https://github.com/fraunhoferiwes/foxes/blob/main/foxes/output/output.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_layout,node_states,node_yaml toneBlue
class node_farm,node_downwind,node_iterative,node_sequential,node_algorithm toneAmber
class node_wake,node_wakeframe,node_turbines,node_types,node_rotors,node_controllers toneMint
class node_data,node_engine,node_numpy toneRose
class node_farmresults,node_pointresults,node_flow,node_grids,node_outputs,node_user toneIndigo
```

## Components

### Farm and wind inputs

- [Farm layout](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/input/farm_layout): `foxes/input/farm_layout`
- [Wind states](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/input/states): `foxes/input/states`
- [YAML inputs](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/input/yaml): `foxes/input/yaml`

### Simulation algorithms

- [Wind farm](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/wind_farm.py): `foxes/core/wind_farm.py`
- [Downwind algorithm](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/downwind/downwind.py): `foxes/algorithms/downwind/downwind.py`
- [Iterative algorithm](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/iterative/iterative.py): `foxes/algorithms/iterative/iterative.py`
- [Sequential algorithm](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/sequential/sequential.py): `foxes/algorithms/sequential/sequential.py`
- [Algorithm core](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/algorithm.py): `foxes/core/algorithm.py`

### Wake and turbine models

- [Wake models](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/wake_models): `foxes/models/wake_models`
- [Wake frames](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/wake_frames): `foxes/models/wake_frames`
- [Turbine models](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/turbine_models): `foxes/models/turbine_models`
- [Turbine types](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/turbine_types): `foxes/models/turbine_types`
- [Rotor models](https://github.com/fraunhoferiwes/foxes/tree/main/foxes/models/rotor_models): `foxes/models/rotor_models`
- [Farm controllers](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/farm_controller.py): `foxes/core/farm_controller.py`

### Calculation runtime

- [Calculation data](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/data.py): `foxes/core/data.py`
- [Execution engine](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/core/engine.py): `foxes/core/engine.py`
- [NumPy engine](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/engines/numpy.py): `foxes/engines/numpy.py`

### Results and analysis

- [Farm results](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/output/farm_results_eval.py): `foxes/output/farm_results_eval.py`
- [Point calculations](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/algorithms/downwind/downwind.py): `foxes/algorithms/downwind/downwind.py`
- [Flow plots](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/output/flow_plots_2d/flow_plots.py): `foxes/output/flow_plots_2d/flow_plots.py`
- [Calculation grids](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/output/grids.py): `foxes/output/grids.py`
- [Output tools](https://github.com/fraunhoferiwes/foxes/blob/main/foxes/output/output.py): `foxes/output/output.py`

### Other components

- **Engineer**

## Connections

- Engineer → Wind states: provides
- Engineer → Wind farm: creates
- Engineer → Farm layout: loads layout
- Engineer → Downwind algorithm: runs
- Wind states → Downwind algorithm: supplies states
- Wind farm → Downwind algorithm: simulates
- Farm layout → Wind farm: populates
- Downwind algorithm → Farm results: returns results
- YAML inputs → Wind farm: configures
- Iterative algorithm → Algorithm core: extends
- Sequential algorithm → Algorithm core: extends
- Downwind algorithm → Algorithm core: uses core
- Algorithm core → Calculation data: manages data (evidence: `foxes/core/algorithm.py`)
- Algorithm core → Execution engine: dispatches work (evidence: `foxes/core/algorithm.py`)
- Execution engine → NumPy engine: selects engine (evidence: `foxes/core/engine.py`)
- Downwind algorithm → Wake models: evaluates wakes
- Downwind algorithm → Wake frames: orders wakes
- Downwind algorithm → Turbine models: evaluates turbines
- Turbine models → Turbine types: uses turbine types
- Turbine models → Rotor models: uses rotor models
- Downwind algorithm → Farm controllers: collects models
- Downwind algorithm → Point calculations: calculates points (evidence: `foxes/algorithms/downwind/downwind.py`)
- Point calculations → Flow plots: feeds plots
- Calculation grids → Flow plots: supports plotting (evidence: `foxes/output/flow_plots_2d/flow_plots.py`)
- Farm results → Output tools: supports analysis
