Thin-Film & Tandem Solar Cell Simulation Platform
1D/2D Drift-Diffusion · Series Poisson · Finite-Site Mobile Ions · Coherent Transfer-Matrix Optics
Perovskite · CIGS · c-Si · Monolithic 2T Tandems
Xuan-Yan Chen · Longhan Zhang · Zecheng Gan* · Chang Yan* · Tongyi Zhang*
The Hong Kong University of Science and Technology (Guangzhou)
| # | Section | Scope |
|---|---|---|
| 1 | Overview & Highlights | Platform positioning and core design pillars |
| 2 | Architecture & Repository Layout | Three-package V2 layout and navigation map |
| 3 | Quickstart | Environment setup, CLI, V2 server, and web workstation |
| 4 | Experiment & Capability Matrix | 1D, 2D, tandem, screening, and UI capabilities |
| 5 | Governing Physics & Numerical Method | PDEs, heterointerfaces, optics, and unified sparse assembly |
| 6 | Validation Benchmarks & Scope | 262-case SCAPS & 45-case hysteresis alignment vs formal qualification |
| 7 | Presets & Verification Suite | Shipped device configurations and CI test gates |
| 8 | References & Contact | Literature and author correspondence |
SolarLab is a research-grade device simulation platform for thin-film and monolithic tandem photovoltaics. It couples Poisson electrostatics, drift-diffusion carrier continuity, steric mobile-ion migration, explicit bulk/interface defect thermodynamics, and wavelength-resolved transfer-matrix optics under a unified sparse equation-assembly architecture, paired with a FastAPI / SSE execution service and an interactive Vite / TypeScript / Plotly browser workstation.
-
Unified Sparse Equation Assembly (
solarlab.equations.assembly) — Positive log-activity carrier variables$(z_n, z_p)$ guarantee$n > 0$ and$p > 0$ at every iterate without density clipping, while sharedSystemLayout+Termcontracts assemble exact sparse analytical Jacobians across 1D DC, transient, small-signal AC, and 2D microstructure solves. -
Strict Conservation & Reciprocity — Cancellation-free
expm1control-volume inventories maintain ionic mass conservation below$1.8 \times 10^{-13}$ relative drift; heterojunctions enforce per-side DOS Bethe/Richardson thermionic reciprocity, two-sided / 7-level Gaussian interface SRH, and series-dielectric face capacitance. -
End-to-End Cryptographic Provenance (
RunStore&ExecutionManifest) — Every configuration, optical table, protocol, and compiled solver state is content-hashed (H_input,H_physics,H_execution). Completed runs and failed prefixes are persisted losslessly for solver-free readback. -
Enforced Package Isolation —
solarlab(core physics & solvers),solarlab_server(V2 HTTP/SSE job service & bundled SPA), andsolarlab_research(R1codec &CBOscan CLIs) obey 12 machine-checkedimport-linterboundary contracts.
Note
devel is the shared V2 engineering baseline (solarlab==0.1.0); AIMC is the separate research branch for microscopic aging models. For contributor rules and retired legacy provenance, see DevelopmentGuide.md and RetiredModelsV1.md.
SolarLab/
├── src/
│ ├── solarlab/ Core kernel: config, materials, mesh, physics, equations, solvers, experiments, io
│ ├── solarlab_server/ V2 FastAPI/SSE job service, RunStore routes, ProcessSupervisor, and SPA serving
│ └── solarlab_research/ Research companion CLIs (solarlab-cbo-scan, solarlab-r1-short-window, r1-verify-sources)
├── web/ Vite + TypeScript + Plotly + GoldenLayout V2 workstation frontend
├── examples/
│ ├── research_1d/ 23 runnable 1D steady, AC, transient, mobile-ion, optical, and HTTP/process workflows
│ └── research_2d/ 10 runnable 2D steady, J-V, grain-boundary, contact, field-mobility, and optical workflows
├── docs/
│ ├── DevelopmentGuide.md Extension workflow, unified assembly rules, and branch governance
│ ├── RetiredModelsV1.md Retired legacy entrypoints, falsified closures, and historical anchors
│ ├── contracts/ 34 active physical model, defect, optical, and 2D protocol specifications
│ └── figures/ Pure-Arial 300 DPI architecture, physics, solver, and validation figures
├── reproducibility/ Frozen SCAPS, hysteresis, analytic, and performance contracts
├── scripts/ Root CI runner (test_all.py), schema generator, figure builder, and benchmarks
└── tests/ ci, unit, integration, refactor, runtime suites + 52 YAML device fixtures
Directory Guides:
- Developer workflow & model extension contract: docs/DevelopmentGuide.md
- Physical & numerical model contracts (
34specs): docs/contracts/README.md - Frozen benchmark & reference contracts: reproducibility/README.md
- Runnable 1D & 2D research workflows: examples/research_1d/README.md · examples/research_2d/README.md
- Python 3.11+ with
uv(local lock targets Python 3.13; CI verifies Python 3.11 & 3.13) - Node.js 22.12+ with
npm
git clone https://github.com/ShaneLogic/SolarLab.git
cd SolarLab
uv sync --frozen --all-extras
npm ci --prefix web
npm --prefix web run build
.venv/bin/solarlab check-install --require-no-legacy# 1D ion-free steady-state J-V sweep on the packaged classical_pin preset
.venv/bin/solarlab steady-jv --output outputs/steady_jv.json
# Research companion CLI entrypoints
.venv/bin/solarlab-cbo-scan --help
.venv/bin/solarlab-r1-short-window --helpStart the V2 solarlab-server backend (serves /configs, /materials, /experiments, /jobs, /runs/.../events, /results/..., and compiled web/dist on port 8000):
.venv/bin/solarlab-server --store-dir ./var/solarlab/store --host 127.0.0.1 --port 8000For hot-reload frontend development, start Vite in a second terminal and open http://127.0.0.1:5173:
npm --prefix web run devOr launch the containerized stack directly via docker compose up --build.
All characterisation workflows compile from the same validated device declaration (YAML, SCAPS YAML, or JSON):
| Domain | Experiment / Capability | Primary Module | Output & Physical Checks |
|---|---|---|---|
| 1D Steady & Sweeps | Illuminated |
solarlab.experiments.jv |
|
| Dark diode |
solarlab.experiments.dark_jv |
Auto-windowed |
|
| Parameter sweeps | solarlab.sweeps |
Cold-compiled multi-parameter studies with persisted RunStore attempts |
|
| 1D Dynamic & Open-Circuit | Waveform / Hysteresis |
solarlab.experiments.waveform_jv |
Continuous preconditioning + forward/reverse mobile-ion loops, |
| Suns-$V_{\mathrm{oc}}$ & |
solarlab.experiments.suns_voc, voc_t
|
Series-resistance-free pseudo-$J\text{–}V$, pseudo-$\mathrm{FF}$, activation-energy intercept | |
| Transient Photovoltage (TPV) | solarlab.experiments.tpv |
Floating-port Maxwell |
|
| Frozen-ion degradation | solarlab.experiments.degradation |
Long-time ionic evolution with zero-diffusivity electronic snapshot |
|
| 1D Small-Signal AC | Impedance spectroscopy |
solarlab.experiments.impedance, ionic_impedance
|
Exact sparse complex solve |
| Mott–Schottky ( |
solarlab.experiments.mott_schottky |
Depletion |
|
| Spectral & Multi-Junction | Monochromatic EQE & EL |
solarlab.experiments.eqe, el_spectrum
|
Coherent TMM or spectral Beer–Lambert |
| 2T Monolithic Tandem | solarlab.experiments.tandem_jv |
Joint 4-region coherent TMM photon budget + series current-matched sub-cell |
|
| 2D & Screening | 2D |
solarlab.experiments.two_dimensional |
Exact control-volume grain-boundary SRH overlap, frozen-ion DC or coupled 2D mobile-ion BE |
| SolarScale material screening |
solarlab.experiments.solarscale, evaluation_report
|
Candidate ingestion, band-alignment gates, sweep manifests, and publication-gated report packs |
Web Workstation Layout (web/):
-
Left Rail (
Devices / Results) — Switch between active device configurations and storedRunStoreattempts for multi-curve overlay. -
Center Pane (
Stack & Parameter Editor) — Interactive layer builder, grouped parameter editors (Geometry, Transport, Recombination & Defects, Ions & Optics, Contacts), live schema preview, and lossless YAML import/export. -
Right Pane (
Experiment Runner & Dockable Plots) — Protocol controls, live SSE progress/cancellation, and GoldenLayout Plotly views ($J\text{–}V$ , Nyquist/Bode, spatial$\varphi, E, n, p, P$ profiles, and 2D heatmaps).
On 1D (
Outer electrostatic boundaries enforce
Carriers are parameterized via positive log-activity coordinates
discretized on interior faces with cancellation-safe Scharfetter–Gummel fluxes
Across abrupt heterojunctions (
Confined single-domain or multi-domain mobile ions obey blocking boundary conditions ($\mathbf{F}\alpha \cdot \mathbf{n} = 0$) and steric Poisson–Nernst–Planck fluxes (supporting single positive ions, independent dual ions, or shared-vacancy $\theta = (P+ + P_-)/P_{\mathrm{lim}}$ populations):
Optical generation integrates absorbed photon flux exactly over each electrical control volume so discrete carrier generation conserves the optical photon budget (
-
Spectral Beer–Lambert (
beer_lambert_spectral) — Single-pass wavelength quadrature using cancellation-free cell absorptance$A_{\mathrm{cell}}(\lambda) = e^{-\tau_j(\lambda)}\bigl(-\mathrm{expm1}(-\Delta\tau_j(\lambda))\bigr)$ . -
Coherent Transfer-Matrix Optics (
tmm) — Multilayer complex$(n(\lambda), k(\lambda))$ standing-wave Poynting-vector absorption across single-junction and 2T monolithic tandem stacks, excluding front-glass and electrode parasitic absorption from carrier generation.
SolarLab separates engineering verification, external solver alignment, and formal continuum scientific certification (scientific_qualification = False until all external reference and continuum-refinement gates are independently closed; see reproducibility/README.md).
Evaluated from an isolated solarlab==0.1.0 wheel across all 262 single- and two-parameter sweeps (scaps_cbo, scaps_nt_cbo, scaps_nt_et, bulk/interface
-
Convergence:
262 / 262cases converged (0solver failures). -
Accuracy across 248 numeric reference points:
233 / 248(94.0%) satisfy$|\Delta V_{\mathrm{oc}}| \le 30\text{ mV}$ ; median$|\Delta V_{\mathrm{oc}}| = 12.7\text{ mV}$ (P90 = 25.9 mV), median$|\Delta\mathrm{FF}| = 0.53%$ , median$|\Delta\mathrm{PCE}| = 0.20%$ . -
Residual diagnosis: Independent zero-Auger radiative-limit ablation (
C_{n,p} = 0) confirmed that the remaining$\sim 25\text{ mV}$ open-circuit plateau offset originates from an undocumented radiative-limit setting in the external partner's proprietary SCAPS project file + bundled.spespectrum table (reducingscaps_nt_cbomedian$|\Delta V_{\mathrm{oc}}|$ to4.40 mVand overall$|\Delta V_{\mathrm{oc}}| \le 20\text{ mV}$ coverage to88.7%).
Evaluated across the 45-case 7-stage preconditioning + forward/reverse scan matrix spanning 6 decades of ion diffusivity, mobile-ion density, and scan rate:
-
Completion & Conservation:
45 / 45cases completed (0stalls), with maximum relative ionic inventory drift$\le 1.80 \times 10^{-13}$ . -
Hysteresis Index Parity: Median
$|\Delta\mathrm{HI}_{\mathrm{norm}}| = 5.64 \times 10^{-4}$ , with43 / 45(95.6%) within$5 \times 10^{-3}$ . -
Four-Axis Decoupled Refinement Closure: Phase 0 operator/conservation gates, time-step axis (
$\le 6.3 \times 10^{-8}\text{ W m}^{-2}$ ), solver-tolerance axis ($\le 4.6 \times 10^{-8}\text{ W m}^{-2}$ ), and weak-peak$\mathrm{HI}_{\mathrm{normalized}}$ (2.73e-4 <= 3.33e-4at 241 nodes) are verified; unnormalized ratio$\mathrm{HI}_P$ at sub-nanometre Debye screening ($L_D \approx 0.54\text{ nm}$ on fixedtanhgrids) and decoupled 100 sR1-L2/L3(RS-G7) remain explicitly open research gates.
| Preset ID | Stack Topology | Mobile Ions | Optics | Primary Role |
|---|---|---|---|---|
classical_pin |
HTL / Absorber / ETL | No | Beer–Lambert | Default CLI & 1D/2D steady-state baseline |
scaps_mirror_v2 |
Glass / Spiro-OMeTAD / |
No | TMM / Spectral BL | SCAPS-1D heterojunction & defect benchmark stack |
calado2016_ion_sweep |
HTL / Perovskite / ETL | Yes | Uniform / BL | Workstation dynamic ion-hysteresis waveform preset |
calado2016_fig1f |
Calado 2016 SI Table 1 stack | Yes | Beer–Lambert | Literature scan-rate hysteresis comparison preset |
An additional 52 YAML device and 2D microstructure test fixtures reside under tests/fixtures/configs/ (isolated from API serving).
# Run all 8 isolated root CI pytest selections (static, core, packages, backend, frontend)
.venv/bin/python scripts/test_all.py
# Static lint, strict typing, package boundary contracts, and schema sync
.venv/bin/ruff check --no-cache src scripts/test_all.py scripts/generate_configuration_schema.py scripts/ci tests/ci
.venv/bin/mypy --cache-dir /dev/null src/solarlab src/solarlab_server
.venv/bin/lint-imports --no-cache
.venv/bin/python scripts/generate_configuration_schema.py --check
# Frontend unit/integration suite (Vitest) and production bundle build
SOLARLAB_PYTHON="$PWD/.venv/bin/python" npm --prefix web run test:run
npm --prefix web run build- Scharfetter, D. L. & Gummel, H. K. (1969) — Large-signal analysis of a silicon Read diode oscillator. IEEE Trans. Electron Devices, 16(1), 64–77.
- Burkhard, G. F., Hoke, E. T. & McGehee, M. D. (2010) — Accounting for interference, scattering, and electrode absorption to make accurate internal quantum efficiency measurements in organic and other thin solar cells. Adv. Mater., 22(30), 3293–3297.
- Calado, P. et al. (2016) — Evidence for ion migration in hybrid perovskite solar cells with minimal hysteresis. Nat. Commun., 7, 13831.
- Courtier, N. E. et al. (2019) — IonMonger: a free and fast planar perovskite solar cell simulator with coupled ion vacancy and charge carrier dynamics. J. Comput. Electron., 18, 1435–1449.
- Burgelman, M., Nollet, P. & Degrave, S. (2000) — Modelling polycrystalline semiconductor solar cells (SCAPS-1D). Thin Solid Films, 361–362, 527–532.
Authors & Correspondence
Xuan-Yan Chen · xchen565@connect.hkust-gz.edu.cn
Longhan Zhang · lzhang619@connect.hkust-gz.edu.cn
Zecheng Gan* · zechenggan@hkust-gz.edu.cn
Chang Yan* · changyan@hkust-gz.edu.cn
Tongyi Zhang* · mezhangt@hkust-gz.edu.cn
* Corresponding authors · The Hong Kong University of Science and Technology (Guangzhou)




