# khurrumsaleem/dragon5 architecture

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

- Interactive diagram: https://gitdiagram.com/khurrumsaleem/dragon5
- Repository: https://github.com/khurrumsaleem/dragon5

## Overview

DRAGON-5 is a modular lattice-cell reactor-physics code for neutron, photon, electron and positron transport and related fuel-assembly calculations. Its documented workflow uses CLE-2000 to control calculations: process cross-section libraries, perform resonance self-shielding, solve multigroup flux, then edit nuclear properties and calculate depletion as needed. Transport choices include SYBIL, EXCELL, NXT, SALT and MCCG; equivalence calculations are another capability. Ganlib provides scripting and object-data infrastructure, with Python bindings and an XSDB library reader. The README establishes product capabilities, while sampled files support the infrastructure and Python data-stack links; implementation wiring for most physics stages was not sampled.

Main entry points: [`Dragon/src`](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src) (Multigroup iterator), [`Ganlib/src/cle2000.h`](https://github.com/khurrumsaleem/dragon5/blob/main/Ganlib/src/cle2000.h) (CLE-2000 supervisor), [`Ganlib/src/lcm_c.c`](https://github.com/khurrumsaleem/dragon5/blob/main/Ganlib/src/lcm_c.c) (LCM objects), [`PyGan/src/lcmmodule.c`](https://github.com/khurrumsaleem/dragon5/blob/main/PyGan/src/lcmmodule.c) (Python bindings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_physics["Physics workflow"]
  node_cross_sections["Cross-section processing"]
  node_self_shielding["Resonance shielding"]
  node_iterator["Multigroup iterator"]
  node_flux["Multigroup flux"]
  node_equivalence["Equivalence calculations"]
  node_editing["Property editing"]
  node_depletion["Isotopic depletion"]
  node_particle_transport["Photon/electron transport"]
end

subgraph group_transport["Transport solvers"]
  node_sybil["SYBIL solver"]
  node_excell_nxt_salt["EXCELL/NXT/SALT"]
  node_mccg["MCCG solver"]
end

subgraph group_runtime["Execution and data"]
  node_supervisor["CLE-2000 supervisor<br/>[cle2000.h]"]
  node_lcm[("LCM objects<br/>[lcm_c.c]")]
  node_lifo["LIFO stack<br/>[clepil.c]"]
end

subgraph group_interfaces["Library interfaces"]
  node_python_bindings["Python bindings<br/>[lcmmodule.c]"]
  node_cle_python["CLE Python binding<br/>[cle2000module.c]"]
  node_xsdb_reader["XSDB library reader<br/>[xsdf.c]"]
  node_ndas_store[("NDAS cross-section files<br/>[sdbm.c]")]
  node_steam["Steam properties<br/>[steam.c]"]
end

node_user(("Analyst"))

node_user -->|"runs procedures"| node_supervisor
node_supervisor -->|"dispatches calculations"| node_cross_sections
node_cross_sections -->|"supplies library data"| node_self_shielding
node_self_shielding -->|"provides shielded data"| node_iterator
node_iterator -->|"controls group solves"| node_flux
node_iterator -->|"selects solver"| node_sybil
node_iterator -->|"selects solver"| node_excell_nxt_salt
node_iterator -->|"selects solver"| node_mccg
node_flux -->|"supports calculations"| node_equivalence
node_flux -->|"provides flux results"| node_editing
node_editing -->|"provides edited properties"| node_depletion
node_supervisor -->|"uses stack"| node_lifo
node_supervisor -->|"uses objects"| node_lcm
node_python_bindings -->|"calls LCM API"| node_lcm
node_cle_python -->|"executes procedure"| node_supervisor
node_xsdb_reader -->|"reads records"| node_ndas_store

click node_supervisor "https://github.com/khurrumsaleem/dragon5/blob/main/Ganlib/src/cle2000.h"
click node_cross_sections "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_self_shielding "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_iterator "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_flux "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_equivalence "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_editing "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_depletion "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_particle_transport "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_sybil "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_excell_nxt_salt "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_mccg "https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src"
click node_lcm "https://github.com/khurrumsaleem/dragon5/blob/main/Ganlib/src/lcm_c.c"
click node_lifo "https://github.com/khurrumsaleem/dragon5/blob/main/Ganlib/src/clepil.c"
click node_python_bindings "https://github.com/khurrumsaleem/dragon5/blob/main/PyGan/src/lcmmodule.c"
click node_cle_python "https://github.com/khurrumsaleem/dragon5/blob/main/PyGan/src/cle2000module.c"
click node_xsdb_reader "https://github.com/khurrumsaleem/dragon5/blob/main/Dragon/src/xsdf.c"
click node_ndas_store "https://github.com/khurrumsaleem/dragon5/blob/main/Dragon/src/sdbm.c"
click node_steam "https://github.com/khurrumsaleem/dragon5/blob/main/Utilib/src/steam.c"

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_cross_sections,node_self_shielding,node_iterator,node_flux,node_equivalence,node_editing,node_depletion,node_particle_transport toneBlue
class node_sybil,node_excell_nxt_salt,node_mccg toneAmber
class node_supervisor,node_lcm,node_lifo toneMint
class node_python_bindings,node_cle_python,node_xsdb_reader,node_ndas_store,node_steam toneRose
class node_user toneIndigo
```

## Components

### Physics workflow

- [Cross-section processing](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [Resonance shielding](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [Multigroup iterator](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [Multigroup flux](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [Equivalence calculations](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [Property editing](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [Isotopic depletion](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [Photon/electron transport](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`

### Transport solvers

- [SYBIL solver](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [EXCELL/NXT/SALT](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`
- [MCCG solver](https://github.com/khurrumsaleem/dragon5/tree/main/Dragon/src): `Dragon/src`

### Execution and data

- [CLE-2000 supervisor](https://github.com/khurrumsaleem/dragon5/blob/main/Ganlib/src/cle2000.h): `Ganlib/src/cle2000.h`
- [LCM objects](https://github.com/khurrumsaleem/dragon5/blob/main/Ganlib/src/lcm_c.c): `Ganlib/src/lcm_c.c`
- [LIFO stack](https://github.com/khurrumsaleem/dragon5/blob/main/Ganlib/src/clepil.c): `Ganlib/src/clepil.c`

### Library interfaces

- [Python bindings](https://github.com/khurrumsaleem/dragon5/blob/main/PyGan/src/lcmmodule.c): `PyGan/src/lcmmodule.c`
- [CLE Python binding](https://github.com/khurrumsaleem/dragon5/blob/main/PyGan/src/cle2000module.c): `PyGan/src/cle2000module.c`
- [XSDB library reader](https://github.com/khurrumsaleem/dragon5/blob/main/Dragon/src/xsdf.c): `Dragon/src/xsdf.c`
- [NDAS cross-section files](https://github.com/khurrumsaleem/dragon5/blob/main/Dragon/src/sdbm.c): `Dragon/src/sdbm.c`
- [Steam properties](https://github.com/khurrumsaleem/dragon5/blob/main/Utilib/src/steam.c): `Utilib/src/steam.c`

### Other components

- **Analyst**

## Connections

- Analyst → CLE-2000 supervisor: runs procedures
- CLE-2000 supervisor → Cross-section processing: dispatches calculations
- Cross-section processing → Resonance shielding: supplies library data
- Resonance shielding → Multigroup iterator: provides shielded data
- Multigroup iterator → Multigroup flux: controls group solves
- Multigroup iterator → SYBIL solver: selects solver
- Multigroup iterator → EXCELL/NXT/SALT: selects solver
- Multigroup iterator → MCCG solver: selects solver
- Multigroup flux → Equivalence calculations: supports calculations
- Multigroup flux → Property editing: provides flux results
- Property editing → Isotopic depletion: provides edited properties
- CLE-2000 supervisor → LIFO stack: uses stack
- CLE-2000 supervisor → LCM objects: uses objects
- Python bindings → LCM objects: calls LCM API
- CLE Python binding → CLE-2000 supervisor: executes procedure
- XSDB library reader → NDAS cross-section files: reads records
