# sandialabs/hyram architecture

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

- Interactive diagram: https://gitdiagram.com/sandialabs/hyram
- Repository: https://github.com/sandialabs/hyram

## Overview

HyRAM+ combines a Qt GUI with Python models for deterministic physical-effects analyses and probabilistic quantitative risk assessment (QRA). The GUI presents inputs, dispatches analyses, and displays results; the physics package covers release/plume, flame, accumulation, and overpressure effects. QRA and uncertainty quantification are separate backend capabilities. The README establishes the product scope, and sampled code confirms GUI-to-physics calls and threaded analysis dispatch; unsampled QRA internals are shown as capabilities without speculative links between stages.

Main entry points: [`src/hyram/phys/api.py`](https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/api.py) (Physics API), [`gui/src/hyramgui/models/analyses.py`](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/models/analyses.py) (Analysis handlers), [`gui/src/hyramgui/main.py`](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/main.py) (GUI startup), [`gui/src/hyramgui/hygu/forms/fields.py`](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/hygu/forms/fields.py) (Form bindings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gui["GUI workflow"]
  node_gui_entry["GUI startup<br/>[main.py]"]
  node_gui_params["Input models<br/>[fields.py]"]
  node_gui_forms["Form bindings<br/>[fields.py]"]
  node_gui_analysis["Analysis handlers<br/>[analyses.py]"]
  node_gui_dispatch["Analysis dispatch<br/>[threads.py]"]
  node_gui_results["Result state<br/>[app.py]"]
end

subgraph group_physics["Physical effects"]
  node_phys_api["Physics API<br/>[api.py]"]
  node_phys_jet["Jet and plume<br/>[_jet.py]"]
  node_phys_nozzle["Release nozzle"]
  node_phys_indoor["Indoor accumulation<br/>[_indoor_release.py]"]
  node_phys_overpressure["Overpressure"]
  node_phys_flame["Flame effects<br/>[_flame.py]"]
  node_phys_therm["Thermodynamics<br/>[_therm.py]"]
end

subgraph group_qra["Risk assessment"]
  node_qra_analysis["QRA analysis<br/>[analysis.py]"]
  node_qra_failure["Component failures"]
  node_qra_event["Event trees<br/>[event_tree.py]"]
  node_qra_consequence["Consequences<br/>[consequence.py]"]
  node_qra_effects["Human effects<br/>[effects.py]"]
  node_qra_risk["Risk results<br/>[risk.py]"]
end

subgraph group_uncertainty["Uncertainty analysis"]
  node_uq_eval["Uncertainty evaluation<br/>[uncertainty.py]"]
  node_uq_sampling["Sampling<br/>[sampling.py]"]
  node_uq_distributions["Distributions<br/>[distributions.py]"]
  node_uq_parallel["Parallel evaluation"]
end

node_user(("Analyst"))

node_user -->|"opens"| node_gui_entry
node_gui_entry -->|"binds controls"| node_gui_forms
node_gui_entry -->|"exposes fields"| node_gui_params
node_gui_params -->|"supplies values"| node_gui_forms
node_gui_forms -->|"submits inputs"| node_gui_analysis
node_gui_analysis -->|"queues analysis"| node_gui_dispatch
node_gui_dispatch -->|"executes handler"| node_gui_analysis
node_gui_analysis -->|"calls analyses"| node_phys_api
node_phys_api -->|"uses models"| node_phys_jet
node_phys_api -->|"uses model"| node_phys_indoor
node_phys_api -->|"uses model"| node_phys_overpressure
node_phys_api -->|"uses model"| node_phys_flame
node_phys_api -->|"uses properties"| node_phys_therm
node_phys_api -->|"uses nozzle model"| node_phys_nozzle
node_gui_analysis -->|"returns results"| node_gui_results
node_user -.->|"requests QRA"| node_qra_analysis
node_uq_eval -->|"evaluates samples"| node_uq_sampling
node_uq_sampling -->|"draws values"| node_uq_distributions
node_uq_eval -->|"evaluates in parallel"| node_uq_parallel

click node_gui_entry "https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/main.py"
click node_gui_params "https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/hygu/models/fields.py"
click node_gui_forms "https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/hygu/forms/fields.py"
click node_gui_analysis "https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/models/analyses.py"
click node_gui_dispatch "https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/hygu/threads.py"
click node_gui_results "https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/forms/app.py"
click node_phys_api "https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/api.py"
click node_phys_jet "https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_jet.py"
click node_phys_nozzle "https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_notional_nozzle.py"
click node_phys_indoor "https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_indoor_release.py"
click node_phys_overpressure "https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_unconfined_overpressure.py"
click node_phys_flame "https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_flame.py"
click node_phys_therm "https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_therm.py"
click node_qra_analysis "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/analysis.py"
click node_qra_failure "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/component_failure.py"
click node_qra_event "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/event_tree.py"
click node_qra_consequence "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/consequence.py"
click node_qra_effects "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/effects.py"
click node_qra_risk "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/risk.py"
click node_uq_eval "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/uncertainty.py"
click node_uq_sampling "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/uq/sampling.py"
click node_uq_distributions "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/uq/distributions.py"
click node_uq_parallel "https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/uq/parallel_evaluations.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_gui_entry,node_gui_params,node_gui_forms,node_gui_analysis,node_gui_dispatch,node_gui_results toneBlue
class node_phys_api,node_phys_jet,node_phys_nozzle,node_phys_indoor,node_phys_overpressure,node_phys_flame,node_phys_therm toneAmber
class node_qra_analysis,node_qra_failure,node_qra_event,node_qra_consequence,node_qra_effects,node_qra_risk toneMint
class node_uq_eval,node_uq_sampling,node_uq_distributions,node_uq_parallel toneRose
class node_user toneIndigo
```

## Components

### GUI workflow

- [GUI startup](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/main.py): `gui/src/hyramgui/main.py`
- [Input models](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/hygu/models/fields.py): `gui/src/hyramgui/hygu/models/fields.py`
- [Form bindings](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/hygu/forms/fields.py): `gui/src/hyramgui/hygu/forms/fields.py`
- [Analysis handlers](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/models/analyses.py): `gui/src/hyramgui/models/analyses.py`
- [Analysis dispatch](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/hygu/threads.py): `gui/src/hyramgui/hygu/threads.py`
- [Result state](https://github.com/sandialabs/hyram/blob/master/gui/src/hyramgui/forms/app.py): `gui/src/hyramgui/forms/app.py`

### Physical effects

- [Physics API](https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/api.py): `src/hyram/phys/api.py`
- [Jet and plume](https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_jet.py): `src/hyram/phys/_jet.py`
- [Release nozzle](https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_notional_nozzle.py): `src/hyram/phys/_notional_nozzle.py`
- [Indoor accumulation](https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_indoor_release.py): `src/hyram/phys/_indoor_release.py`
- [Overpressure](https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_unconfined_overpressure.py): `src/hyram/phys/_unconfined_overpressure.py`
- [Flame effects](https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_flame.py): `src/hyram/phys/_flame.py`
- [Thermodynamics](https://github.com/sandialabs/hyram/blob/master/src/hyram/phys/_therm.py): `src/hyram/phys/_therm.py`

### Risk assessment

- [QRA analysis](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/analysis.py): `src/hyram/qra/analysis.py`
- [Component failures](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/component_failure.py): `src/hyram/qra/component_failure.py`
- [Event trees](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/event_tree.py): `src/hyram/qra/event_tree.py`
- [Consequences](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/consequence.py): `src/hyram/qra/consequence.py`
- [Human effects](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/effects.py): `src/hyram/qra/effects.py`
- [Risk results](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/risk.py): `src/hyram/qra/risk.py`

### Uncertainty analysis

- [Uncertainty evaluation](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/uncertainty.py): `src/hyram/qra/uncertainty.py`
- [Sampling](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/uq/sampling.py): `src/hyram/qra/uq/sampling.py`
- [Distributions](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/uq/distributions.py): `src/hyram/qra/uq/distributions.py`
- [Parallel evaluation](https://github.com/sandialabs/hyram/blob/master/src/hyram/qra/uq/parallel_evaluations.py): `src/hyram/qra/uq/parallel_evaluations.py`

### Other components

- **Analyst**

## Connections

- Analyst → GUI startup: opens
- GUI startup → Form bindings: binds controls
- GUI startup → Input models: exposes fields
- Input models → Form bindings: supplies values
- Form bindings → Analysis handlers: submits inputs
- Analysis handlers → Analysis dispatch: queues analysis
- Analysis dispatch → Analysis handlers: executes handler
- Analysis handlers → Physics API: calls analyses
- Physics API → Jet and plume: uses models
- Physics API → Indoor accumulation: uses model
- Physics API → Overpressure: uses model
- Physics API → Flame effects: uses model
- Physics API → Thermodynamics: uses properties
- Physics API → Release nozzle: uses nozzle model
- Analysis handlers → Result state: returns results
- Analyst → QRA analysis: requests QRA
- Uncertainty evaluation → Sampling: evaluates samples
- Sampling → Distributions: draws values
- Uncertainty evaluation → Parallel evaluation: evaluates in parallel
