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 layout and navigation map |
| 3 | Quickstart | Environment setup, CLI, 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(HTTP/SSE job service & bundled SPA), andsolarlab_research(R1codec &CBOscan CLIs) obey 12 machine-checkedimport-linterboundary contracts.
Note
devel is the shared 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/ 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 workstation frontend
├── examples/
│ ├── research_1d/ 24 runnable 1D steady, AC, transient, mobile-ion, iodine-aging, optical, and HTTP 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/ 35 active physical model, defect, optical, aging, 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 (
35specs): 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 # Coupled 1D iodine chemistry steady state, AC redox capacitance, and multi-stage aging .venv/bin/solarlab iodine-presets .venv/bin/solarlab iodine-steady --preset bitton_tessler_2023_blocking --output outputs/iodine_steady.json .venv/bin/solarlab iodine-aging --preset bitton_tessler_2023_self_healing --output outputs/iodine_aging.json # Research companion CLI entrypoints .venv/bin/solarlab-cbo-scan --help .venv/bin/solarlab-r1-short-window --help
Start the 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 8000
For hot-reload frontend development, start Vite in a second terminal and open http://127.0.0.1:5173:
npm --prefix web run dev
Or 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, |
|
|
solarlab.experiments.suns_voc, voc_t
|
Series-resistance-free |
|
| Transient Photovoltage (TPV) | solarlab.experiments.tpv |
Floating-port Maxwell |
|
| Frozen-ion degradation | solarlab.experiments.degradation |
Long-time ionic evolution with zero-diffusivity electronic snapshot |
|
| Iodine chemistry & aging |
solarlab.experiments.iodine_aging, iodine_declarative
|
Coupled 5-reaction |
|
| 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 normal-blocking boundary conditions (
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 across all 262 single- and two-parameter sweeps (scaps_cbo, scaps_nt_cbo, scaps_nt_et, bulk/interface scaps_pvk_xy + ScapsAm15g1Sun.spe, driven by scaps_native_pvk_xy.py) with zero empirical calibration factors (het_recomb_despike = 0, no work-function offsets, no interface-state attenuation, 7-level Gaussian PVK/ETL quadrature, and recalculated flat-band contacts):
-
Convergence & Gate Closure:
262 / 262cases converged (0solver failures);221 / 248(89.1%) numeric reference points pass all four strict pointwise contract gates simultaneously ($V_{\mathrm{oc}}$ :236/248[95.2%],$J_{\mathrm{sc}}$ :239/248[96.4%],$\mathrm{FF}$ :221/248[89.1%],$\mathrm{PCE}$ :235/248[94.8%]), achieving100%pass across 11 of the 14 groups (including the full 56-case 2Dscaps_nt_etgrid). -
Pointwise Accuracy: Median
$\lvert\Delta V_{\mathrm{oc}}\rvert = 0.60\text{ mV}$ (P90 = 1.01 mV,96.0%$\le 5\text{ mV}$ ), median$\lvert\Delta J_{\mathrm{sc}}\rvert = 0.0088\text{ mA cm}^{-2}$ , median$\lvert\Delta\mathrm{FF}\rvert$ of0.031%, and median$\lvert\Delta\mathrm{PCE}\rvert$ of0.009%. -
Boundary Regime Localization: The remaining 27 tolerance-exceeding points localize to steep positive conduction-band spikes (
$\Delta E_c \ge +0.30\text{ eV}$ inscaps_cbo/scaps_nt_cbo, plus high-doping$N_{D,\mathrm{PVK}} = 10^{18}\text{ cm}^{-3}$ ), where finite-difference mesh placement across the sub-nanometre heterointerface barrier governs S-curve knee sensitivity.
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
$\lvert\Delta\mathrm{HI}_{\mathrm{norm}}\rvert = 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_{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_pvk_xy |
SAM / Perovskite / |
No | TMM / Spectral BL | Native zero-fit SCAPS-1D benchmark baseline (PVK-xy.scaps) |
scaps_mirror_v2 |
Glass / Spiro-OMeTAD / |
No | TMM / Spectral BL | Historical PDF-table SCAPS contract 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 5 declarative iodine reaction–diffusion–aging presets (bitton_tessler_2023_{blocking,permeable,outgassing,ag_corrosion,self_healing}) reside under src/solarlab/materials/data/iodine_presets/ (served at /iodine/presets and ?view=iodine-aging), alongside 52 YAML device and 2D microstructure test fixtures 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 tests .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.
- Bitton, S. & Tessler, N. (2023) — Perovskite ionics – elucidating degradation mechanisms in perovskite solar cells via device modelling and iodine chemistry. Energy Environ. Sci., 16(6), 2621–2628.
Authors & Correspondence
Xuan-Yan Chen · [email protected]
Longhan Zhang · [email protected]
Zecheng Gan* · [email protected]
Chang Yan* · [email protected]
Tongyi Zhang* · [email protected]
* Corresponding authors · The Hong Kong University of Science and Technology (Guangzhou)




