# ceplkist/nature-comm.-tea-code architecture

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

- Interactive diagram: https://gitdiagram.com/ceplkist/nature-comm.-tea-code
- Repository: https://github.com/ceplkist/nature-comm.-tea-code

## Overview

This MATLAB framework synthesizes CO2RR–OOR process designs, simulates them in Aspen Plus, and evaluates technoeconomic performance as levelized chemical costs (LCCs). The README identifies the convergence-check scripts as the sequential workflow and separately documents global sensitivity analysis and visualization/post-processing. Edges reflect only those documented relationships; no source excerpts were provided, so internal calls and finer-grained data flow are not asserted.

Main entry points: [`script1_convergenceCheck.m`](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheck.m) (Convergence demos), [`script1_convergenceCheckCascade.m`](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckCascade.m) (Cascade demos), [`script1_convergenceCheckOptimal.m`](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckOptimal.m) (Optimal demos), [`script1_convergenceCheckCascadeOptimal.m`](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckCascadeOptimal.m) (Optimal cascade)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Process workflow"]
  node_convergence["Convergence demos"]
  node_cascade["Cascade demos"]
  node_optimal["Optimal demos"]
  node_cascadeoptimal["Optimal cascade"]
  node_synthesis["Process synthesis"]
  node_aspen["Aspen Plus"]
end

subgraph group_economics["Economic analysis"]
  node_tea["Cost estimation"]
  node_electrolyzer["Electrolyzer model"]
end

subgraph group_sensitivity["Sensitivity analysis"]
  node_gsa["Global sensitivity"]
  node_gsacascade["Cascade sensitivity"]
  node_gsatoolbox["GSA methods"]
end

subgraph group_post["Post-processing"]
  node_contour["Contour sampling"]
  node_tsne["Design similarity<br/>[script4_tsne.m]"]
  node_heatmap["Economics heatmap<br/>[script5_heatmap.m]"]
  node_fdca["FDCA scenarios"]
  node_capex["CAPEX sensitivity"]
end

node_engineer(("Analyst"))

node_engineer -->|"runs"| node_convergence
node_engineer -->|"runs"| node_cascade
node_engineer -->|"runs"| node_optimal
node_engineer -->|"runs"| node_cascadeoptimal
node_convergence -->|"synthesizes"| node_synthesis
node_convergence -->|"simulates with"| node_aspen
node_convergence -->|"evaluates costs"| node_tea
node_cascade -->|"synthesizes"| node_synthesis
node_cascade -->|"simulates with"| node_aspen
node_cascade -->|"evaluates costs"| node_tea
node_optimal -->|"synthesizes"| node_synthesis
node_optimal -->|"simulates with"| node_aspen
node_optimal -->|"evaluates costs"| node_tea
node_cascadeoptimal -->|"synthesizes"| node_synthesis
node_cascadeoptimal -->|"simulates with"| node_aspen
node_cascadeoptimal -->|"evaluates costs"| node_tea
node_engineer -->|"runs"| node_gsa
node_engineer -->|"runs"| node_gsacascade
node_gsa -.->|"analyzes sensitivity"| node_gsatoolbox
node_gsacascade -.->|"analyzes sensitivity"| node_gsatoolbox
node_engineer -->|"runs"| node_contour
node_engineer -->|"runs"| node_tsne
node_engineer -->|"runs"| node_heatmap
node_engineer -->|"runs"| node_fdca
node_engineer -->|"runs"| node_capex

click node_convergence "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheck.m"
click node_cascade "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckCascade.m"
click node_optimal "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckOptimal.m"
click node_cascadeoptimal "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckCascadeOptimal.m"
click node_synthesis "https://github.com/ceplkist/nature-comm.-tea-code/tree/master/Functions/aspen"
click node_tea "https://github.com/ceplkist/nature-comm.-tea-code/tree/master/Functions/NPV"
click node_electrolyzer "https://github.com/ceplkist/nature-comm.-tea-code/tree/master/Functions/electrolyzer"
click node_gsa "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script2_GlobalSensitivityAnalysis.m"
click node_gsacascade "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script2_GlobalSensitivityAnalysisCascade.m"
click node_gsatoolbox "https://github.com/ceplkist/nature-comm.-tea-code/tree/master/Functions/GSAT"
click node_contour "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script3_contourSampling.m"
click node_tsne "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script4_tsne.m"
click node_heatmap "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script5_heatmap.m"
click node_fdca "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script6_forReview_FDCA.m"
click node_capex "https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script7_forReview_CAPEX.m"

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_convergence,node_cascade,node_optimal,node_cascadeoptimal,node_synthesis,node_aspen toneBlue
class node_tea,node_electrolyzer toneAmber
class node_gsa,node_gsacascade,node_gsatoolbox toneMint
class node_contour,node_tsne,node_heatmap,node_fdca,node_capex toneRose
class node_engineer toneIndigo
```

## Components

### Process workflow

- [Convergence demos](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheck.m): `script1_convergenceCheck.m`
- [Cascade demos](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckCascade.m): `script1_convergenceCheckCascade.m`
- [Optimal demos](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckOptimal.m): `script1_convergenceCheckOptimal.m`
- [Optimal cascade](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script1_convergenceCheckCascadeOptimal.m): `script1_convergenceCheckCascadeOptimal.m`
- [Process synthesis](https://github.com/ceplkist/nature-comm.-tea-code/tree/master/Functions/aspen): `Functions/aspen`
- **Aspen Plus**

### Economic analysis

- [Cost estimation](https://github.com/ceplkist/nature-comm.-tea-code/tree/master/Functions/NPV): `Functions/NPV`
- [Electrolyzer model](https://github.com/ceplkist/nature-comm.-tea-code/tree/master/Functions/electrolyzer): `Functions/electrolyzer`

### Sensitivity analysis

- [Global sensitivity](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script2_GlobalSensitivityAnalysis.m): `script2_GlobalSensitivityAnalysis.m`
- [Cascade sensitivity](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script2_GlobalSensitivityAnalysisCascade.m): `script2_GlobalSensitivityAnalysisCascade.m`
- [GSA methods](https://github.com/ceplkist/nature-comm.-tea-code/tree/master/Functions/GSAT): `Functions/GSAT`

### Post-processing

- [Contour sampling](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script3_contourSampling.m): `script3_contourSampling.m`
- [Design similarity](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script4_tsne.m): `script4_tsne.m`
- [Economics heatmap](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script5_heatmap.m): `script5_heatmap.m`
- [FDCA scenarios](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script6_forReview_FDCA.m): `script6_forReview_FDCA.m`
- [CAPEX sensitivity](https://github.com/ceplkist/nature-comm.-tea-code/blob/master/script7_forReview_CAPEX.m): `script7_forReview_CAPEX.m`

### Other components

- **Analyst**

## Connections

- Analyst → Convergence demos: runs (evidence: `README.md`)
- Analyst → Cascade demos: runs (evidence: `README.md`)
- Analyst → Optimal demos: runs (evidence: `README.md`)
- Analyst → Optimal cascade: runs (evidence: `README.md`)
- Convergence demos → Process synthesis: synthesizes (evidence: `README.md`)
- Convergence demos → Aspen Plus: simulates with (evidence: `README.md`)
- Convergence demos → Cost estimation: evaluates costs (evidence: `README.md`)
- Cascade demos → Process synthesis: synthesizes (evidence: `README.md`)
- Cascade demos → Aspen Plus: simulates with (evidence: `README.md`)
- Cascade demos → Cost estimation: evaluates costs (evidence: `README.md`)
- Optimal demos → Process synthesis: synthesizes (evidence: `README.md`)
- Optimal demos → Aspen Plus: simulates with (evidence: `README.md`)
- Optimal demos → Cost estimation: evaluates costs (evidence: `README.md`)
- Optimal cascade → Process synthesis: synthesizes (evidence: `README.md`)
- Optimal cascade → Aspen Plus: simulates with (evidence: `README.md`)
- Optimal cascade → Cost estimation: evaluates costs (evidence: `README.md`)
- Analyst → Global sensitivity: runs (evidence: `README.md`)
- Analyst → Cascade sensitivity: runs (evidence: `README.md`)
- Global sensitivity → GSA methods: analyzes sensitivity
- Cascade sensitivity → GSA methods: analyzes sensitivity
- Analyst → Contour sampling: runs (evidence: `README.md`)
- Analyst → Design similarity: runs (evidence: `README.md`)
- Analyst → Economics heatmap: runs (evidence: `README.md`)
- Analyst → FDCA scenarios: runs (evidence: `README.md`)
- Analyst → CAPEX sensitivity: runs (evidence: `README.md`)
