# team-tsa/gribs architecture

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

- Interactive diagram: https://gitdiagram.com/team-tsa/gribs
- Repository: https://github.com/team-tsa/gribs

## Overview

GRIBS is a JSON-configured transient solid-rocket internal-ballistics simulator. Users provide motor and thermochemistry inputs, select a backend, and run the simulation to obtain time-history results and reports. Its domain workflow covers propellant properties, thermochemistry, grain regression, chamber/nozzle behavior, and post-burnout blowdown; reporting includes plots and provenance. The runtime is implemented in one Python file. README statements support the documented capabilities and workflow; source excerpts are partial, so finer call relationships are not asserted.

Main entry points: [`GRIBS_v0.4.3-alpha.py`](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py) (Unsteady chamber), [`gribs_config.json`](https://github.com/team-tsa/gribs/blob/main/gribs_config.json) (JSON configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Inputs and setup"]
  node_config["JSON configuration<br/>[gribs_config.json]"]
  node_validation["Config validation"]
  node_density["Mixture density"]
end

subgraph group_thermo["Thermochemistry"]
  node_thermo_select["Backend selection"]
  node_cea_python["CEA Python backend"]
  node_cea_legacy["Legacy CEA backend"]
  node_cea_package["NASA CEA package"]
  node_cea_exec["fcea2 executable"]
  node_property_table["Chamber properties"]
  node_cache[("Thermo cache")]
end

subgraph group_simulation["Ballistics simulation"]
  node_selftests["Numerical self-tests"]
  node_regression["Grain regression"]
  node_burning["Burn-rate model"]
  node_chamber["Unsteady chamber"]
  node_nozzle["Nozzle flow"]
  node_erosion["Erosive and throat erosion"]
  node_blowdown["Post-burnout blowdown"]
end

subgraph group_results["Results and diagnostics"]
  node_cea_diagnostics["CEA performance diagnostics"]
  node_outputs["Plots and data outputs"]
  node_provenance["Run provenance"]
end

node_user(("Motor analyst"))

node_user -->|"edits"| node_config
node_user -->|"validates"| node_validation
node_config -->|"validates"| node_validation
node_user -->|"selects backend"| node_thermo_select
node_config -->|"configures"| node_thermo_select
node_thermo_select -->|"selects"| node_cea_python
node_thermo_select -->|"selects"| node_cea_legacy
node_cea_python -->|"uses API"| node_cea_package
node_cea_legacy -->|"runs"| node_cea_exec
node_cea_python -->|"calculates properties"| node_property_table
node_cea_legacy -.->|"provides properties"| node_property_table
node_property_table -->|"caches table"| node_cache
node_validation -.->|"validates inputs"| node_density
node_density -.->|"sets propellant density"| node_chamber
node_user -->|"runs checks"| node_selftests
node_user -->|"runs simulation"| node_chamber
node_chamber -->|"models grain"| node_regression
node_chamber -->|"models burning"| node_burning
node_chamber -->|"models flow"| node_nozzle
node_chamber -->|"includes erosion"| node_erosion
node_chamber -->|"models blowdown"| node_blowdown
node_user -->|"enables diagnostics"| node_cea_diagnostics
node_chamber -->|"compares performance"| node_cea_diagnostics
node_chamber -->|"produces results"| node_outputs
node_chamber -->|"records provenance"| node_provenance

click node_config "https://github.com/team-tsa/gribs/blob/main/gribs_config.json"
click node_validation "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_density "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_thermo_select "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_cea_python "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_cea_legacy "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_property_table "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_cache "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_selftests "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_regression "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_burning "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_chamber "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_nozzle "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_erosion "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_blowdown "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_cea_diagnostics "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_outputs "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py"
click node_provenance "https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.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_validation,node_density toneBlue
class node_thermo_select,node_cea_python,node_cea_legacy,node_cea_package,node_cea_exec,node_property_table,node_cache toneAmber
class node_selftests,node_regression,node_burning,node_chamber,node_nozzle,node_erosion,node_blowdown toneMint
class node_cea_diagnostics,node_outputs,node_provenance toneRose
class node_user toneIndigo
```

## Components

### Inputs and setup

- [JSON configuration](https://github.com/team-tsa/gribs/blob/main/gribs_config.json): `gribs_config.json`
- [Config validation](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Mixture density](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`

### Thermochemistry

- [Backend selection](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [CEA Python backend](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Legacy CEA backend](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- **NASA CEA package**
- **fcea2 executable**
- [Chamber properties](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Thermo cache](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`

### Ballistics simulation

- [Numerical self-tests](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Grain regression](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Burn-rate model](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Unsteady chamber](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Nozzle flow](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Erosive and throat erosion](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Post-burnout blowdown](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`

### Results and diagnostics

- [CEA performance diagnostics](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Plots and data outputs](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`
- [Run provenance](https://github.com/team-tsa/gribs/blob/main/GRIBS_v0.4.3-alpha.py): `GRIBS_v0.4.3-alpha.py`

### Other components

- **Motor analyst**

## Connections

- Motor analyst → JSON configuration: edits (evidence: `README.md`)
- Motor analyst → Config validation: validates (evidence: `README.md`)
- JSON configuration → Config validation: validates (evidence: `README.md`)
- Motor analyst → Backend selection: selects backend (evidence: `README.md`)
- JSON configuration → Backend selection: configures (evidence: `README.md`)
- Backend selection → CEA Python backend: selects (evidence: `README.md`)
- Backend selection → Legacy CEA backend: selects (evidence: `README.md`)
- CEA Python backend → NASA CEA package: uses API (evidence: `README.md`)
- Legacy CEA backend → fcea2 executable: runs (evidence: `README.md`)
- CEA Python backend → Chamber properties: calculates properties (evidence: `GRIBS_v0.4.3-alpha.py`)
- Legacy CEA backend → Chamber properties: provides properties (evidence: `GRIBS_v0.4.3-alpha.py`)
- Chamber properties → Thermo cache: caches table (evidence: `GRIBS_v0.4.3-alpha.py`)
- Config validation → Mixture density: validates inputs (evidence: `GRIBS_v0.4.3-alpha.py`)
- Mixture density → Unsteady chamber: sets propellant density (evidence: `GRIBS_v0.4.3-alpha.py`)
- Motor analyst → Numerical self-tests: runs checks (evidence: `README.md`)
- Motor analyst → Unsteady chamber: runs simulation (evidence: `README.md`)
- Unsteady chamber → Grain regression: models grain (evidence: `README.md`)
- Unsteady chamber → Burn-rate model: models burning (evidence: `README.md`)
- Unsteady chamber → Nozzle flow: models flow (evidence: `README.md`)
- Unsteady chamber → Erosive and throat erosion: includes erosion (evidence: `README.md`)
- Unsteady chamber → Post-burnout blowdown: models blowdown (evidence: `README.md`)
- Motor analyst → CEA performance diagnostics: enables diagnostics (evidence: `README.md`)
- Unsteady chamber → CEA performance diagnostics: compares performance (evidence: `README.md`)
- Unsteady chamber → Plots and data outputs: produces results (evidence: `README.md`)
- Unsteady chamber → Run provenance: records provenance (evidence: `README.md`)
