How qpv-research-group/solcore5 works
Purpose and entry points
Solcore is a Python semiconductor-device simulation library for optical and electrical modeling of quantum-well, single-junction, and multijunction solar cells. Primary user APIs are the package root and solar-cell model/dispatcher: solcore/__init__.py, solcore/solar_cell.py, solcore/solar_cell_solver.py. Script and notebook entry points in examples/ demonstrate composed simulations rather than a server or CLI application.
Device model and solver orchestration
SolarCell structures are assembled from layers, junctions, and tunnel junctions, then dispatched by solver action through the central coordinator. solcore/structure.py supplies generic layered structures; solcore/solar_cell.py specializes them for devices; solcore/solar_cell_solver.py selects and combines optical and electrical solving stages. This is the principal control boundary between a user-defined device and pluggable numerical models.
Materials, parameters, and units
Material construction and parameter lookup underpin every physics model. solcore/material_system/material_system.py and solcore/parameter_system/parameter_system.py provide material and semiconductor-property access, backed by bundled datasets in solcore/material_data/. solcore/units_system/units_system.py normalizes physical-unit inputs. Material data is local/package-managed, including refractive-index and SOPRA datasets; user-defined materials are supported by solcore/material_system/create_new_material.py.
Optical and light-generation pipeline
A light source supplies wavelength-dependent illumination, then optics solvers calculate reflection, absorption, transmission, and generation profiles for the layered cell. solcore/light_source/light_source.py provides spectra including bundled ASTM data. solcore/optics/tmm.py, solcore/optics/rcwa.py, and solcore/optics/beer_lambert.py expose alternative optical methods; their lower-level implementations include solcore/absorption_calculator/transfer_matrix.py and solcore/absorption_calculator/rigorous_coupled_wave.py. Optical outputs form key inputs to junction quantum-efficiency and transport calculations.
Electrical solver families
The package supports interchangeable electrical fidelity levels. Analytic/depletion, detailed-balance, diode, IV, QE, and tunnel-junction models live in solcore/analytic_solar_cells/. Poisson–drift–diffusion support uses Python structure/utility layers in solcore/poisson_drift_diffusion/DeviceStructure.py and solcore/poisson_drift_diffusion/DriftDiffusionUtilities.py, with a compiled Fortran current solver at solcore/poisson_drift_diffusion/DDmodel-current.f95. A separate Sesame-backed drift-diffusion adapter processes structures and solves them through solcore/sesame_drift_diffusion/process_structure.py and solcore/sesame_drift_diffusion/solve_pdd.py.
Quantum and multijunction coupling
Quantum-well calculations provide band alignment, strain, k·p states, and quantum-well absorption used by appropriate structures and optical/electrical paths. Core modules are solcore/quantum_mechanics/high_level_kp_QW.py, solcore/quantum_mechanics/heterostructure_alignment.py, and solcore/absorption_calculator/absorption_QW.py. Multijunction devices combine junction-level outputs through the main solar-cell solver and analytic IV machinery, while radiative-coupling examples illustrate cross-junction optical/electrical feedback.
Systems-scale, optimization, and runtime boundaries
Optimization wraps simulations via differential evolution in solcore/optimization/differential_evolution.py. Module and quasi-3D panel modeling use a SPICE integration boundary: solcore/spice/pv_module_solver.py, solcore/spice/quasi_3D_solver.py, and solcore/spice/spice.py. The runtime is primarily Python; Meson build definitions (meson.build, solcore/poisson_drift_diffusion/meson.build) compile native Fortran components. CI builds/tests and publishes wheels via .github/workflows/build_deploy_wheels.yml; documentation is Sphinx-based under docs/source/.
Main entry points: solar_cell_solver.py Solar-cell solver · tmm.py Optics methods · solar_cell.py Solar cell · material_system.py Material system
Components 20
Device orchestration
- Solcore API
solcore/__init__.py - Layer structures
solcore/structure.py - Solar cell
solcore/solar_cell.py - Solar-cell solver · Dispatches optical and electrical actions for a device.
solcore/solar_cell_solver.py
Materials and illumination
- Material system
solcore/material_system/material_system.py - Parameter system
solcore/parameter_system/parameter_system.py - Material datasets · Bundled semiconductor, refractive-index, and SOPRA data.
solcore/material_data/__init__.py - Units system
solcore/units_system/units_system.py - Light source
solcore/light_source/light_source.py
Optical pipeline
- Optics methods · Selects TMM, RCWA, or Beer–Lambert optics.
solcore/optics/tmm.py - Transfer-matrix engine
solcore/absorption_calculator/transfer_matrix.py - RCWA engine
solcore/absorption_calculator/rigorous_coupled_wave.py - Quantum-well model · Computes alignment, strain, and k·p states.
solcore/quantum_mechanics/high_level_kp_QW.py - QW absorption
solcore/absorption_calculator/absorption_QW.py
Electrical models
- Analytic cell models · Provides depletion, detailed-balance, diode, IV, QE, and tunnel-junction models.
solcore/analytic_solar_cells/__init__.py - PDD structure layer
solcore/poisson_drift_diffusion/DeviceStructure.py - Fortran PDD solver
solcore/poisson_drift_diffusion/DDmodel-current.f95 - Sesame PDD adapter
solcore/sesame_drift_diffusion/solve_pdd.py
Advanced runtimes
- Differential evolution
solcore/optimization/differential_evolution.py - SPICE module solver · Supports module and quasi-3D panel simulation.
solcore/spice/pv_module_solver.py
Connections 21
- Solcore API → Solar cell: builds
- Solcore API → Material system: accesses
- Layer structures → Solar cell: specialized by
- Solar cell → Solar-cell solver: solved by
- Units system → Material system: normalizes inputs
- Material datasets → Material system: backs
- Parameter system → Material system: supplies properties
- Solar cell → Optics methods: layer stack
- Light source → Optics methods: illumination
- Solar-cell solver → Optics methods: runs
- Optics methods → Transfer-matrix engine: TMM path
- Optics methods → RCWA engine: RCWA path
- Quantum-well model → QW absorption: states for
- QW absorption → Optics methods: QW optical properties
- Optics methods → Analytic cell models: generation and QE inputs
- Solar-cell solver → Analytic cell models: runs junction and IV models
- Solar-cell solver → PDD structure layer: runs PDD path
- PDD structure layer → Fortran PDD solver: calls
- Solar-cell solver → Sesame PDD adapter: runs alternate PDD
- Differential evolution → Solar-cell solver: evaluates simulations
- SPICE module solver → Solar-cell solver: uses cell results