# mihapompe/pinn-nuclear-decay-equation architecture

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

- Interactive diagram: https://gitdiagram.com/mihapompe/pinn-nuclear-decay-equation
- Repository: https://github.com/mihapompe/pinn-nuclear-decay-equation

## Overview

This repository is a research implementation of physics-informed neural networks for nuclear decay and burnup equations. Its main workflow is to provide a system matrix and initial isotope composition, construct a decay or burnup PINN, train it over time, and obtain a predicted isotope evolution. The README also describes real- and complex-eigenvalue architectures and analysis of accuracy and stiffness. The documented example driver is absent from the supplied tree, and excerpts do not establish how solvers or analysis code are wired, so those relationships are left independent.

Main entry points: [`Bateman_PINN.py`](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/Bateman_PINN.py) (Decay and burnup PINNs), [`data/A_matrices`](https://github.com/mihapompe/pinn-nuclear-decay-equation/tree/main/data/A_matrices) (Matrix data), [`SineCosineLayer.py`](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/SineCosineLayer.py) (Sine/cosine layers), [`CRAMsolve.py`](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/CRAMsolve.py) (CRAM solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["PINN models"]
  node_pinn["Decay and burnup PINNs<br/>[Bateman_PINN.py]"]
  node_training["PINN training<br/>[Bateman_PINN.py]"]
  node_trig_layers["Sine/cosine layers<br/>[SineCosineLayer.py]"]
end

subgraph group_numerical["Numerical methods"]
  node_cram["CRAM solver<br/>[CRAMsolve.py]"]
  node_rk["RK45 solver<br/>[RKsolve.py]"]
end

subgraph group_research["Analysis"]
  node_analysis["Experiment analysis<br/>[run_analysis.py]"]
end

node_researcher(("Researcher"))
node_matrix_data[("Matrix data")]
node_checkpoint["Saved model<br/>[burnup_model.pt]"]

node_researcher -->|"selects inputs"| node_matrix_data
node_researcher -->|"configures model"| node_pinn
node_matrix_data -->|"supplies matrix"| node_pinn
node_pinn -->|"trains network"| node_training
node_training -->|"updates weights"| node_pinn
node_pinn -->|"uses for burnup"| node_trig_layers
node_training -->|"saves model"| node_checkpoint
node_researcher -.->|"requests solve"| node_cram
node_researcher -.->|"requests solve"| node_rk
node_researcher -->|"runs experiments"| node_analysis

click node_matrix_data "https://github.com/mihapompe/pinn-nuclear-decay-equation/tree/main/data/A_matrices"
click node_pinn "https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/Bateman_PINN.py"
click node_training "https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/Bateman_PINN.py"
click node_trig_layers "https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/SineCosineLayer.py"
click node_checkpoint "https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/burnup_model.pt"
click node_cram "https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/CRAMsolve.py"
click node_rk "https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/RKsolve.py"
click node_analysis "https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/analysis/run_analysis.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_pinn,node_training,node_trig_layers toneBlue
class node_cram,node_rk,node_matrix_data toneAmber
class node_analysis toneMint
class node_researcher,node_checkpoint toneIndigo
```

## Components

### PINN models

- [Decay and burnup PINNs](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/Bateman_PINN.py): `Bateman_PINN.py`
- [PINN training](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/Bateman_PINN.py): `Bateman_PINN.py`
- [Sine/cosine layers](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/SineCosineLayer.py): `SineCosineLayer.py`

### Numerical methods

- [CRAM solver](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/CRAMsolve.py): `CRAMsolve.py`
- [RK45 solver](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/RKsolve.py): `RKsolve.py`

### Analysis

- [Experiment analysis](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/analysis/run_analysis.py): `analysis/run_analysis.py`

### Other components

- **Researcher**
- [Matrix data](https://github.com/mihapompe/pinn-nuclear-decay-equation/tree/main/data/A_matrices): `data/A_matrices`
- [Saved model](https://github.com/mihapompe/pinn-nuclear-decay-equation/blob/main/burnup_model.pt): `burnup_model.pt`

## Connections

- Researcher → Matrix data: selects inputs
- Researcher → Decay and burnup PINNs: configures model
- Matrix data → Decay and burnup PINNs: supplies matrix
- Decay and burnup PINNs → PINN training: trains network
- PINN training → Decay and burnup PINNs: updates weights
- Decay and burnup PINNs → Sine/cosine layers: uses for burnup
- PINN training → Saved model: saves model
- Researcher → CRAM solver: requests solve
- Researcher → RK45 solver: requests solve
- Researcher → Experiment analysis: runs experiments
