├── docs ├── .nojekyll ├── requirements.txt └── source │ ├── Examples │ ├── iv.jpg │ ├── kp.png │ ├── qe.jpg │ ├── Ag_k.png │ ├── Ag_n.png │ ├── DA_iv.png │ ├── DA_qe.png │ ├── DA_iv2.png │ ├── PDD_IV.png │ ├── PDD_qe.png │ ├── Diamond_nk.png │ ├── MQW_LDOS.png │ ├── RAT_of_ARC.png │ ├── SiGeSn_nk.png │ ├── Single_QW.png │ ├── iv_params.jpg │ ├── ls_compare.png │ ├── ls_smarts.png │ ├── Ag_GaAs_abs.png │ ├── eff_mass_fit.png │ ├── optmodelcomp.png │ ├── IV_solar_module.png │ ├── MJ_IV_optimal.png │ ├── square_mask_IV.png │ ├── substrate_RAT.png │ ├── tunnel_junction.png │ ├── MJ_efficiency_map.png │ ├── circular_mask_IV.png │ ├── square_mask_V1_3.png │ ├── substrate_Adepth.png │ ├── IV_param_dispersion.png │ ├── MJ_with_rad_coupling.png │ ├── PDD_carrier_density.png │ ├── circular_mask_V1_3.png │ ├── example_tunnel_junction.rst │ ├── example_QWs.rst │ ├── example_light_sources.rst │ ├── main.rst │ ├── example_K_and_effective_mass.rst │ ├── example_pv_module.rst │ ├── example_RAT_of_ARC.rst │ └── custom_materials_example.rst │ ├── Infographics.jpg │ ├── _static │ └── header.png │ ├── Quasi3D │ ├── pv_module.png │ ├── quasi3Dimg.png │ ├── spice.rst │ └── pv_panel.rst │ ├── Solvers │ ├── Figures │ │ ├── IV.png │ │ ├── QE.png │ │ ├── iv_mj.png │ │ ├── mesh.png │ │ ├── qe_mj.png │ │ ├── EQandSC.png │ │ ├── LightIV.png │ │ ├── PDD_np.png │ │ ├── PDD_pn.png │ │ └── QWunit.png │ ├── detailed_balance.rst │ └── sign_conventions.rst │ ├── Optics │ ├── qw_absorption.png │ ├── optics.rst │ ├── other_methods.rst │ └── tmm.rst │ ├── Systems │ ├── eg_vs_lattice_constant.png │ ├── Units.rst │ └── systems.rst │ ├── Installation │ ├── Solcore_on_MacOSX.md │ ├── s4_installation.md │ └── compilation.md │ ├── index.rst │ └── Structures │ └── structure.rst ├── tests ├── __init__.py ├── mock_ddModel.py ├── test_basics.py ├── data │ ├── SiGeSn_params.txt │ └── Ge-Palik.csv ├── test_state.py └── test_optimization.py ├── solcore ├── data_analysis_tools │ └── __init__.py ├── material_data │ ├── Adachi │ │ ├── ternaries.txt │ │ └── binaries.txt │ ├── AlGaAs-Material │ │ └── __init__.py │ ├── InGaAs-Material │ │ ├── __init__.py │ │ ├── test.py │ │ └── n │ │ │ └── critical_points.txt │ ├── InGaSb-Material │ │ └── __init__.py │ ├── __init__.py │ ├── refractiveindex_info_DB │ │ └── __init__.py │ ├── SOPRA_DB │ │ ├── List_Of_Files.xlsx │ │ ├── List_Of_Files_Updated_PDF.pdf │ │ ├── AIR.MAT │ │ ├── PERFECT_MIRROR.MAT │ │ ├── compounds.txt │ │ ├── ZRSI2.MAT │ │ ├── LI.MAT │ │ ├── COR7059.MAT │ │ ├── AL2O3.MAT │ │ ├── MGF2.MAT │ │ ├── MOSI2-A.MAT │ │ ├── MOSI2-B.MAT │ │ ├── COSI2-4.MAT │ │ ├── RESIGE_GE │ │ │ ├── RESIGE83.MAT │ │ │ ├── RESIGE91.MAT │ │ │ ├── RESIGE75.MAT │ │ │ ├── RESIGE51.MAT │ │ │ ├── RESIGE64.MAT │ │ │ ├── RESIGE39.MAT │ │ │ └── RESIGE22.MAT │ │ ├── IR3SI5E.MAT │ │ ├── GAPOX.MAT │ │ ├── GAASOX.MAT │ │ ├── INASOX.MAT │ │ ├── GASBOX.MAT │ │ ├── INPOX.MAT │ │ ├── FESI2EL1.MAT │ │ ├── INSBOX.MAT │ │ ├── FESI2EPI.MAT │ │ ├── LASF9.MAT │ │ ├── SF11.MAT │ │ ├── IR3SI5P.MAT │ │ ├── SIAM2.MAT │ │ ├── ALON.MAT │ │ ├── HFO2.MAT │ │ └── SIO.MAT │ ├── GaAsP-Material │ │ ├── __init__.py │ │ ├── n │ │ │ └── critical_points.txt │ │ └── k │ │ │ └── critical_points.txt │ ├── GaInP-Material │ │ ├── __init__.py │ │ ├── n │ │ │ └── critical_points.txt │ │ └── k │ │ │ └── critical_points.txt │ ├── AlInP-Material │ │ ├── k │ │ │ ├── 1.000_AlInP_k.txt │ │ │ └── critical_points.txt │ │ ├── n │ │ │ ├── critical_points.txt │ │ │ └── 1.000_AlInP_n.txt │ │ └── __init__.py │ ├── Si-Material │ │ ├── info.txt │ │ └── k.txt │ ├── InP-Material │ │ └── info.txt │ └── Levinshtein │ │ └── GroupIV.txt ├── units_system │ ├── __init__.py │ └── Default_units.txt ├── absorption_calculator │ ├── cppm │ │ └── __init__.py │ ├── __init__.py │ └── kramers_kronig.py ├── optimization │ └── __init__.py ├── parameter_system │ ├── __init__.py │ └── calculable_parameters.txt ├── graphing │ ├── __init__.py │ └── graph_support.py ├── sesame_drift_diffusion │ └── __init__.py ├── material_system │ └── __init__.py ├── spice │ └── __init__.py ├── quantum_mechanics │ ├── __init__.py │ └── heterostructure_alignment.py ├── light_source │ └── __init__.py ├── constants.py ├── optics │ └── __init__.py ├── analytic_solar_cells │ └── __init__.py ├── poisson_drift_diffusion │ └── __init__.py ├── state.py ├── solcore_config.txt ├── meson.build ├── __init__.py └── smooth.py ├── examples ├── data │ ├── masks_cl.png │ ├── masks_sq.png │ ├── masks_illumination.png │ ├── SiGeSn_params.txt │ ├── Palik_GaAs_Eps1.csv │ ├── Ge-Palik.csv │ └── Palik_GaAs_Eps2.csv ├── Tunnel_junction.py ├── simple_rcwa.py ├── Schrodinger_QW_and_MQW.py ├── Light_sources_examples.py ├── Optical_constants_RAT_of_ITO_films.py ├── kp_fit_effective_masses.py ├── Optical_constants_ellipsometry_modelling_2.py ├── Materials_Eg_vs_lattice_constant.py ├── Absorption_profile_AlGaAs_GaAs_structure.py ├── PV_module_calculator.py ├── Optical_constants_RAT_of_ARC.py ├── Optical_constants_using_SOPRA_db.py ├── Schrodinger_QW_absorption.py ├── coherency_example.py ├── custom_materials_example.py └── notebooks │ └── Tunnel_junction.ipynb ├── binder ├── postBuild ├── requirements.txt └── apt.txt ├── meson_options.txt ├── .pre-commit-config.yaml ├── .readthedocs.yaml ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ ├── bug_report.md │ └── question.md ├── meson.build ├── LICENSE.txt ├── .spin └── cmds.py ├── pyproject.toml └── .gitignore /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | recommonmark -------------------------------------------------------------------------------- /solcore/data_analysis_tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /solcore/material_data/Adachi/ternaries.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /solcore/material_data/AlGaAs-Material/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /solcore/material_data/InGaAs-Material/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /solcore/material_data/InGaSb-Material/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /solcore/material_data/__init__.py: -------------------------------------------------------------------------------- 1 | from .mobility import calculate_mobility -------------------------------------------------------------------------------- /solcore/units_system/__init__.py: -------------------------------------------------------------------------------- 1 | from .units_system import UnitsSystem -------------------------------------------------------------------------------- /solcore/absorption_calculator/cppm/__init__.py: -------------------------------------------------------------------------------- 1 | from .Custom_CPPB import Custom_CPPB -------------------------------------------------------------------------------- /solcore/optimization/__init__.py: -------------------------------------------------------------------------------- 1 | from .differential_evolution import DE, PDE 2 | -------------------------------------------------------------------------------- /solcore/parameter_system/__init__.py: -------------------------------------------------------------------------------- 1 | from .parameter_system import ParameterSystem -------------------------------------------------------------------------------- /solcore/graphing/__init__.py: -------------------------------------------------------------------------------- 1 | from .graph_lines import * 2 | from .graph import * 3 | -------------------------------------------------------------------------------- /tests/mock_ddModel.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import MagicMock 2 | 3 | runiv = MagicMock() 4 | -------------------------------------------------------------------------------- /solcore/material_data/refractiveindex_info_DB/__init__.py: -------------------------------------------------------------------------------- 1 | from .dbmaterial import DBMaterial 2 | -------------------------------------------------------------------------------- /solcore/sesame_drift_diffusion/__init__.py: -------------------------------------------------------------------------------- 1 | from .solve_pdd import qe_sesame, iv_sesame, equilibrium 2 | -------------------------------------------------------------------------------- /docs/source/Examples/iv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/iv.jpg -------------------------------------------------------------------------------- /docs/source/Examples/kp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/kp.png -------------------------------------------------------------------------------- /docs/source/Examples/qe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/qe.jpg -------------------------------------------------------------------------------- /examples/data/masks_cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/examples/data/masks_cl.png -------------------------------------------------------------------------------- /examples/data/masks_sq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/examples/data/masks_sq.png -------------------------------------------------------------------------------- /docs/source/Examples/Ag_k.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/Ag_k.png -------------------------------------------------------------------------------- /docs/source/Examples/Ag_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/Ag_n.png -------------------------------------------------------------------------------- /docs/source/Examples/DA_iv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/DA_iv.png -------------------------------------------------------------------------------- /docs/source/Examples/DA_qe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/DA_qe.png -------------------------------------------------------------------------------- /docs/source/Infographics.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Infographics.jpg -------------------------------------------------------------------------------- /docs/source/_static/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/_static/header.png -------------------------------------------------------------------------------- /docs/source/Examples/DA_iv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/DA_iv2.png -------------------------------------------------------------------------------- /docs/source/Examples/PDD_IV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/PDD_IV.png -------------------------------------------------------------------------------- /docs/source/Examples/PDD_qe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/PDD_qe.png -------------------------------------------------------------------------------- /docs/source/Examples/Diamond_nk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/Diamond_nk.png -------------------------------------------------------------------------------- /docs/source/Examples/MQW_LDOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/MQW_LDOS.png -------------------------------------------------------------------------------- /docs/source/Examples/RAT_of_ARC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/RAT_of_ARC.png -------------------------------------------------------------------------------- /docs/source/Examples/SiGeSn_nk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/SiGeSn_nk.png -------------------------------------------------------------------------------- /docs/source/Examples/Single_QW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/Single_QW.png -------------------------------------------------------------------------------- /docs/source/Examples/iv_params.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/iv_params.jpg -------------------------------------------------------------------------------- /docs/source/Examples/ls_compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/ls_compare.png -------------------------------------------------------------------------------- /docs/source/Examples/ls_smarts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/ls_smarts.png -------------------------------------------------------------------------------- /docs/source/Quasi3D/pv_module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Quasi3D/pv_module.png -------------------------------------------------------------------------------- /docs/source/Quasi3D/quasi3Dimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Quasi3D/quasi3Dimg.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/IV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/IV.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/QE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/QE.png -------------------------------------------------------------------------------- /docs/source/Examples/Ag_GaAs_abs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/Ag_GaAs_abs.png -------------------------------------------------------------------------------- /docs/source/Examples/eff_mass_fit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/eff_mass_fit.png -------------------------------------------------------------------------------- /docs/source/Examples/optmodelcomp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/optmodelcomp.png -------------------------------------------------------------------------------- /docs/source/Optics/qw_absorption.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Optics/qw_absorption.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/iv_mj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/iv_mj.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/mesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/mesh.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/qe_mj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/qe_mj.png -------------------------------------------------------------------------------- /examples/data/masks_illumination.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/examples/data/masks_illumination.png -------------------------------------------------------------------------------- /solcore/material_system/__init__.py: -------------------------------------------------------------------------------- 1 | from .material_system import MaterialSystem 2 | from .create_new_material import create_new_material -------------------------------------------------------------------------------- /binder/postBuild: -------------------------------------------------------------------------------- 1 | set -ex 2 | 3 | pip install . 4 | git clone https://github.com/phoebe-p/S4 5 | cd S4 6 | make S4_pyext 7 | cd .. 8 | rm -rf S4 -------------------------------------------------------------------------------- /binder/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | matplotlib 3 | scipy 4 | tmm 5 | natsort 6 | regex 7 | cycler 8 | pyyaml 9 | yabox 10 | joblib 11 | -------------------------------------------------------------------------------- /docs/source/Examples/IV_solar_module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/IV_solar_module.png -------------------------------------------------------------------------------- /docs/source/Examples/MJ_IV_optimal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/MJ_IV_optimal.png -------------------------------------------------------------------------------- /docs/source/Examples/square_mask_IV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/square_mask_IV.png -------------------------------------------------------------------------------- /docs/source/Examples/substrate_RAT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/substrate_RAT.png -------------------------------------------------------------------------------- /docs/source/Examples/tunnel_junction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/tunnel_junction.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/EQandSC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/EQandSC.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/LightIV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/LightIV.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/PDD_np.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/PDD_np.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/PDD_pn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/PDD_pn.png -------------------------------------------------------------------------------- /docs/source/Solvers/Figures/QWunit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Solvers/Figures/QWunit.png -------------------------------------------------------------------------------- /docs/source/Examples/MJ_efficiency_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/MJ_efficiency_map.png -------------------------------------------------------------------------------- /docs/source/Examples/circular_mask_IV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/circular_mask_IV.png -------------------------------------------------------------------------------- /docs/source/Examples/square_mask_V1_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/square_mask_V1_3.png -------------------------------------------------------------------------------- /docs/source/Examples/substrate_Adepth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/substrate_Adepth.png -------------------------------------------------------------------------------- /docs/source/Examples/IV_param_dispersion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/IV_param_dispersion.png -------------------------------------------------------------------------------- /docs/source/Examples/MJ_with_rad_coupling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/MJ_with_rad_coupling.png -------------------------------------------------------------------------------- /docs/source/Examples/PDD_carrier_density.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/PDD_carrier_density.png -------------------------------------------------------------------------------- /docs/source/Examples/circular_mask_V1_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Examples/circular_mask_V1_3.png -------------------------------------------------------------------------------- /binder/apt.txt: -------------------------------------------------------------------------------- 1 | gfortran 2 | ngspice 3 | make 4 | git 5 | gcc 6 | g++ 7 | libopenblas-dev 8 | libfftw3-dev 9 | libsuitesparse-dev 10 | libboost-all-dev -------------------------------------------------------------------------------- /docs/source/Systems/eg_vs_lattice_constant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/docs/source/Systems/eg_vs_lattice_constant.png -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/List_Of_Files.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/solcore/material_data/SOPRA_DB/List_Of_Files.xlsx -------------------------------------------------------------------------------- /solcore/spice/__init__.py: -------------------------------------------------------------------------------- 1 | from .spice import solve_circuit, SpiceSolverError 2 | from .pv_module_solver import solve_pv_module 3 | from .quasi_3D_solver import solve_quasi_3D 4 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/List_Of_Files_Updated_PDF.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qpv-research-group/solcore5/HEAD/solcore/material_data/SOPRA_DB/List_Of_Files_Updated_PDF.pdf -------------------------------------------------------------------------------- /solcore/quantum_mechanics/__init__.py: -------------------------------------------------------------------------------- 1 | from .high_level_kp_QW import schrodinger 2 | from .kp_bulk import KPbands, kp8x8_bulk, kp_bands, fit_effective_masses 3 | from .structure_utilities import assemble_qw_structure -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/AIR.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*2* 4 | DATA1*1*1e2*1*0* 5 | DATA1*2*1e6*1*0* 6 | COMMENT*Added manually to the SOPRA database for Solcore.* 7 | COMMENT*Added manually to the SOPRA database for Solcore.* 8 | EOF* -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/PERFECT_MIRROR.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*2* 4 | DATA1*1*1e2*1e8*0* 5 | DATA1*2*1e6*1e8*0* 6 | COMMENT*Added manually to the SOPRA database for Solcore.* 7 | COMMENT*Added manually to the SOPRA database for Solcore* 8 | EOF* -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('with_pdd', type : 'boolean', value : true, 2 | description: 'If set to true builds the fortran PDD module') 3 | option('install_test', type : 'boolean', value : false, 4 | description: 'If set to true builds the fortran PDD module') -------------------------------------------------------------------------------- /solcore/light_source/__init__.py: -------------------------------------------------------------------------------- 1 | from .spectral2 import get_default_spectral2_object, calculate_spectrum_spectral2 2 | from .smarts import get_default_smarts_object, calculate_spectrum_smarts, SmartsSolverError 3 | from .light_source import reference_spectra, LightSource 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /solcore/material_data/GaAsP-Material/__init__.py: -------------------------------------------------------------------------------- 1 | import solcore.science_tracker as st 2 | 3 | st.science_reference('GaP refractive index', 'S. Adachi. Optical dispersion relations for GaP, GaAs, GaSb, InP, InAs, InSb, AlxGa1−xAs, and In1−xGaxAsyP1−y, J. Appl. Phys. 66, 6030-6040 (1989)') 4 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/kynan/nbstripout 3 | rev: 0.6.1 4 | hooks: 5 | - id: nbstripout 6 | files: ".ipynb" 7 | 8 | - repo: https://github.com/pycqa/flake8 9 | rev: 6.0.0 10 | hooks: 11 | - id: flake8 12 | additional_dependencies: [Flake8-pyproject] -------------------------------------------------------------------------------- /docs/source/Systems/Units.rst: -------------------------------------------------------------------------------- 1 | The Units System 2 | ================ 3 | 4 | Most of these functions can be acccessed directly from Solcore:: 5 | 6 | >>> from solcore import eV 7 | 8 | >>> print(eV(1e-19)) 9 | 0.624 eV 10 | 11 | .. automodule:: solcore.units_system.units_system 12 | :members: 13 | :undoc-members: 14 | -------------------------------------------------------------------------------- /docs/source/Systems/systems.rst: -------------------------------------------------------------------------------- 1 | Materials and units 2 | ====================== 3 | 4 | These are the modules that deal with material properties and units. Together with the :doc:`structure modules <../Structures/structure>`, they form the backbone of Solcore. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | Materials 10 | Units 11 | NewMats -------------------------------------------------------------------------------- /solcore/constants.py: -------------------------------------------------------------------------------- 1 | kb=1.3806503e-23 2 | q=1.60217646e-19 3 | h=6.626068e-34 4 | hbar=1.05457148e-34 5 | electron_mass=9.10938188e-31 6 | vacuum_permittivity=8.854187817e-12 7 | c=299792458 8 | fs=6.8e-5 9 | Ts=5762.0 10 | solar_constant=1352.89684374 11 | pi=3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 -------------------------------------------------------------------------------- /solcore/quantum_mechanics/heterostructure_alignment.py: -------------------------------------------------------------------------------- 1 | def VBO_align(structure): 2 | """Takes in the the structure layers and sets Ec and Ev energies in the state which aligns the heterostructure.""" 3 | 4 | for layer in structure: 5 | layer.Ev = layer.material.valence_band_offset 6 | layer.Ec = layer.material.valence_band_offset + layer.material.band_gap 7 | return structure 8 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/compounds.txt: -------------------------------------------------------------------------------- 1 | [AlGaInP] 2 | x=Al 3 | 4 | [AlGaAs] 5 | x=Al 6 | 7 | [HgCdTe] 8 | x=Cd 9 | 10 | [InGaSb] 11 | x=Ga 12 | 13 | [ReSiGe] 14 | x=Ge 15 | 16 | [ReInGaAs] 17 | x=In 18 | 19 | [SiGe] 20 | x=Si 21 | 22 | [StInGaAs] 23 | x=In 24 | 25 | [SiON] 26 | x=N 27 | 28 | [SiPOLY] 29 | x=Poly 30 | 31 | [StSiGe] 32 | x=Ge 33 | 34 | [ZnCdTe] 35 | x=Cd 36 | 37 | [ZnSeTe] 38 | x=Te -------------------------------------------------------------------------------- /solcore/optics/__init__.py: -------------------------------------------------------------------------------- 1 | from ..registries import register_optics 2 | from .beer_lambert import solve_beer_lambert # noqa 3 | from .external_optics import solve_external_optics # noqa 4 | from .rcwa import rcwa_options, solve_rcwa # noqa 5 | from .tmm import solve_tmm # noqa 6 | 7 | 8 | @register_optics(name=None) 9 | def no_optics(*args, **kwargs) -> None: 10 | """Dummy function that does not calculate any optics.""" 11 | return 12 | -------------------------------------------------------------------------------- /solcore/analytic_solar_cells/__init__.py: -------------------------------------------------------------------------------- 1 | from .IV import iv_multijunction 2 | from .QE import spectral_response_all_junctions 3 | from .detailed_balance import iv_detailed_balance, qe_detailed_balance, absorptance_detailed_balance, db_options 4 | from .depletion_approximation import iv_depletion, qe_depletion, da_options 5 | from .diode_equation import iv_2diode 6 | from .tunnel_junctions import resistive_tunnel_junction, parametric_tunnel_junction, external_tunnel_junction -------------------------------------------------------------------------------- /solcore/material_data/GaInP-Material/__init__.py: -------------------------------------------------------------------------------- 1 | import solcore.science_tracker as st 2 | 3 | st.science_reference('GaP and InP refractive index', 'S. Adachi. Optical dispersion relations for GaP, GaAs, GaSb, InP, InAs, InSb, AlxGa1−xAs, and In1−xGaxAsyP1−y, J. Appl. Phys. 66, 6030-6040 (1989)') 4 | st.science_reference('GaInP refractive index', 'M. Schubert, V. Gottschalch, C. M. Herzinger, H. Yao, P. G. Snyder and J. A. Woollam. Optical constants of GaxIn1−xP lattice matched to GaAs, J. Appl. Phys. 77, 3416 (1995)') 5 | -------------------------------------------------------------------------------- /tests/test_basics.py: -------------------------------------------------------------------------------- 1 | from pytest import approx 2 | 3 | import solcore 4 | 5 | 6 | def test_constants_correctly_imported(): 7 | q = 1.60217646e-19 8 | assert q == solcore.constants.q 9 | 10 | 11 | def test_material_correctly_imported(): 12 | GaAs = solcore.material("GaAs")(T=300) 13 | beta_Gamma_GaAs = 204 14 | assert GaAs.beta_Gamma == beta_Gamma_GaAs 15 | 16 | 17 | def test_units_correctly_calculated(): 18 | a_nm = 1239.8417166827828 19 | assert a_nm == approx(solcore.eVnm(1)) 20 | -------------------------------------------------------------------------------- /solcore/poisson_drift_diffusion/__init__.py: -------------------------------------------------------------------------------- 1 | # Package file for the Poisson - Drift-Diffusion solver 2 | 3 | # We import all the contents of the modules of this package so they can be used directly 4 | from .DeviceStructure import * 5 | from .QWunit import * 6 | 7 | try: 8 | from .DriftDiffusionUtilities import * 9 | except Exception as err: 10 | print('WARNING: The Poisson - Drift-Diffusion solver will not be available because ' 11 | 'the ddModel fortran library could not be imported.') 12 | print(err) -------------------------------------------------------------------------------- /docs/source/Optics/optics.rst: -------------------------------------------------------------------------------- 1 | Optical methods 2 | =============== 3 | 4 | Solcore includes several methods to calculate the optical properties of individual materials and of full stacks of layers. Some of them are built in, but it can also deal with externally provided data and, currently, it has also an interface to **S4** to perform rigorous couple wave analysis calculations. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | material_optics 10 | qw_absorption 11 | tmm 12 | rcwa 13 | other_methods 14 | 15 | -------------------------------------------------------------------------------- /solcore/material_data/AlInP-Material/k/1.000_AlInP_k.txt: -------------------------------------------------------------------------------- 1 | 330.1791e-9 0.196746 2 | 334.9031e-9 0.168535 3 | 336.6801e-9 0.146868 4 | 342.0151e-9 0.0939062 5 | 344.3931e-9 0.0700951 6 | 347.9421e-9 0.0575155 7 | 351.4951e-9 0.0448194 8 | 357.9941e-9 0.0337462 9 | 364.4921e-9 0.0262983 10 | 373.3431e-9 0.0208506 11 | 382.7821e-9 0.0168185 12 | 395.7551e-9 0.0134507 13 | 405.7781e-9 0.0116226 14 | 416.3871e-9 0.0103947 15 | 430.5321e-9 0.00898261 16 | 444.6761e-9 0.00782939 17 | 464.7091e-9 0.00688386 18 | 486.5091e-9 0.00600085 19 | 504.7731e-9 0.0 20 | -------------------------------------------------------------------------------- /solcore/material_data/Si-Material/info.txt: -------------------------------------------------------------------------------- 1 | # this file is part of refractiveindex.info database 2 | # refractiveindex.info database is in the public domain 3 | # copyright and related rights waived via CC0 1.0 4 | 5 | REFERENCES: "M. A. Green. Self-consistent optical parameters of intrinsic silicon at 300K including temperature coefficients, Sol. Energ. Mat. Sol. Cells 92, 1305–1310 (2008)" 6 | COMMENTS: "Combination of data sets enforcing KK consistency. 300 K (27 °C). k is for band-to-band absorption." -------------------------------------------------------------------------------- /solcore/material_data/AlInP-Material/n/critical_points.txt: -------------------------------------------------------------------------------- 1 | [0.000] 2 | file = 0.000_AlInP_n.txt 3 | 1 = 2.720649984167821e-07 3.898774013625066 4 | 2 = 4.02424032653869e-07 4.769111482399965 5 | 3 = 9.015129065901442e-07 3.441833055163585 6 | 7 | [0.530] 8 | file = 0.530_AlInP_n.txt 9 | 1 = 2.7132008964971305e-07 3.8860072601036046 10 | 2 = 3.4581096635661983e-07 4.478 11 | 3 = 4.925579934692261e-07 3.5527827789014728 12 | 13 | [1.000] 14 | file = 1.000_AlInP_n.txt 15 | 1 = 2.7132008964971305e-07 3.82612 16 | 2 = 3.2197388581040965e-07 3.82612 17 | 3 = 3.949749449831783e-07 3.324982703938456 18 | 19 | -------------------------------------------------------------------------------- /solcore/material_data/GaAsP-Material/n/critical_points.txt: -------------------------------------------------------------------------------- 1 | [0.000] 2 | file = 0.000_GaAsP_n.txt 3 | 1 = 2.0653532783675151e-07 1.264 4 | 2 = 2.8212683355663194e-07 4.0124928381421014 5 | 3 = 3.361922813562816e-07 3.485419333251732 6 | 4 = 4.3230863300010313e-07 5.054547547746392 7 | 5 = 9.043800892507473e-07 3.592286972461495 8 | 9 | [1.000] 10 | file = 1.000_GaAsP_n.txt 11 | 1 = 2.0653532783675151e-07 1.7732 12 | 2 = 2.6010016963825614e-07 4.27099663138421 13 | 3 = 2.8012440956405237e-07 4.186904462155653 14 | 4 = 3.3469046336184684e-07 5.571214360045594 15 | 5 = 4.53834690920334e-07 3.794161244759685 16 | 17 | -------------------------------------------------------------------------------- /solcore/material_data/InGaAs-Material/test.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | import seaborn as sns 4 | 5 | cols = sns.color_palette("husl", 7) 6 | fig, (ax1, ax2) = plt.subplots(nrows=1, ncols=2, figsize=(8, 4)) 7 | for i1, comp in enumerate(["000", "010", "024", "035", "053", "075", "100"]): 8 | 9 | nk = np.loadtxt(comp + "_InGaAs.txt") 10 | ax1.plot(nk[:,0], nk[:,1], color=cols[i1], label=comp) 11 | ax2.plot(nk[:,0], nk[:,2], color=cols[i1]) 12 | 13 | ax1.legend() 14 | ax1.set_xlabel("E (eV)") 15 | ax2.set_xlabel("E (eV)") 16 | ax1.set_ylabel("e1") 17 | ax2.set_ylabel("e2") 18 | plt.show() -------------------------------------------------------------------------------- /solcore/material_data/InP-Material/info.txt: -------------------------------------------------------------------------------- 1 | # this data is identical to the data included for InP in the SOPRA database. 2 | # The original source for this data appears (not confirmed, just from plotting the data) 3 | # to be a combination of the following two sources: 4 | # 5 | # 1) D. E. Aspnes and A. A. Studna. Dielectric functions and optical parameters of Si, Ge, 6 | # GaP, GaAs, GaSb, InP, InAs, and InSb from 1.5 to 6.0 eV, Phys. Rev. B 27, 985-1009 (1983) 7 | # 2) G. D. Pettit and W. J. Turner. Refractive index of InP, J. Appl. Phys. 36, 2081 (1965) 8 | # 9 | # Data for 1) from 207 to ~900 nm (around the bandgap), data from 2) from ~900 to 2478 nm 10 | 11 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Set the version of Python and other tools you might need 9 | build: 10 | os: ubuntu-22.04 11 | tools: 12 | python: "3.10" 13 | 14 | # Build documentation in the docs/ directory with Sphinx 15 | sphinx: 16 | configuration: docs/source/conf.py 17 | 18 | # We recommend specifying your dependencies to enable reproducible builds: 19 | # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html 20 | python: 21 | install: 22 | - requirements: docs/requirements.txt -------------------------------------------------------------------------------- /solcore/graphing/graph_support.py: -------------------------------------------------------------------------------- 1 | import collections, os, platform 2 | 3 | 4 | def flatten(l): 5 | for el in l: 6 | if isinstance(el, collections.Iterable) and not isinstance(el, str): 7 | yield from flatten(el) 8 | else: 9 | yield el 10 | 11 | 12 | def open_with_os(path): 13 | sys = platform.system() 14 | 15 | if sys == "Darwin": 16 | os.system('open "%s"' % path) 17 | elif sys == "Windows": 18 | os.startfile(path) 19 | elif sys == "Linux": 20 | os.system('evince "%s"' % path) 21 | else: 22 | raise NotImplementedError("Unable to open files in this particular system: %s" % sys) 23 | -------------------------------------------------------------------------------- /docs/source/Optics/other_methods.rst: -------------------------------------------------------------------------------- 1 | Other optical methods 2 | ===================== 3 | 4 | Finally, the optical properties of the solar cell can be defined with a simple Beer-Lambert formalism and also provided externally by the user. These section describe the methods that are called internally by the solar cell solver in these two cases. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | other_methods 10 | 11 | Beer-Lambert law 12 | ---------------- 13 | 14 | .. automodule:: solcore.optics.beer_lambert 15 | :members: 16 | :undoc-members: 17 | 18 | External optics 19 | --------------- 20 | 21 | .. automodule:: solcore.optics.external_optics 22 | :members: 23 | :undoc-members: 24 | -------------------------------------------------------------------------------- /tests/data/SiGeSn_params.txt: -------------------------------------------------------------------------------- 1 | [SiGeSn] 2 | lattice_constant=5.658 Angstrom 3 | Eg0_Gamma=0.89 eV 4 | alpha_Gamma=0.582 meV K-1 5 | beta_Gamma=296 K 6 | Eg0_L=0.742 eV 7 | alpha_L=0.48 meV K-1 8 | beta_L=235 K 9 | spin_orbit_splitting=0.29 eV 10 | eff_mass_DOS_L=0.22 11 | eff_mass_DOS_X=0.22 12 | gamma1=13.35 13 | gamma2=4.25 14 | gamma3=5.69 15 | eff_mass_split_off=0.084 16 | eff_mass_electron=0.12 17 | eff_mass_hh_z=0.33 18 | eff_mass_lh_z=0.043 19 | interband_matrix_element=26.3 eV 20 | c11=126 GPa 21 | c12=44 GPa 22 | c44=67.7 GPa 23 | relative_dielectric_constant=16.2 24 | electron_affinity=4.0 eV 25 | electron_auger_recombination=1e-42 26 | hole_auger_recombination=1e-42 27 | radiative_recombination=6.4e-20 -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /examples/data/SiGeSn_params.txt: -------------------------------------------------------------------------------- 1 | [SiGeSn] 2 | lattice_constant=5.658 Angstrom 3 | Eg0_Gamma=0.89 eV 4 | alpha_Gamma=0.582 meV K-1 5 | beta_Gamma=296 K 6 | Eg0_L=0.742 eV 7 | alpha_L=0.48 meV K-1 8 | beta_L=235 K 9 | spin_orbit_splitting=0.29 eV 10 | eff_mass_DOS_L=0.22 11 | eff_mass_DOS_X=0.22 12 | gamma1=13.35 13 | gamma2=4.25 14 | gamma3=5.69 15 | eff_mass_split_off=0.084 16 | eff_mass_electron=0.12 17 | eff_mass_hh_z=0.33 18 | eff_mass_lh_z=0.043 19 | interband_matrix_element=26.3 eV 20 | c11=126 GPa 21 | c12=44 GPa 22 | c44=67.7 GPa 23 | relative_dielectric_constant=16.2 24 | electron_affinity=4.0 eV 25 | electron_auger_recombination=1e-42 26 | hole_auger_recombination=1e-42 27 | radiative_recombination=6.4e-20 -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | 14 | **To Reproduce** 15 | Steps to reproduce the behavior: 16 | 17 | 18 | **Expected behavior** 19 | A clear and concise description of what you expected to happen. 20 | 21 | 22 | **Screenshots** 23 | If applicable, add screenshots to help explain your problem. 24 | 25 | **Desktop (please complete the following information):** 26 | - OS: [e.g. iOS] 27 | - Solcore Version [e.g. 22] 28 | 29 | 30 | **Additional context** 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /solcore/material_data/GaInP-Material/n/critical_points.txt: -------------------------------------------------------------------------------- 1 | [0.000] 2 | file = 0.000_GaInP_n.txt 3 | 1 = 2.6010016963825614e-07 4.27099663138421 4 | 2 = 2.7962380356590747e-07 4.186527699691593 5 | 3 = 3.3469046336184684e-07 5.571214360045594 6 | 4 = 4.5283347892404415e-07 3.8038100216594133 7 | 8 | [0.490] 9 | file = 0.490_GaInP_n.txt 10 | 1 = 2.7061289559929914e-07 3.976107379416137 11 | 2 = 3.146662234360507e-07 3.67616 12 | 3 = 3.917595471503659e-07 4.589288954894701 13 | 4 = 6.801086020818304e-07 3.5521645574998004 14 | 15 | [1.000] 16 | file = 1.000_GaInP_n.txt 17 | 1 = 2.71614107595589e-07 3.8994363391251237 18 | 2 = 3.086589514583119e-07 3.3611221419340245 19 | 3 = 4.01271061115119e-07 4.815052049382116 20 | 4 = 9.224019051839639e-07 3.4117496859391228 21 | 22 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('solcore', 2 | version: '5.10.1', 3 | license: 'GNU LGPL', 4 | meson_version: '>= 0.64.0', 5 | default_options : [ 6 | 'buildtype=release', 7 | 'c_std=c99', 8 | 'cpp_std=c++14', 9 | 'fortran_std=legacy', 10 | ] 11 | ) 12 | 13 | is_windows = host_machine.system() == 'windows' 14 | message('WINDOWS:', is_windows) 15 | 16 | py_mod = import('python') 17 | py = py_mod.find_installation('python3', pure: false) 18 | message('py DIR', py.full_path()) 19 | message('install DIR', py.get_install_dir()) 20 | 21 | subdir('solcore') 22 | 23 | if get_option('install_test') 24 | install_subdir('tests', install_dir: py.get_install_dir() / 'solcore') 25 | install_subdir('examples', install_dir: py.get_install_dir() / 'solcore') 26 | endif 27 | 28 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/ZRSI2.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*13* 4 | DATA1*1*4.13283938e2*2.71000000*2.96000000* 5 | DATA1*2*4.27535108e2*2.79000000*2.95000000* 6 | DATA1*3*4.42804219e2*2.86000000*3.05000000* 7 | DATA1*4*4.59204375e2*2.92000000*3.11000000* 8 | DATA1*5*4.76866082e2*3.04000000*3.11000000* 9 | DATA1*6*4.95940725e2*3.23000000*3.15000000* 10 | DATA1*7*5.16604922e2*3.26000000*3.16000000* 11 | DATA1*8*5.39066006e2*3.33000000*3.18000000* 12 | DATA1*9*5.63569006e2*3.44000000*3.16000000* 13 | DATA1*10*5.90405625e2*3.55000000*3.28000000* 14 | DATA1*11*6.19925906e2*3.66000000*3.11000000* 15 | DATA1*12*6.52553586e2*3.70000000*3.27000000* 16 | DATA1*13*6.88806563e2*3.91000000*3.36000000* 17 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 18 | COMMENT*sopra-sa.com/indices.htm* 19 | EOF* 20 | -------------------------------------------------------------------------------- /tests/test_state.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from solcore.state import State 3 | 4 | 5 | def test_state(): 6 | array1 = np.array([1, 2, 3]) 7 | array2 = np.array([2, 3, 4]) 8 | 9 | state1 = State() 10 | state1.a = 1 11 | state1.b = True 12 | state1.c = array1 13 | assert state1.__len__() == 3 14 | assert state1.a == 1 15 | assert state1.b == True 16 | assert all([input == output for input, output in zip(array1, state1.c)]) 17 | 18 | state2 = State() 19 | state2.b = False 20 | state2.d = array2 21 | state1.update(state2) 22 | assert state1.__len__() == 4 23 | assert state1.a == 1 24 | assert state2.b == False 25 | assert all([input == output for input, output in zip(array1, state1.c)]) 26 | assert all([input == output for input, output in zip(array2, state1.d)]) 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question about Solcore and it’s use 4 | title: '' 5 | labels: question 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Please, confirm the following:** 11 | 12 | - [ ] I have checked [Solcore’s documentation](http://docs.solcore.solar/en/master/) and could not find the answer. 13 | - [ ] I haven’t found any [other issue](https://github.com/qpv-research-group/solcore5/issues?q=) on a related topic. 14 | 15 | **What’s the question?** 16 | Please, be concise and straight to the point 17 | 18 | **Additional information** 19 | Add any other relevant information that could help us answering your question, E.g.: 20 | - Code of a minimum working example showing what you’re trying to do. 21 | - Screenshot showing the problem you are talking about. 22 | - Context in which your question applies 23 | -------------------------------------------------------------------------------- /solcore/material_data/AlInP-Material/__init__.py: -------------------------------------------------------------------------------- 1 | import solcore.science_tracker as st 2 | 3 | st.science_reference('InP refractive index', 'S. Adachi. Optical dispersion relations for GaP, GaAs, GaSb, InP, InAs, InSb, AlxGa1−xAs, and In1−xGaxAsyP1−y, J. Appl. Phys. 66, 6030-6040 (1989)') 4 | st.science_reference('AlInP refractive index', 'E. Ochoa-Martínez, L. Barrutia, M. Ochoa, E. Barrigón, I. García, I. Rey-Stolle, C. Algora, P. Basa, G. Kronome, and M. Gabás, “Refractive indexes and extinction coefficients of n- and p-type doped GaInP, AlInP and AlGaInP for multijunction solar cells,” Solar Energy Materials and Solar Cells, vol. 174, pp. 388–396, Jan. 2018.') 5 | st.science_reference('AlP refractive index. Cut to bandgap.', 'V. Emberger, F. Hatami, W. Ted Masselink, and S. Peters, “AlP/GaP distributed Bragg reflectors,” Appl. Phys. Lett., vol. 103, no. 3, pp. 031101–4, Jul. 2013.') -------------------------------------------------------------------------------- /solcore/absorption_calculator/__init__.py: -------------------------------------------------------------------------------- 1 | from .adachi_alpha import create_adachi_alpha 2 | from .absorption_QW import calc_alpha, calc_emission 3 | from .transfer_matrix import calculate_absorption_profile, calculate_rat, calculate_ellipsometry, OptiStack 4 | from .dielectric_constant_models import DielectricConstantModel 5 | from .sopra_db import sopra_database 6 | from .nk_db import download_db, search_db, create_nk_txt 7 | from .cppm import Custom_CPPB 8 | from .tmm_core_vec import inc_tmm, position_resolved, inc_tmm, unpolarized_RT, ellips, find_in_structure 9 | 10 | 11 | class RCWASolverError(Exception): 12 | pass 13 | 14 | 15 | try: 16 | from .rigorous_coupled_wave import calculate_absorption_profile_rcwa, calculate_rat_rcwa, \ 17 | rcwa_rat, initialise_S, necessary_materials, update_epsilon, rcwa_position_resolved 18 | except RCWASolverError: 19 | print('WARNING: The RCWA solver will not be available because an S4 installation has not been found.') 20 | -------------------------------------------------------------------------------- /solcore/material_data/GaAsP-Material/k/critical_points.txt: -------------------------------------------------------------------------------- 1 | [0.000] 2 | file = 0.000_GaAsP_k.txt 3 | 1 = 2.4989525808785096e-07 4.096982104070575 4 | 2 = 2.998281000629667e-07 1.94617630780145 5 | 3 = 3.88948742069186e-07 2.2615901986223044 6 | 4 = 4.281365421002895e-07 1.67475178454301 7 | 5 = 4.6985258729469e-07 0.5660207916806521 8 | 6 = 8.269672166103913e-07 0.07768263123436019 9 | 7 = 8.554099746974826e-07 0.03853977526477051 10 | 8 = 8.863809779478708e-07 0.0016445338035460185 11 | 9 = 8.857489166570466e-07 1.9081603300870967e-06 12 | 13 | [1.000] 14 | file = 1.000_GaAsP_k.txt 15 | 1 = 2.416784613071357e-07 3.842987474080661 16 | 2 = 2.72649464557524e-07 2.3383518181112533 17 | 3 = 3.3395940976747626e-07 1.94617630780145 18 | 4 = 3.6240216785456745e-07 0.8308750151090651 19 | 5 = 3.826281291609435e-07 0.20794772374154943 20 | 6 = 4.3445715500853205e-07 0.11028877226185906 21 | 7 = 4.4836250340666555e-07 0.05752550809912156 22 | 8 = 4.534189937332596e-07 0.017885560199857087 23 | 9 = 5.48228187356897e-07 2.2547301129128463e-06 24 | 25 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018, Imperial College, London All rights reserved. 2 | 3 | Solcore is free software: you can redistribute it and/or modify it under 4 | the terms of the GNU Lesser General Public License as published by the 5 | Free Software Foundation, either version 3 of the License or any later version. 6 | 7 | Solcore is distributed WITHOUT ANY WARRANTY; without even the implied 8 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | GNU Lesser General Public License for more details. You should have 10 | received a copy it along with Solcore. If not, see http://www.gnu.org/licenses/. 11 | 12 | If you find this software useful and help you produce any scientific 13 | publication, please cite the initial Solcore paper at: 14 | 15 | “Solcore: A multi-scale, python-based library for modelling solar cells 16 | and semiconductor materials” 17 | D. Alonso-Alvarez, T. Wilson, P. Pearce, M. Führer, D. Farrell and N. Ekins-Daukes. 18 | Journal of Computational Electronics (2018) https://doi.org/10.1007/s10825-018-1171-3 19 | 20 | -------------------------------------------------------------------------------- /tests/test_optimization.py: -------------------------------------------------------------------------------- 1 | from pytest import approx, mark 2 | 3 | 4 | @mark.flaky(reruns=5) 5 | def test_DE(): 6 | from yabox.problems import Ackley 7 | from solcore.optimization import DE 8 | 9 | problem = Ackley() 10 | 11 | algorithm = DE(problem, problem.bounds) 12 | 13 | result = algorithm.solve() 14 | 15 | assert result[0] == approx(0.0) 16 | assert result[1] == approx(0.0) 17 | assert result[2][-1] == approx(result[0]) 18 | assert result[3][-1] == approx(0.0) 19 | assert result[4][-1] == approx(0.0) 20 | 21 | 22 | @mark.flaky(reruns=5) 23 | def test_PDE(): 24 | from yabox.problems import Ackley 25 | from solcore.optimization import PDE 26 | 27 | problem = Ackley() 28 | 29 | algorithm = PDE(problem, problem.bounds, processes=0) 30 | 31 | result = algorithm.solve() 32 | 33 | assert result[0] == approx(0.0) 34 | assert result[1] == approx(0.0) 35 | assert result[2][-1] == approx(result[0]) 36 | assert result[3][-1] == approx(0.0) 37 | assert result[4][-1] == approx(0.0) 38 | -------------------------------------------------------------------------------- /docs/source/Quasi3D/spice.rst: -------------------------------------------------------------------------------- 1 | SPICE-based solar cell solver 2 | ============================= 3 | 4 | - Example 1: :doc:`PV module calculator <../Examples/example_pv_module>` 5 | - Example 2: :doc:`Quasi-3D 3J solar cell <../Examples/example_quasi3D_cell>` 6 | 7 | When the two diode model is used to define the junctions in a MJ solar cell, then larger scale circuits can be constructed. Solcore includes two levels of large scale equivalent circuits: quasi-3D solar cell modelling and solar array modelling. Both solvers are based on the interface between Solcore and SPICE, allowing for a fast calculation of complex structures with many elements. 8 | 9 | This solver has been tested with NGSPICE, only. Check the installation :doc:`instructions for Windows <../Installation/Solcore_on_Windows>` and :doc:`for MacOS <../Installation/Solcore_on_MacOSX>`. 10 | 11 | .. toctree:: 12 | :maxdepth: 0 13 | 14 | pv_panel 15 | quasi3D 16 | 17 | Spice solver files 18 | ------------------ 19 | 20 | .. automodule:: solcore.spice.spice 21 | :members: 22 | :undoc-members: 23 | -------------------------------------------------------------------------------- /docs/source/Installation/Solcore_on_MacOSX.md: -------------------------------------------------------------------------------- 1 | Solcore on Mac OS X 2 | ===================== 3 | 4 | Solcore has been heavily tested under Mac OS X, so there should be no problems. However, using NGSPICE requires some details, as shown below. 5 | 6 | Installing NGSpice on MacOSX 7 | ---------------------------- 8 | 9 | * Download NGSpice from 10 | [http://ngspice.sourceforge.net/download.html](http://ngspice.sourceforge.net/download.html) 11 | * Installing the binary package on mac os X will result in the executable residing in ```/Applications/ngspice/bin/ngspice``` 12 | * You an set the path using 13 | ``` `\>\>\>import solcore.config\_tools as config 14 | > > > config.set_location_of_spice('/Applications/ngspice/bin/ngspice') 15 | 16 | 17 | * If NG spice throws an error 18 | ``` `dyld: Library not loaded: /opt/X11/lib/libXaw.7.dylib``` 19 | `* then you will likely need to install xquartz. It can be downloaded from from [https://www.xquartz.org](https://www.xquartz.org) 20 | * run the installer and restart the computer. 21 | * You can test the NGSpice installation using Example\_PV\_module.py 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/source/Installation/s4_installation.md: -------------------------------------------------------------------------------- 1 | Installing S4 2 | -------------- 3 | 4 | Installing S4 is only necessary if you would like to use Solcore's rigorous coupled-wave analysis (RCWA) functionality. 5 | This is a wave optical method for solving Maxwell's equations in a periodic structure, and can be used for structures which 6 | contain e.g. a diffraction grating or other photonic structures. S4 is written in C++ and must be compiled on your system 7 | before you are able to import it as a Python package. Up-to-date instructions on how to do this in MacOS 8 | and Ubuntu are maintained [here](https://github.com/phoebe-p/S4) (scroll down to the README section). We do not currently have 9 | installation instructions for other Linux distributions, but it should be possible to compile S4 on any UNIX operating system 10 | as long as the relevant packages are installed first (see the link above for requirements). Unfortunately, 11 | there are currently no instructions available for installing S4 on Windows; if you want to use the RCWA functionality from 12 | a Windows machine there are [a few options](Solcore_on_Windows.md). 13 | -------------------------------------------------------------------------------- /solcore/material_data/AlInP-Material/n/1.000_AlInP_n.txt: -------------------------------------------------------------------------------- 1 | 329.5011e-9 3.82612 2 | 333.6271e-9 3.81929 3 | 337.1661e-9 3.80699 4 | 338.3531e-9 3.78784 5 | 341.3131e-9 3.75774 6 | 344.2771e-9 3.71671 7 | 347.2401e-9 3.67977 8 | 349.6101e-9 3.64831 9 | 353.1611e-9 3.61275 10 | 356.7131e-9 3.57445 11 | 360.8521e-9 3.54163 12 | 366.1741e-9 3.49512 13 | 370.3111e-9 3.46503 14 | 376.2191e-9 3.42674 15 | 382.7161e-9 3.38708 16 | 387.4431e-9 3.35563 17 | 393.9331e-9 3.32965 18 | 402.7861e-9 3.28999 19 | 409.2791e-9 3.25991 20 | 416.3581e-9 3.23530 21 | 426.9751e-9 3.19976 22 | 435.2341e-9 3.17105 23 | 444.6701e-9 3.14371 24 | 454.1021e-9 3.12321 25 | 463.5351e-9 3.10135 26 | 474.1451e-9 3.08085 27 | 487.1131e-9 3.05626 28 | 501.2581e-9 3.03304 29 | 516.5811e-9 3.00982 30 | 531.3131e-9 2.99070 31 | 547.8101e-9 2.97433 32 | 560.1851e-9 2.95794 33 | 580.8051e-9 2.94021 34 | 597.8921e-9 2.92247 35 | 619.0981e-9 2.91021 36 | 640.3051e-9 2.89659 37 | 661.5131e-9 2.88159 38 | 683.8971e-9 2.87071 39 | 705.1021e-9 2.86119 40 | 721.5941e-9 2.85439 41 | 744.5651e-9 2.84624 42 | 769.3031e-9 2.83810 43 | 795.2201e-9 2.82859 44 | 822.3121e-9 2.82319 45 | 838.8031e-9 2.81912 46 | 849.4041e-9 2.81642 -------------------------------------------------------------------------------- /solcore/material_data/AlInP-Material/k/critical_points.txt: -------------------------------------------------------------------------------- 1 | [0.000] 2 | file = 0.000_AlInP_k.txt 3 | 1 = 2.588028937264991e-07 3.558212016524214 4 | 2 = 2.8725697011676234e-07 1.8143772659806061 5 | 3 = 4.0414939204433015e-07 1.9346627516775792 6 | 4 = 4.326034684345933e-07 0.842714933922444 7 | 5 = 5.779499667524244e-07 0.31106188179928107 8 | 6 = 8.478791779141105e-07 0.18161512138550107 9 | 7 = 9.193988834355828e-07 0.016039098359706697 10 | 11 | [0.530] 12 | file = 0.530_AlInP_k.txt 13 | 1 = 2.349629918860083e-07 3.6080000000000005 14 | 2 = 2.8341182465861864e-07 2.06603531005843 15 | 3 = 3.1801813378191177e-07 1.9740529239897344 16 | 4 = 3.6646696655452206e-07 0.7570373556277895 17 | 5 = 4.149157993271324e-07 0.3008445363425424 18 | 6 = 4.7643812665743127e-07 0.10668649630213695 19 | 7 = 5.325772503463288e-07 0.012 20 | 21 | [1.000] 22 | file = 1.000_AlInP_k.txt 23 | 1 = 1.934354209380566e-07 0.196746 24 | 2 = 2.3419396279437959e-07 0.196746 25 | 3 = 2.926401737581635e-07 0.196746 26 | 4 = 3.218632792400554e-07 0.196746 27 | 5 = 3.2417036651494164e-07 0.196746 28 | 6 = 3.380128901642589e-07 0.13363707851519338 29 | 7 = 3.9107589748664163e-07 0.01466542429079537 30 | 31 | -------------------------------------------------------------------------------- /solcore/state.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | 3 | 4 | class State(OrderedDict): 5 | """ This class defines a convent way of expanding the attributes of an object, usually fixed during the definition of 6 | the class. In this case, the class is just a dictionary - a special type of it - and attributes are expanded by 7 | adding new keys to it. 8 | """ 9 | def __getattr__(self, name): 10 | # print ("***", name) 11 | if name in ["_OrderedDict__root", "_OrderedDict__map"]: 12 | return OrderedDict.__getattribute__(self, name) 13 | 14 | if name in self: 15 | return self[name] 16 | else: 17 | raise KeyError("The state object does not have an entry for the key '%s'." % (name,)) 18 | 19 | def __setattr__(self, name, value): 20 | if name in ["_OrderedDict__root", "_OrderedDict__map", "_OrderedDict__hardroot"]: 21 | return OrderedDict.__setattr__(self, name, value) 22 | 23 | self[name] = value 24 | 25 | # 26 | if __name__ == "__main__": 27 | a = State() 28 | 29 | a.a = 0 30 | a.b = 1 31 | a.c = 2 32 | 33 | a["d"] = 3 34 | print(a) 35 | -------------------------------------------------------------------------------- /examples/data/Palik_GaAs_Eps1.csv: -------------------------------------------------------------------------------- 1 | 0.291910734,10.94926657 2 | 0.468615345,11.0932519 3 | 0.645323215,11.25620083 4 | 0.822041196,11.47796057 5 | 0.998771961,11.77408129 6 | 1.175524953,12.19949347 7 | 1.352318625,12.8615393 8 | 1.529114384,13.53571773 9 | 1.705884045,14.05809565 10 | 1.882657468,14.60235103 11 | 2.066415092,15.34474157 12 | 2.232485016,16.30129041 13 | 2.400597258,17.62832151 14 | 2.561415074,19.16106373 15 | 2.639106701,20.72574113 16 | 2.758282405,22.5747439 17 | 2.855084127,23.49500185 18 | 2.912213329,20.57445793 19 | 2.928358435,18.35782719 20 | 2.993532145,16.43799671 21 | 3.073208384,14.98167271 22 | 3.111361934,13.19374078 23 | 3.155331121,11.44324465 24 | 3.228347978,9.702416776 25 | 3.404455128,8.701498101 26 | 3.581073068,8.341333359 27 | 3.757778809,8.491895714 28 | 3.934548116,9.012211895 29 | 4.111363234,9.799000929 30 | 4.288104274,10.15489233 31 | 4.418613277,8.868505386 32 | 4.450337418,7.685628436 33 | 4.510738689,6.076341534 34 | 4.571271184,4.659976741 35 | 4.627366063,2.997350847 36 | 4.711313555,0.477358021 37 | 4.755732661,-0.52037397 38 | 4.788262642,-2.859811574 39 | 4.838781114,-5.103297205 40 | 4.89959537,-8.163205476 41 | 4.953480394,-10.10714966 42 | 5.000038453,-11.71332317 -------------------------------------------------------------------------------- /examples/Tunnel_junction.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | 3 | from solcore.structure import TunnelJunction 4 | from solcore.solar_cell_solver import default_options 5 | from solcore.analytic_solar_cells import parametric_tunnel_junction 6 | 7 | # We define the tunnel junction and solve its properties 8 | tunnel = TunnelJunction(v_peak=0.2, j_peak=100, v_valley=0.9, j_valley=10, prefactor=10, j01=1e-21, kind='parametric') 9 | parametric_tunnel_junction(tunnel, default_options) 10 | 11 | v = tunnel.voltage 12 | 13 | plt.plot(v, tunnel.tunnel_current(v), 'r--', label='Tunnel') 14 | plt.plot(v, tunnel.excess_current(v), 'g--', label='Excess') 15 | plt.plot(v, tunnel.diffusion_current(v), 'b--', label='Diffusion') 16 | plt.plot(v, tunnel.current, 'k', linewidth=3, color='DimGray', label='Total') 17 | plt.plot((0.2, 0.9), (100, 10), 'ko') 18 | 19 | plt.annotate('V$_P$, J$_P$', xy=(0.2, 110), fontsize=12) 20 | plt.annotate('V$_V$, J$_V$', xy=(0.6, 10), fontsize=12) 21 | 22 | plt.legend(fontsize=12, frameon=False) 23 | plt.ylim(0, 150) 24 | plt.xlim(0, 2) 25 | plt.ylabel('Current Density(A/$m^2$)', fontsize=12) 26 | plt.xlabel('Voltage(V)', fontsize=12) 27 | plt.tick_params(labelsize=12) 28 | plt.tight_layout() 29 | plt.show() 30 | -------------------------------------------------------------------------------- /solcore/material_data/GaInP-Material/k/critical_points.txt: -------------------------------------------------------------------------------- 1 | [0.000] 2 | file = 0.000_GaInP_k.txt 3 | 1 = 2.4157774770689474e-07 3.8436636939679927 4 | 2 = 2.7111350159744404e-07 2.430268867348966 5 | 3 = 3.331886453674122e-07 1.9886744118501305 6 | 4 = 3.817474271874678e-07 0.2244766648331531 7 | 5 = 4.3831590497784193e-07 0.0906866943935999 8 | 6 = 4.5233287292589925e-07 0.02167576821440051 9 | 7 = 5.429425585901267e-07 9.520328516395682e-05 10 | 11 | [0.490] 12 | file = 0.490_GaInP_k.txt 13 | 1 = 2.490868376790683e-07 3.74166 14 | 2 = 2.97645619499124e-07 1.9228278042725024 15 | 3 = 3.647268232505411e-07 1.7985259583515465 16 | 4 = 5.089013507162733e-07 0.23175098470628225 17 | 5 = 6.520746661857158e-07 0.10606097817127424 18 | 6 = 6.675934521282078e-07 0.011461715334443703 19 | 7 = 6.741013301040915e-07 0.0021535478690559375 20 | 21 | [1.000] 22 | file = 1.000_GaInP_k.txt 23 | 1 = 2.590989576419664e-07 3.5580258128037947 24 | 2 = 3.3519106935999174e-07 1.8176251412626654 25 | 3 = 4.0477530310213334e-07 1.8889689260401037 26 | 4 = 5.809886144491394e-07 0.3085340574483674 27 | 5 = 9.013764532618779e-07 0.08747435130861375 28 | 6 = 9.173958452025147e-07 0.024081664811602413 29 | 7 = 9.224019051839639e-07 0.00671167782128346 30 | 31 | -------------------------------------------------------------------------------- /solcore/units_system/Default_units.txt: -------------------------------------------------------------------------------- 1 | [length] 2 | Ang: 1e-10 3 | angstrom: 1e-10 4 | Angstrom: 1e-10 5 | lightyear: 9.4605284e15 6 | parsec: 3.08568025e16 7 | META_GenerateConversions: m centi deci 8 | 9 | [mass] 10 | META_GenerateConversions: g 0.001 altbase 11 | emu: constants.electron_mass 12 | amu: 1.66053878283e-27 13 | 14 | [time] 15 | META_GenerateConversions: s 16 | min: 60 17 | h: 3600 18 | days:86400 19 | day:86400 20 | 21 | [angle] 22 | radians: 1 23 | degrees: constants.pi/180. 24 | °: constants.pi/180. 25 | 26 | [pressure] 27 | hPa: 100. 28 | bar: 1/1e-5 29 | at: 1/1.0197e-5 30 | atm: 1/9.8692e-6 31 | Torr: 1/7.5006e-3 32 | psi: 1/145.04e-6 33 | META_GenerateConversions: Pa 34 | 35 | [voltage] 36 | META_GenerateConversions: V 37 | 38 | [current] 39 | META_GenerateConversions: A 40 | 41 | [resistance] 42 | META_GenerateConversions: Ohm 43 | 44 | [power] 45 | META_GenerateConversions: W 46 | 47 | [energy] 48 | META_GenerateConversions: J 49 | META_GenerateConversions2: eV constants.q altbase 50 | 51 | [luminous intensity] 52 | META_GenerateConversions: cd 53 | 54 | [temperature] 55 | META_GenerateConversions: K 56 | 57 | [force] 58 | META_GenerateConversions: N 59 | 60 | [charge] 61 | META_GenerateConversions: C -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/LI.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*20* 4 | DATA1*1*1.83681750e2*4.40000000e-1*4.07000000e-1* 5 | DATA1*2*1.92225087e2*4.08000000e-1*4.60000000e-1* 6 | DATA1*3*2.01601921e2*3.76000000e-1*5.22000000e-1* 7 | DATA1*4*2.11940481e2*3.42000000e-1*5.94000000e-1* 8 | DATA1*5*2.23396723e2*3.10000000e-1*6.88000000e-1* 9 | DATA1*6*2.36162250e2*2.99000000e-1*7.95000000e-1* 10 | DATA1*7*2.50475114e2*3.02000000e-1*9.06000000e-1* 11 | DATA1*8*2.66634798e2*3.17000000e-1*1.01000000* 12 | DATA1*9*2.85023405e2*3.33000000e-1*1.11000000* 13 | DATA1*10*3.06136250e2*3.46000000e-1*1.21000000* 14 | DATA1*11*3.30627150e2*3.45000000e-1*1.32000000* 15 | DATA1*12*3.59377337e2*3.34000000e-1*1.45000000* 16 | DATA1*13*3.93603750e2*3.04000000e-1*1.60000000* 17 | DATA1*14*4.35035724e2*2.47000000e-1*1.82000000* 18 | DATA1*15*4.86216397e2*2.17000000e-1*2.11000000* 19 | DATA1*16*5.51045250e2*2.06000000e-1*2.48000000* 20 | DATA1*17*6.35821443e2*2.21000000e-1*2.94000000* 21 | DATA1*18*7.51425341e2*2.65000000e-1*3.55000000* 22 | DATA1*19*9.18408750e2*3.38000000e-1*4.36000000* 23 | DATA1*20*1.18081125e3*4.48000000e-1*5.58000000* 24 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 25 | COMMENT*sopra-sa.com/indices.htm* 26 | EOF* 27 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/COR7059.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*22* 4 | DATA1*1*4.40000000e2*1.54355700*0.00000000* 5 | DATA1*2*4.50000000e2*1.54254000*0.00000000* 6 | DATA1*3*4.60000000e2*1.54157500*0.00000000* 7 | DATA1*4*4.70000000e2*1.54066100*0.00000000* 8 | DATA1*5*4.80000000e2*1.53980000*0.00000000* 9 | DATA1*6*4.90000000e2*1.53899200*0.00000000* 10 | DATA1*7*5.00000000e2*1.53824300*0.00000000* 11 | DATA1*8*5.10000000e2*1.53754800*0.00000000* 12 | DATA1*9*5.20000000e2*1.53690100*0.00000000* 13 | DATA1*10*5.30000000e2*1.53629700*0.00000000* 14 | DATA1*11*5.40000000e2*1.53573000*0.00000000* 15 | DATA1*12*5.50000000e2*1.53519100*0.00000000* 16 | DATA1*13*5.60000000e2*1.53467400*0.00000000* 17 | DATA1*14*5.70000000e2*1.53418300*0.00000000* 18 | DATA1*15*5.80000000e2*1.53371600*0.00000000* 19 | DATA1*16*5.90000000e2*1.53327000*0.00000000* 20 | DATA1*17*6.00000000e2*1.53284700*0.00000000* 21 | DATA1*18*6.10000000e2*1.53243700*0.00000000* 22 | DATA1*19*6.20000000e2*1.53203800*0.00000000* 23 | DATA1*20*6.30000000e2*1.53164400*0.00000000* 24 | DATA1*21*6.40000000e2*1.53125000*0.00000000* 25 | DATA1*22*6.50000000e2*1.53085400*0.00000000* 26 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 27 | COMMENT*sopra-sa.com/indices.htm* 28 | EOF* 29 | -------------------------------------------------------------------------------- /solcore/material_data/Adachi/binaries.txt: -------------------------------------------------------------------------------- 1 | [GaAs] 2 | E0=1.42 3 | E0plusD0=1.77 4 | E1=2.90 5 | E1plusD1=3.13 6 | E2=4.7 7 | Eg1d=1.73 8 | A=3.45 9 | B1=6.37 10 | B11=13.08 11 | Gamma=0.1 12 | C=2.39 13 | gamma=0.146 14 | D=24.2 15 | epsilon1inf=1.6 16 | 17 | [GaP] 18 | E0=2.74 19 | E0plusD0=2.84 20 | E1=3.70 21 | E1plusD1=3.73 22 | E2=5.0 23 | Eg1d=2.26 24 | A=13.76 25 | B1=6.35 26 | B11=9.49 27 | Gamma=0.06 28 | C=2.08 29 | gamma=0.132 30 | D=4.6 31 | epsilon1inf=0.0 32 | 33 | [GaSb] 34 | E0=0.72 35 | E0plusD0=1.46 36 | E1=2.05 37 | E1plusD1=2.50 38 | E2=4.0 39 | Eg1d=0.76 40 | A=0.71 41 | B1=6.68 42 | B11=14.29 43 | Gamma=0.09 44 | C=5.69 45 | gamma=0.290 46 | D=7.4 47 | epsilon1inf=1.0 48 | 49 | [InAs] 50 | E0=0.36 51 | E0plusD0=0.76 52 | E1=2.50 53 | E1plusD1=2.78 54 | E2=4.45 55 | Eg1d=1.07 56 | A=0.61 57 | B1=6.59 58 | B11=13.76 59 | Gamma=0.21 60 | C=1.78 61 | gamma=0.108 62 | D=20.8 63 | epsilon1inf=2.8 64 | 65 | [InP] 66 | E0=1.35 67 | E0plusD0=1.45 68 | E1=3.10 69 | E1plusD1=3.25 70 | E2=4.7 71 | Eg1d=2.05 72 | A=6.57 73 | B1=4.93 74 | B11=10.43 75 | Gamma=0.10 76 | C=1.49 77 | gamma=0.094 78 | D=60.4 79 | epsilon1inf=1.6 80 | 81 | [InSb] 82 | E0=0.18 83 | E0plusD0=0.99 84 | E1=1.80 85 | E1plusD1=2.30 86 | E2=3.9 87 | Eg1d=0.93 88 | A=0.19 89 | B1=6.37 90 | B11=12.26 91 | Gamma=0.16 92 | C=5.37 93 | gamma=0.318 94 | D=19.5 95 | epsilon1inf=3.1 -------------------------------------------------------------------------------- /examples/simple_rcwa.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | from solcore import material, si 5 | from solcore.structure import Layer, Structure 6 | from solcore.absorption_calculator.rigorous_coupled_wave import calculate_rat_rcwa 7 | 8 | T = 300 9 | # define materials 10 | Air = material("Air")(T=T) 11 | TiO2 = material("TiO2", sopra=True)(T=T) # for the nanoparticles 12 | GaAs = material("GaAs")(T=T) 13 | 14 | # define a flat layer and another with circular discs with the same thickness 15 | Flat = Layer(si('50nm'), TiO2) 16 | NP_layer = Layer(si('50nm'), Air, geometry=[{'type': 'circle', 'mat': TiO2, 'center': (200, 200), 'radius': 50}]) 17 | 18 | flat_struct = Structure([Flat]) 19 | np_struct = Structure([NP_layer]) 20 | 21 | # And the wavelength in which the solve the problem 22 | wl = np.linspace(300, 1000, 150) 23 | 24 | rat_flat = calculate_rat_rcwa(flat_struct, size=((400, 0), (0, 400)), orders=10, wavelength=wl, 25 | substrate=GaAs, incidence=Air) 26 | rat_np = calculate_rat_rcwa(np_struct, size=((400, 0), (0, 400)), orders=10, wavelength=wl, 27 | substrate=GaAs, incidence=Air) 28 | 29 | plt.plot(wl, rat_flat["R"], '-k', label="Flat (R)") 30 | plt.plot(wl, rat_np["R"], '-b', label="Nanoparticles (R)") 31 | plt.plot(wl, rat_flat["T"], '--k', label="Flat (T)") 32 | plt.plot(wl, rat_np["T"], '--b', label="Nanoparticles (T)") 33 | plt.legend() 34 | plt.show() -------------------------------------------------------------------------------- /solcore/material_data/Levinshtein/GroupIV.txt: -------------------------------------------------------------------------------- 1 | [Ge] 2 | lattice_constant=5.658 Angstrom 3 | Eg0_Gamma=0.89 eV 4 | alpha_Gamma=0.582 meV K-1 5 | beta_Gamma=296 K 6 | Eg0_L=0.742 eV 7 | alpha_L=0.48 meV K-1 8 | beta_L=235 K 9 | spin_orbit_splitting=0.29 eV 10 | eff_mass_DOS_L=0.22 11 | eff_mass_DOS_X=0.22 12 | gamma1=13.35 13 | gamma2=4.25 14 | gamma3=5.69 15 | eff_mass_split_off=0.084 16 | eff_mass_electron=0.12 17 | eff_mass_hh_z=0.33 18 | eff_mass_lh_z=0.043 19 | interband_matrix_element=26.3 eV 20 | c11=126 GPa 21 | c12=44 GPa 22 | c44=67.7 GPa 23 | relative_permittivity=16.2 24 | electron_affinity=4.0 eV 25 | electron_auger_recombination=1e-42 26 | hole_auger_recombination=1e-42 27 | radiative_recombination=6.4e-20 28 | Nc=1e25 29 | Nv=5e24 30 | 31 | [Si] 32 | lattice_constant=5.431 Angstrom 33 | Eg0_Gamma=4.34 eV 34 | alpha_Gamma=0.391 meV K-1 35 | beta_Gamma=125 K 36 | Eg0_X=1.17 eV 37 | alpha_X=0.473 meV K-1 38 | beta_X=636 K 39 | spin_orbit_splitting=0.044 eV 40 | eff_mass_DOS_L=0.36 41 | eff_mass_DOS_X=0.36 42 | interband_matrix_element=21.6 eV 43 | gamma1=4.22 44 | gamma2=0.39 45 | gamma3=1.44 46 | eff_mass_split_off=0.24 47 | eff_mass_electron=0.26 48 | eff_mass_hh_z=0.49 49 | eff_mass_lh_z=0.16 50 | c11=166 GPa 51 | c12=64 GPa 52 | c44=79.6 GPa 53 | relative_permittivity=11.7 54 | electron_affinity=4.05 eV 55 | electron_auger_recombination=1.1e-42 56 | hole_auger_recombination=3e-43 57 | radiative_recombination=1.1e-20 58 | Nc=3e25 59 | Nv=1e25 -------------------------------------------------------------------------------- /solcore/parameter_system/calculable_parameters.txt: -------------------------------------------------------------------------------- 1 | [Immediate Calculables] # parameters that are calculated for every material immediately, prior to bowing 2 | Eg_Gamma=get('Eg0_Gamma')-get('alpha_Gamma')*T**2/(T+get('beta_Gamma')) 3 | Eg_X=get('Eg0_X')-get('alpha_X')*T**2/(T+get('beta_X')) 4 | Eg_L=get('Eg0_L')-get('alpha_L')*T**2/(T+get('beta_L')) 5 | 6 | [Final Calculables] # parameters that are calculated at the end, when all the bowing is done 7 | band_gap=min([tget('Eg_Gamma',1e10),tget('Eg_X',1e10),tget('Eg_L',1e10)]) 8 | lowest_band=['Gamma','X','L'][[get('Eg_Gamma'),get('Eg_X'),get('Eg_L')].index(get("band_gap"))] 9 | m0: get("eff_mass_split_off")*(get("gamma1")-get("interband_matrix_element")*get("spin_orbit_splitting")/(3*get("band_gap")*(get("band_gap")+get("spin_orbit_splitting")))) 10 | eff_mass_hh_z: get('m0')/(get('gamma1')-2*get('gamma2')) 11 | eff_mass_hh_110: get('m0')/(get('gamma1')-0.5*get('gamma2')-1.5*get('gamma3')) 12 | eff_mass_hh_111: get('m0')/(get('gamma1')-2*get('gamma3')) 13 | eff_mass_lh_z: get('m0')/(get('gamma1')+2*get('gamma2')) 14 | eff_mass_lh_110: get('m0')/(get('gamma1')+0.5*get('gamma2')+1.5*get('gamma3')) 15 | eff_mass_lh_111: get('m0')/(get('gamma1')+2*get('gamma3')) 16 | eff_mass_electron: get('m0')/(1+2*get('F')+get('interband_matrix_element')*(get('band_gap')+2*get('spin_orbit_splitting')/3)/(get('band_gap')*(get('band_gap')+get('spin_orbit_splitting')))) 17 | permittivity = 8.854187817e-12*get('relative_permittivity') 18 | 19 | -------------------------------------------------------------------------------- /tests/data/Ge-Palik.csv: -------------------------------------------------------------------------------- 1 | 0.599033816,0 0.600193611,4.002143272 0.640165204,50.01748064 0.659925492,450.0754657 0.680197477,902.9873834 0.700169396,2000.91022 0.720092915,3400.555168 0.740298507,5003.893731 0.760269773,6001.786634 0.779874214,27028.75472 0.8,45967.23871 0.82010582,470393.9153 0.840108401,560191.5989 0.859916782,599542.8571 0.880056778,600207.0972 0.899854862,679366.4731 1,819830.1613 1.100266193,1148445.43 1.200387222,1496242.014 1.300199224,2200400.545 1.400180668,2695957.543 1.500120977,4530205.662 1.540181344,4932127.686 1.600206478,5594618.66 1.64021164,6050296.296 1.700260524,6909318.525 1.740106652,7582627 1.800232288,9121660.859 1.840308697,10014755.12 1.90009194,12284872.82 2.000322633,18912853.69 2.040144784,23775748.6 2.100271003,34777852.3 2.140144978,41727621.68 2.200141945,45684410.93 2.24028907,48243450.77 2.300129846,54030769.8 2.340064163,57719652.76 2.400309717,59716473.09 2.440464475,60072454.24 2.500504134,60410050.41 2.54046302,60577336.61 2.600125813,60840624.87 2.640545145,61037150.77 2.740331492,61510917.13 2.800361337,61893509.49 2.840128264,62225588.64 2.945368171,63725439.43 3.000241955,65216719.09 3.1,69584225 3.140035452,71978455.31 3.240135877,78541604.39 3.340517241,85206417.03 3.440621532,91176720.31 3.540833809,96954117.65 3.640634175,103265513.8 3.740573152,110269966.8 3.840198204,118421610.4 4,135226374.2 4.100529101,150176997.4 4.240766074,180797407.7 4.441260745,204467543 4.640718563,181153562.9 4.839968774,168674761.9 5,161989927.4 -------------------------------------------------------------------------------- /examples/data/Ge-Palik.csv: -------------------------------------------------------------------------------- 1 | 0.599033816,0 0.600193611,4.002143272 0.640165204,50.01748064 0.659925492,450.0754657 0.680197477,902.9873834 0.700169396,2000.91022 0.720092915,3400.555168 0.740298507,5003.893731 0.760269773,6001.786634 0.779874214,27028.75472 0.8,45967.23871 0.82010582,470393.9153 0.840108401,560191.5989 0.859916782,599542.8571 0.880056778,600207.0972 0.899854862,679366.4731 1.0,819830.1613 1.100266193,1148445.43 1.200387222,1496242.014 1.300199224,2200400.545 1.400180668,2695957.543 1.500120977,4530205.662 1.540181344,4932127.686 1.600206478,5594618.66 1.64021164,6050296.296 1.700260524,6909318.525 1.740106652,7582627 1.800232288,9121660.859 1.840308697,10014755.12 1.90009194,12284872.82 2.000322633,18912853.69 2.040144784,23775748.6 2.100271003,34777852.3 2.140144978,41727621.68 2.200141945,45684410.93 2.24028907,48243450.77 2.300129846,54030769.8 2.340064163,57719652.76 2.400309717,59716473.09 2.440464475,60072454.24 2.500504134,60410050.41 2.54046302,60577336.61 2.600125813,60840624.87 2.640545145,61037150.77 2.740331492,61510917.13 2.800361337,61893509.49 2.840128264,62225588.64 2.945368171,63725439.43 3.000241955,65216719.09 3.1,69584225 3.140035452,71978455.31 3.240135877,78541604.39 3.340517241,85206417.03 3.440621532,91176720.31 3.540833809,96954117.65 3.640634175,103265513.8 3.740573152,110269966.8 3.840198204,118421610.4 4,135226374.2 4.100529101,150176997.4 4.240766074,180797407.7 4.441260745,204467543 4.640718563,181153562.9 4.839968774,168674761.9 5,161989927.4 -------------------------------------------------------------------------------- /solcore/solcore_config.txt: -------------------------------------------------------------------------------- 1 | [Configuration] 2 | version: 5.10.1 3 | welcome_message: 1 4 | verbose_loading: 1 5 | 6 | [Units] 7 | default: SOLCORE_ROOT/units_system/Default_units.txt 8 | 9 | [Parameters] 10 | calculables: SOLCORE_ROOT/parameter_system/calculable_parameters.txt 11 | adachi_binaries: SOLCORE_ROOT/material_data/Adachi/binaries.txt 12 | adachi_compounds: SOLCORE_ROOT/material_data/Adachi/ternaries.txt 13 | vurgaftman_binaries: SOLCORE_ROOT/material_data/Vurgaftman/binaries.txt 14 | vurgaftman_compounds: SOLCORE_ROOT/material_data/Vurgaftman/ternaries.txt 15 | levinshtein_groupIV: SOLCORE_ROOT/material_data/Levinshtein/GroupIV.txt 16 | 17 | [Materials] 18 | GaAs: SOLCORE_ROOT/material_data/GaAs-Material 19 | InSb: SOLCORE_ROOT/material_data/InSb-Material 20 | GaSb: SOLCORE_ROOT/material_data/GaSb-Material 21 | AlAs: SOLCORE_ROOT/material_data/AlAs-Material 22 | AlGaAs: SOLCORE_ROOT/material_data/AlGaAs-Material 23 | InGaAs: SOLCORE_ROOT/material_data/InGaAs-Material 24 | GaInSb: SOLCORE_ROOT/material_data/InGaSb-Material 25 | Ge: SOLCORE_ROOT/material_data/Ge-Material 26 | Si: SOLCORE_ROOT/material_data/Si-Material 27 | GaInP: SOLCORE_ROOT/material_data/GaInP-Material 28 | GaAsP: SOLCORE_ROOT/material_data/GaAsP-Material 29 | AlInP: SOLCORE_ROOT/material_data/AlInP-Material 30 | InP: SOLCORE_ROOT/material_data/InP-Material 31 | 32 | [Others] 33 | sopra: SOLCORE_ROOT/material_data/SOPRA_DB 34 | 35 | [External programs] 36 | spice: 37 | smarts: 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | .. image:: _static/header.png 2 | :align: center 3 | 4 | :literal:`Solcore` was born as a modular set of tools, written (almost) entirely in Python 3, to address some of the task we had to solve more often, such as fitting dark IV curves or luminescence decays. With time, however, it has evolved as a complete semiconductor solver able of modelling the optical and electrical properties of a wide range of solar cells, from quantum well devices to multi-junction solar cells. A compact description of Solcore's functionality and physics can be found in the open access publication: 5 | 6 | `D. Alonso-Álvarez, T. Wilson, P. Pearce, M. Führer, D. Farrell, N. Ekins-Daukes, Journal of Computational Electronics (2018) `_. 7 | 8 | Please, cite this article if you find Solcore useful for your research. A list of papers 9 | which have used Solcore can be found :ref:`here`. 10 | 11 | .. image:: Infographics.jpg 12 | :align: center 13 | 14 | 15 | Contents: 16 | --------- 17 | 18 | .. toctree:: 19 | :maxdepth: 2 20 | 21 | Installation/installation 22 | Structures/structure 23 | Systems/systems 24 | QM/Schrodinger 25 | spectral/spectral 26 | Optics/optics 27 | Solvers/solving_solar_cells 28 | Quasi3D/spice 29 | Examples/main 30 | 31 | .. Indices and tables 32 | .. ================== 33 | .. 34 | .. * :ref:`genindex` 35 | .. * :ref:`modindex` 36 | .. * :ref:`search` 37 | 38 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/AL2O3.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*27* 4 | DATA1*1*2.50000000e2*1.73310000*0.00000000* 5 | DATA1*2*2.75000000e2*1.71630000*0.00000000* 6 | DATA1*3*3.00000000e2*1.70420000*0.00000000* 7 | DATA1*4*3.25000000e2*1.69510000*0.00000000* 8 | DATA1*5*3.50000000e2*1.68810000*0.00000000* 9 | DATA1*6*3.75000000e2*1.68250000*0.00000000* 10 | DATA1*7*4.00000000e2*1.67800000*0.00000000* 11 | DATA1*8*4.25000000e2*1.67430000*0.00000000* 12 | DATA1*9*4.50000000e2*1.67130000*0.00000000* 13 | DATA1*10*4.75000000e2*1.66870000*0.00000000* 14 | DATA1*11*5.00000000e2*1.66650000*0.00000000* 15 | DATA1*12*5.25000000e2*1.66460000*0.00000000* 16 | DATA1*13*5.50000000e2*1.66290000*0.00000000* 17 | DATA1*14*5.75000000e2*1.66140000*0.00000000* 18 | DATA1*15*6.00000000e2*1.66010000*0.00000000* 19 | DATA1*16*6.25000000e2*1.65900000*0.00000000* 20 | DATA1*17*6.50000000e2*1.65790000*0.00000000* 21 | DATA1*18*6.75000000e2*1.65700000*0.00000000* 22 | DATA1*19*7.00000000e2*1.65610000*0.00000000* 23 | DATA1*20*7.25000000e2*1.65530000*0.00000000* 24 | DATA1*21*7.50000000e2*1.65460000*0.00000000* 25 | DATA1*22*7.75000000e2*1.65390000*0.00000000* 26 | DATA1*23*8.00000000e2*1.65320000*0.00000000* 27 | DATA1*24*8.25000000e2*1.65260000*0.00000000* 28 | DATA1*25*8.50000000e2*1.65200000*0.00000000* 29 | DATA1*26*8.75000000e2*1.65150000*0.00000000* 30 | DATA1*27*9.00000000e2*1.65090000*0.00000000* 31 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 32 | COMMENT*sopra-sa.com/indices.htm* 33 | EOF* 34 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/MGF2.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*27* 4 | DATA1*1*2.50000000e2*1.41170000*0.00000000* 5 | DATA1*2*2.75000000e2*1.40440000*0.00000000* 6 | DATA1*3*3.00000000e2*1.39960000*0.00000000* 7 | DATA1*4*3.25000000e2*1.39610000*0.00000000* 8 | DATA1*5*3.50000000e2*1.39350000*0.00000000* 9 | DATA1*6*3.75000000e2*1.39150000*0.00000000* 10 | DATA1*7*4.00000000e2*1.38990000*0.00000000* 11 | DATA1*8*4.25000000e2*1.38860000*0.00000000* 12 | DATA1*9*4.50000000e2*1.38750000*0.00000000* 13 | DATA1*10*4.75000000e2*1.38650000*0.00000000* 14 | DATA1*11*5.00000000e2*1.38570000*0.00000000* 15 | DATA1*12*5.25000000e2*1.38500000*0.00000000* 16 | DATA1*13*5.50000000e2*1.38440000*0.00000000* 17 | DATA1*14*5.75000000e2*1.38390000*0.00000000* 18 | DATA1*15*6.00000000e2*1.38340000*0.00000000* 19 | DATA1*16*6.25000000e2*1.38300000*0.00000000* 20 | DATA1*17*6.50000000e2*1.38260000*0.00000000* 21 | DATA1*18*6.75000000e2*1.38230000*0.00000000* 22 | DATA1*19*7.00000000e2*1.38190000*0.00000000* 23 | DATA1*20*7.25000000e2*1.38160000*0.00000000* 24 | DATA1*21*7.50000000e2*1.38140000*0.00000000* 25 | DATA1*22*7.75000000e2*1.38110000*0.00000000* 26 | DATA1*23*8.00000000e2*1.38090000*0.00000000* 27 | DATA1*24*8.25000000e2*1.38070000*0.00000000* 28 | DATA1*25*8.50000000e2*1.38050000*0.00000000* 29 | DATA1*26*8.75000000e2*1.38030000*0.00000000* 30 | DATA1*27*9.00000000e2*1.38020000*0.00000000* 31 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 32 | COMMENT*sopra-sa.com/indices.htm* 33 | EOF* 34 | -------------------------------------------------------------------------------- /docs/source/Examples/example_tunnel_junction.rst: -------------------------------------------------------------------------------- 1 | Example of a tunnel junction 2 | ============================ 3 | 4 | .. image:: tunnel_junction.png 5 | :width: 60% 6 | :align: center 7 | 8 | .. code-block:: Python 9 | 10 | import matplotlib.pyplot as plt 11 | 12 | from solcore.structure import TunnelJunction 13 | from solcore.solar_cell_solver import default_options 14 | from solcore.analytic_solar_cells import parametric_tunnel_junction 15 | 16 | # We define the tunnel junction and solve its properties 17 | tunnel = TunnelJunction(v_peak=0.2, j_peak=100, v_valley=0.9, j_valley=10, prefactor=10, j01=1e-21, kind='parametric') 18 | parametric_tunnel_junction(tunnel, default_options) 19 | 20 | v = tunnel.voltage 21 | 22 | plt.plot(v, tunnel.tunnel_current(v), 'r--', label='Tunnel') 23 | plt.plot(v, tunnel.excess_current(v), 'g--', label='Excess') 24 | plt.plot(v, tunnel.diffusion_current(v), 'b--', label='Diffusion') 25 | plt.plot(v, tunnel.current, 'k', linewidth=3, color='DimGray', label='Total') 26 | plt.plot((0.2, 0.9), (100, 10), 'ko') 27 | 28 | plt.annotate('V$_P$, J$_P$', xy=(0.2, 110), fontsize=12) 29 | plt.annotate('V$_V$, J$_V$', xy=(0.6, 10), fontsize=12) 30 | 31 | plt.legend(fontsize=12, frameon=False) 32 | plt.ylim(0, 150) 33 | plt.xlim(0, 2) 34 | plt.ylabel('Current Density(A/$m^2$)', fontsize=12) 35 | plt.xlabel('Voltage(V)', fontsize=12) 36 | plt.tick_params(labelsize=12) 37 | plt.tight_layout() 38 | plt.show() 39 | -------------------------------------------------------------------------------- /examples/Schrodinger_QW_and_MQW.py: -------------------------------------------------------------------------------- 1 | from solcore import si, material 2 | from solcore.structure import Layer, Structure 3 | import solcore.quantum_mechanics as QM 4 | 5 | # First we create the materials we need 6 | bulk = material("GaAs")(T=293, strained=False) 7 | barrier = material("GaAsP")(T=293, P=0.1, strained=True) 8 | 9 | # As well as some of the layers 10 | top_layer = Layer(width=si("30nm"), material=barrier) 11 | inter = Layer(width=si("3nm"), material=bulk) 12 | barrier_layer = Layer(width=si("5nm"), material=barrier) 13 | bottom_layer = top_layer 14 | 15 | # We create the QW material at the given composition 16 | QW = material("InGaAs")(T=293, In=0.15, strained=True) 17 | 18 | # And the layer 19 | well_layer = Layer(width=si("7.2nm"), material=QW) 20 | 21 | # The following lines create the QW structure, with different number of QWs and interlayers. Indicating the substrate 22 | # material with the keyword "substrate" is essential in order to calculate correctly the strain. 23 | 24 | # A single QW with interlayers 25 | test_structure_1 = Structure([top_layer, inter, well_layer, inter, bottom_layer], substrate=bulk) 26 | output_1 = QM.schrodinger(test_structure_1, quasiconfined=0, graphtype='potentials', num_eigenvalues=20, show=True) 27 | 28 | # 10 QWs without interlayers 29 | test_structure_2 = Structure([top_layer, barrier_layer] + 10 * [well_layer, barrier_layer] + [bottom_layer], 30 | substrate=bulk) 31 | output_2 = QM.schrodinger(test_structure_2, quasiconfined=0.05, graphtype='potentialsLDOS', num_eigenvalues=200, 32 | show=True) 33 | -------------------------------------------------------------------------------- /docs/source/Solvers/detailed_balance.rst: -------------------------------------------------------------------------------- 1 | Detailed balance approximation 2 | ============================== 3 | 4 | - Example: :doc:`MJ solar cell efficiency map <../Examples/example_MJ_efficiency_map>` 5 | 6 | This solver calculates the electrical properties of the junction by 7 | balancing the elementary processes taking place in the solar cell, 8 | carrier generation and radiative recombination, using the formalism 9 | described by Araújo and Martí (1996) ([#Ref20]_). The 10 | method is widely used by the photovoltaic community to calculate the 11 | limiting conversion efficiencies of the different solar cell 12 | architectures or materials. The simplest DB formulation only needs an 13 | absorption edge energy and an absorptivity value above that edge. Out of 14 | this, the carrier generation and radiative recombination are calculated 15 | for different internal chemical potentials, equal to the external 16 | electrical bias, in the ideal case. Solcore includes this basic model, 17 | but also allows the user to provide a more complex absorption profile. 18 | 19 | For a more detailed description of the implementation of the DB solver in 20 | Solcore, `refer to the main Solcore paper (open access) `_ and references therein. 21 | 22 | Detailed balance functions 23 | -------------------------- 24 | 25 | .. automodule:: solcore.analytic_solar_cells.detailed_balance 26 | :members: 27 | :undoc-members: 28 | 29 | References 30 | ---------- 31 | 32 | .. [#Ref20] Martí, A., Araújo, G.L.: Limiting efficiencies for photovoltaic energy conversion in multigap systems. Sol. Energy Mater. Sol. Cells 43(2), 203–222 (1996) -------------------------------------------------------------------------------- /examples/Light_sources_examples.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | from solcore.light_source import LightSource 5 | 6 | # TODO If SMARTS is not installed, it keeps trying and producing errors. 7 | # LightSource is poorly designed... 8 | # The wavelength range of the spectra 9 | wl = np.linspace(300, 3000, 200) 10 | 11 | # Now different types of light sources can be defined 12 | gauss = LightSource(source_type='laser', x=wl, center=800, linewidth=50, power=200) 13 | bb = LightSource(source_type='black body', x=wl, T=5800, entendue='Sun') 14 | am15g = LightSource(source_type='standard', x=wl, version='AM1.5g') 15 | spectral = LightSource(source_type='SPECTRAL2', x=wl) 16 | 17 | # Plot comparing the different light sources 18 | plt.figure(1) 19 | plt.plot(*gauss.spectrum(), label='Gauss') 20 | plt.plot(*bb.spectrum(), label='Black body') 21 | plt.plot(*am15g.spectrum(), label='AM1.5G') 22 | plt.plot(*spectral.spectrum(), label='SPECTRAL2') 23 | 24 | try: 25 | smarts = LightSource(source_type='SMARTS', x=wl) 26 | plt.plot(*smarts.spectrum(), label='SMARTS') 27 | except TypeError: 28 | pass 29 | 30 | plt.xlim(300, 3000) 31 | plt.xlabel('Wavelength (nm)') 32 | plt.ylabel('Power density (Wm$^{-2}$nm$^{-1}$)') 33 | plt.tight_layout() 34 | plt.legend() 35 | 36 | try: 37 | # Plot comparing the spectra calculated with SMARTS at different hours of the day 38 | for h in range(8, 20): 39 | plt.plot(*smarts.spectrum(HOUR=h), label='{} h'.format(h)) 40 | 41 | plt.xlim(300, 3000) 42 | plt.xlabel('Wavelength (nm)') 43 | plt.ylabel('Power density (Wm$^{-2}$nm$^{-1}$)') 44 | plt.tight_layout() 45 | plt.legend() 46 | except TypeError: 47 | pass 48 | 49 | plt.show() -------------------------------------------------------------------------------- /solcore/meson.build: -------------------------------------------------------------------------------- 1 | install_subdir('absorption_calculator', install_dir: py.get_install_dir() / 'solcore') 2 | install_subdir('analytic_solar_cells', install_dir: py.get_install_dir() / 'solcore') 3 | install_subdir('data_analysis_tools', install_dir: py.get_install_dir() / 'solcore') 4 | install_subdir('graphing', install_dir: py.get_install_dir() / 'solcore') 5 | install_subdir('light_source', install_dir: py.get_install_dir() / 'solcore') 6 | install_subdir('material_data', install_dir: py.get_install_dir() / 'solcore') 7 | install_subdir('material_system', install_dir: py.get_install_dir() / 'solcore') 8 | install_subdir('optics', install_dir: py.get_install_dir() / 'solcore') 9 | install_subdir('optimization', install_dir: py.get_install_dir() / 'solcore') 10 | install_subdir('parameter_system', install_dir: py.get_install_dir() / 'solcore') 11 | subdir('poisson_drift_diffusion') 12 | install_subdir('sesame_drift_diffusion', install_dir: py.get_install_dir() / 'solcore') 13 | install_subdir('quantum_mechanics', install_dir: py.get_install_dir() / 'solcore') 14 | install_subdir('spice', install_dir: py.get_install_dir() / 'solcore') 15 | install_subdir('units_system', install_dir: py.get_install_dir() / 'solcore') 16 | 17 | 18 | python_sources = [ 19 | '__init__.py', 20 | 'solcore_config.txt', 21 | 'config_tools.py', 22 | 'constants.py', 23 | 'crystals.py', 24 | 'interpolate.py', 25 | 'registries.py', 26 | 'science_tracker.py', 27 | 'singleton.py', 28 | 'smooth.py', 29 | 'solar_cell.py', 30 | 'solar_cell_solver.py', 31 | 'source_managed_class.py', 32 | 'state.py', 33 | 'strain_balancing.py', 34 | 'structure.py' 35 | ] 36 | 37 | py.install_sources( 38 | python_sources, 39 | subdir: 'solcore' 40 | ) -------------------------------------------------------------------------------- /examples/Optical_constants_RAT_of_ITO_films.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | from solcore.absorption_calculator import calculate_rat 4 | from solcore.absorption_calculator.dielectric_constant_models import DielectricConstantModel, Drude, Poles 5 | 6 | x = 2 * np.logspace(3, 4, 200) 7 | 8 | # Model parameters for three ITO layers grown at different temperatures. They have been obtained after fitting the 9 | # ellipsometry data. 10 | e_inf = [3.7883, 3.8915, 3.8982] 11 | A = [16.038, 36.556, 36.806] 12 | Br = [0.11112, 0.10413, 0.088618] 13 | label = ['150', '250', '350'] 14 | ls = ['solid', 'dashed', 'dashdot'] 15 | 16 | for i in range(len(e_inf)): 17 | 18 | # We create the oscillators for each layer 19 | drud = Drude(An=A[i], Brn=Br[i]) 20 | 21 | # Then we put them together inside a dielectric model 22 | model = DielectricConstantModel(e_inf=e_inf[i], oscillators=[drud]) 23 | 24 | # We might want to calculate the RAT of the films 25 | out = calculate_rat([[300, model]], x) 26 | 27 | plt.figure(1) 28 | plt.plot(x/1000, out['R'], 'b', label='R ' + label[i], ls=ls[i]) 29 | plt.plot(x/1000, out['A'], 'r', label='A ' + label[i], ls=ls[i]) 30 | plt.plot(x/1000, out['T'], 'g', label='T ' + label[i], ls=ls[i]) 31 | 32 | # And also want to know the n and k data 33 | n = model.n_and_k(x) 34 | 35 | plt.figure(2) 36 | plt.plot(x/1000, np.real(n), 'b', label='n ' + label[i], ls=ls[i]) 37 | plt.plot(x/1000, np.imag(n), 'g', label='k ' + label[i], ls=ls[i]) 38 | 39 | 40 | plt.figure(1) 41 | plt.xlabel('Wavelength (µm)') 42 | plt.ylabel('RAT') 43 | plt.xlim((2, 20)) 44 | plt.legend(loc=0) 45 | 46 | plt.figure(2) 47 | plt.xlabel('Wavelength (µm)') 48 | plt.ylabel('n & k') 49 | plt.xlim((2, 20)) 50 | plt.legend(loc=2) 51 | 52 | plt.show() 53 | -------------------------------------------------------------------------------- /examples/kp_fit_effective_masses.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | from solcore import material 5 | from solcore.constants import electron_mass 6 | from solcore.quantum_mechanics import kp_bands 7 | 8 | # Material parameters 9 | GaAs = material("GaAs")(T=300) 10 | InGaAs = material("InGaAs") 11 | 12 | # As a test, we solve the problem for an intermediate indium composition 13 | InGaAs2 = InGaAs(In=0.15, T=300) 14 | masses = kp_bands(InGaAs2, GaAs, graph=False, fit_effective_mass=True, effective_mass_direction="L", return_so=True) 15 | 16 | comp = np.linspace(0.01, 0.25, 15) 17 | me = [] 18 | mhh = [] 19 | mlh = [] 20 | mso = [] 21 | for i in comp: 22 | InGaAs2 = InGaAs(In=i, T=300) 23 | 24 | # Set graph = True to see the fitting of the bands 25 | c, hh, lh, so, m_eff_c, m_eff_hh, m_eff_lh, m_eff_so = kp_bands(InGaAs2, GaAs, graph=False, fit_effective_mass=True, 26 | effective_mass_direction="L", return_so=True) 27 | 28 | me.append(m_eff_c / electron_mass) 29 | mhh.append(m_eff_hh / electron_mass) 30 | mlh.append(m_eff_lh / electron_mass) 31 | mso.append(m_eff_so / electron_mass) 32 | 33 | print('Effective masses for In = {:2.3}%:'.format(i * 100)) 34 | print('- m_e = {:1.3f} m0'.format(me[-1])) 35 | print('- m_hh = {:1.3f} m0'.format(mhh[-1])) 36 | print('- m_lh = {:1.3f} m0'.format(mlh[-1])) 37 | print('- m_so = {:1.3f} m0'.format(mso[-1])) 38 | print() 39 | 40 | plt.plot(comp * 100, me, 'b-o', label='e') 41 | plt.plot(comp * 100, mhh, 'r-o', label='hh') 42 | plt.plot(comp * 100, mlh, 'g-o', label='lh') 43 | plt.plot(comp * 100, mso, 'k-o', label='so') 44 | 45 | plt.xlabel("Indium content (%)") 46 | plt.ylabel("Effective mass (m$_0$)") 47 | plt.legend() 48 | plt.show() 49 | -------------------------------------------------------------------------------- /examples/Optical_constants_ellipsometry_modelling_2.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | from solcore.absorption_calculator import calculate_ellipsometry 4 | from solcore import material, si 5 | from solcore.structure import Structure, Layer 6 | 7 | # First we defined a couple of materials, for example, GaAs and AlGAs 8 | GaAs = material('GaAs')(T=300) 9 | AlGaAs = material('AlGaAs')(T=300, Al=0.3) 10 | 11 | # Now, let's build the structure. We don't add a substrate and assume that there is an infinitely thick absorbing 12 | # material in the back. 13 | my_structure = Structure([ 14 | Layer(si(40, 'nm'), material=AlGaAs), 15 | Layer(si(3000, 'nm'), material=GaAs), 16 | ]) 17 | 18 | # We want to calculate the ellipsometry of this structure as a function of the wavelength for a few angles 19 | wavelength = np.linspace(400, 1000, 200) 20 | angles = [65, 70, 75] 21 | 22 | out = calculate_ellipsometry(my_structure, wavelength, angle=angles) 23 | 24 | # This results must be taken with care. As the ellipsometry routine can only deal with coherent light, there might be 25 | # strange oscillations related with intereference in thick layers, something that should not happen. 26 | # Setting no_back_reflection=True (the default) should take care of most of this effects, but might add other unexpected 27 | # ones. 28 | fig, ax1 = plt.subplots(1, 1) 29 | ax2 = ax1.twinx() 30 | 31 | ax1.plot(wavelength, out['psi'][:, 0], 'b', label=r'$\Psi$') 32 | ax2.plot(wavelength, out['Delta'][:, 0], 'r', label=r'$\Delta$') 33 | for i in range(1, len(angles)): 34 | ax1.plot(wavelength, out['psi'][:, i], 'b') 35 | ax2.plot(wavelength, out['Delta'][:, i], 'r') 36 | 37 | ax1.set_xlabel("Wavelength (nm)") 38 | ax1.set_ylabel(r'$\Psi$ (º)') 39 | ax2.set_ylabel(r'$\Delta$ (º)') 40 | 41 | ax1.legend(loc="upper left") 42 | ax2.legend(loc="upper right") 43 | 44 | plt.show() 45 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/MOSI2-A.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*35* 4 | DATA1*1*2.81784503e2*2.52000000*3.36900000* 5 | DATA1*2*2.88337631e2*2.50200000*3.44600000* 6 | DATA1*3*2.95202813e2*2.57600000*3.50300000* 7 | DATA1*4*3.02402881e2*2.69900000*3.53300000* 8 | DATA1*5*3.09962953e2*2.84000000*3.53300000* 9 | DATA1*6*3.17910721e2*2.98000000*3.50700000* 10 | DATA1*7*3.26276793e2*3.10100000*3.45900000* 11 | DATA1*8*3.35095085e2*3.21600000*3.39800000* 12 | DATA1*9*3.44403281e2*3.30100000*3.33000000* 13 | DATA1*10*3.54243375e2*3.38400000*3.26100000* 14 | DATA1*11*3.64662298e2*3.45300000*3.19900000* 15 | DATA1*12*3.75712671e2*3.52200000*3.14400000* 16 | DATA1*13*3.87453692e2*3.59700000*3.09900000* 17 | DATA1*14*3.99952198e2*3.68400000*3.06200000* 18 | DATA1*15*4.13283938e2*3.78600000*3.02700000* 19 | DATA1*16*4.27535108e2*3.90300000*2.99000000* 20 | DATA1*17*4.42804219e2*4.03300000*2.94300000* 21 | DATA1*18*4.59204375e2*4.17000000*2.88000000* 22 | DATA1*19*4.76866082e2*4.30800000*2.79500000* 23 | DATA1*20*4.95940725e2*4.43700000*2.68600000* 24 | DATA1*21*5.16604922e2*4.55000000*2.55400000* 25 | DATA1*22*5.39066006e2*4.63900000*2.40500000* 26 | DATA1*23*5.63569006e2*4.70000000*2.24900000* 27 | DATA1*24*5.90405625e2*4.73400000*2.10000000* 28 | DATA1*25*6.19925906e2*4.74400000*1.97100000* 29 | DATA1*26*6.52553586e2*4.73900000*1.89300000* 30 | DATA1*27*6.88806563e2*4.73200000*1.80700000* 31 | DATA1*28*7.29324596e2*4.73200000*1.74100000* 32 | DATA1*29*7.74907383e2*4.74400000*1.69000000* 33 | DATA1*30*8.26567875e2*4.76500000*1.64100000* 34 | DATA1*31*8.85608438e2*4.78500000*1.57700000* 35 | DATA1*32*9.53732164e2*4.79000000*1.48700000* 36 | DATA1*33*1.03320984e3*4.78700000*1.37500000* 37 | DATA1*34*1.12713801e3*4.79800000*1.26900000* 38 | DATA1*35*1.23985181e3*4.77800000*1.15200000* 39 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 40 | COMMENT*sopra-sa.com/indices.htm* 41 | EOF* 42 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/MOSI2-B.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*35* 4 | DATA1*1*2.81784503e2*2.55700000*3.16900000* 5 | DATA1*2*2.88337631e2*2.28200000*3.05900000* 6 | DATA1*3*2.95202813e2*2.24800000*3.01600000* 7 | DATA1*4*3.02402881e2*2.25400000*3.01600000* 8 | DATA1*5*3.09962953e2*2.27800000*3.04100000* 9 | DATA1*6*3.17910721e2*2.31200000*3.07900000* 10 | DATA1*7*3.26276793e2*2.35500000*3.12200000* 11 | DATA1*8*3.35095085e2*2.40100000*3.16400000* 12 | DATA1*9*3.44403281e2*2.46800000*3.20600000* 13 | DATA1*10*3.54243375e2*2.54000000*3.24700000* 14 | DATA1*11*3.64662298e2*2.62600000*3.29200000* 15 | DATA1*12*3.75712671e2*2.72700000*3.34300000* 16 | DATA1*13*3.87453692e2*2.84800000*3.40200000* 17 | DATA1*14*3.99952198e2*2.99100000*3.46900000* 18 | DATA1*15*4.13283938e2*3.16100000*3.54100000* 19 | DATA1*16*4.27535108e2*3.35800000*3.56700000* 20 | DATA1*17*4.42804219e2*3.58300000*3.58400000* 21 | DATA1*18*4.59204375e2*3.82500000*3.56500000* 22 | DATA1*19*4.76866082e2*4.07100000*3.49900000* 23 | DATA1*20*4.95940725e2*4.29800000*3.38900000* 24 | DATA1*21*5.16604922e2*4.48500000*3.24900000* 25 | DATA1*22*5.39066006e2*4.62100000*3.09100000* 26 | DATA1*23*5.63569006e2*4.70700000*2.93200000* 27 | DATA1*24*5.90405625e2*4.75500000*2.78100000* 28 | DATA1*25*6.19925906e2*4.78100000*2.64700000* 29 | DATA1*26*6.52553586e2*4.80000000*2.53300000* 30 | DATA1*27*6.88806563e2*4.82200000*2.43700000* 31 | DATA1*28*7.29324596e2*4.85400000*2.35300000* 32 | DATA1*29*7.74907383e2*4.89800000*2.27500000* 33 | DATA1*30*8.26567875e2*4.95300000*2.19500000* 34 | DATA1*31*8.85608438e2*5.01600000*2.10400000* 35 | DATA1*32*9.53732164e2*5.08200000*2.00000000* 36 | DATA1*33*1.03320984e3*5.14500000*1.88100000* 37 | DATA1*34*1.12713801e3*5.19200000*1.75500000* 38 | DATA1*35*1.23985181e3*5.21200000*1.63400000* 39 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 40 | COMMENT*sopra-sa.com/indices.htm* 41 | EOF* 42 | -------------------------------------------------------------------------------- /docs/source/Quasi3D/pv_panel.rst: -------------------------------------------------------------------------------- 1 | Solar array model 2 | ================= 3 | 4 | - Example: :doc:`PV module calculator <../Examples/example_pv_module>` 5 | 6 | The ability to use Solcore to build a SPICE equivalent circuit allows 7 | entire PV systems to be simulated from the bottom 8 | up. Each photovoltaic solar cell is described 9 | using an equivalent circuit which can then be arranged in strings of 10 | series and parallel cells to represent the entire system. An example for 11 | a triple junction solar cell, complete with a bypass diode is shown in 12 | figure [fig:3J\_equiv\_curcuit]; this unit is the basic building block 13 | for a concentrator PV module. 14 | 15 | .. image:: pv_module.png 16 | :align: center 17 | 18 | The diode and resistance values for the equivalent circuit are 19 | determined from solar cell testing, while the current source is 20 | evaluated by integrating the product of the spectral irradiance 21 | (estimated using an appropriate radiative transfer code e.g. SPCTRAL2 or 22 | SMARTS) and the quantum efficiency which in turn can be calculated 23 | dynamically as a function of temperature by 24 | Solcore. 25 | 26 | Since the entire module (and subsequently the system) is assembled from 27 | individual solar cell components, it is possible (and indeed, necessary) 28 | to distribute the component values to accommodate for manufacturing 29 | tolerances. This enables a close match between the modelled output power 30 | and that measured experimentally and has been used to determine how both 31 | aerosols and precipitable water affect the electricity yield from 32 | concentrator PV systems. 33 | Where system IV data is available, the emergence of electrical faults, 34 | (e.g. shunts or shading) can also be accounted 35 | for. 36 | 37 | PV module solver functions 38 | -------------------------- 39 | 40 | .. automodule:: solcore.spice.pv_module_solver 41 | :members: 42 | :undoc-members: 43 | -------------------------------------------------------------------------------- /examples/Materials_Eg_vs_lattice_constant.py: -------------------------------------------------------------------------------- 1 | from solcore import material 2 | from solcore import si, asUnit 3 | 4 | import numpy as np 5 | import matplotlib.pyplot as plt 6 | 7 | # This is the list of materials available in Solcore... yes, it could be obtained in a more automated way. 8 | mat = ['AlInAs','AlGaAs','InGaAs', 'GaAsP','GaInP','AlGaP','AlPSb','InAsP','AlAsP','AlInP','AlGaSb','GaAsSb','GaInSb','AlInSb','InAsSb','InPSb'] 9 | 10 | # The element that varies the composition 11 | xx = ['Al','Al','In','P','In','Ga','Sb','As','As','Al','Al','Sb','In','In','Sb','Sb'] 12 | 13 | # And the labels for the binary compounds 14 | mat2 = ['GaAs', 'AlAs', 'InAs', 'InSb', 'GaSb', 'AlSb', 'GaP', 'InP', 'AlP', 'Si', 'Ge'] 15 | pos = [(5.58, 1.3), (5.65, 2.32), (6, 0.21), (6.44, 0.02), (6.11, 0.788), (6.15, 1.69), (5.39, 2.14), (5.89, 1.41), (5.40, 2.49), (5.44, 1.21), (5.67, 0.73)] 16 | 17 | zz = np.linspace(0, 1, 100) 18 | lat = np.zeros_like(zz) 19 | eg = np.zeros_like(zz) 20 | 21 | colors = plt.cm.jet(np.linspace(0,1,len(mat))) 22 | 23 | fig = plt.figure(figsize=(6,4.5)) 24 | ax = fig.add_subplot(111) 25 | 26 | for j, (m, x) in enumerate(zip(mat, xx)): 27 | for i, z in enumerate(zz): 28 | param = {x : z} 29 | new_mat = material(m)(T=300, **param) 30 | 31 | lat[i] = new_mat.lattice_constant*1e10 32 | eg[i] = asUnit(new_mat.band_gap, 'eV') 33 | 34 | ax.plot(lat, eg, label=m, color=colors[j]) 35 | 36 | lat2 = [] 37 | eg2 = [] 38 | for (m, p) in zip(mat2, pos): 39 | new_mat = material(m)(T=300) 40 | 41 | lat2.append(new_mat.lattice_constant*1e10) 42 | eg2.append(asUnit(new_mat.band_gap, 'eV')) 43 | 44 | ax.annotate(m, xy=p) 45 | 46 | plt.plot(lat2, eg2, 'ko') 47 | 48 | plt.ylim(-0.1, 2.8) 49 | 50 | plt.ylabel('Band gap (eV)') 51 | plt.xlabel('Lattice constant ($\AA$)') 52 | plt.legend(ncol=3, loc="upper right", frameon=False, columnspacing=0.2) 53 | plt.tight_layout() 54 | 55 | plt.show() -------------------------------------------------------------------------------- /docs/source/Examples/example_QWs.rst: -------------------------------------------------------------------------------- 1 | Setting up the options for and defining custom materials 2 | ======================================================== 3 | 4 | .. image:: Single_QW.png 5 | :width: 40% 6 | .. image:: MQW_LDOS.png 7 | :width: 40% 8 | 9 | .. code-block:: Python 10 | 11 | from solcore import si, material 12 | from solcore.structure import Layer, Structure 13 | import solcore.quantum_mechanics as QM 14 | 15 | # First we create the materials we need 16 | bulk = material("GaAs")(T=293, strained=False) 17 | barrier = material("GaAsP")(T=293, P=0.1, strained=True) 18 | 19 | # As well as some of the layers 20 | top_layer = Layer(width=si("30nm"), material=barrier) 21 | inter = Layer(width=si("3nm"), material=bulk) 22 | barrier_layer = Layer(width=si("5nm"), material=barrier) 23 | bottom_layer = top_layer 24 | 25 | # We create the QW material at the given composition 26 | QW = material("InGaAs")(T=293, In=0.15, strained=True) 27 | 28 | # And the layer 29 | well_layer = Layer(width=si("7.2nm"), material=QW) 30 | 31 | # The following lines create the QW structure, with different number of QWs and interlayers. Indicating the substrate 32 | # material with the keyword "substrate" is essential in order to calculate correctly the strain. 33 | 34 | # A single QW with interlayers 35 | test_structure_1 = Structure([top_layer, inter, well_layer, inter, bottom_layer], substrate=bulk) 36 | output_1 = QM.schrodinger(test_structure_1, quasiconfined=0, graphtype='potentials', num_eigenvalues=20, show=True) 37 | 38 | # 10 QWs without interlayers 39 | test_structure_2 = Structure([top_layer, barrier_layer] + 10 * [well_layer, barrier_layer] + [bottom_layer], 40 | substrate=bulk) 41 | output_2 = QM.schrodinger(test_structure_2, quasiconfined=0.05, graphtype='potentialsLDOS', num_eigenvalues=200, 42 | show=True) 43 | -------------------------------------------------------------------------------- /solcore/absorption_calculator/kramers_kronig.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from scipy.integrate import quad 3 | 4 | 5 | class Epsi1: 6 | def __init__(self, epsi_2, mini=0., maxi=5.): 7 | 8 | self.epsi_2 = epsi_2 9 | self.mini = max(mini, 0) 10 | self.maxi = maxi 11 | 12 | def __call__(self, E): 13 | eps = 1e-2 14 | fun = lambda w, q: w * self.epsi_2(w) / (w ** 2 - q ** 2) 15 | 16 | try: 17 | val = np.zeros_like(E) 18 | for i, ee in enumerate(E): 19 | out1 = quad(fun, a=self.mini, b=ee - eps, args=(ee,)) 20 | out2 = quad(fun, a=ee + eps, b=self.maxi, args=(ee,)) 21 | 22 | val[i] = out1[0] + out2[0] 23 | except: 24 | out1 = quad(fun, a=self.mini, b=E - eps, args=(E,)) 25 | out2 = quad(fun, a=E + eps, b=self.maxi, args=(E,)) 26 | 27 | val = out1[0] + out2[0] 28 | 29 | val *= 2 / np.pi 30 | 31 | return val 32 | 33 | 34 | if __name__ == '__main__': 35 | import matplotlib.pyplot as plt 36 | from solcore.absorption_calculator.dielectric_constant_models import Lorentz 37 | 38 | 39 | def epsi2(x): 40 | En = 2.5 41 | Br = 0.5 42 | A = 1 43 | 44 | s = 0.5 * Br / np.sqrt(np.log(2)) 45 | 46 | out1 = np.exp(-((x - En) / s) ** 2) 47 | out2 = np.exp(-((x + En) / s) ** 2) 48 | 49 | out = A * (out1 - out2) 50 | 51 | return out 52 | 53 | 54 | epsi1 = Epsi1(epsi2) 55 | 56 | E = np.linspace(0, 5, 50) 57 | 58 | e1 = epsi1(E) 59 | e2 = epsi2(E) 60 | 61 | n = Lorentz(0.2, 2.5, 0.5).dielectric(1240 / E) 62 | e1_l = np.real(n) 63 | e2_l = np.imag(n) 64 | 65 | # print(e1, e2) 66 | 67 | plt.plot(E, e1, 'b', label='e1') 68 | plt.plot(E, e2, 'r', label='e2') 69 | plt.plot(E, e1_l, 'b--', label='e1_l') 70 | plt.plot(E, e2_l, 'r--', label='e2_l') 71 | plt.legend() 72 | plt.show() 73 | -------------------------------------------------------------------------------- /examples/data/Palik_GaAs_Eps2.csv: -------------------------------------------------------------------------------- 1 | 0.255611605,0.039731623 2 | 0.420850348,0.045923952 3 | 0.578429018,0.040202739 4 | 0.736007687,0.052938224 5 | 0.897963541,0.029735557 6 | 1.051165025,0.008688652 7 | 1.208743694,0.037606329 8 | 1.379453919,0.045155144 9 | 1.516240959,0.569304685 10 | 1.681479702,0.923189253 11 | 1.839058371,1.313057087 12 | 1.990774739,1.55697827 13 | 2.15421571,2.08652413 14 | 2.322090713,2.595519776 15 | 2.449675715,3.264489268 16 | 2.533389383,4.17065252 17 | 2.600360317,4.951623627 18 | 2.656118923,5.832537151 19 | 2.709434302,6.804801294 20 | 2.736928497,7.838646866 21 | 2.775502442,8.888906057 22 | 2.787484987,9.81816176 23 | 2.808394464,10.90235546 24 | 2.832132276,12.26636169 25 | 2.85182961,13.79536917 26 | 2.864961166,15.60583656 27 | 2.918830389,17.46894786 28 | 2.925225627,18.41209343 29 | 2.858395388,14.66900616 30 | 2.887941388,16.45961164 31 | 3.049996724,17.7417586 32 | 3.093356439,18.33868802 33 | 3.143350148,18.9273773 34 | 3.199405477,17.74475069 35 | 3.232644727,16.93663639 36 | 3.276516061,16.05801876 37 | 3.345904396,15.21835277 38 | 3.434542397,14.39379515 39 | 3.592121067,13.73484316 40 | 3.749699736,13.37321862 41 | 3.907278405,13.50232435 42 | 4.048925407,14.04490409 43 | 4.124396742,14.85137396 44 | 4.184682521,15.71541575 45 | 4.237208744,16.52943389 46 | 4.281527744,17.76870708 47 | 4.324205301,18.82863861 48 | 4.386251902,20.4489992 49 | 4.355392746,19.71417514 50 | 4.41940908,21.68947307 51 | 4.499839859,22.83993201 52 | 4.602768083,23.90779105 53 | 4.705020418,24.80168502 54 | 4.823652087,24.71292354 55 | 4.877372087,23.32649404 56 | 4.920049644,21.73284186 57 | 4.897069421,22.51683635 58 | 4.936464088,20.47758361 59 | 4.977373935,18.52162593 60 | 4.951237089,19.73328324 61 | 5.018283782,16.23364916 62 | 4.995556089,17.44996383 63 | 5.044799423,15.33600782 64 | 5.080911202,13.56888239 65 | 5.059572424,14.57759033 66 | 5.124901914,12.32706588 67 | 5.187057944,11.00163986 68 | 5.26540956,9.950556541 69 | 5.350108095,8.946410019 70 | 5.474857875,8.104340216 71 | 5.550911469,7.648754833 -------------------------------------------------------------------------------- /docs/source/Examples/example_light_sources.rst: -------------------------------------------------------------------------------- 1 | Example of the creation of light sources 2 | ======================================== 3 | 4 | .. image:: ls_compare.png 5 | :width: 40% 6 | .. image:: ls_smarts.png 7 | :width: 40% 8 | 9 | **Note**: This script requires having SMARTS installed and correctly configured. If you do not have it, comment those lines related to the SMARTS light source. 10 | 11 | .. code-block:: Python 12 | 13 | import numpy as np 14 | import matplotlib.pyplot as plt 15 | 16 | from solcore.light_source import LightSource 17 | 18 | # The wavelength range of the spectra 19 | wl = np.linspace(300, 3000, 200) 20 | 21 | # Now different types of light sources can be defined 22 | gauss = LightSource(source_type='laser', x=wl, center=800, linewidth=50, power=200) 23 | bb = LightSource(source_type='black body', x=wl, T=5800, entendue='Sun') 24 | am15g = LightSource(source_type='standard', x=wl, version='AM1.5g') 25 | smarts = LightSource(source_type='SMARTS', x=wl) 26 | spectral = LightSource(source_type='SPECTRAL2', x=wl) 27 | 28 | # Plot comparing the different light sources 29 | plt.figure(1) 30 | plt.plot(*gauss.spectrum(), label='Gauss') 31 | plt.plot(*bb.spectrum(), label='Black body') 32 | plt.plot(*am15g.spectrum(), label='AM1.5G') 33 | plt.plot(*smarts.spectrum(), label='SMARTS') 34 | plt.plot(*spectral.spectrum(), label='SPECTRAL2') 35 | 36 | plt.xlim(300, 3000) 37 | plt.xlabel('Wavelength (nm)') 38 | plt.ylabel('Power density (Wm$^{-2}$nm$^{-1}$)') 39 | plt.tight_layout() 40 | plt.legend() 41 | 42 | # Plot comparing the spectra calculated with SMARTS at different hours of the day 43 | plt.figure(2) 44 | for h in range(8, 20): 45 | plt.plot(*smarts.spectrum(HOUR=h), label='{} h'.format(h)) 46 | 47 | plt.xlim(300, 3000) 48 | plt.xlabel('Wavelength (nm)') 49 | plt.ylabel('Power density (Wm$^{-2}$nm$^{-1}$)') 50 | plt.tight_layout() 51 | plt.legend() 52 | plt.show() 53 | 54 | -------------------------------------------------------------------------------- /examples/Absorption_profile_AlGaAs_GaAs_structure.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | from solcore.absorption_calculator import calculate_absorption_profile 4 | from solcore import material, si 5 | from solcore.structure import Structure, Layer 6 | 7 | # First we defined a couple of materials, for example, GaAs and AlGAs 8 | GaAs = material('GaAs')(T=300) 9 | AlGaAs = material('AlGaAs')(T=300, Al=0.3) 10 | 11 | # Now, let's build the structure 12 | my_structure = Structure([ 13 | Layer(si(30, 'nm'), material=AlGaAs), 14 | Layer(si(3000, 'nm'), material=GaAs), 15 | Layer(si(300, 'um'), material=GaAs), 16 | ]) 17 | 18 | # We want to calculate the absorption profile of this structure as a function of the position and wavelength 19 | wl = np.linspace(400, 1000, 200) 20 | out = calculate_absorption_profile(my_structure, wl, steps_size=1, z_limit=3000) 21 | 22 | # Finally, we plot the absorption profile. Note that absorption at short wavelengths take place near the surface of the 23 | # structure, in the AlGaAs layer and top of the GaAs layer, while longer wavelengths penetrate more. Wavelengths beyond 24 | # the GaAs band edge are not absorbed. 25 | plt.figure(1) 26 | ax = plt.contourf(out['position'], wl, out['absorption'], 200) 27 | plt.xlabel('Position (nm)') 28 | plt.ylabel('Wavelength (nm)') 29 | cbar = plt.colorbar() 30 | cbar.set_label('Absorption (1/nm)') 31 | 32 | # We can also check what is the overall light absorption in the AlGaAs and GaAs epilayers as that represents the total 33 | # light absorption in our solar cell and therefore the maximum EQE (light absorbed in the thick substrate lost). 34 | # The absorption is mostly limited by the reflexion in the front surface. Clearly, this solar cell needs an AR coating. 35 | A = np.zeros_like(wl) 36 | 37 | for i, absorption in enumerate(out['absorption'][:]): 38 | A[i] = np.trapezoid(absorption, out['position']) 39 | 40 | plt.figure(2) 41 | plt.plot(wl, A) 42 | plt.xlabel('Wavelength (nm)') 43 | plt.ylabel('Absorption') 44 | 45 | plt.show() 46 | -------------------------------------------------------------------------------- /examples/PV_module_calculator.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | from solcore.solar_cell import SolarCell 5 | from solcore.light_source import LightSource 6 | from solcore.spice.pv_module_solver import solve_pv_module 7 | from solcore.structure import Junction 8 | 9 | T = 298 10 | 11 | # First we define the properties of the MJ solar cell that the solar module is made of. We use junctions of kind 2-diode 12 | db_junction = Junction(kind='2D', T=T, reff=1, jref=300, Eg=0.66, A=1, R_series=0.00236, R_shunt=1e14, n=3.5) 13 | db_junction2 = Junction(kind='2D', T=T, reff=1, jref=300, Eg=1.4, A=1, R_series=0.00012, R_shunt=1e14, n=3.5) 14 | db_junction3 = Junction(kind='2D', T=T, reff=1, jref=300, Eg=1.9, A=1, R_series=8.0e-5, R_shunt=1e14, n=3.5) 15 | 16 | my_solar_cell = SolarCell([db_junction3, db_junction2, db_junction], T=T, R_series=0.0, area=0.1) 17 | 18 | wl = np.linspace(350, 2000, 301) * 1e-9 19 | light_source = LightSource(source_type='standard', version='AM1.5g', x=wl, output_units='photon_flux_per_m', 20 | concentration=1) 21 | 22 | options = {'light_iv': True, 'wavelength': wl, 'light_source': light_source} 23 | 24 | # After defining the individual solar cell, we solve the module IV characteristics adding some dispersion in the 25 | # values of the short circuit currents. 26 | voltage, current, all_Isc_values, raw_data = solve_pv_module(my_solar_cell, options, jscSigma=0.02) 27 | 28 | plt.figure(1) 29 | 30 | plt.subplot(311) 31 | plt.title('Histogram of sub-cell photocurrents') 32 | plt.ylabel('InGaP') 33 | plt.hist(([row[0] for row in all_Isc_values]), bins=20) 34 | 35 | plt.subplot(312) 36 | plt.hist(([row[1] for row in all_Isc_values]), bins=20) 37 | plt.ylabel('GaAs') 38 | 39 | plt.subplot(313) 40 | plt.xlabel('Current (A)') 41 | plt.ylabel('Ge') 42 | plt.hist(([row[2] for row in all_Isc_values]), bins=20) 43 | 44 | plt.figure(2) 45 | plt.plot(voltage, current) 46 | plt.xlabel('Voltage (V)') 47 | plt.ylabel('Current (A)') 48 | plt.xlim(0, 80) 49 | plt.ylim(0, 17) 50 | 51 | plt.show() 52 | -------------------------------------------------------------------------------- /solcore/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from datetime import datetime 3 | 4 | SOLCORE_ROOT = os.path.split(__file__)[0] 5 | default_config = os.path.join(SOLCORE_ROOT, "solcore_config.txt") 6 | user_path = os.environ.get("SOLCORE_USER_DATA") 7 | if user_path is None: 8 | user_path = os.path.join(os.path.expanduser("~"), ".solcore") 9 | if not os.path.exists(user_path): 10 | os.mkdir(user_path) 11 | user_config = os.path.join(user_path, "solcore_config.txt") 12 | 13 | from .config_tools import SolcoreConfig 14 | 15 | config = SolcoreConfig(default_config, user_config) 16 | verbose = config.verbose_loading() 17 | __version__ = config.version() 18 | 19 | if config.welcome_message(): 20 | print( 21 | f"""\n\tWelcome to Solcore - version {config.version()} 22 | \tCopyright (c) {datetime.today().year}, Imperial College London. All rights reserved. 23 | \tSoftware released under the GNU Lesser General Public License.\n""" 24 | ) 25 | 26 | from solcore.units_system import UnitsSystem 27 | 28 | # First we populate the Units system: 29 | us = UnitsSystem(config.units) 30 | config.register_observer("Units", us.read) 31 | 32 | # And now we load some functions form it. 33 | si = us.si 34 | asUnit = us.asUnit 35 | siUnits = us.siUnits 36 | sensibleUnits = us.sensibleUnits 37 | siUnitFromString = us.siUnitFromString 38 | convert = us.convert 39 | guess_dimension = us.guess_dimension 40 | nmJ = us.nmJ 41 | mJ = us.mJ 42 | eVnm = us.eVnm 43 | nmHz = us.nmHz 44 | spectral_conversion_nm_ev = us.spectral_conversion_nm_ev 45 | spectral_conversion_nm_hz = us.spectral_conversion_nm_hz 46 | eV = us.eV 47 | 48 | # And the same with the Parameter system 49 | from solcore.parameter_system import ParameterSystem 50 | 51 | ps = ParameterSystem(config.parameters) 52 | config.register_observer("Parameters", ps.read) 53 | get_parameter = ps.get_parameter 54 | 55 | # And the same with the Materials system 56 | from solcore.material_system import MaterialSystem 57 | 58 | ms = MaterialSystem(config.materials) 59 | config.register_observer("Materials", ms.read) 60 | material = ms.material 61 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/COSI2-4.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*39* 4 | DATA1*1*2.58302461e2*2.18400000*2.40200000* 5 | DATA1*2*2.63798258e2*2.18300000*2.40600000* 6 | DATA1*3*2.69533003e2*2.18600000*2.40400000* 7 | DATA1*4*2.75522625e2*2.19200000*2.39600000* 8 | DATA1*5*2.81784503e2*2.20100000*2.38300000* 9 | DATA1*6*2.88337631e2*2.21500000*2.36700000* 10 | DATA1*7*2.95202813e2*2.23200000*2.34800000* 11 | DATA1*8*3.02402881e2*2.25300000*2.32700000* 12 | DATA1*9*3.09962953e2*2.27800000*2.30600000* 13 | DATA1*10*3.17910721e2*2.30500000*2.28500000* 14 | DATA1*11*3.26276793e2*2.33400000*2.26700000* 15 | DATA1*12*3.35095085e2*2.36200000*2.25200000* 16 | DATA1*13*3.44403281e2*2.38600000*2.24200000* 17 | DATA1*14*3.54243375e2*2.40700000*2.23800000* 18 | DATA1*15*3.64662298e2*2.42600000*2.24000000* 19 | DATA1*16*3.75712671e2*2.44400000*2.24800000* 20 | DATA1*17*3.87453692e2*2.46900000*2.26200000* 21 | DATA1*18*3.99952198e2*2.50700000*2.28000000* 22 | DATA1*19*4.13283938e2*2.56000000*2.29900000* 23 | DATA1*20*4.27535108e2*2.63100000*2.31300000* 24 | DATA1*21*4.42804219e2*2.71800000*2.31600000* 25 | DATA1*22*4.59204375e2*2.81300000*2.30000000* 26 | DATA1*23*4.76866082e2*2.91100000*2.25800000* 27 | DATA1*24*4.95940725e2*3.00000000*2.18800000* 28 | DATA1*25*5.16604922e2*3.07100000*2.10600000* 29 | DATA1*26*5.39066006e2*3.11500000*2.02800000* 30 | DATA1*27*5.63569006e2*3.12400000*1.95400000* 31 | DATA1*28*5.90405625e2*3.09400000*1.88400000* 32 | DATA1*29*6.19925906e2*3.02400000*1.81700000* 33 | DATA1*30*6.52553586e2*2.91700000*1.75500000* 34 | DATA1*31*6.88806563e2*2.77800000*1.70300000* 35 | DATA1*32*7.29324596e2*2.61400000*1.67600000* 36 | DATA1*33*7.74907383e2*2.43200000*1.70100000* 37 | DATA1*34*8.26567875e2*2.23800000*1.81100000* 38 | DATA1*35*8.85608438e2*2.03700000*2.03800000* 39 | DATA1*36*9.53732164e2*1.83400000*2.40400000* 40 | DATA1*37*1.03320984e3*1.63000000*2.91200000* 41 | DATA1*38*1.12713801e3*1.42800000*3.56000000* 42 | DATA1*39*1.23985181e3*1.22700000*4.34600000* 43 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 44 | COMMENT*sopra-sa.com/indices.htm* 45 | EOF* 46 | -------------------------------------------------------------------------------- /docs/source/Examples/main.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ======== 3 | 4 | List of examples illustrating the use of Solcore. More examples are available in the `Solcore's Github repository (Examples folder) `_, 5 | and on the `solcore-education website `_. 6 | 7 | Quantum solvers 8 | --------------- 9 | 10 | - :doc:`Calculating the bandstructure and local density of states in QWs and MQWs ` 11 | - :doc:`KP calculator and effective mass fitting ` 12 | 13 | Light sources 14 | ------------- 15 | 16 | - :doc:`Example of the use of the light_sources module ` 17 | 18 | Optical methods 19 | --------------- 20 | 21 | - :doc:`Using the TMM solver to calculate the reflection of a multilayered ARC ` 22 | - :doc:`Looking at the effect of substrate and the no_back_reflection option in the TMM solver ` 23 | - :doc:`Comparing optical models (TMM, Beer-Lambert, and RCWA) ` 24 | 25 | Custom materials 26 | ---------------- 27 | 28 | - :doc:`Setting up the options for and defining custom materials ` 29 | - :doc:`Searching the refractiveindex.info database and comparing materials ` 30 | 31 | MJ solar cells 32 | -------------- 33 | 34 | - :doc:`Tutorial: 2J solar cell with QWs in the bottom cell ` 35 | - :doc:`Example of a 2J solar cell calculated with the PDD solver ` 36 | - :doc:`Radiative coupling in a 3J solar cell ` 37 | - :doc:`MJ solar cell efficiency map ` 38 | - :doc:`Traditional GaInP/InGaAs/Ge solar cell ` 39 | - :doc:`Example of a tunnel junction <../Examples/example_tunnel_junction>` 40 | 41 | SPICE-based solar cell solver 42 | ----------------------------- 43 | 44 | - :doc:`PV module calculator ` 45 | - :doc:`Quasi-3D 3J solar cell ` 46 | 47 | 48 | -------------------------------------------------------------------------------- /docs/source/Solvers/sign_conventions.rst: -------------------------------------------------------------------------------- 1 | .. _sign-conventions: 2 | 3 | Current-voltage sign conventions 4 | ================================ 5 | 6 | In order to maintain internal consistency, the following sign conventions are used for current and voltage: 7 | 8 | - A positive voltage means that a higher potential is applied to the front contact of the cell. 9 | 10 | - For a **p-n junction** (i.e. p-type material is on top of n-type material), this means that a **positive 11 | voltage** results in 'solar cell operation' under illumination, with a positive open-circuit voltage (V\ :sub:`OC`). 12 | - For an **n-p junction**, a **negative voltage** must be applied for PV operation and V\ :sub:`OC` will be negative. 13 | 14 | - For the junction object itself, the short-circuit current (J\ :sub:`SC`) is negative if the cell operates at positive voltage, and positive 15 | if the cell operates at negative voltage (the product of current and voltage is negative, i.e. work is being done 16 | *by* the cell). This relates to the data which is stored in ``junction.iv``. 17 | 18 | - For the cell as a whole (i.e. the multi-junction IV for a multi-junction cell, or the IV with shunt resistance for 19 | a single-junction cell), the short-circuit current was taken to be positive for positive voltages. This means that 20 | it will be negative for negative voltages. 21 | 22 | - The two-diode (2D) and detailed-balance (DB) models always assume that, in this sign convention, the cell has the polarity of 23 | a p-n junction (positive voltage should be applied) 24 | 25 | .. image:: Figures/PDD_pn.png 26 | :width: 40% 27 | .. image:: Figures/PDD_np.png 28 | :width: 40% 29 | 30 | Note that the sign conventions here were always the case for the (Fortran) PDD solver, but were not used consistently 31 | by the depletion approximation solver before version 5.10, which always assumed that V\ :sub:`OC` and J\ :sub:`SC` were positive. This 32 | does not matter for single-junction cells, since the choice is arbitrary, but caused inconsistencies when defining 33 | n-p cells which mix different types of junction. 34 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/RESIGE_GE/RESIGE83.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*40* 4 | DATA1*1*2.21402109e2*1.29427500*2.77761600* 5 | DATA1*2*2.25427602e2*1.33469600*2.75343700* 6 | DATA1*3*2.29602188e2*1.33621000*2.75779900* 7 | DATA1*4*2.33934304e2*1.32591800*2.79429000* 8 | DATA1*5*2.38433041e2*1.32263700*2.86170700* 9 | DATA1*6*2.43108199e2*1.33065100*2.94968300* 10 | DATA1*7*2.47970363e2*1.34721900*3.06186200* 11 | DATA1*8*2.53030982e2*1.38742900*3.19295500* 12 | DATA1*9*2.58302461e2*1.44505400*3.34935500* 13 | DATA1*10*2.63798258e2*1.52926900*3.53109900* 14 | DATA1*11*2.69533003e2*1.65265900*3.74850400* 15 | DATA1*12*2.75522625e2*1.86368300*4.02160600* 16 | DATA1*13*2.81784503e2*2.26704600*4.31619000* 17 | DATA1*14*2.88337631e2*2.89961600*4.33333300* 18 | DATA1*15*2.95202813e2*3.36704200*4.02578900* 19 | DATA1*16*3.02402881e2*3.58060900*3.68792100* 20 | DATA1*17*3.09962953e2*3.67205300*3.43132300* 21 | DATA1*18*3.17910721e2*3.73318700*3.23985900* 22 | DATA1*19*3.26276793e2*3.78477400*3.09265500* 23 | DATA1*20*3.35095085e2*3.83304500*2.97022400* 24 | DATA1*21*3.44403281e2*3.88158300*2.86996300* 25 | DATA1*22*3.54243375e2*3.93927700*2.78350600* 26 | DATA1*23*3.64662298e2*4.01177300*2.70080100* 27 | DATA1*24*3.75712671e2*4.09257000*2.59983300* 28 | DATA1*25*3.87453692e2*4.15209300*2.47586000* 29 | DATA1*26*3.99952198e2*4.16879400*2.35559700* 30 | DATA1*27*4.13283938e2*4.14877200*2.28742400* 31 | DATA1*28*4.27535108e2*4.15011100*2.28548100* 32 | DATA1*29*4.42804219e2*4.20780200*2.32068900* 33 | DATA1*30*4.59204375e2*4.32420000*2.37038100* 34 | DATA1*31*4.76866082e2*4.53898900*2.42124400* 35 | DATA1*32*4.95940725e2*4.90683400*2.37424000* 36 | DATA1*33*5.16604922e2*5.25576200*2.12909200* 37 | DATA1*34*5.39066006e2*5.62155300*1.69170300* 38 | DATA1*35*5.63569006e2*5.56035200*1.03320800* 39 | DATA1*36*5.90405625e2*5.29443700*6.79014400e-1* 40 | DATA1*37*6.19925906e2*5.07424000*4.87757500e-1* 41 | DATA1*38*6.52553586e2*4.89830700*3.78702300e-1* 42 | DATA1*39*6.88806563e2*4.75845500*2.87908800e-1* 43 | DATA1*40*7.29324596e2*4.64785000*2.29138700e-1* 44 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 45 | COMMENT*sopra-sa.com/indices.htm* 46 | EOF* 47 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/RESIGE_GE/RESIGE91.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*40* 4 | DATA1*1*2.21402109e2*1.27059800*2.80970100* 5 | DATA1*2*2.25427602e2*1.30028100*2.78401400* 6 | DATA1*3*2.29602188e2*1.29880600*2.78332500* 7 | DATA1*4*2.33934304e2*1.29040700*2.81694000* 8 | DATA1*5*2.38433041e2*1.27595900*2.88410600* 9 | DATA1*6*2.43108199e2*1.27826700*2.98059800* 10 | DATA1*7*2.47970363e2*1.29840600*3.09610400* 11 | DATA1*8*2.53030982e2*1.33472500*3.23287600* 12 | DATA1*9*2.58302461e2*1.38768900*3.39052800* 13 | DATA1*10*2.63798258e2*1.46557000*3.57881200* 14 | DATA1*11*2.69533003e2*1.58366500*3.80762300* 15 | DATA1*12*2.75522625e2*1.78427200*4.10531700* 16 | DATA1*13*2.81784503e2*2.21180200*4.44207900* 17 | DATA1*14*2.88337631e2*2.90328200*4.45185900* 18 | DATA1*15*2.95202813e2*3.37537400*4.10769400* 19 | DATA1*16*3.02402881e2*3.58810200*3.75825400* 20 | DATA1*17*3.09962953e2*3.67929200*3.49387900* 21 | DATA1*18*3.17910721e2*3.73708400*3.29936300* 22 | DATA1*19*3.26276793e2*3.78240300*3.14747000* 23 | DATA1*20*3.35095085e2*3.83067800*3.02557400* 24 | DATA1*21*3.44403281e2*3.88083300*2.92076500* 25 | DATA1*22*3.54243375e2*3.93275300*2.83135000* 26 | DATA1*23*3.64662298e2*4.00414100*2.74465800* 27 | DATA1*24*3.75712671e2*4.07933000*2.63646200* 28 | DATA1*25*3.87453692e2*4.13298500*2.51029200* 29 | DATA1*26*3.99952198e2*4.14400200*2.38175500* 30 | DATA1*27*4.13283938e2*4.10827200*2.30388800* 31 | DATA1*28*4.27535108e2*4.08206700*2.29418100* 32 | DATA1*29*4.42804219e2*4.11362100*2.33492600* 33 | DATA1*30*4.59204375e2*4.19577200*2.39050200* 34 | DATA1*31*4.76866082e2*4.34038500*2.45945900* 35 | DATA1*32*4.95940725e2*4.59378700*2.52841500* 36 | DATA1*33*5.16604922e2*5.01678200*2.43682100* 37 | DATA1*34*5.39066006e2*5.32802200*2.17435300* 38 | DATA1*35*5.63569006e2*5.75471400*1.71077100* 39 | DATA1*36*5.90405625e2*5.64215600*9.96958900e-1* 40 | DATA1*37*6.19925906e2*5.36129900*6.58422600e-1* 41 | DATA1*38*6.52553586e2*5.12468300*5.12226300e-1* 42 | DATA1*39*6.88806563e2*4.95499400*3.63269400e-1* 43 | DATA1*40*7.29324596e2*4.81342600*2.62806000e-1* 44 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 45 | COMMENT*sopra-sa.com/indices.htm* 46 | EOF* 47 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/RESIGE_GE/RESIGE75.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*40* 4 | DATA1*1*2.21402109e2*1.27966300*2.88747900* 5 | DATA1*2*2.25427602e2*1.32937100*2.87353900* 6 | DATA1*3*2.29602188e2*1.33623100*2.86627100* 7 | DATA1*4*2.33934304e2*1.33235000*2.90088900* 8 | DATA1*5*2.38433041e2*1.32636700*2.96298000* 9 | DATA1*6*2.43108199e2*1.33350600*3.05585300* 10 | DATA1*7*2.47970363e2*1.35069500*3.17244000* 11 | DATA1*8*2.53030982e2*1.39511800*3.31154800* 12 | DATA1*9*2.58302461e2*1.45445400*3.47209400* 13 | DATA1*10*2.63798258e2*1.54054200*3.66104800* 14 | DATA1*11*2.69533003e2*1.66878100*3.88906600* 15 | DATA1*12*2.75522625e2*1.88841600*4.16486600* 16 | DATA1*13*2.81784503e2*2.29637500*4.46355700* 17 | DATA1*14*2.88337631e2*2.94664200*4.51361300* 18 | DATA1*15*2.95202813e2*3.45520700*4.20814100* 19 | DATA1*16*3.02402881e2*3.69694700*3.85453200* 20 | DATA1*17*3.09962953e2*3.80398200*3.57914400* 21 | DATA1*18*3.17910721e2*3.86966200*3.37109500* 22 | DATA1*19*3.26276793e2*3.92442400*3.21575900* 23 | DATA1*20*3.35095085e2*3.97560100*3.08632600* 24 | DATA1*21*3.44403281e2*4.02842700*2.98131300* 25 | DATA1*22*3.54243375e2*4.09170600*2.88999200* 26 | DATA1*23*3.64662298e2*4.17633900*2.80389100* 27 | DATA1*24*3.75712671e2*4.26691000*2.69750300* 28 | DATA1*25*3.87453692e2*4.33870300*2.56989200* 29 | DATA1*26*3.99952198e2*4.36392600*2.44619200* 30 | DATA1*27*4.13283938e2*4.36266200*2.38386600* 31 | DATA1*28*4.27535108e2*4.39865900*2.38709100* 32 | DATA1*29*4.42804219e2*4.50486000*2.41738900* 33 | DATA1*30*4.59204375e2*4.71916100*2.44958800* 34 | DATA1*31*4.76866082e2*5.07287400*2.38622100* 35 | DATA1*32*4.95940725e2*5.44778500*2.10911400* 36 | DATA1*33*5.16604922e2*5.72516300*1.56764100* 37 | DATA1*34*5.39066006e2*5.59745400*9.75443500e-1* 38 | DATA1*35*5.63569006e2*5.33155500*6.36774800e-1* 39 | DATA1*36*5.90405625e2*5.10853700*4.32609200e-1* 40 | DATA1*37*6.19925906e2*4.92790100*2.90184400e-1* 41 | DATA1*38*6.52553586e2*4.77635000*2.31348200e-1* 42 | DATA1*39*6.88806563e2*4.64652900*1.01150800e-1* 43 | DATA1*40*7.29324596e2*4.53565400*1.10237700e-1* 44 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 45 | COMMENT*sopra-sa.com/indices.htm* 46 | EOF* 47 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/RESIGE_GE/RESIGE51.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*40* 4 | DATA1*1*2.21402109e2*1.32440600*2.87298600* 5 | DATA1*2*2.25427602e2*1.36757300*2.88101600* 6 | DATA1*3*2.29602188e2*1.38648800*2.88138000* 7 | DATA1*4*2.33934304e2*1.39383800*2.90564700* 8 | DATA1*5*2.38433041e2*1.39631500*2.96136700* 9 | DATA1*6*2.43108199e2*1.40275400*3.04757600* 10 | DATA1*7*2.47970363e2*1.42916900*3.16267700* 11 | DATA1*8*2.53030982e2*1.47012300*3.29564300* 12 | DATA1*9*2.58302461e2*1.53555800*3.45802500* 13 | DATA1*10*2.63798258e2*1.63067000*3.64267500* 14 | DATA1*11*2.69533003e2*1.77110600*3.86481800* 15 | DATA1*12*2.75522625e2*1.99836600*4.12837300* 16 | DATA1*13*2.81784503e2*2.39984400*4.39195300* 17 | DATA1*14*2.88337631e2*3.01982900*4.44064900* 18 | DATA1*15*2.95202813e2*3.53112500*4.13749200* 19 | DATA1*16*3.02402881e2*3.76831200*3.78684200* 20 | DATA1*17*3.09962953e2*3.87283300*3.51551400* 21 | DATA1*18*3.17910721e2*3.94039900*3.31311700* 22 | DATA1*19*3.26276793e2*4.00087700*3.16180600* 23 | DATA1*20*3.35095085e2*4.06015000*3.04052900* 24 | DATA1*21*3.44403281e2*4.12271300*2.94223700* 25 | DATA1*22*3.54243375e2*4.20007800*2.86542300* 26 | DATA1*23*3.64662298e2*4.30686500*2.79089300* 27 | DATA1*24*3.75712671e2*4.43243200*2.69378100* 28 | DATA1*25*3.87453692e2*4.54700900*2.57202100* 29 | DATA1*26*3.99952198e2*4.62833500*2.46200800* 30 | DATA1*27*4.13283938e2*4.74109500*2.42032700* 31 | DATA1*28*4.27535108e2*4.98021400*2.37540000* 32 | DATA1*29*4.42804219e2*5.34199300*2.16492200* 33 | DATA1*30*4.59204375e2*5.63768600*1.65936900* 34 | DATA1*31*4.76866082e2*5.54641900*1.07366600* 35 | DATA1*32*4.95940725e2*5.29178100*7.16204900e-1* 36 | DATA1*33*5.16604922e2*5.05752100*4.88381600e-1* 37 | DATA1*34*5.39066006e2*4.84923500*3.53664100e-1* 38 | DATA1*35*5.63569006e2*4.67004200*2.81582100e-1* 39 | DATA1*36*5.90405625e2*4.52482900*2.09952700e-1* 40 | DATA1*37*6.19925906e2*4.40152800*1.82891000e-1* 41 | DATA1*38*6.52553586e2*4.29856600*1.66334500e-1* 42 | DATA1*39*6.88806563e2*4.21054000*1.36562000e-1* 43 | DATA1*40*7.29324596e2*4.12947300*1.80410400e-1* 44 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 45 | COMMENT*sopra-sa.com/indices.htm* 46 | EOF* 47 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/RESIGE_GE/RESIGE64.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*40* 4 | DATA1*1*2.21402109e2*1.28929800*2.91243700* 5 | DATA1*2*2.25427602e2*1.34087700*2.90481500* 6 | DATA1*3*2.29602188e2*1.36612500*2.90969000* 7 | DATA1*4*2.33934304e2*1.37254100*2.94344500* 8 | DATA1*5*2.38433041e2*1.37106400*3.00496500* 9 | DATA1*6*2.43108199e2*1.37878000*3.09694000* 10 | DATA1*7*2.47970363e2*1.40311200*3.21072000* 11 | DATA1*8*2.53030982e2*1.44668500*3.34557900* 12 | DATA1*9*2.58302461e2*1.51221300*3.50810300* 13 | DATA1*10*2.63798258e2*1.60455100*3.70197000* 14 | DATA1*11*2.69533003e2*1.74379700*3.92820900* 15 | DATA1*12*2.75522625e2*1.97119000*4.20304500* 16 | DATA1*13*2.81784503e2*2.37975200*4.48366100* 17 | DATA1*14*2.88337631e2*3.01713600*4.53575900* 18 | DATA1*15*2.95202813e2*3.53147500*4.24043800* 19 | DATA1*16*3.02402881e2*3.78028800*3.88594700* 20 | DATA1*17*3.09962953e2*3.88716400*3.60417000* 21 | DATA1*18*3.17910721e2*3.95751100*3.39733700* 22 | DATA1*19*3.26276793e2*4.02117500*3.24034700* 23 | DATA1*20*3.35095085e2*4.07744500*3.10733800* 24 | DATA1*21*3.44403281e2*4.14082300*2.99940300* 25 | DATA1*22*3.54243375e2*4.20809700*2.91343100* 26 | DATA1*23*3.64662298e2*4.30191800*2.82780800* 27 | DATA1*24*3.75712671e2*4.41449300*2.72171700* 28 | DATA1*25*3.87453692e2*4.50522500*2.59365600* 29 | DATA1*26*3.99952198e2*4.54968800*2.47379600* 30 | DATA1*27*4.13283938e2*4.59772300*2.41641400* 31 | DATA1*28*4.27535108e2*4.70814800*2.41177600* 32 | DATA1*29*4.42804219e2*4.94464300*2.38945500* 33 | DATA1*30*4.59204375e2*5.29752600*2.21896000* 34 | DATA1*31*4.76866082e2*5.62347800*1.81204600* 35 | DATA1*32*4.95940725e2*5.67301700*1.20130100* 36 | DATA1*33*5.16604922e2*5.44718600*7.62779200e-1* 37 | DATA1*34*5.39066006e2*5.20206400*5.11335600e-1* 38 | DATA1*35*5.63569006e2*4.99692900*3.73229200e-1* 39 | DATA1*36*5.90405625e2*4.82450300*2.36293700e-1* 40 | DATA1*37*6.19925906e2*4.67679000*1.11187400e-1* 41 | DATA1*38*6.52553586e2*4.53480300*1.20181600e-1* 42 | DATA1*39*6.88806563e2*4.42495800*1.58193600e-2* 43 | DATA1*40*7.29324596e2*4.32271100*7.63409900e-2* 44 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 45 | COMMENT*sopra-sa.com/indices.htm* 46 | EOF* 47 | -------------------------------------------------------------------------------- /examples/Optical_constants_RAT_of_ARC.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | from solcore.solar_cell import Layer 4 | from solcore.absorption_calculator import calculate_rat, OptiStack 5 | from solcore import material, si 6 | 7 | wl = np.linspace(300, 1900, 1000) 8 | 9 | MgF2 = material("MgF2")() 10 | HfO2 = material("HfO2")() 11 | ZnS = material("ZnScub")() 12 | AlInP = material("AlInP")(Al=0.52) 13 | GaInP = material("GaInP")(In=0.49) 14 | 15 | stack = OptiStack([ 16 | Layer(si('141nm'), material=MgF2), 17 | Layer(si('82nm'), material=HfO2), 18 | Layer(si('70nm'), material=ZnS), 19 | Layer(si('25nm'), material=AlInP), 20 | ], substrate=GaInP, no_back_reflection=False) 21 | 22 | angles = np.linspace(0, 80, 10) 23 | RAT_angles = np.zeros((len(angles), 3, len(wl))) 24 | 25 | print("Calculate RAT:") 26 | for i, theta in enumerate(angles): 27 | print("Calculating at angle: %4.1f deg" % theta) 28 | # Calculate RAT data... 29 | rat_data = calculate_rat(stack, angle=theta, wavelength=wl, 30 | no_back_reflection=False) 31 | 32 | RAT_angles[i] = [rat_data["R"], rat_data["A"], rat_data["T"]] 33 | 34 | colors = plt.cm.jet(np.linspace(1, 0, len(RAT_angles))) 35 | 36 | fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 4)) 37 | 38 | for i, RAT in enumerate(RAT_angles): 39 | if i == 0: 40 | ax1.plot(wl, RAT[0] * 100, ls="-", color=colors[i], label="R") 41 | ax1.plot(wl, (RAT[1] + RAT[2]) * 100, ls="--", color=colors[i], label="A+T") 42 | 43 | else: 44 | ax1.plot(wl, RAT[0] * 100, ls="-", color=colors[i]) 45 | ax1.plot(wl, (RAT[1] + RAT[2]) * 100, ls="--", color=colors[i]) 46 | 47 | ax2.plot(wl, RAT[1]*100, color=colors[i], label="%4.1f$^\circ$" % angles[i]) 48 | 49 | ax1.set_ylim([0, 100]) 50 | ax1.set_xlim([300, 1800]) 51 | ax1.set_xlabel("Wavelength (nm)") 52 | ax1.set_ylabel("Reflection and transmission into structure (%)") 53 | ax1.legend(loc=5) 54 | 55 | ax2.set_ylim([0, 100]) 56 | ax2.set_xlim([300, 1800]) 57 | ax2.set_xlabel("Wavelength (nm)") 58 | ax2.set_ylabel("Absorption in surface layers (%)") 59 | ax2.legend(loc=5) 60 | 61 | plt.tight_layout() 62 | plt.show() -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/RESIGE_GE/RESIGE39.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*40* 4 | DATA1*1*2.21402109e2*1.27928800*2.99776200* 5 | DATA1*2*2.25427602e2*1.34364200*3.01419500* 6 | DATA1*3*2.29602188e2*1.39248900*3.01977300* 7 | DATA1*4*2.33934304e2*1.40993900*3.04268400* 8 | DATA1*5*2.38433041e2*1.41434800*3.09683400* 9 | DATA1*6*2.43108199e2*1.41843900*3.18307600* 10 | DATA1*7*2.47970363e2*1.44017200*3.30516200* 11 | DATA1*8*2.53030982e2*1.48283900*3.44946500* 12 | DATA1*9*2.58302461e2*1.54853400*3.62601100* 13 | DATA1*10*2.63798258e2*1.64694400*3.83437400* 14 | DATA1*11*2.69533003e2*1.80393000*4.08829600* 15 | DATA1*12*2.75522625e2*2.06286500*4.38467900* 16 | DATA1*13*2.81784503e2*2.50814400*4.67875900* 17 | DATA1*14*2.88337631e2*3.22550300*4.75119700* 18 | DATA1*15*2.95202813e2*3.81180200*4.37719500* 19 | DATA1*16*3.02402881e2*4.05652200*3.95289400* 20 | DATA1*17*3.09962953e2*4.15539100*3.64105400* 21 | DATA1*18*3.17910721e2*4.21368200*3.41981200* 22 | DATA1*19*3.26276793e2*4.27081700*3.25113500* 23 | DATA1*20*3.35095085e2*4.33155700*3.12127900* 24 | DATA1*21*3.44403281e2*4.39865200*3.01797000* 25 | DATA1*22*3.54243375e2*4.48607200*2.94021100* 26 | DATA1*23*3.64662298e2*4.61888200*2.87299000* 27 | DATA1*24*3.75712671e2*4.79244600*2.77624400* 28 | DATA1*25*3.87453692e2*4.97666700*2.64333500* 29 | DATA1*26*3.99952198e2*5.18593700*2.50677900* 30 | DATA1*27*4.13283938e2*5.50018800*2.29174000* 31 | DATA1*28*4.27535108e2*5.79311300*1.80559200* 32 | DATA1*29*4.42804219e2*5.76481000*1.17176500* 33 | DATA1*30*4.59204375e2*5.48493400*7.31093600e-1* 34 | DATA1*31*4.76866082e2*5.20367700*4.88116400e-1* 35 | DATA1*32*4.95940725e2*5.00131300*3.50907800e-1* 36 | DATA1*33*5.16604922e2*4.77592900*2.43931600e-1* 37 | DATA1*34*5.39066006e2*4.61607900*1.67891400e-1* 38 | DATA1*35*5.63569006e2*4.48290600*8.03050500e-2* 39 | DATA1*36*5.90405625e2*4.36817500*3.09053500e-2* 40 | DATA1*37*6.19925906e2*4.26616900*1.40641400e-2* 41 | DATA1*38*6.52553586e2*4.17853700*1.31625000e-2* 42 | DATA1*39*6.88806563e2*4.10489700*1.33986300e-2* 43 | DATA1*40*7.29324596e2*4.03734500*1.23843800e-2* 44 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 45 | COMMENT*sopra-sa.com/indices.htm* 46 | EOF* 47 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/RESIGE_GE/RESIGE22.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*40* 4 | DATA1*1*2.21402109e2*1.28222700*3.06498100* 5 | DATA1*2*2.25427602e2*1.35308600*3.11140500* 6 | DATA1*3*2.29602188e2*1.43180900*3.12891000* 7 | DATA1*4*2.33934304e2*1.47171100*3.14260000* 8 | DATA1*5*2.38433041e2*1.47795600*3.18345000* 9 | DATA1*6*2.43108199e2*1.45290400*3.27275600* 10 | DATA1*7*2.47970363e2*1.49477800*3.39180800* 11 | DATA1*8*2.53030982e2*1.53312600*3.54830600* 12 | DATA1*9*2.58302461e2*1.59688400*3.74166300* 13 | DATA1*10*2.63798258e2*1.69965100*3.97728700* 14 | DATA1*11*2.69533003e2*1.87286500*4.26352200* 15 | DATA1*12*2.75522625e2*2.17609400*4.59079400* 16 | DATA1*13*2.81784503e2*2.68216300*4.89530400* 17 | DATA1*14*2.88337631e2*3.47541700*4.96774900* 18 | DATA1*15*2.95202813e2*4.12731100*4.51383400* 19 | DATA1*16*3.02402881e2*4.35822700*4.02916100* 20 | DATA1*17*3.09962953e2*4.44187000*3.69326500* 21 | DATA1*18*3.17910721e2*4.49522500*3.46367500* 22 | DATA1*19*3.26276793e2*4.55702300*3.29491400* 23 | DATA1*20*3.35095085e2*4.63578400*3.16235600* 24 | DATA1*21*3.44403281e2*4.72692500*3.06330200* 25 | DATA1*22*3.54243375e2*4.85566900*2.99958700* 26 | DATA1*23*3.64662298e2*5.08741400*2.94648700* 27 | DATA1*24*3.75712671e2*5.45658000*2.81678300* 28 | DATA1*25*3.87453692e2*5.88842700*2.41320800* 29 | DATA1*26*3.99952198e2*6.11144900*1.73199500* 30 | DATA1*27*4.13283938e2*5.92505400*1.05653100* 31 | DATA1*28*4.27535108e2*5.57138900*6.56030300e-1* 32 | DATA1*29*4.42804219e2*5.26380300*4.44545500e-1* 33 | DATA1*30*4.59204375e2*5.01540900*3.23004500e-1* 34 | DATA1*31*4.76866082e2*4.81676300*2.26293000e-1* 35 | DATA1*32*4.95940725e2*4.65088700*1.44058500e-1* 36 | DATA1*33*5.16604922e2*4.51086000*8.86748700e-2* 37 | DATA1*34*5.39066006e2*4.38979000*1.59460900e-2* 38 | DATA1*35*5.63569006e2*4.28605100*1.51654800e-2* 39 | DATA1*36*5.90405625e2*4.19168300*1.43140600e-2* 40 | DATA1*37*6.19925906e2*4.11098300*1.33788000e-2* 41 | DATA1*38*6.52553586e2*4.03982100*1.23767900e-2* 42 | DATA1*39*6.88806563e2*3.97745300*1.13137700e-2* 43 | DATA1*40*7.29324596e2*3.92047600*1.14782000e-2* 44 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 45 | COMMENT*sopra-sa.com/indices.htm* 46 | EOF* 47 | -------------------------------------------------------------------------------- /docs/source/Examples/example_K_and_effective_mass.rst: -------------------------------------------------------------------------------- 1 | KP calculator and effective mass fitting 2 | ======================================== 3 | 4 | .. image:: kp.png 5 | :width: 35% 6 | .. image:: eff_mass_fit.png 7 | :width: 50% 8 | 9 | .. code-block:: Python 10 | 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | from solcore import material 15 | from solcore.constants import electron_mass 16 | from solcore.quantum_mechanics import kp_bands 17 | 18 | # Material parameters 19 | GaAs = material("GaAs")(T=300) 20 | InGaAs = material("InGaAs") 21 | 22 | # As a test, we solve the problem for an intermediate indium composition 23 | InGaAs2 = InGaAs(In=0.15, T=300) 24 | masses = kp_bands(InGaAs2, GaAs, graph=True, fit_effective_mass=True, effective_mass_direction="L", return_so=True) 25 | 26 | comp = np.linspace(0.01, 0.25, 15) 27 | me = [] 28 | mhh = [] 29 | mlh = [] 30 | mso = [] 31 | for i in comp: 32 | InGaAs2 = InGaAs(In=i, T=300) 33 | 34 | # Set graph = True to see the fitting of the bands 35 | c, hh, lh, so, m_eff_c, m_eff_hh, m_eff_lh, m_eff_so = kp_bands(InGaAs2, GaAs, graph=False, fit_effective_mass=True, 36 | effective_mass_direction="L", return_so=True) 37 | 38 | me.append(m_eff_c / electron_mass) 39 | mhh.append(m_eff_hh / electron_mass) 40 | mlh.append(m_eff_lh / electron_mass) 41 | mso.append(m_eff_so / electron_mass) 42 | 43 | print('Effective masses for In = {:2.3}%:'.format(i * 100)) 44 | print('- m_e = {:1.3f} m0'.format(me[-1])) 45 | print('- m_hh = {:1.3f} m0'.format(mhh[-1])) 46 | print('- m_lh = {:1.3f} m0'.format(mlh[-1])) 47 | print('- m_so = {:1.3f} m0'.format(mso[-1])) 48 | print() 49 | 50 | plt.plot(comp * 100, me, 'b-o', label='e') 51 | plt.plot(comp * 100, mhh, 'r-o', label='hh') 52 | plt.plot(comp * 100, mlh, 'g-o', label='lh') 53 | plt.plot(comp * 100, mso, 'k-o', label='so') 54 | 55 | plt.xlabel("Indium content (%)") 56 | plt.ylabel("Effective mass (m$_0$)") 57 | plt.legend() 58 | plt.show() 59 | -------------------------------------------------------------------------------- /docs/source/Optics/tmm.rst: -------------------------------------------------------------------------------- 1 | Transfer matrix method 2 | ====================== 3 | 4 | Example 1: :doc:`Using the TMM solver to calculate the reflextion of a multilayered ARC <../Examples/example_RAT_of_ARC>` 5 | 6 | Example 2: :doc:`Looking at the effect of substrate and the no_back_reflection option in the TMM solver <../Examples/substrate_example>` 7 | 8 | Example 3: :doc:`Coherent and incoherent layers in the TMM solver<../Examples/example_coherency>` 9 | 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | tmm 15 | 16 | 17 | The TMM interface for the solar cell solver 18 | ------------------------------------------- 19 | 20 | This is the method actually called from the solar cell solver, serving as interface between the solar cell and the lower level TMM formalism. 21 | The :doc:`Beer-Lambert calculator `, the :doc:`RCWA calculator ` and the :doc:`external optics calculator ` 22 | (where the user simply adds the reflection and the absorption profile manually) have similar interfaces. 23 | 24 | The TMM solver can handle different input angles and polarizations, specified in the options (specifically, options.theta and options.pol). 25 | The input angle is in degrees, while pol is 's', 'p' or 'u' (computationally, 'u' is simply the average of 's' and 'p' and thus requires 26 | two calculations.) 27 | 28 | Using the default options, all layers (except very thick layers, with the layer thickness more than 10 times the maximum incident wavelength) 29 | will be considered as coherent, i.e. phase information in the wave-optical calculation is retained. However, layers can also be specified to be 30 | incoherent using a coherency_list option with one entry (either 'c' or 'i') per layer. 31 | 32 | .. automodule:: solcore.optics.tmm 33 | :members: 34 | :undoc-members: 35 | 36 | The OptiStack and the high level TMM optical methods 37 | ----------------------------------------------------- 38 | 39 | .. automodule:: solcore.absorption_calculator.transfer_matrix 40 | :members: 41 | :undoc-members: 42 | 43 | Transfer matrix engine 44 | ---------------------- 45 | 46 | .. automodule:: solcore.absorption_calculator.tmm_core_vec 47 | :members: 48 | :undoc-members: 49 | -------------------------------------------------------------------------------- /.spin/cmds.py: -------------------------------------------------------------------------------- 1 | import click 2 | from spin import util 3 | from spin.cmds.meson import _get_site_packages 4 | 5 | 6 | @click.command() 7 | @click.option( 8 | "-test-dep", is_flag=True, help="If to install test dependecies" 9 | ) 10 | @click.option( 11 | "-doc-dep", is_flag=True, help="If to install test dependecies" 12 | ) 13 | def install_dependencies(test_dep=False, doc_dep=False): 14 | """ 15 | Accesses the `pyproject.toml` configuration to retrieve the dependencies 16 | 17 | Parameters 18 | ---------- 19 | test_dep: bool 20 | Flag for installing the test's dependencies 21 | doc_dep: bool 22 | Flag for installing the documentation dependencies 23 | 24 | """ 25 | config = util.get_config() 26 | default_dependencies = config["project"]['dependencies'] 27 | print("Installing dependencies", default_dependencies) 28 | util.run( 29 | ["pip", "install"] + list(default_dependencies), 30 | ) 31 | if test_dep: 32 | test_dependencies = config["project.optional-dependencies"]['test'] 33 | print("Installing test-dependencies", test_dependencies) 34 | util.run( 35 | ["pip", "install"] + list(test_dependencies), 36 | ) 37 | if doc_dep: 38 | doc_dependencies = config["project.optional-dependencies"]['doc'] 39 | print("Installing doc-dependencies", doc_dependencies) 40 | util.run( 41 | ["pip", "install"] + list(doc_dependencies), 42 | ) 43 | 44 | 45 | @click.command() 46 | @click.option( 47 | "--build-dir", default="build", help="Build directory; default is `$PWD/build`" 48 | ) 49 | @click.argument("codecov_args", nargs=-1) 50 | def codecov(build_dir, codecov_args): 51 | """🔧 Run codecov in the build directory 52 | CODECOV_ARGS are passed through directly to codecov, e.g.: 53 | ./dev.py codecov -- -v 54 | 55 | Parameters 56 | ---------- 57 | build_dir: str 58 | Path of the build directory default is `$PWD/build`" 59 | codecov_args: bool 60 | codecov parameters 61 | """ 62 | 63 | site_path = _get_site_packages() 64 | 65 | util.run( 66 | ["codecov"] + list(codecov_args), 67 | cwd=site_path, 68 | ) 69 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/IR3SI5E.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*42* 4 | DATA1*1*1.51201441e2*1.19100000*1.74400000* 5 | DATA1*2*1.53068125e2*1.19700000*1.76800000* 6 | DATA1*3*1.54981477e2*1.20700000*1.79600000* 7 | DATA1*4*1.56943267e2*1.22100000*1.82500000* 8 | DATA1*5*1.58955361e2*1.23900000*1.85300000* 9 | DATA1*6*1.61019716e2*1.26000000*1.88100000* 10 | DATA1*7*1.63138396e2*1.28200000*1.90800000* 11 | DATA1*8*1.65313575e2*1.30700000*1.93300000* 12 | DATA1*9*1.67547542e2*1.33300000*1.95500000* 13 | DATA1*10*1.69842714e2*1.36100000*1.97500000* 14 | DATA1*11*1.72201641e2*1.39200000*1.99500000* 15 | DATA1*12*1.74627016e2*1.42400000*2.01300000* 16 | DATA1*13*1.77121688e2*1.45900000*2.02700000* 17 | DATA1*14*1.79688669e2*1.49500000*2.03700000* 18 | DATA1*15*1.82331149e2*1.53100000*2.04600000* 19 | DATA1*16*1.85052509e2*1.56800000*2.05300000* 20 | DATA1*17*1.87856335e2*1.60400000*2.05700000* 21 | DATA1*18*1.90746433e2*1.64100000*2.05800000* 22 | DATA1*19*1.93726846e2*1.67600000*2.05900000* 23 | DATA1*20*1.96801875e2*1.71000000*2.06200000* 24 | DATA1*21*1.99976099e2*1.74500000*2.06600000* 25 | DATA1*22*2.03254396e2*1.78000000*2.06800000* 26 | DATA1*23*2.06641969e2*1.81700000*2.06700000* 27 | DATA1*24*2.10144375e2*1.85500000*2.06300000* 28 | DATA1*25*2.13767554e2*1.89600000*2.06000000* 29 | DATA1*26*2.17517862e2*1.94000000*2.05700000* 30 | DATA1*27*2.21402109e2*1.98700000*2.05000000* 31 | DATA1*28*2.25427602e2*2.03500000*2.03800000* 32 | DATA1*29*2.29602188e2*2.08400000*2.02200000* 33 | DATA1*30*2.33934304e2*2.13600000*2.00600000* 34 | DATA1*31*2.38433041e2*2.18900000*1.99000000* 35 | DATA1*32*2.43108199e2*2.24000000*1.97500000* 36 | DATA1*33*2.47970363e2*2.28500000*1.96400000* 37 | DATA1*34*2.53030982e2*2.31700000*1.95500000* 38 | DATA1*35*2.58302461e2*2.34200000*1.94700000* 39 | DATA1*36*2.63798258e2*2.36500000*1.93900000* 40 | DATA1*37*2.69533003e2*2.38600000*1.93200000* 41 | DATA1*38*2.75522625e2*2.40100000*1.92500000* 42 | DATA1*39*2.81784503e2*2.41000000*1.92100000* 43 | DATA1*40*2.88337631e2*2.41300000*1.91800000* 44 | DATA1*41*2.95202813e2*2.41000000*1.91700000* 45 | DATA1*42*3.02402881e2*2.40200000*1.91900000* 46 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 47 | COMMENT*sopra-sa.com/indices.htm* 48 | EOF* 49 | -------------------------------------------------------------------------------- /examples/Optical_constants_using_SOPRA_db.py: -------------------------------------------------------------------------------- 1 | """ Quick example code to generate some data from the SOPRA database""" 2 | 3 | from solcore import material 4 | 5 | import numpy as np 6 | import matplotlib.pyplot as plt 7 | 8 | # Initiate some variables... 9 | wl = np.linspace(300, 1800, 1000) 10 | Al_fraction = np.linspace(10, 100, 10) 11 | 12 | f, (ax1, ax2) = plt.subplots(1, 2, figsize=(11.25,4)) 13 | ax1b = ax1.twinx() 14 | 15 | # Load GaAs n and k data from the Sopra database... 16 | GaAs = material("GaAs", sopra=True)(T=300) 17 | GaAs_n = GaAs.n(wl*1e-9) 18 | GaAs_k = GaAs.k(wl*1e-9) 19 | 20 | # Load Ge n and k data from Sopra database... 21 | Ge = material("Ge", sopra=True)(T=300) 22 | Ge_n = Ge.n(wl*1e-9) 23 | Ge_k = Ge.k(wl*1e-9) 24 | 25 | # Load AlGaAs k data for a range of compositions... 26 | AlGaAs = material("AlGaAs", sopra=True) 27 | 28 | AlGaAs_k = [GaAs_k] 29 | 30 | for comp in Al_fraction: 31 | AlGaAs_k.append(AlGaAs(T=300, Al=comp/100).k(wl*1e-9)) 32 | 33 | # Plot the data... 34 | colors = plt.cm.jet(np.linspace(0,1,len(Al_fraction)+1)) 35 | 36 | lns1 = ax1.plot(wl, GaAs_n, 'b', label='n, GaAs') 37 | lns2 = ax1b.plot(wl, GaAs_k, 'r', label='k, GaAs') 38 | 39 | lns3 = ax1.plot(wl, Ge_n, ls="--", color='blue', label='n, Ge') 40 | lns4 = ax1b.plot(wl, Ge_k,ls="--", color='red', label='k, Ge') 41 | 42 | ax1.set_xlim([300,1800]) 43 | ax1b.set_xlim([300,1800]) 44 | ax1b.set_ylim([0, 3.8]) 45 | 46 | # added these three lines 47 | lns = lns1+lns2+lns3+lns4 48 | labs = [l.get_label() for l in lns] 49 | ax1.legend(lns, labs, loc="upper right", frameon=False) 50 | ax1.text(0.05, 0.9, '(a)', transform=ax1.transAxes, fontsize=12) 51 | 52 | ax1.set_xlabel("Wavelength (nm)") 53 | ax1.set_ylabel("Refractive Index, n") 54 | ax1b.set_ylabel("Extinction Coefficient, k") 55 | 56 | for i, k in enumerate(Al_fraction): 57 | ax2.plot(wl, AlGaAs_k[i], color=colors[i+1], label='{}%'.format(int(Al_fraction[i]))) 58 | 59 | ax2.set_xlim([300, 900]) 60 | ax2.set_ylim([0, 2.8]) 61 | 62 | ax2.set_xlabel("Wavelength (nm)") 63 | ax2.set_ylabel("Extinction Coefficient, k") 64 | ax2.legend(loc="upper right", frameon=False) 65 | ax2.text(0.05, 0.9, '(b)', transform=ax2.transAxes, fontsize=12) 66 | plt.tight_layout(w_pad=4) 67 | 68 | plt.show() 69 | 70 | -------------------------------------------------------------------------------- /solcore/smooth.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | 4 | def smooth(x: np.ndarray, window_len: int, window: str = 'hanning', 5 | blurmode: str = "even") -> np.ndarray: 6 | """smooth the data using a window with requested size. 7 | 8 | This method is based on the convolution of a scaled window with the signal. 9 | The signal is prepared by introducing reflected copies of the signal 10 | (with the window size) in both ends so that transient parts are minimized 11 | in the begining and end part of the output signal. 12 | 13 | input: 14 | x: the input signal 15 | window_len: the dimension of the smoothing window; should be an odd integer 16 | window: the type of window from 'flat', 'hanning', 'hamming', 'bartlett', 'blackman' 17 | flat window will produce a moving average smoothing. 18 | 19 | output: 20 | the smoothed signal 21 | 22 | example: 23 | 24 | t=linspace(-2,2,0.1) 25 | x=sin(t)+randn(len(t))*0.1 26 | y=smooth(x) 27 | 28 | see also: 29 | 30 | numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convolve 31 | scipy.signal.lfilter 32 | 33 | TODO: the window parameter could be the window itself if an array instead of a string 34 | """ 35 | 36 | if x.ndim != 1: 37 | raise ValueError("smooth only accepts 1 dimension arrays.") 38 | 39 | if x.size < window_len: 40 | raise ValueError("Input vector needs to be bigger than window size.") 41 | 42 | if window_len < 3: 43 | return x 44 | 45 | if not window in ['flat', 'hanning', 'hamming', 'bartlett', 'blackman']: 46 | raise ValueError("Window should be one of 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'") 47 | 48 | s = np.r_[2 * x[0] - x[window_len - 1::-1], x, 2 * x[-1] - x[-1:-window_len:-1]] 49 | 50 | # print(len(s)) 51 | if window == 'flat': # moving average 52 | w = np.ones(window_len, 'd') 53 | else: 54 | w = eval('numpy.' + window + '(window_len)') 55 | 56 | if blurmode == "right": 57 | w = w[:len(w) / 2] 58 | elif blurmode == "left": 59 | w = w[len(w) / 2:] 60 | 61 | y = np.convolve(w / w.sum(), s, mode='same') 62 | return y[window_len:-window_len + 1] 63 | -------------------------------------------------------------------------------- /solcore/material_data/InGaAs-Material/n/critical_points.txt: -------------------------------------------------------------------------------- 1 | [0.000] 2 | file = 0.000_Strained_InGaAs_n.txt 3 | 1 = 2.397701971058378e-07 1.643453 4 | 2 = 2.5091434889292436e-07 2.6687751311386063 5 | 3 = 2.6091079489735766e-07 3.4842392751664235 6 | 4 = 2.8304578247860277e-07 3.9927775932196785 7 | 5 = 3.2850581073685886e-07 3.4954788278894315 8 | 6 = 4.003850177211172e-07 4.3769033866602305 9 | 7 = 4.091914106297845e-07 4.454564092416867 10 | 8 = 4.301363451152638e-07 5.068375083488723 11 | 9 = 4.5964966189025725e-07 4.685877340942464 12 | 10 = 5.80249417521334e-07 3.965802836089408 13 | 11 = 8.398189512453172e-07 3.655752966915353 14 | 15 | [0.100] 16 | file = 0.100_Strained_InGaAs_n.txt 17 | 1 = 2.397701971058378e-07 1.695632 18 | 2 = 2.516283807503839e-07 2.6614401617187067 19 | 3 = 2.61386816135664e-07 3.4735789757055953 20 | 4 = 2.8399782495521546e-07 3.9933137180471325 21 | 5 = 3.401683310753644e-07 3.5079888396916186 22 | 6 = 4.039551770084148e-07 4.189583621895903 23 | 7 = 4.2609016458965985e-07 4.488618532976771 24 | 8 = 4.4251289731122885e-07 4.961830087166537 25 | 9 = 4.725022353245286e-07 4.627013437917303 26 | 10 = 5.80249417521334e-07 3.961760725092148 27 | 11 = 8.405379804246079e-07 3.634122 28 | 29 | [0.200] 30 | file = 0.200_Strained_InGaAs_n.txt 31 | 1 = 2.453444679550775e-07 2.018242535784303 32 | 2 = 2.530564444653029e-07 2.6374181686456115 33 | 3 = 2.62814879850583e-07 3.435832437456185 34 | 4 = 2.8304578247860277e-07 3.899390765501357 35 | 5 = 3.45166554077581e-07 3.433792419692874 36 | 6 = 4.068113044382529e-07 4.003578536651571 37 | 7 = 4.244240902555877e-07 4.1374884397971 38 | 8 = 4.553654707455002e-07 4.862424975498494 39 | 9 = 4.86782872473719e-07 4.516092699487354 40 | 10 = 5.80249417521334e-07 3.9544219338291717 41 | 11 = 8.405379804246079e-07 3.601192 42 | 43 | [0.240] 44 | file = 0.240_Strained_InGaAs_n.txt 45 | 1 = 2.397701971058378e-07 1.8122 46 | 2 = 2.532944550844561e-07 2.6264756038388937 47 | 3 = 2.640049329463489e-07 3.4402949901916644 48 | 4 = 2.828077718594496e-07 3.8587496897481466 49 | 5 = 3.446905328392746e-07 3.408232887733208 50 | 6 = 4.077633469148656e-07 3.93200994749544 51 | 7 = 4.2537613273220033e-07 4.049081929695399 52 | 8 = 4.6083971498602307e-07 4.809056402758983 53 | 9 = 5.015395308612158e-07 4.40301370965575 54 | 10 = 5.80249417521334e-07 3.960546992077038 55 | 11 = 8.407776568177049e-07 3.5991 56 | 57 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/GAPOX.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*45* 4 | DATA1*1*2.06641969e2*1.82500000*5.33200000e-3* 5 | DATA1*2*2.10144375e2*1.81200000*3.94700000e-3* 6 | DATA1*3*2.13767554e2*1.79900000*2.78900000e-3* 7 | DATA1*4*2.17517862e2*1.78700000*1.83300000e-3* 8 | DATA1*5*2.21402109e2*1.77500000*1.05500000e-3* 9 | DATA1*6*2.25427602e2*1.76400000*4.36000000e-4* 10 | DATA1*7*2.29602188e2*1.75400000*0.00000000* 11 | DATA1*8*2.33934304e2*1.74400000*0.00000000* 12 | DATA1*9*2.38433041e2*1.73400000*0.00000000* 13 | DATA1*10*2.43108199e2*1.72500000*0.00000000* 14 | DATA1*11*2.47970363e2*1.71600000*0.00000000* 15 | DATA1*12*2.53030982e2*1.70700000*0.00000000* 16 | DATA1*13*2.58302461e2*1.69900000*0.00000000* 17 | DATA1*14*2.63798258e2*1.69200000*0.00000000* 18 | DATA1*15*2.69533003e2*1.68400000*0.00000000* 19 | DATA1*16*2.75522625e2*1.67700000*0.00000000* 20 | DATA1*17*2.81784503e2*1.67100000*0.00000000* 21 | DATA1*18*2.88337631e2*1.66400000*0.00000000* 22 | DATA1*19*2.95202813e2*1.65800000*0.00000000* 23 | DATA1*20*3.02402881e2*1.65300000*0.00000000* 24 | DATA1*21*3.09962953e2*1.64700000*0.00000000* 25 | DATA1*22*3.17910721e2*1.64200000*0.00000000* 26 | DATA1*23*3.26276793e2*1.63700000*0.00000000* 27 | DATA1*24*3.35095085e2*1.63300000*0.00000000* 28 | DATA1*25*3.44403281e2*1.62800000*0.00000000* 29 | DATA1*26*3.54243375e2*1.62400000*0.00000000* 30 | DATA1*27*3.64662298e2*1.62000000*0.00000000* 31 | DATA1*28*3.75712671e2*1.61700000*0.00000000* 32 | DATA1*29*3.87453692e2*1.61300000*0.00000000* 33 | DATA1*30*3.99952198e2*1.61000000*0.00000000* 34 | DATA1*31*4.13283938e2*1.60700000*0.00000000* 35 | DATA1*32*4.27535108e2*1.60400000*0.00000000* 36 | DATA1*33*4.42804219e2*1.60100000*0.00000000* 37 | DATA1*34*4.59204375e2*1.59900000*0.00000000* 38 | DATA1*35*4.76866082e2*1.59600000*0.00000000* 39 | DATA1*36*4.95940725e2*1.59400000*0.00000000* 40 | DATA1*37*5.16604922e2*1.59200000*0.00000000* 41 | DATA1*38*5.39066006e2*1.59000000*0.00000000* 42 | DATA1*39*5.63569006e2*1.58900000*0.00000000* 43 | DATA1*40*5.90405625e2*1.58700000*0.00000000* 44 | DATA1*41*6.19925906e2*1.58600000*0.00000000* 45 | DATA1*42*6.52553586e2*1.58400000*0.00000000* 46 | DATA1*43*6.88806563e2*1.58300000*0.00000000* 47 | DATA1*44*7.29324596e2*1.58200000*0.00000000* 48 | DATA1*45*7.74907383e2*1.58100000*0.00000000* 49 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 50 | COMMENT*sopra-sa.com/indices.htm* 51 | EOF* 52 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/GAASOX.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*45* 4 | DATA1*1*2.06641969e2*2.05800000*6.34300000e-1* 5 | DATA1*2*2.10144375e2*2.12700000*6.16900000e-1* 6 | DATA1*3*2.13767554e2*2.19600000*5.81400000e-1* 7 | DATA1*4*2.17517862e2*2.25600000*5.27500000e-1* 8 | DATA1*5*2.21402109e2*2.30200000*4.58700000e-1* 9 | DATA1*6*2.25427602e2*2.32800000*3.81800000e-1* 10 | DATA1*7*2.29602188e2*2.33500000*3.04600000e-1* 11 | DATA1*8*2.33934304e2*2.32400000*2.33700000e-1* 12 | DATA1*9*2.38433041e2*2.30100000*1.73000000e-1* 13 | DATA1*10*2.43108199e2*2.27100000*1.23400000e-1* 14 | DATA1*11*2.47970363e2*2.23700000*8.45200000e-2* 15 | DATA1*12*2.53030982e2*2.20300000*5.47900000e-2* 16 | DATA1*13*2.58302461e2*2.16900000*3.25300000e-2* 17 | DATA1*14*2.63798258e2*2.13800000*1.61700000e-2* 18 | DATA1*15*2.69533003e2*2.10900000*4.34500000e-3* 19 | DATA1*16*2.75522625e2*2.08300000*0.00000000* 20 | DATA1*17*2.81784503e2*2.05800000*0.00000000* 21 | DATA1*18*2.88337631e2*2.03600000*0.00000000* 22 | DATA1*19*2.95202813e2*2.01600000*0.00000000* 23 | DATA1*20*3.02402881e2*1.99800000*0.00000000* 24 | DATA1*21*3.09962953e2*1.98200000*0.00000000* 25 | DATA1*22*3.17910721e2*1.96700000*0.00000000* 26 | DATA1*23*3.26276793e2*1.95300000*0.00000000* 27 | DATA1*24*3.35095085e2*1.94000000*0.00000000* 28 | DATA1*25*3.44403281e2*1.92800000*0.00000000* 29 | DATA1*26*3.54243375e2*1.91800000*0.00000000* 30 | DATA1*27*3.64662298e2*1.90800000*0.00000000* 31 | DATA1*28*3.75712671e2*1.89800000*0.00000000* 32 | DATA1*29*3.87453692e2*1.89000000*0.00000000* 33 | DATA1*30*3.99952198e2*1.88100000*0.00000000* 34 | DATA1*31*4.13283938e2*1.87400000*0.00000000* 35 | DATA1*32*4.27535108e2*1.86700000*0.00000000* 36 | DATA1*33*4.42804219e2*1.86000000*0.00000000* 37 | DATA1*34*4.59204375e2*1.85400000*0.00000000* 38 | DATA1*35*4.76866082e2*1.84800000*0.00000000* 39 | DATA1*36*4.95940725e2*1.84200000*0.00000000* 40 | DATA1*37*5.16604922e2*1.83700000*0.00000000* 41 | DATA1*38*5.39066006e2*1.83200000*0.00000000* 42 | DATA1*39*5.63569006e2*1.82700000*0.00000000* 43 | DATA1*40*5.90405625e2*1.82200000*0.00000000* 44 | DATA1*41*6.19925906e2*1.81700000*0.00000000* 45 | DATA1*42*6.52553586e2*1.81300000*0.00000000* 46 | DATA1*43*6.88806563e2*1.80900000*0.00000000* 47 | DATA1*44*7.29324596e2*1.80500000*0.00000000* 48 | DATA1*45*7.74907383e2*1.80100000*0.00000000* 49 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 50 | COMMENT*sopra-sa.com/indices.htm* 51 | EOF* 52 | -------------------------------------------------------------------------------- /docs/source/Examples/example_pv_module.rst: -------------------------------------------------------------------------------- 1 | Example of a PV solar array 2 | =========================== 3 | 4 | .. image:: IV_solar_module.png 5 | :width: 40% 6 | .. image:: IV_param_dispersion.png 7 | :width: 40% 8 | 9 | .. code-block:: Python 10 | 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | from solcore.solar_cell import SolarCell 15 | from solcore.light_source import LightSource 16 | from solcore.spice.pv_module_solver import solve_pv_module 17 | from solcore.structure import Junction 18 | 19 | T = 298 20 | 21 | # First we define the properties of the MJ solar cell that the solar module is made of. We use junctions of kind 2-diode 22 | db_junction = Junction(kind='2D', T=T, reff=1, jref=300, Eg=0.66, A=1, R_series=0.00236, R_shunt=1e14, n=3.5) 23 | db_junction2 = Junction(kind='2D', T=T, reff=1, jref=300, Eg=1.4, A=1, R_series=0.00012, R_shunt=1e14, n=3.5) 24 | db_junction3 = Junction(kind='2D', T=T, reff=1, jref=300, Eg=1.9, A=1, R_series=8.0e-5, R_shunt=1e14, n=3.5) 25 | 26 | my_solar_cell = SolarCell([db_junction3, db_junction2, db_junction], T=T, R_series=0.0, area=0.1) 27 | 28 | wl = np.linspace(350, 2000, 301) * 1e-9 29 | light_source = LightSource(source_type='standard', version='AM1.5g', x=wl, output_units='photon_flux_per_m', 30 | concentration=1) 31 | 32 | options = {'light_iv': True, 'wavelength': wl, 'light_source': light_source} 33 | 34 | # After defining the individual solar cell, we solve the module IV characteristics adding some dispersion in the 35 | # values of the short circuit currents. 36 | voltage, current, all_Isc_values, raw_data = solve_pv_module(my_solar_cell, options, jscSigma=0.02) 37 | 38 | plt.figure(1) 39 | 40 | plt.subplot(311) 41 | plt.title('Histogram of sub-cell photocurrents') 42 | plt.ylabel('InGaP') 43 | plt.hist(([row[0] for row in all_Isc_values]), bins=20) 44 | 45 | plt.subplot(312) 46 | plt.hist(([row[1] for row in all_Isc_values]), bins=20) 47 | plt.ylabel('GaAs') 48 | 49 | plt.subplot(313) 50 | plt.xlabel('Current (A)') 51 | plt.ylabel('Ge') 52 | plt.hist(([row[2] for row in all_Isc_values]), bins=20) 53 | 54 | plt.figure(2) 55 | plt.plot(voltage, current) 56 | plt.xlabel('Voltage (V)') 57 | plt.ylabel('Current (A)') 58 | plt.xlim(0, 80) 59 | plt.ylim(0, 17) 60 | 61 | plt.show() 62 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/INASOX.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*45* 4 | DATA1*1*2.06641969e2*1.87500000*5.67000000e-1* 5 | DATA1*2*2.10144375e2*1.92100000*5.72600000e-1* 6 | DATA1*3*2.13767554e2*1.97100000*5.69700000e-1* 7 | DATA1*4*2.17517862e2*2.02500000*5.55500000e-1* 8 | DATA1*5*2.21402109e2*2.07900000*5.28400000e-1* 9 | DATA1*6*2.25427602e2*2.12700000*4.87700000e-1* 10 | DATA1*7*2.29602188e2*2.16600000*4.35500000e-1* 11 | DATA1*8*2.33934304e2*2.19200000*3.75600000e-1* 12 | DATA1*9*2.38433041e2*2.20300000*3.13100000e-1* 13 | DATA1*10*2.43108199e2*2.20000000*2.53100000e-1* 14 | DATA1*11*2.47970363e2*2.18600000*1.99100000e-1* 15 | DATA1*12*2.53030982e2*2.16400000*1.52900000e-1* 16 | DATA1*13*2.58302461e2*2.13800000*1.14900000e-1* 17 | DATA1*14*2.63798258e2*2.11000000*8.45200000e-2* 18 | DATA1*15*2.69533003e2*2.08200000*6.07600000e-2* 19 | DATA1*16*2.75522625e2*2.05400000*4.24700000e-2* 20 | DATA1*17*2.81784503e2*2.02800000*2.85800000e-2* 21 | DATA1*18*2.88337631e2*2.00400000*1.81700000e-2* 22 | DATA1*19*2.95202813e2*1.98100000*1.04600000e-2* 23 | DATA1*20*3.02402881e2*1.96000000*4.85300000e-3* 24 | DATA1*21*3.09962953e2*1.94100000*8.55000000e-4* 25 | DATA1*22*3.17910721e2*1.92300000*0.00000000* 26 | DATA1*23*3.26276793e2*1.90700000*0.00000000* 27 | DATA1*24*3.35095085e2*1.89200000*0.00000000* 28 | DATA1*25*3.44403281e2*1.87800000*0.00000000* 29 | DATA1*26*3.54243375e2*1.86500000*0.00000000* 30 | DATA1*27*3.64662298e2*1.85300000*0.00000000* 31 | DATA1*28*3.75712671e2*1.84200000*0.00000000* 32 | DATA1*29*3.87453692e2*1.83200000*0.00000000* 33 | DATA1*30*3.99952198e2*1.82200000*0.00000000* 34 | DATA1*31*4.13283938e2*1.81300000*0.00000000* 35 | DATA1*32*4.27535108e2*1.80500000*0.00000000* 36 | DATA1*33*4.42804219e2*1.79700000*0.00000000* 37 | DATA1*34*4.59204375e2*1.78900000*0.00000000* 38 | DATA1*35*4.76866082e2*1.78200000*0.00000000* 39 | DATA1*36*4.95940725e2*1.77600000*0.00000000* 40 | DATA1*37*5.16604922e2*1.76900000*0.00000000* 41 | DATA1*38*5.39066006e2*1.76300000*0.00000000* 42 | DATA1*39*5.63569006e2*1.75700000*0.00000000* 43 | DATA1*40*5.90405625e2*1.75200000*0.00000000* 44 | DATA1*41*6.19925906e2*1.74600000*0.00000000* 45 | DATA1*42*6.52553586e2*1.74100000*0.00000000* 46 | DATA1*43*6.88806563e2*1.73600000*0.00000000* 47 | DATA1*44*7.29324596e2*1.73100000*0.00000000* 48 | DATA1*45*7.74907383e2*1.72600000*0.00000000* 49 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 50 | COMMENT*sopra-sa.com/indices.htm* 51 | EOF* 52 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/GASBOX.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*45* 4 | DATA1*1*2.06641969e2*1.89400000*9.75300000e-1* 5 | DATA1*2*2.10144375e2*1.93100000*9.76200000e-1* 6 | DATA1*3*2.13767554e2*1.97300000*9.75100000e-1* 7 | DATA1*4*2.17517862e2*2.01900000*9.71100000e-1* 8 | DATA1*5*2.21402109e2*2.07000000*9.62700000e-1* 9 | DATA1*6*2.25427602e2*2.12600000*9.48300000e-1* 10 | DATA1*7*2.29602188e2*2.18600000*9.25900000e-1* 11 | DATA1*8*2.33934304e2*2.24900000*8.93300000e-1* 12 | DATA1*9*2.38433041e2*2.31300000*8.48400000e-1* 13 | DATA1*10*2.43108199e2*2.37400000*7.89600000e-1* 14 | DATA1*11*2.47970363e2*2.42700000*7.17000000e-1* 15 | DATA1*12*2.53030982e2*2.46800000*6.32200000e-1* 16 | DATA1*13*2.58302461e2*2.49200000*5.39500000e-1* 17 | DATA1*14*2.63798258e2*2.49800000*4.44700000e-1* 18 | DATA1*15*2.69533003e2*2.48600000*3.53800000e-1* 19 | DATA1*16*2.75522625e2*2.45800000*2.71700000e-1* 20 | DATA1*17*2.81784503e2*2.42000000*2.01500000e-1* 21 | DATA1*18*2.88337631e2*2.37600000*1.44100000e-1* 22 | DATA1*19*2.95202813e2*2.32900000*9.88800000e-2* 23 | DATA1*20*3.02402881e2*2.28300000*6.45000000e-2* 24 | DATA1*21*3.09962953e2*2.23900000*3.91200000e-2* 25 | DATA1*22*3.17910721e2*2.19900000*2.09200000e-2* 26 | DATA1*23*3.26276793e2*2.16200000*8.31200000e-3* 27 | DATA1*24*3.35095085e2*2.12900000*0.00000000* 28 | DATA1*25*3.44403281e2*2.10000000*0.00000000* 29 | DATA1*26*3.54243375e2*2.07400000*0.00000000* 30 | DATA1*27*3.64662298e2*2.05200000*0.00000000* 31 | DATA1*28*3.75712671e2*2.03300000*0.00000000* 32 | DATA1*29*3.87453692e2*2.01600000*0.00000000* 33 | DATA1*30*3.99952198e2*2.00200000*0.00000000* 34 | DATA1*31*4.13283938e2*1.99000000*0.00000000* 35 | DATA1*32*4.27535108e2*1.97900000*0.00000000* 36 | DATA1*33*4.42804219e2*1.97100000*0.00000000* 37 | DATA1*34*4.59204375e2*1.96300000*0.00000000* 38 | DATA1*35*4.76866082e2*1.95700000*0.00000000* 39 | DATA1*36*4.95940725e2*1.95300000*0.00000000* 40 | DATA1*37*5.16604922e2*1.94900000*0.00000000* 41 | DATA1*38*5.39066006e2*1.94600000*0.00000000* 42 | DATA1*39*5.63569006e2*1.94400000*0.00000000* 43 | DATA1*40*5.90405625e2*1.94200000*0.00000000* 44 | DATA1*41*6.19925906e2*1.94100000*0.00000000* 45 | DATA1*42*6.52553586e2*1.94100000*0.00000000* 46 | DATA1*43*6.88806563e2*1.94100000*0.00000000* 47 | DATA1*44*7.29324596e2*1.94200000*0.00000000* 48 | DATA1*45*7.74907383e2*1.94300000*0.00000000* 49 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 50 | COMMENT*sopra-sa.com/indices.htm* 51 | EOF* 52 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/INPOX.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*45* 4 | DATA1*1*2.06641969e2*1.53700000*1.36700000e-1* 5 | DATA1*2*2.10144375e2*1.54200000*1.24000000e-1* 6 | DATA1*3*2.13767554e2*1.54500000*1.11800000e-1* 7 | DATA1*4*2.17517862e2*1.54700000*1.00200000e-1* 8 | DATA1*5*2.21402109e2*1.54800000*8.92900000e-2* 9 | DATA1*6*2.25427602e2*1.54900000*7.91500000e-2* 10 | DATA1*7*2.29602188e2*1.54900000*6.97600000e-2* 11 | DATA1*8*2.33934304e2*1.54800000*6.11300000e-2* 12 | DATA1*9*2.38433041e2*1.54600000*5.32300000e-2* 13 | DATA1*10*2.43108199e2*1.54500000*4.60300000e-2* 14 | DATA1*11*2.47970363e2*1.54300000*3.95100000e-2* 15 | DATA1*12*2.53030982e2*1.54100000*3.36200000e-2* 16 | DATA1*13*2.58302461e2*1.53800000*2.83300000e-2* 17 | DATA1*14*2.63798258e2*1.53600000*2.35900000e-2* 18 | DATA1*15*2.69533003e2*1.53400000*1.93500000e-2* 19 | DATA1*16*2.75522625e2*1.53100000*1.55900000e-2* 20 | DATA1*17*2.81784503e2*1.52900000*1.22600000e-2* 21 | DATA1*18*2.88337631e2*1.52700000*9.33600000e-3* 22 | DATA1*19*2.95202813e2*1.52400000*6.77300000e-3* 23 | DATA1*20*3.02402881e2*1.52200000*4.54500000e-3* 24 | DATA1*21*3.09962953e2*1.52000000*2.62400000e-3* 25 | DATA1*22*3.17910721e2*1.51800000*9.83000000e-4* 26 | DATA1*23*3.26276793e2*1.51600000*0.00000000* 27 | DATA1*24*3.35095085e2*1.51400000*0.00000000* 28 | DATA1*25*3.44403281e2*1.51200000*0.00000000* 29 | DATA1*26*3.54243375e2*1.51000000*0.00000000* 30 | DATA1*27*3.64662298e2*1.50900000*0.00000000* 31 | DATA1*28*3.75712671e2*1.50700000*0.00000000* 32 | DATA1*29*3.87453692e2*1.50600000*0.00000000* 33 | DATA1*30*3.99952198e2*1.50400000*0.00000000* 34 | DATA1*31*4.13283938e2*1.50300000*0.00000000* 35 | DATA1*32*4.27535108e2*1.50200000*0.00000000* 36 | DATA1*33*4.42804219e2*1.50100000*0.00000000* 37 | DATA1*34*4.59204375e2*1.50000000*0.00000000* 38 | DATA1*35*4.76866082e2*1.49900000*0.00000000* 39 | DATA1*36*4.95940725e2*1.49800000*0.00000000* 40 | DATA1*37*5.16604922e2*1.49700000*0.00000000* 41 | DATA1*38*5.39066006e2*1.49600000*0.00000000* 42 | DATA1*39*5.63569006e2*1.49600000*0.00000000* 43 | DATA1*40*5.90405625e2*1.49500000*0.00000000* 44 | DATA1*41*6.19925906e2*1.49500000*0.00000000* 45 | DATA1*42*6.52553586e2*1.49400000*0.00000000* 46 | DATA1*43*6.88806563e2*1.49400000*0.00000000* 47 | DATA1*44*7.29324596e2*1.49300000*0.00000000* 48 | DATA1*45*7.74907383e2*1.49300000*0.00000000* 49 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 50 | COMMENT*sopra-sa.com/indices.htm* 51 | EOF* 52 | -------------------------------------------------------------------------------- /examples/Schrodinger_QW_absorption.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | 4 | from solcore import si, material 5 | from solcore.structure import Layer, Structure 6 | import solcore.quantum_mechanics as QM 7 | from solcore.constants import vacuum_permittivity, q 8 | 9 | # First we create the materials we need 10 | bulk = material("GaAs")(T=293, strained=False) 11 | barrier = material("GaAsP")(T=293, P=0.1, strained=True) 12 | 13 | # As well as some of the layers 14 | top_layer = Layer(width=si("30nm"), material=bulk) 15 | inter = Layer(width=si("3nm"), material=bulk) 16 | barrier_layer = Layer(width=si("15nm"), material=barrier) 17 | bottom_layer = top_layer 18 | 19 | # We are going to calculate the absorption coefficient of InGaAs QWs of fixed thickness but different compositions 20 | num_comp = 5 21 | comp = np.linspace(0.05, 0.25, num_comp) 22 | colors = plt.cm.jet(np.linspace(0, 1, num_comp)) 23 | 24 | # The absorption coefficients will be calculated at these energies and stored in alfas 25 | num_energy = 300 26 | E = np.linspace(1.15, 1.5, num_energy) * q 27 | 28 | # We define some parameters need to calculate the shape of the excitonic absorption 29 | alpha_params = { 30 | "well_width": si("7.2nm"), 31 | "theta": 0, 32 | "eps": 12.9 * vacuum_permittivity, 33 | "espace": E, 34 | "hwhm": si("6meV"), 35 | "dimensionality": 0.16, 36 | "line_shape": "Gauss" 37 | } 38 | 39 | # plt.figure(figsize=(4, 4.5)) 40 | for j, i in enumerate(comp): 41 | # We create the QW material at the given composition 42 | QW = material("InGaAs")(T=293, In=i, strained=True) 43 | 44 | # And the layer 45 | well_layer = Layer(width=si("7.2nm"), material=QW) 46 | 47 | # The following lines create the QW structure, with different number of QWs and interlayers 48 | test_structure = Structure([barrier_layer, inter, well_layer, inter, barrier_layer], substrate=bulk) 49 | 50 | # Finally, the quantum properties are claculated here 51 | output = QM.schrodinger(test_structure, quasiconfined=0, num_eigenvalues=20, alpha_params=alpha_params, 52 | calculate_absorption=True) 53 | 54 | alfa = output[0]['alphaE'](E) 55 | plt.plot(1240 / (E / q), alfa / 100, label='{}%'.format(int(i * 100))) 56 | 57 | plt.xlim(826, 1100) 58 | plt.ylim(0, 23000) 59 | plt.xlabel('Wavelength (nm)') 60 | plt.ylabel('$\\alpha$ cm$^{-1}$') 61 | plt.legend(loc='upper right', frameon=False) 62 | plt.tight_layout() 63 | 64 | plt.show() 65 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/FESI2EL1.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*46* 4 | DATA1*1*1.37761313e2*6.28000000e-1*1.39000000* 5 | DATA1*2*1.39309192e2*6.00000000e-1*1.41000000* 6 | DATA1*3*1.40892251e2*5.69000000e-1*1.43200000* 7 | DATA1*4*1.42511703e2*5.58000000e-1*1.46000000* 8 | DATA1*5*1.44168815e2*5.60000000e-1*1.49200000* 9 | DATA1*6*1.45864919e2*5.60000000e-1*1.52200000* 10 | DATA1*7*1.47601406e2*5.62000000e-1*1.55600000* 11 | DATA1*8*1.49379736e2*5.73000000e-1*1.59600000* 12 | DATA1*9*1.51201441e2*5.84000000e-1*1.64000000* 13 | DATA1*10*1.53068125e2*5.94000000e-1*1.68500000* 14 | DATA1*11*1.54981477e2*6.04000000e-1*1.73100000* 15 | DATA1*12*1.56943267e2*6.14000000e-1*1.77500000* 16 | DATA1*13*1.58955361e2*6.33000000e-1*1.81700000* 17 | DATA1*14*1.61019716e2*6.67000000e-1*1.85800000* 18 | DATA1*15*1.63138396e2*7.04000000e-1*1.90000000* 19 | DATA1*16*1.65313575e2*7.27000000e-1*1.94200000* 20 | DATA1*17*1.67547542e2*7.35000000e-1*1.98400000* 21 | DATA1*18*1.69842714e2*7.44000000e-1*2.02800000* 22 | DATA1*19*1.72201641e2*7.61000000e-1*2.07200000* 23 | DATA1*20*1.74627016e2*7.86000000e-1*2.11500000* 24 | DATA1*21*1.77121688e2*8.13000000e-1*2.15700000* 25 | DATA1*22*1.79688669e2*8.43000000e-1*2.19900000* 26 | DATA1*23*1.82331149e2*8.76000000e-1*2.24200000* 27 | DATA1*24*1.85052509e2*9.11000000e-1*2.28700000* 28 | DATA1*25*1.87856335e2*9.49000000e-1*2.33400000* 29 | DATA1*26*1.90746433e2*9.87000000e-1*2.38100000* 30 | DATA1*27*1.93726846e2*1.02300000*2.42900000* 31 | DATA1*28*1.96801875e2*1.05900000*2.47700000* 32 | DATA1*29*1.99976099e2*1.10200000*2.52400000* 33 | DATA1*30*2.03254396e2*1.15300000*2.57300000* 34 | DATA1*31*2.06641969e2*1.21200000*2.62300000* 35 | DATA1*32*2.10144375e2*1.27800000*2.67600000* 36 | DATA1*33*2.13767554e2*1.34700000*2.73000000* 37 | DATA1*34*2.17517862e2*1.42000000*2.78300000* 38 | DATA1*35*2.21402109e2*1.49900000*2.83100000* 39 | DATA1*36*2.25427602e2*1.58900000*2.87400000* 40 | DATA1*37*2.29602188e2*1.69000000*2.91000000* 41 | DATA1*38*2.33934304e2*1.80100000*2.93800000* 42 | DATA1*39*2.38433041e2*1.91700000*2.95900000* 43 | DATA1*40*2.43108199e2*2.03600000*2.97500000* 44 | DATA1*41*2.47970363e2*2.15700000*2.98400000* 45 | DATA1*42*2.53030982e2*2.27600000*2.97700000* 46 | DATA1*43*2.58302461e2*2.38600000*2.94500000* 47 | DATA1*44*2.63798258e2*2.47800000*2.89200000* 48 | DATA1*45*2.69533003e2*2.54200000*2.82700000* 49 | DATA1*46*2.75522625e2*2.56700000*2.76000000* 50 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 51 | COMMENT*sopra-sa.com/indices.htm* 52 | EOF* 53 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/INSBOX.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*45* 4 | DATA1*1*2.06641969e2*1.80500000*8.51000000e-1* 5 | DATA1*2*2.10144375e2*1.83100000*8.62000000e-1* 6 | DATA1*3*2.13767554e2*1.86100000*8.72500000e-1* 7 | DATA1*4*2.17517862e2*1.89400000*8.81900000e-1* 8 | DATA1*5*2.21402109e2*1.93100000*8.89600000e-1* 9 | DATA1*6*2.25427602e2*1.97200000*8.94800000e-1* 10 | DATA1*7*2.29602188e2*2.01800000*8.96300000e-1* 11 | DATA1*8*2.33934304e2*2.06800000*8.92900000e-1* 12 | DATA1*9*2.38433041e2*2.12100000*8.83000000e-1* 13 | DATA1*10*2.43108199e2*2.17700000*8.65300000e-1* 14 | DATA1*11*2.47970363e2*2.23500000*8.38100000e-1* 15 | DATA1*12*2.53030982e2*2.29100000*8.00400000e-1* 16 | DATA1*13*2.58302461e2*2.34300000*7.52100000e-1* 17 | DATA1*14*2.63798258e2*2.38700000*6.93900000e-1* 18 | DATA1*15*2.69533003e2*2.42100000*6.27900000e-1* 19 | DATA1*16*2.75522625e2*2.44300000*5.57100000e-1* 20 | DATA1*17*2.81784503e2*2.45300000*4.85300000e-1* 21 | DATA1*18*2.88337631e2*2.45000000*4.16000000e-1* 22 | DATA1*19*2.95202813e2*2.43600000*3.51700000e-1* 23 | DATA1*20*3.02402881e2*2.41500000*2.94500000e-1* 24 | DATA1*21*3.09962953e2*2.38800000*2.45100000e-1* 25 | DATA1*22*3.17910721e2*2.35800000*2.03500000e-1* 26 | DATA1*23*3.26276793e2*2.32700000*1.69200000e-1* 27 | DATA1*24*3.35095085e2*2.29500000*1.41400000e-1* 28 | DATA1*25*3.44403281e2*2.26400000*1.19100000e-1* 29 | DATA1*26*3.54243375e2*2.23500000*1.01600000e-1* 30 | DATA1*27*3.64662298e2*2.20800000*8.79400000e-2* 31 | DATA1*28*3.75712671e2*2.18200000*7.74200000e-2* 32 | DATA1*29*3.87453692e2*2.15900000*6.94300000e-2* 33 | DATA1*30*3.99952198e2*2.13700000*6.34700000e-2* 34 | DATA1*31*4.13283938e2*2.11800000*5.91100000e-2* 35 | DATA1*32*4.27535108e2*2.10000000*5.60200000e-2* 36 | DATA1*33*4.42804219e2*2.08400000*5.39200000e-2* 37 | DATA1*34*4.59204375e2*2.06900000*5.25800000e-2* 38 | DATA1*35*4.76866082e2*2.05600000*5.18400000e-2* 39 | DATA1*36*4.95940725e2*2.04400000*5.15500000e-2* 40 | DATA1*37*5.16604922e2*2.03300000*5.15900000e-2* 41 | DATA1*38*5.39066006e2*2.02297500*5.18400000e-2* 42 | DATA1*39*5.63569006e2*2.01390100*5.21780000e-2* 43 | DATA1*40*5.90405625e2*2.00575000*5.24860000e-2* 44 | DATA1*41*6.19925906e2*1.99850000*5.26420000e-2* 45 | DATA1*42*6.52553586e2*1.99212600*5.25250000e-2* 46 | DATA1*43*6.88806563e2*1.98660200*5.20170000e-2* 47 | DATA1*44*7.29324596e2*1.98190000*5.09950000e-2* 48 | DATA1*45*7.74907383e2*1.97800000*4.93400000e-2* 49 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 50 | COMMENT*sopra-sa.com/indices.htm* 51 | EOF* 52 | -------------------------------------------------------------------------------- /examples/coherency_example.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | from solcore import material, si 5 | 6 | from solcore.solar_cell import SolarCell, Layer, Junction 7 | from solcore.solar_cell_solver import solar_cell_solver 8 | from solcore.state import State 9 | 10 | GaInP = material("GaInP")(In=0.5) 11 | GaAs = material("GaAs")() 12 | Ge = material("Ge")() 13 | 14 | optical_struct = SolarCell( 15 | [ 16 | Layer(material=GaInP, width=si("5000nm")), 17 | Junction( 18 | [ 19 | Layer(material=GaAs, width=si("200nm")), 20 | Layer(material=GaAs, width=si("5um")), 21 | ], 22 | kind="DA", 23 | ), 24 | Layer(material=Ge, width=si("50um")), 25 | ] 26 | ) 27 | 28 | wl = np.linspace(250, 1700, 300) * 1e-9 29 | 30 | options = State() 31 | options.wavelength = wl 32 | options.optics_method = "TMM" 33 | options.no_back_reflection = False 34 | options.BL_correction = True 35 | options.recalculate_absorption = True 36 | options.positions = [1e-8, 1e-9, 1e-8, 1e-7] 37 | options.theta = 0 38 | 39 | 40 | c_list = [ 41 | ["c", "c", "c", "c"], 42 | ["c", "c", "c", "i"], 43 | ["c", "i", "i", "c"], 44 | ["i", "i", "i", "i"], 45 | ] 46 | 47 | titles = [ 48 | "All coherent", 49 | "Bottom Ge layer explicity incoherent", 50 | "Both layers of GaAs junction incoherent", 51 | "All layers incoherent", 52 | ] 53 | 54 | for i1, cl in enumerate(c_list): 55 | plt.figure(i1) 56 | options.coherency_list = cl 57 | solar_cell_solver(optical_struct, "optics", options) 58 | plt.plot(wl * 1e9, optical_struct[0].layer_absorption) 59 | plt.plot(wl * 1e9, optical_struct[1].layer_absorption) 60 | plt.plot(wl * 1e9, optical_struct[2].layer_absorption) 61 | plt.plot(wl * 1e9, optical_struct.reflected, "--") 62 | plt.plot(wl * 1e9, optical_struct.transmitted, "--") 63 | plt.plot( 64 | wl * 1e9, 65 | optical_struct[0].layer_absorption 66 | + optical_struct[1].layer_absorption 67 | + optical_struct[2].layer_absorption 68 | + optical_struct.reflected 69 | + optical_struct.transmitted, 70 | ) 71 | plt.legend(["GaInP", "GaAs", "Ge", "R", "T", "R+A+T"], loc="upper left") 72 | plt.title(titles[i1]) 73 | plt.xlabel("Wavelength (nm)") 74 | plt.show() 75 | 76 | # plt.figure(1) 77 | # plt.plot(np.linspace(0, 3000, 100), 78 | # optical_struct[1].absorbed(np.linspace(0, 3000, 100)*1e-9)[:,0]) 79 | # plt.show() 80 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | build-backend = 'mesonpy' 3 | requires = [ 4 | 'meson-python', 5 | 'numpy', 6 | 'cython' 7 | ] 8 | 9 | [project] 10 | name = 'solcore' 11 | description= "Python-based solar cell simulator" 12 | readme = "README.md" 13 | license = {file = "GNU-LGPL.txt"} 14 | requires-python = ">=3.9" 15 | keywords = ["photovoltaics", "modelling", "physics"] 16 | authors = [ 17 | {name = "The Quantum Photovoltaics Group", email = "nekins@unsw.edu.au"} 18 | ] 19 | classifiers=[ 20 | "Development Status :: 5 - Production/Stable", 21 | "Intended Audience :: Science/Research", 22 | "License :: OSI Approved", 23 | "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", 24 | "Natural Language :: English", 25 | "Operating System :: OS Independent", 26 | "Programming Language :: Python", 27 | "Programming Language :: Python :: 3", 28 | "Topic :: Scientific/Engineering", 29 | "Topic :: Scientific/Engineering :: Physics", 30 | ] 31 | dependencies = [ 32 | "numpy>=2.0.0", 33 | "matplotlib", 34 | "scipy", 35 | "tmm", 36 | "natsort", 37 | "regex", 38 | "cycler", 39 | "pyyaml", 40 | "yabox", 41 | "joblib", 42 | "solsesame==2.1a1", 43 | ] 44 | dynamic = ["version"] 45 | 46 | [project.urls] 47 | homepage = "https://www.solcore.solar/" 48 | documentation = "http://solcore5.readthedocs.io" 49 | repository = "https://github.com/qpv-research-group/solcore5" 50 | changelog = "https://github.com/me/spam/blob/master/CHANGELOG.md" 51 | 52 | 53 | [project.optional-dependencies] 54 | test = [ 55 | "pytest", 56 | "pytest-cov", 57 | "pytest-mock", 58 | "nbconvert", 59 | "nbformat", 60 | "pytest-rerunfailures", 61 | "pytest-xdist", 62 | ] 63 | doc = ["Sphinx", "recommonmark"] 64 | 65 | dev = ["pre-commit"] 66 | 67 | [tool.spin] 68 | package = 'solcore' 69 | 70 | [tool.spin.commands] 71 | "Build" = ["spin.cmds.meson.build", "spin.cmds.meson.test"] 72 | "Extensions" = ['.spin/cmds.py:codecov', '.spin/cmds.py:install_dependencies'] 73 | 74 | [tool.pytest.ini_options] 75 | addopts = "--cov=solcore --cov-report=html:htmlcov -p no:warnings -n \"auto\" -v" 76 | 77 | [tool.isort] 78 | line_length = 88 79 | multi_line_output = 3 80 | include_trailing_comma = true 81 | 82 | [tool.flake8] 83 | max-line-length = 88 84 | exclude = ".venv/" 85 | extend-ignore = ["E203"] 86 | 87 | [tool.mypy] 88 | ignore_missing_imports = true 89 | 90 | [tool.mypy-setup] 91 | ignore_errors = true -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | *.dSYM 9 | 10 | # Distribution / packaging 11 | .Python 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | pip-wheel-metadata/ 25 | share/python-wheels/ 26 | *.egg-info/ 27 | .installed.cfg 28 | *.egg 29 | MANIFEST 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov 43 | .tox/ 44 | .nox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *.cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | 63 | # Flask stuff: 64 | instance/ 65 | .webassets-cache 66 | 67 | # Scrapy stuff: 68 | .scrapy 69 | 70 | # Sphinx documentation 71 | docs/_build/ 72 | 73 | # PyBuilder 74 | target/ 75 | 76 | # Jupyter Notebook 77 | .ipynb_checkpoints 78 | 79 | # IPython 80 | profile_default/ 81 | ipython_config.py 82 | 83 | # pyenv 84 | .python-version 85 | 86 | # pipenv 87 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 88 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 89 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 90 | # install all needed dependencies. 91 | #Pipfile.lock 92 | 93 | # celery beat schedule file 94 | celerybeat-schedule 95 | 96 | # SageMath parsed files 97 | *.sage.py 98 | 99 | # Environments 100 | .env 101 | .venv 102 | env/ 103 | venv/ 104 | ENV/ 105 | env.bak/ 106 | venv.bak/ 107 | 108 | # Spyder project settings 109 | .spyderproject 110 | .spyproject 111 | 112 | # Rope project settings 113 | .ropeproject 114 | 115 | # mkdocs documentation 116 | /site 117 | 118 | # mypy 119 | .mypy_cache/ 120 | .dmypy.json 121 | dmypy.json 122 | 123 | # Pyre type checker 124 | .pyre/ 125 | 126 | # JetBrains IDE files 127 | .idea/ 128 | 129 | # VS Code 130 | .vscode/ 131 | 132 | # macOS 133 | .DS_Store 134 | 135 | # meson 136 | .mesonpy-native-file.ini -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/FESI2EPI.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*49* 4 | DATA1*1*2.47970363e2*2.01900000*2.88800000* 5 | DATA1*2*2.53030982e2*2.10300000*2.91200000* 6 | DATA1*3*2.58302461e2*2.21700000*2.92400000* 7 | DATA1*4*2.63798258e2*2.31700000*2.93400000* 8 | DATA1*5*2.69533003e2*2.42600000*2.92800000* 9 | DATA1*6*2.75522625e2*2.51300000*2.91100000* 10 | DATA1*7*2.81784503e2*2.62700000*2.91800000* 11 | DATA1*8*2.88337631e2*2.72900000*2.87400000* 12 | DATA1*9*2.95202813e2*2.81100000*2.84100000* 13 | DATA1*10*3.02402881e2*2.89500000*2.80200000* 14 | DATA1*11*3.09962953e2*2.97300000*2.76700000* 15 | DATA1*12*3.17910721e2*3.05200000*2.71800000* 16 | DATA1*13*3.26276793e2*3.12000000*2.66500000* 17 | DATA1*14*3.35095085e2*3.17600000*2.60000000* 18 | DATA1*15*3.44403281e2*3.20700000*2.54900000* 19 | DATA1*16*3.54243375e2*3.23500000*2.50600000* 20 | DATA1*17*3.64662298e2*3.25800000*2.47500000* 21 | DATA1*18*3.75712671e2*3.27700000*2.45000000* 22 | DATA1*19*3.87453692e2*3.29500000*2.43900000* 23 | DATA1*20*3.99952198e2*3.31900000*2.43900000* 24 | DATA1*21*4.13283938e2*3.35200000*2.43600000* 25 | DATA1*22*4.27535108e2*3.36900000*2.45000000* 26 | DATA1*23*4.42804219e2*3.40100000*2.48100000* 27 | DATA1*24*4.59204375e2*3.46800000*2.51900000* 28 | DATA1*25*4.76866082e2*3.53600000*2.53900000* 29 | DATA1*26*4.95940725e2*3.59100000*2.56300000* 30 | DATA1*27*5.16604922e2*3.64600000*2.60600000* 31 | DATA1*28*5.39066006e2*3.74400000*2.66900000* 32 | DATA1*29*5.63569006e2*3.86300000*2.72600000* 33 | DATA1*30*5.90405625e2*3.99800000*2.77500000* 34 | DATA1*31*6.19925906e2*4.19100000*2.85400000* 35 | DATA1*32*6.52553586e2*4.45100000*2.83400000* 36 | DATA1*33*6.88806563e2*4.69100000*2.74000000* 37 | DATA1*34*7.29324596e2*4.87400000*2.61800000* 38 | DATA1*35*7.74907383e2*5.03300000*2.48600000* 39 | DATA1*36*8.26567875e2*5.21700000*2.32400000* 40 | DATA1*37*8.85608438e2*5.37800000*2.17800000* 41 | DATA1*38*9.53732164e2*5.58300000*2.02100000* 42 | DATA1*39*1.03320984e3*5.79200000*1.82100000* 43 | DATA1*40*1.12713801e3*5.97900000*1.56900000* 44 | DATA1*41*1.23985181e3*6.27300000*1.21000000* 45 | DATA1*42*1.37761313e3*6.79200000*2.58000000e-1* 46 | DATA1*43*1.54981477e3*6.42000000*1.50000000e-2* 47 | DATA1*44*1.77121688e3*6.16400000*0.00000000* 48 | DATA1*45*2.06641969e3*5.98300000*0.00000000* 49 | DATA1*46*2.47970363e3*5.85000000*0.00000000* 50 | DATA1*47*3.09962953e3*5.75800000*0.00000000* 51 | DATA1*48*4.13283938e3*5.72600000*0.00000000* 52 | DATA1*49*6.19925906e3*5.70600000*0.00000000* 53 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 54 | COMMENT*sopra-sa.com/indices.htm* 55 | EOF* 56 | -------------------------------------------------------------------------------- /docs/source/Installation/compilation.md: -------------------------------------------------------------------------------- 1 | # Fortran Compilers 2 | 3 | In order to use the Poisson-Drift-diffusion solver, it will be necessary to have a suitable fortran compiler installed and correctly configured in your system. After that, you do not need to worry about the compilation process: it is done automatically by the installation script. 4 | 5 | ## Linux 6 | 7 | Most Linux systems have a Fortran compiler already installed, typically part of GCC, the GNU compiler collection. If not, you will need to check how to install it for your particular linux distribution. 8 | 9 | ## Mac OS X 10 | 11 | For Mac OS X we have used the *gfortran* compiler installed together with GCC using [Homebrew](https://brew.sh), a MacOS package manager. 12 | 13 | ```brew install gcc``` 14 | 15 | Other package managers like [MacPorts](https://www.macports.org) or [Fink](http://www.finkproject.org) might also work, but we have not tried. 16 | 17 | There is currently a known issue involving the compilation of the PDD solver on new Macs with M1/ARM/Apple silicon chips. 18 | The homebrew version of gfortran (installed above alongside gcc as indicated above) does not work. For a workaround please 19 | see [here](https://github.com/qpv-research-group/solcore5/issues/209). 20 | 21 | ## Windows 22 | 23 | To get a Fortran compiler properly working under Windows with F2Py, we have followed the [detailed instructions written by Michael Hirsch](https://www.scivision.co/f2py-running-fortran-code-in-python-on-windows/). Read Michael Hirsch's instructions in full for a complete picture, but the important bits are: 24 | 25 | 1. Install [MSYS2 and MinGW](https://www.scivision.co/install-msys2-windows) 26 | 27 | Follow the instructions there to update all packages and to setup your environment. 28 | 29 | 2. Install the fortran compiler executing from the PowerShell: 30 | 31 | ```bash 32 | pacman -S mingw-w64-x86_64-gcc-fortran 33 | ```` 34 | 35 | 3. Tell Python to use MinGW: create file ```~/pydistutils.cfg``` containing: 36 | 37 | ``` 38 | [build] 39 | compiler=mingw32 40 | ``` 41 | 42 | You can do this executing in the PowerShell 43 | 44 | ```bash 45 | echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg 46 | ```` 47 | 48 | And that should be it. With this, your will be able to call the gfortran compiler from the Windows terminal and also the Solcore installer should be able to find it. You can try installing Solcore itself or with the *lowtran* package described in the instructions by [Michael Hirsch](https://www.scivision.co/f2py-running-fortran-code-in-python-on-windows/). -------------------------------------------------------------------------------- /docs/source/Examples/example_RAT_of_ARC.rst: -------------------------------------------------------------------------------- 1 | Using the TMM solver to calculate the reflection of a multilayered ARC 2 | ====================================================================== 3 | 4 | .. image:: RAT_of_ARC.png 5 | :width: 100% 6 | 7 | .. code-block:: Python 8 | 9 | import matplotlib.pyplot as plt 10 | import numpy as np 11 | from solcore.solar_cell import Layer 12 | from solcore.absorption_calculator import calculate_rat, OptiStack 13 | from solcore import material, si 14 | 15 | wl = np.linspace(300, 1900, 1000) 16 | 17 | MgF2 = material("MgF2")() 18 | HfO2 = material("HfO2")() 19 | ZnS = material("ZnScub")() 20 | AlInP = material("AlInP")(Al=0.52) 21 | GaInP = material("GaInP")(In=0.49) 22 | 23 | stack = OptiStack([ 24 | Layer(si('141nm'), material=MgF2), 25 | Layer(si('82nm'), material=HfO2), 26 | Layer(si('70nm'), material=ZnS), 27 | Layer(si('25nm'), material=AlInP), 28 | ], substrate=GaInP, no_back_reflection=False) 29 | 30 | angles = np.linspace(0, 80, 10) 31 | RAT_angles = np.zeros((len(angles), 3, len(wl))) 32 | 33 | print("Calculate RAT:") 34 | for i, theta in enumerate(angles): 35 | print("Calculating at angle: %4.1f deg" % theta) 36 | # Calculate RAT data... 37 | rat_data = calculate_rat(stack, angle=theta, wavelength=wl, 38 | no_back_reflection=False) 39 | 40 | RAT_angles[i] = [rat_data["R"], rat_data["A"], rat_data["T"]] 41 | 42 | colors = plt.cm.jet(np.linspace(1, 0, len(RAT_angles))) 43 | 44 | fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 4)) 45 | 46 | for i, RAT in enumerate(RAT_angles): 47 | if i == 0: 48 | ax1.plot(wl, RAT[0] * 100, ls="-", color=colors[i], label="R") 49 | ax1.plot(wl, (RAT[1] + RAT[2]) * 100, ls="--", color=colors[i], label="A+T") 50 | 51 | else: 52 | ax1.plot(wl, RAT[0] * 100, ls="-", color=colors[i]) 53 | ax1.plot(wl, (RAT[1] + RAT[2]) * 100, ls="--", color=colors[i]) 54 | 55 | ax2.plot(wl, RAT[1]*100, color=colors[i], label="%4.1f$^\circ$" % angles[i]) 56 | 57 | ax1.set_ylim([0, 100]) 58 | ax1.set_xlim([300, 1800]) 59 | ax1.set_xlabel("Wavelength (nm)") 60 | ax1.set_ylabel("Reflection and transmission into structure (%)") 61 | ax1.legend(loc=5) 62 | 63 | ax2.set_ylim([0, 100]) 64 | ax2.set_xlim([300, 1800]) 65 | ax2.set_xlabel("Wavelength (nm)") 66 | ax2.set_ylabel("Absorption in surface layers (%)") 67 | ax2.legend(loc=5) 68 | 69 | plt.tight_layout() 70 | plt.show() -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/LASF9.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*50* 4 | DATA1*1*2.10144375e2*2.44455439*0.00000000* 5 | DATA1*2*2.13767554e2*2.40727247*0.00000000* 6 | DATA1*3*2.17517862e2*2.37198851*0.00000000* 7 | DATA1*4*2.21402109e2*2.33860538*0.00000000* 8 | DATA1*5*2.25427602e2*2.30702923*0.00000000* 9 | DATA1*6*2.29602188e2*2.27716963*0.00000000* 10 | DATA1*7*2.33934304e2*2.24893960*0.00000000* 11 | DATA1*8*2.38433041e2*2.22225567*0.00000000* 12 | DATA1*9*2.43108199e2*2.19703793*0.00000000* 13 | DATA1*10*2.47970363e2*2.17320994*0.00000000* 14 | DATA1*11*2.53030982e2*2.15069882*0.00000000* 15 | DATA1*12*2.58302461e2*2.12943512*0.00000000* 16 | DATA1*13*2.63798258e2*2.10935280*0.00000000* 17 | DATA1*14*2.69533003e2*2.09038917*0.00000000* 18 | DATA1*15*2.75522625e2*2.07248475*0.00000000* 19 | DATA1*16*2.81784503e2*2.05558322*0.00000000* 20 | DATA1*17*2.88337631e2*2.03963128*0.00000000* 21 | DATA1*18*2.95202813e2*2.02457851*0.00000000* 22 | DATA1*19*3.02402881e2*2.01037731*0.00000000* 23 | DATA1*20*3.09962953e2*1.99698268*0.00000000* 24 | DATA1*21*3.17910721e2*1.98435217*0.00000000* 25 | DATA1*22*3.26276793e2*1.97244566*0.00000000* 26 | DATA1*23*3.35095085e2*1.96122529*0.00000000* 27 | DATA1*24*3.44403281e2*1.95065530*0.00000000* 28 | DATA1*25*3.54243375e2*1.94070189*0.00000000* 29 | DATA1*26*3.64662298e2*1.93133311*0.00000000* 30 | DATA1*27*3.75712671e2*1.92251869*0.00000000* 31 | DATA1*28*3.87453692e2*1.91422997*0.00000000* 32 | DATA1*29*3.99952198e2*1.90643978*0.00000000* 33 | DATA1*30*4.13283938e2*1.89912226*0.00000000* 34 | DATA1*31*4.27535108e2*1.89225285*0.00000000* 35 | DATA1*32*4.42804219e2*1.88580810*0.00000000* 36 | DATA1*33*4.59204375e2*1.87976563*0.00000000* 37 | DATA1*34*4.76866082e2*1.87410397*0.00000000* 38 | DATA1*35*4.95940725e2*1.86880251*0.00000000* 39 | DATA1*36*5.16604922e2*1.86384139*0.00000000* 40 | DATA1*37*5.39066006e2*1.85920132*0.00000000* 41 | DATA1*38*5.63569006e2*1.85486357*0.00000000* 42 | DATA1*39*5.90405625e2*1.85080969*0.00000000* 43 | DATA1*40*6.19925906e2*1.84702144*0.00000000* 44 | DATA1*41*6.52553586e2*1.84348049*0.00000000* 45 | DATA1*42*6.88806563e2*1.84016814*0.00000000* 46 | DATA1*43*7.29324596e2*1.83706487*0.00000000* 47 | DATA1*44*7.74907383e2*1.83414977*0.00000000* 48 | DATA1*45*8.26567875e2*1.83139961*0.00000000* 49 | DATA1*46*8.85608438e2*1.82878754*0.00000000* 50 | DATA1*47*9.53732164e2*1.82628099*0.00000000* 51 | DATA1*48*1.03320984e3*1.82383832*0.00000000* 52 | DATA1*49*1.12713801e3*1.82140330*0.00000000* 53 | DATA1*50*1.23985181e3*1.81889545*0.00000000* 54 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 55 | COMMENT*sopra-sa.com/indices.htm* 56 | EOF* 57 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/SF11.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*50* 4 | DATA1*1*2.10144375e2*3.21752615*0.00000000* 5 | DATA1*2*2.13767554e2*3.08620188*0.00000000* 6 | DATA1*3*2.17517862e2*2.96460485*0.00000000* 7 | DATA1*4*2.21402109e2*2.85233989*0.00000000* 8 | DATA1*5*2.25427602e2*2.74899781*0.00000000* 9 | DATA1*6*2.29602188e2*2.65415564*0.00000000* 10 | DATA1*7*2.33934304e2*2.56737754*0.00000000* 11 | DATA1*8*2.38433041e2*2.48821651*0.00000000* 12 | DATA1*9*2.43108199e2*2.41621674*0.00000000* 13 | DATA1*10*2.47970363e2*2.35091667*0.00000000* 14 | DATA1*11*2.53030982e2*2.29185258*0.00000000* 15 | DATA1*12*2.58302461e2*2.23856256*0.00000000* 16 | DATA1*13*2.63798258e2*2.19059065*0.00000000* 17 | DATA1*14*2.69533003e2*2.14749099*0.00000000* 18 | DATA1*15*2.75522625e2*2.10883175*0.00000000* 19 | DATA1*16*2.81784503e2*2.07419868*0.00000000* 20 | DATA1*17*2.88337631e2*2.04319816*0.00000000* 21 | DATA1*18*2.95202813e2*2.01545960*0.00000000* 22 | DATA1*19*3.02402881e2*1.99063732*0.00000000* 23 | DATA1*20*3.09962953e2*1.96841161*0.00000000* 24 | DATA1*21*3.17910721e2*1.94848931*0.00000000* 25 | DATA1*22*3.26276793e2*1.93060372*0.00000000* 26 | DATA1*23*3.35095085e2*1.91451415*0.00000000* 27 | DATA1*24*3.44403281e2*1.90000493*0.00000000* 28 | DATA1*25*3.54243375e2*1.88688419*0.00000000* 29 | DATA1*26*3.64662298e2*1.87498242*0.00000000* 30 | DATA1*27*3.75712671e2*1.86415076*0.00000000* 31 | DATA1*28*3.87453692e2*1.85425935*0.00000000* 32 | DATA1*29*3.99952198e2*1.84519554*0.00000000* 33 | DATA1*30*4.13283938e2*1.83686212*0.00000000* 34 | DATA1*31*4.27535108e2*1.82917562*0.00000000* 35 | DATA1*32*4.42804219e2*1.82206472*0.00000000* 36 | DATA1*33*4.59204375e2*1.81546863*0.00000000* 37 | DATA1*34*4.76866082e2*1.80933569*0.00000000* 38 | DATA1*35*4.95940725e2*1.80362204*0.00000000* 39 | DATA1*36*5.16604922e2*1.79829038*0.00000000* 40 | DATA1*37*5.39066006e2*1.79330884*0.00000000* 41 | DATA1*38*5.63569006e2*1.78865001*0.00000000* 42 | DATA1*39*5.90405625e2*1.78428995*0.00000000* 43 | DATA1*40*6.19925906e2*1.78020742*0.00000000* 44 | DATA1*41*6.52553586e2*1.77638300*0.00000000* 45 | DATA1*42*6.88806563e2*1.77279839*0.00000000* 46 | DATA1*43*7.29324596e2*1.76943558*0.00000000* 47 | DATA1*44*7.74907383e2*1.76627599*0.00000000* 48 | DATA1*45*8.26567875e2*1.76329946*0.00000000* 49 | DATA1*46*8.85608438e2*1.76048283*0.00000000* 50 | DATA1*47*9.53732164e2*1.75779801*0.00000000* 51 | DATA1*48*1.03320984e3*1.75520898*0.00000000* 52 | DATA1*49*1.12713801e3*1.75266686*0.00000000* 53 | DATA1*50*1.23985181e3*1.75010156*0.00000000* 54 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 55 | COMMENT*sopra-sa.com/indices.htm* 56 | EOF* 57 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/IR3SI5P.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*50* 4 | DATA1*1*2.25427602e2*1.92200000*1.97400000* 5 | DATA1*2*2.29602188e2*1.94800000*2.04700000* 6 | DATA1*3*2.33934304e2*1.96500000*2.05000000* 7 | DATA1*4*2.38433041e2*1.99600000*2.04800000* 8 | DATA1*5*2.43108199e2*2.02400000*2.04400000* 9 | DATA1*6*2.47970363e2*2.05600000*2.04300000* 10 | DATA1*7*2.53030982e2*2.08500000*2.04100000* 11 | DATA1*8*2.58302461e2*2.10800000*2.04200000* 12 | DATA1*9*2.63798258e2*2.13900000*2.05600000* 13 | DATA1*10*2.69533003e2*2.16900000*2.05900000* 14 | DATA1*11*2.75522625e2*2.19600000*2.07100000* 15 | DATA1*12*2.81784503e2*2.22700000*2.08100000* 16 | DATA1*13*2.88337631e2*2.25900000*2.09900000* 17 | DATA1*14*2.95202813e2*2.30300000*2.11700000* 18 | DATA1*15*3.02402881e2*2.33600000*2.13400000* 19 | DATA1*16*3.09962953e2*2.38200000*2.15000000* 20 | DATA1*17*3.17910721e2*2.42000000*2.16600000* 21 | DATA1*18*3.26276793e2*2.46900000*2.18400000* 22 | DATA1*19*3.35095085e2*2.52300000*2.20500000* 23 | DATA1*20*3.44403281e2*2.58100000*2.22600000* 24 | DATA1*21*3.54243375e2*2.66400000*2.26900000* 25 | DATA1*22*3.64662298e2*2.75200000*2.27200000* 26 | DATA1*23*3.75712671e2*2.79200000*2.27800000* 27 | DATA1*24*3.87453692e2*2.85500000*2.28600000* 28 | DATA1*25*3.99952198e2*2.96400000*2.30300000* 29 | DATA1*26*4.13283938e2*3.06400000*2.30400000* 30 | DATA1*27*4.27535108e2*3.15100000*2.28200000* 31 | DATA1*28*4.42804219e2*3.23600000*2.23400000* 32 | DATA1*29*4.59204375e2*3.37700000*2.19300000* 33 | DATA1*30*4.76866082e2*3.42400000*2.12500000* 34 | DATA1*31*4.95940725e2*3.47600000*2.06300000* 35 | DATA1*32*5.16604922e2*3.52900000*2.00200000* 36 | DATA1*33*5.39066006e2*3.55400000*1.93800000* 37 | DATA1*34*5.63569006e2*3.57300000*1.88000000* 38 | DATA1*35*5.90405625e2*3.58000000*1.84600000* 39 | DATA1*36*6.19925906e2*3.58100000*1.81300000* 40 | DATA1*37*6.52553586e2*3.57400000*1.78000000* 41 | DATA1*38*6.88806563e2*3.55800000*1.77500000* 42 | DATA1*39*7.29324596e2*3.56400000*1.78200000* 43 | DATA1*40*7.74907383e2*3.55100000*1.82400000* 44 | DATA1*41*8.26567875e2*3.56400000*1.89200000* 45 | DATA1*42*8.85608438e2*3.64100000*2.00600000* 46 | DATA1*43*9.53732164e2*3.71700000*2.07600000* 47 | DATA1*44*1.03320984e3*3.76400000*2.09200000* 48 | DATA1*45*1.12713801e3*3.81000000*2.10900000* 49 | DATA1*46*1.23985181e3*3.84300000*2.14200000* 50 | DATA1*47*1.37761313e3*3.90200000*2.17200000* 51 | DATA1*48*1.54981477e3*3.91200000*2.26300000* 52 | DATA1*49*1.77121688e3*3.93800000*2.26700000* 53 | DATA1*50*2.06641969e3*3.93900000*2.67500000* 54 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 55 | COMMENT*sopra-sa.com/indices.htm* 56 | EOF* 57 | -------------------------------------------------------------------------------- /docs/source/Structures/structure.rst: -------------------------------------------------------------------------------- 1 | Structures and support classes 2 | ============================== 3 | 4 | While Solcore is mostly about physics, it also needs a lot of tools that keep everiting working together properly or that support the creation and management of solar cell structure. Here you can find (some) information about all those extra bits and pieces Solcore is made of. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | structure 10 | 11 | Structure 12 | --------- 13 | 14 | Solcore calculates optical and electrical properties of solar cells or, in other words, of a certain combination of layers made of different materials and serving to specific purposes. The *structure* module contains tha basic building blocks that allow you to make a solar cell structure and calculate their properties. Their use will be explained with examples in other packages - such as in the quantum efficiency calculator or the Poisson-drift-diffusion solver. 15 | 16 | .. automodule:: solcore.structure 17 | :members: 18 | :undoc-members: 19 | 20 | Another, very useful class is the *state_object* which makes the use of dictionaries very easy. 21 | 22 | .. automodule:: solcore.state 23 | :members: 24 | :undoc-members: 25 | 26 | Solar Cells 27 | ----------- 28 | 29 | Finally, the higher level building block of solar cells is contained in the *solar_cell* module. 30 | 31 | .. automodule:: solcore.solar_cell 32 | :members: 33 | :undoc-members: 34 | 35 | Science tracker 36 | --------------- 37 | 38 | Solcore is an original work, but the equations it implements and the data it uses have been often published elsewere. The Science tracker allows you to keep track of those references and check yourself their origin and assumpions. 39 | 40 | .. automodule:: solcore.science_tracker 41 | :members: 42 | :undoc-members: 43 | 44 | Other classes 45 | ------------- 46 | 47 | Solcore depends on many other classes and functions that work in the background and keep everything together. Some of them are used directly, others are completely transparent but make Solcore work they way it does. Unfortunately, their documentation is not very extensive or explicit, so feel free to explore the source code to understand what they are doing and how. 48 | 49 | .. automodule:: solcore.interpolate 50 | :members: 51 | :undoc-members: 52 | 53 | .. automodule:: solcore.crystals 54 | :members: 55 | :undoc-members: 56 | 57 | .. automodule:: solcore.smooth 58 | :members: 59 | :undoc-members: 60 | 61 | .. automodule:: solcore.singleton 62 | :members: 63 | :undoc-members: 64 | 65 | .. automodule:: solcore.source_managed_class 66 | :members: 67 | :undoc-members: 68 | 69 | -------------------------------------------------------------------------------- /examples/custom_materials_example.py: -------------------------------------------------------------------------------- 1 | from solcore import material 2 | from solcore import si 3 | from solcore.material_system import create_new_material 4 | from solcore.absorption_calculator import create_nk_txt, download_db, search_db 5 | import matplotlib.pyplot as plt 6 | import numpy as np 7 | 8 | """ 9 | When adding custom materials - or getting the refractive index database - the 10 | information will be stored in the Solcore's users folder. These can be setup by setting 11 | the SOLCORE_USER_DATA environmental variable to your prefered location or, by default, 12 | it will be in your home directory, in a directory called .solcore. 13 | """ 14 | 15 | """ 16 | EXAMPLE 1 17 | 18 | need to have n and k data, and a parameter file in the correct format - 19 | see examples of parameter files in e.g. material_data/Adachi/binaries.txt 20 | 21 | create a new material, silicon-germanium-tin, from input files. Here, 22 | the parameters in SiGeSn_params.txt have been copied directly from Ge. 23 | """ 24 | 25 | create_new_material('SiGeSn', 'data/SiGeSn_n.txt', 'data/SiGeSn_k.txt', 'data/SiGeSn_params.txt') 26 | 27 | # Note that the final argument, the parameter file, is optional - if you do not 28 | # provide it, a material will be added with optical constants only, so it can be 29 | # used for optical calculations. 30 | 31 | # can now create an instance of it like any Solcore material 32 | SiGeSn = material('SiGeSn')() 33 | 34 | plt.figure() 35 | plt.plot(si(np.arange(300, 1700, 5), 'nm')*1e9, SiGeSn.n(si(np.arange(300, 1700, 5), 'nm'))) 36 | plt.plot(si(np.arange(300, 1700, 5), 'nm')*1e9, SiGeSn.k(si(np.arange(300, 1700, 5), 'nm'))) 37 | 38 | plt.xlabel('Wavelength (nm)') 39 | plt.ylabel('SiGeSn n / k') 40 | 41 | plt.show() 42 | 43 | """ 44 | EXAMPLE 2 45 | Can also create a Solcore material from a material in the refractiveindex.info database: 46 | if necessary, download database: 47 | (Uncomment lines below to run this part of the example!) 48 | """ 49 | # 50 | # download_db() 51 | # 52 | # # search what options are available for diamond, then use the first result's pageid to 53 | # # create data files for the n & k of diamond: 54 | # 55 | # results = search_db('Diamond') 56 | # create_nk_txt(pageid=results[0][0], file='C_Diamond') 57 | # create_new_material(mat_name = 'Diamond', n_source='C_Diamond_n.txt', k_source='C_Diamond_k.txt') 58 | # 59 | # Diamond = material('Diamond')() 60 | # 61 | # plt.figure() 62 | # plt.plot(si(np.arange(100, 800, 5), 'nm')*1e9, Diamond.n(si(np.arange(100, 800, 5), 'nm'))) 63 | # plt.plot(si(np.arange(100, 800, 5), 'nm')*1e9, Diamond.k(si(np.arange(100, 800, 5), 'nm'))) 64 | # 65 | # plt.xlabel('Wavelength (nm)') 66 | # plt.ylabel('Diamond n / k') 67 | # 68 | # plt.show() 69 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/SIAM2.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*51* 4 | DATA1*1*2.06641969e2*1.05350300*2.81350400* 5 | DATA1*2*2.10144375e2*1.11590100*2.83300100* 6 | DATA1*3*2.13767554e2*1.17690000*2.85920000* 7 | DATA1*4*2.17517862e2*1.23860000*2.91450000* 8 | DATA1*5*2.21402109e2*1.30310000*2.98130000* 9 | DATA1*6*2.25427602e2*1.37250000*3.04200000* 10 | DATA1*7*2.29602188e2*1.44530000*3.10310000* 11 | DATA1*8*2.33934304e2*1.52790000*3.16450000* 12 | DATA1*9*2.38433041e2*1.61620000*3.22680000* 13 | DATA1*10*2.43108199e2*1.71220000*3.28810000* 14 | DATA1*11*2.47970363e2*1.81440000*3.34550000* 15 | DATA1*12*2.53030982e2*1.92780000*3.40540000* 16 | DATA1*13*2.58302461e2*2.04870000*3.46080000* 17 | DATA1*14*2.63798258e2*2.18190000*3.51290000* 18 | DATA1*15*2.69533003e2*2.32450000*3.55990000* 19 | DATA1*16*2.75522625e2*2.47970000*3.60120000* 20 | DATA1*17*2.81784503e2*2.64530000*3.63290000* 21 | DATA1*18*2.88337631e2*2.82550000*3.65420000* 22 | DATA1*19*2.95202813e2*3.01780000*3.66160000* 23 | DATA1*20*3.02402881e2*3.21990000*3.65070000* 24 | DATA1*21*3.09962953e2*3.43110000*3.61690000* 25 | DATA1*22*3.17910721e2*3.53930000*3.59110000* 26 | DATA1*23*3.26276793e2*3.86810000*3.47590000* 27 | DATA1*24*3.35095085e2*4.08180000*3.35880000* 28 | DATA1*25*3.44403281e2*4.28360000*3.21700000* 29 | DATA1*26*3.54243375e2*4.46970000*3.04610000* 30 | DATA1*27*3.64662298e2*4.63000000*2.85420000* 31 | DATA1*28*3.75712671e2*4.76640000*2.64350000* 32 | DATA1*29*3.87453692e2*4.87280000*2.42370000* 33 | DATA1*30*3.99952198e2*4.94820000*2.19880000* 34 | DATA1*31*4.13283938e2*4.99760000*1.97390000* 35 | DATA1*32*4.27535108e2*5.01850000*1.75650000* 36 | DATA1*33*4.42804219e2*5.01840000*1.54730000* 37 | DATA1*34*4.59204375e2*4.99880000*1.34830000* 38 | DATA1*35*4.76866082e2*4.96230000*1.16380000* 39 | DATA1*36*4.95940725e2*4.91350000*9.91100000e-1* 40 | DATA1*37*5.16604922e2*4.85400000*8.31300000e-1* 41 | DATA1*38*5.39066006e2*4.78330000*6.85700000e-1* 42 | DATA1*39*5.63569006e2*4.70770000*5.50200000e-1* 43 | DATA1*40*5.90405625e2*4.62870000*4.18000000e-1* 44 | DATA1*41*6.19925906e2*4.54890000*2.86900000e-1* 45 | DATA1*42*6.52553586e2*4.46600000*1.59000000e-1* 46 | DATA1*43*6.88806563e2*4.39570000*4.32000000e-2* 47 | DATA1*44*7.29324596e2*4.33470000*5.80000000e-3* 48 | DATA1*45*7.74907383e2*4.27790000*0.00000000* 49 | DATA1*46*8.26567875e2*4.22610000*0.00000000* 50 | DATA1*47*8.85608438e2*4.18600000*0.00000000* 51 | DATA1*48*9.53732164e2*4.16500000*0.00000000* 52 | DATA1*49*1.03320984e3*4.11000000*0.00000000* 53 | DATA1*50*1.12713801e3*4.09400000*0.00000000* 54 | DATA1*51*1.23985181e3*4.05400000*0.00000000* 55 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 56 | COMMENT*sopra-sa.com/indices.htm* 57 | EOF* 58 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/ALON.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*53* 4 | DATA1*1*3.99952198e2*1.81245300*0.00000000* 5 | DATA1*2*4.06508791e2*1.81134500*0.00000000* 6 | DATA1*3*4.13283938e2*1.81009700*0.00000000* 7 | DATA1*4*4.20288750e2*1.80873600*0.00000000* 8 | DATA1*5*4.27535108e2*1.80728600*0.00000000* 9 | DATA1*6*4.35035724e2*1.80577400*0.00000000* 10 | DATA1*7*4.42804219e2*1.80422500*0.00000000* 11 | DATA1*8*4.50855205e2*1.80266500*0.00000000* 12 | DATA1*9*4.59204375e2*1.80112000*0.00000000* 13 | DATA1*10*4.67868609e2*1.79961500*0.00000000* 14 | DATA1*11*4.76866082e2*1.79817600*0.00000000* 15 | DATA1*12*4.86216397e2*1.79682900*0.00000000* 16 | DATA1*13*4.95940725e2*1.79559900*0.00000000* 17 | DATA1*14*5.06061964e2*1.79451200*0.00000000* 18 | DATA1*15*5.16604922e2*1.79359400*0.00000000* 19 | DATA1*16*5.27596516e2*1.79284600*0.00000000* 20 | DATA1*17*5.39066006e2*1.79236600*0.00000000* 21 | DATA1*18*5.51045250e2*1.79232500*0.00000000* 22 | DATA1*19*5.63569006e2*1.79249800*0.00000000* 23 | DATA1*20*5.76675262e2*1.79282200*0.00000000* 24 | DATA1*21*5.90405625e2*1.79297300*0.00000000* 25 | DATA1*22*6.04805762e2*1.79250900*0.00000000* 26 | DATA1*23*6.19925906e2*1.79171900*0.00000000* 27 | DATA1*24*6.35821443e2*1.79074100*0.00000000* 28 | DATA1*25*6.52553586e2*1.78958200*0.00000000* 29 | DATA1*26*6.70190169e2*1.78828000*0.00000000* 30 | DATA1*27*6.88806563e2*1.78687600*0.00000000* 31 | DATA1*28*7.08486750e2*1.78540800*0.00000000* 32 | DATA1*29*7.29324596e2*1.78391700*0.00000000* 33 | DATA1*30*7.51425341e2*1.78244200*0.00000000* 34 | DATA1*31*7.74907383e2*1.78102200*0.00000000* 35 | DATA1*32*7.99904395e2*1.77943100*0.00000000* 36 | DATA1*33*8.26567875e2*1.77850500*0.00000000* 37 | DATA1*34*8.55070216e2*1.77955600*0.00000000* 38 | DATA1*35*8.85608438e2*1.78093100*0.00000000* 39 | DATA1*36*9.18408750e2*1.78141200*0.00000000* 40 | DATA1*37*9.53732164e2*1.78099900*0.00000000* 41 | DATA1*38*9.91881450e2*1.77884900*0.00000000* 42 | DATA1*39*1.03320984e3*1.77628100*0.00000000* 43 | DATA1*40*1.07813201e3*1.77451600*0.00000000* 44 | DATA1*41*1.12713801e3*1.77301100*0.00000000* 45 | DATA1*42*1.18081125e3*1.77168000*0.00000000* 46 | DATA1*43*1.23985181e3*1.77037300*0.00000000* 47 | DATA1*44*1.30510717e3*1.76886500*0.00000000* 48 | DATA1*45*1.37761313e3*1.76729400*0.00000000* 49 | DATA1*46*1.45864919e3*1.76582600*0.00000000* 50 | DATA1*47*1.54981477e3*1.76415400*0.00000000* 51 | DATA1*48*1.65313575e3*1.76198100*0.00000000* 52 | DATA1*49*1.77121688e3*1.75944400*0.00000000* 53 | DATA1*50*1.90746433e3*1.75672300*0.00000000* 54 | DATA1*51*2.06641969e3*1.75339500*0.00000000* 55 | DATA1*52*2.25427602e3*1.74918900*0.00000000* 56 | DATA1*53*2.47970363e3*1.74383400*0.00000000* 57 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 58 | COMMENT*sopra-sa.com/indices.htm* 59 | EOF* 60 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/HFO2.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*53* 4 | DATA1*1*2.50000000e2*2.12220000*0.00000000* 5 | DATA1*2*2.62500000e2*2.10482500*0.00000000* 6 | DATA1*3*2.75000000e2*2.08870000*0.00000000* 7 | DATA1*4*2.87500000e2*2.07377500*0.00000000* 8 | DATA1*5*3.00000000e2*2.06000000*0.00000000* 9 | DATA1*6*3.12500000e2*2.04734400*0.00000000* 10 | DATA1*7*3.25000000e2*2.03570000*0.00000000* 11 | DATA1*8*3.37500000e2*2.02496300*0.00000000* 12 | DATA1*9*3.50000000e2*2.01510000*0.00000000* 13 | DATA1*10*3.62500000e2*2.00608800*0.00000000* 14 | DATA1*11*3.75000000e2*1.99780000*0.00000000* 15 | DATA1*12*3.87500000e2*1.99010000*0.00000000* 16 | DATA1*13*4.00000000e2*1.98300000*0.00000000* 17 | DATA1*14*4.12500000e2*1.97650000*0.00000000* 18 | DATA1*15*4.25000000e2*1.97050000*0.00000000* 19 | DATA1*16*4.37500000e2*1.96490000*0.00000000* 20 | DATA1*17*4.50000000e2*1.95970000*0.00000000* 21 | DATA1*18*4.62500000e2*1.95488100*0.00000000* 22 | DATA1*19*4.75000000e2*1.95040000*0.00000000* 23 | DATA1*20*4.87500000e2*1.94620600*0.00000000* 24 | DATA1*21*5.00000000e2*1.94230000*0.00000000* 25 | DATA1*22*5.12500000e2*1.93868100*0.00000000* 26 | DATA1*23*5.25000000e2*1.93530000*0.00000000* 27 | DATA1*24*5.37500000e2*1.93210000*0.00000000* 28 | DATA1*25*5.50000000e2*1.92910000*0.00000000* 29 | DATA1*26*5.62500000e2*1.92631200*0.00000000* 30 | DATA1*27*5.75000000e2*1.92370000*0.00000000* 31 | DATA1*28*5.87500000e2*1.92123100*0.00000000* 32 | DATA1*29*6.00000000e2*1.91890000*0.00000000* 33 | DATA1*30*6.12500000e2*1.91668800*0.00000000* 34 | DATA1*31*6.25000000e2*1.91460000*0.00000000* 35 | DATA1*32*6.37500000e2*1.91265000*0.00000000* 36 | DATA1*33*6.50000000e2*1.91080000*0.00000000* 37 | DATA1*34*6.62500000e2*1.90900000*0.00000000* 38 | DATA1*35*6.75000000e2*1.90730000*0.00000000* 39 | DATA1*36*6.87500000e2*1.90575600*0.00000000* 40 | DATA1*37*7.00000000e2*1.90430000*0.00000000* 41 | DATA1*38*7.12500000e2*1.90286900*0.00000000* 42 | DATA1*39*7.25000000e2*1.90150000*0.00000000* 43 | DATA1*40*7.37500000e2*1.90021900*0.00000000* 44 | DATA1*41*7.50000000e2*1.89900000*0.00000000* 45 | DATA1*42*7.62500000e2*1.89782500*0.00000000* 46 | DATA1*43*7.75000000e2*1.89670000*0.00000000* 47 | DATA1*44*7.87500000e2*1.89562500*0.00000000* 48 | DATA1*45*8.00000000e2*1.89460000*0.00000000* 49 | DATA1*46*8.12500000e2*1.89363100*0.00000000* 50 | DATA1*47*8.25000000e2*1.89270000*0.00000000* 51 | DATA1*48*8.37500000e2*1.89177500*0.00000000* 52 | DATA1*49*8.50000000e2*1.89090000*0.00000000* 53 | DATA1*50*8.62500000e2*1.89013100*0.00000000* 54 | DATA1*51*8.75000000e2*1.88940000*0.00000000* 55 | DATA1*52*8.87500000e2*1.88866900*0.00000000* 56 | DATA1*53*9.00000000e2*1.88790000*0.00000000* 57 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 58 | COMMENT*sopra-sa.com/indices.htm* 59 | EOF* 60 | -------------------------------------------------------------------------------- /docs/source/Examples/custom_materials_example.rst: -------------------------------------------------------------------------------- 1 | Setting up the options for and defining custom materials 2 | ======================================================== 3 | 4 | .. image:: SiGeSn_nk.png 5 | :width: 40% 6 | .. image:: Diamond_nk.png 7 | :width: 40% 8 | 9 | 10 | .. code-block:: Python 11 | 12 | from solcore import material 13 | from solcore import si 14 | from solcore.material_system import create_new_material 15 | from solcore.absorption_calculator import create_nk_txt, download_db, search_db 16 | from solcore.config_tools import add_source 17 | import matplotlib.pyplot as plt 18 | import numpy as np 19 | import os 20 | 21 | # When adding custom materials - or getting the refractive index database - the 22 | # information will be stored in the Solcore's users folder. These can be setup by setting 23 | # the SOLCORE_USER_DATA environmental variable to your prefered location or, by default, 24 | # it will be in your home directory, in a directory called .solcore. 25 | 26 | # EXAMPLE 1 27 | 28 | # need to have n and k data, and a parameter file in the correct format - 29 | # see examples of parameter files in e.g. material_data/Adachi/binaries.txt 30 | 31 | # create a new material, silicon-germanium-tin, from input files. Here, 32 | # the parameters in SiGeSn_params.txt have been copied directly from Ge. 33 | create_new_material('SiGeSn', 'SiGeSn_n.txt', 'SiGeSn_k.txt', 'SiGeSn_params.txt') 34 | 35 | # Note that the final argument, the parameter file, is optional - if you do not 36 | # provide it, a material will be added with optical constants only, so it can be 37 | # used for optical calculations. 38 | 39 | # can now create an instance of it like any Solcore material 40 | SiGeSn = material('SiGeSn')() 41 | 42 | plt.figure() 43 | plt.plot(si(np.arange(300, 1700, 5), 'nm')*1e9, SiGeSn.n(si(np.arange(300, 1700, 5), 'nm'))) 44 | plt.plot(si(np.arange(300, 1700, 5), 'nm')*1e9, SiGeSn.k(si(np.arange(300, 1700, 5), 'nm'))) 45 | plt.show() 46 | 47 | # EXAMPLE 2 48 | # Can also create a Solcore material from a material in the refractiveindex.info database: 49 | 50 | # if necessary, download database: 51 | download_db() 52 | 53 | # search what options are available for diamond, then use the first result's pageid to 54 | # create data files for the n & k of diamond: 55 | 56 | results = search_db('Diamond') 57 | create_nk_txt(pageid=results[0][0], file='C_Diamond') 58 | create_new_material(mat_name = 'Diamond', n_source='C_Diamond_n.txt', k_source='C_Diamond_k.txt') 59 | 60 | Diamond = material('Diamond')() 61 | 62 | plt.figure() 63 | plt.plot(si(np.arange(100, 800, 5), 'nm')*1e9, Diamond.n(si(np.arange(100, 800, 5), 'nm'))) 64 | plt.plot(si(np.arange(100, 800, 5), 'nm')*1e9, Diamond.k(si(np.arange(100, 800, 5), 'nm'))) 65 | plt.show() 66 | -------------------------------------------------------------------------------- /examples/notebooks/Tunnel_junction.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import matplotlib.pyplot as plt" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "from solcore.structure import TunnelJunction\n", 19 | "from solcore.solar_cell_solver import default_options\n", 20 | "from solcore.analytic_solar_cells import parametric_tunnel_junction" 21 | ] 22 | }, 23 | { 24 | "cell_type": "markdown", 25 | "metadata": {}, 26 | "source": [ 27 | "We define the tunnel junction and solve its properties" 28 | ] 29 | }, 30 | { 31 | "cell_type": "code", 32 | "execution_count": null, 33 | "metadata": {}, 34 | "outputs": [], 35 | "source": [ 36 | "tunnel = TunnelJunction(v_peak=0.2, j_peak=100, v_valley=0.9, j_valley=10, prefactor=10, j01=1e-21, kind='parametric')\n", 37 | "parametric_tunnel_junction(tunnel, default_options)" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": null, 43 | "metadata": {}, 44 | "outputs": [], 45 | "source": [ 46 | "v = tunnel.voltage" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": null, 52 | "metadata": {}, 53 | "outputs": [], 54 | "source": [ 55 | "plt.plot(v, tunnel.tunnel_current(v), 'r--', label='Tunnel')\n", 56 | "plt.plot(v, tunnel.excess_current(v), 'g--', label='Excess')\n", 57 | "plt.plot(v, tunnel.diffusion_current(v), 'b--', label='Diffusion')\n", 58 | "plt.plot(v, tunnel.current, 'k', linewidth=3, color='DimGray', label='Total')\n", 59 | "plt.plot((0.2, 0.9), (100, 10), 'ko')\n", 60 | "\n", 61 | "plt.annotate('V$_P$, J$_P$', xy=(0.2, 110), fontsize=12)\n", 62 | "plt.annotate('V$_V$, J$_V$', xy=(0.6, 10), fontsize=12)\n", 63 | "\n", 64 | "plt.legend(fontsize=12, frameon=False)\n", 65 | "plt.ylim(0, 150)\n", 66 | "plt.xlim(0, 2)\n", 67 | "plt.ylabel('Current Density(A/$m^2$)', fontsize=12)\n", 68 | "plt.xlabel('Voltage(V)', fontsize=12)\n", 69 | "plt.tick_params(labelsize=12)\n", 70 | "plt.tight_layout()\n", 71 | "plt.show()" 72 | ] 73 | } 74 | ], 75 | "metadata": { 76 | "kernelspec": { 77 | "display_name": "Python 3", 78 | "language": "python", 79 | "name": "python3" 80 | }, 81 | "language_info": { 82 | "codemirror_mode": { 83 | "name": "ipython", 84 | "version": 3 85 | }, 86 | "file_extension": ".py", 87 | "mimetype": "text/x-python", 88 | "name": "python", 89 | "nbconvert_exporter": "python", 90 | "pygments_lexer": "ipython3", 91 | "version": "3.7.4" 92 | } 93 | }, 94 | "nbformat": 4, 95 | "nbformat_minor": 4 96 | } 97 | -------------------------------------------------------------------------------- /solcore/material_data/SOPRA_DB/SIO.MAT: -------------------------------------------------------------------------------- 1 | VERSION*1* 2 | FORMAT*1* 3 | POINTS*54* 4 | DATA1*1*2.10144375e2*1.69330000*1.05740000* 5 | DATA1*2*2.13767554e2*1.61120000*1.05910000* 6 | DATA1*3*2.17517862e2*1.63330000*1.06810000* 7 | DATA1*4*2.21402109e2*1.65730000*1.08020000* 8 | DATA1*5*2.25427602e2*1.68170000*1.09020000* 9 | DATA1*6*2.29602188e2*1.70690000*1.10000000* 10 | DATA1*7*2.33934304e2*1.73470000*1.10920000* 11 | DATA1*8*2.38433041e2*1.76390000*1.11820000* 12 | DATA1*9*2.43108199e2*1.79490000*1.12650000* 13 | DATA1*10*2.47970363e2*1.82700000*1.13330000* 14 | DATA1*11*2.53030982e2*1.86220000*1.14030000* 15 | DATA1*12*2.58302461e2*1.89880000*1.14570000* 16 | DATA1*13*2.63798258e2*1.93830000*1.14970000* 17 | DATA1*14*2.69533003e2*1.97980000*1.15200000* 18 | DATA1*15*2.75522625e2*2.02410000*1.15240000* 19 | DATA1*16*2.81784503e2*2.07050000*1.15000000* 20 | DATA1*17*2.88337631e2*2.12010000*1.14450000* 21 | DATA1*18*2.95202813e2*2.17210000*1.13510000* 22 | DATA1*19*3.02402881e2*2.22590000*1.12090000* 23 | DATA1*20*3.09962953e2*2.28120000*1.10070000* 24 | DATA1*21*3.17910721e2*2.34840000*1.07810000* 25 | DATA1*22*3.26276793e2*2.39330000*1.04150000* 26 | DATA1*23*3.35095085e2*2.44680000*1.00020000* 27 | DATA1*24*3.44403281e2*2.49670000*9.53000000e-1* 28 | DATA1*25*3.54243375e2*2.54200000*8.98700000e-1* 29 | DATA1*26*3.64662298e2*2.58010000*8.39600000e-1* 30 | DATA1*27*3.75712671e2*2.61170000*7.76000000e-1* 31 | DATA1*28*3.87453692e2*2.63530000*7.10700000e-1* 32 | DATA1*29*3.99952198e2*2.65060000*6.44600000e-1* 33 | DATA1*30*4.13283938e2*2.65900000*5.78800000e-1* 34 | DATA1*31*4.27535108e2*2.65990000*5.15600000e-1* 35 | DATA1*32*4.42804219e2*2.65530000*4.54900000e-1* 36 | DATA1*33*4.59204375e2*2.64560000*3.97100000e-1* 37 | DATA1*34*4.76866082e2*2.63150000*3.43600000e-1* 38 | DATA1*35*4.95940725e2*2.61430000*2.93400000e-1* 39 | DATA1*36*5.16604922e2*2.59420000*2.46800000e-1* 40 | DATA1*37*5.39066006e2*2.57110000*2.04200000e-1* 41 | DATA1*38*5.63569006e2*2.54680000*1.64400000e-1* 42 | DATA1*39*5.90405625e2*2.52160000*1.25400000e-1* 43 | DATA1*40*6.19925906e2*2.49630000*8.63000000e-2* 44 | DATA1*41*6.52553586e2*2.47020000*4.80000000e-2* 45 | DATA1*42*6.88806563e2*2.44800000*1.31000000e-2* 46 | DATA1*43*7.29324596e2*2.42880000*1.80000000e-3* 47 | DATA1*44*7.74907383e2*2.41080000*0.00000000* 48 | DATA1*45*8.26567875e2*2.39440000*0.00000000* 49 | DATA1*46*8.85608438e2*2.38140000*0.00000000* 50 | DATA1*47*9.53732164e2*2.37430000*0.00000000* 51 | DATA1*48*1.03320984e3*2.35660000*0.00000000* 52 | DATA1*49*1.12713801e3*2.35090000*0.00000000* 53 | DATA1*50*1.23985181e3*2.33760000*0.00000000* 54 | DATA1*51*1.37761313e3*2.32540000*0.00000000* 55 | DATA1*52*1.54981477e3*2.31320000*0.00000000* 56 | DATA1*53*1.77121688e3*2.30100000*0.00000000* 57 | DATA1*54*2.06641969e3*2.28880000*0.00000000* 58 | COMMENT*Based on data from the Sopra S.A. web site. See http://www.* 59 | COMMENT*sopra-sa.com/indices.htm* 60 | EOF* 61 | -------------------------------------------------------------------------------- /solcore/material_data/Si-Material/k.txt: -------------------------------------------------------------------------------- 1 | 2.5e-7 3.6650e+00 2 | 2.6e-7 4.0840e+00 3 | 2.7e-7 4.6800e+00 4 | 2.8e-7 5.2870e+00 5 | 2.9e-7 5.2860e+00 6 | 3e-7 4.2340e+00 7 | 3.1e-7 3.5980e+00 8 | 3.2e-7 3.3030e+00 9 | 3.3e-7 3.1000e+00 10 | 3.4e-7 2.9770e+00 11 | 3.5e-7 2.9380e+00 12 | 3.6e-7 2.9660e+00 13 | 3.7e-7 2.1710e+00 14 | 3.8e-7 9.4600e-01 15 | 3.9e-7 4.4500e-01 16 | 4e-7 2.9600e-01 17 | 4.1e-7 2.2700e-01 18 | 4.2e-7 1.7600e-01 19 | 4.3e-7 1.3800e-01 20 | 4.4e-7 1.0700e-01 21 | 4.5e-7 8.6302e-02 22 | 4.6e-7 7.1381e-02 23 | 4.7e-7 6.2086e-02 24 | 4.8e-7 5.5004e-02 25 | 4.9e-7 4.9131e-02 26 | 5e-7 4.4165e-02 27 | 5.1e-7 3.9367e-02 28 | 5.2e-7 3.6415e-02 29 | 5.3e-7 3.3108e-02 30 | 5.4e-7 3.0295e-02 31 | 5.5e-7 2.7968e-02 32 | 5.6e-7 2.5758e-02 33 | 5.7e-7 2.4131e-02 34 | 5.8e-7 2.2524e-02 35 | 5.9e-7 2.1081e-02 36 | 6e-7 1.9934e-02 37 | 6.1e-7 1.8446e-02 38 | 6.2e-7 1.7367e-02 39 | 6.3e-7 1.6444e-02 40 | 6.4e-7 1.5432e-02 41 | 6.5e-7 1.4431e-02 42 | 6.6e-7 1.3498e-02 43 | 6.7e-7 1.2743e-02 44 | 6.8e-7 1.1905e-02 45 | 6.9e-7 1.1201e-02 46 | 7e-7 1.0528e-02 47 | 7.1e-7 1.0057e-02 48 | 7.2e-7 9.6257e-03 49 | 7.3e-7 8.9461e-03 50 | 7.4e-7 8.3620e-03 51 | 7.5e-7 7.8185e-03 52 | 7.6e-7 7.1970e-03 53 | 7.7e-7 6.7402e-03 54 | 7.8e-7 6.3933e-03 55 | 7.9e-7 5.8340e-03 56 | 8e-7 5.4113e-03 57 | 8.1e-7 4.9955e-03 58 | 8.2e-7 4.6134e-03 59 | 8.3e-7 4.2734e-03 60 | 8.4e-7 3.9439e-03 61 | 8.5e-7 3.6120e-03 62 | 8.6e-7 3.2781e-03 63 | 8.7e-7 2.9839e-03 64 | 8.8e-7 2.6821e-03 65 | 8.9e-7 2.4293e-03 66 | 9e-7 2.1701e-03 67 | 9.1e-7 1.9625e-03 68 | 9.2e-7 1.7571e-03 69 | 9.3e-7 1.5467e-03 70 | 9.4e-7 1.3689e-03 71 | 9.5e-7 1.1793e-03 72 | 9.6e-7 1.0237e-03 73 | 9.7e-7 8.7225e-04 74 | 9.8e-7 7.4866e-04 75 | 9.9e-7 6.2238e-04 76 | 1e-6 5.0930e-04 77 | 1.01e-6 4.1071e-04 78 | 1.02e-6 3.2386e-04 79 | 1.03e-6 2.4753e-04 80 | 1.04e-6 1.8704e-04 81 | 1.05e-6 1.3620e-04 82 | 1.06e-6 9.3631e-05 83 | 1.07e-6 6.8118e-05 84 | 1.08e-6 5.3285e-05 85 | 1.09e-6 4.0768e-05 86 | 1.1e-6 3.0637e-05 87 | 1.11e-6 2.3849e-05 88 | 1.12e-6 1.7825e-05 89 | 1.13e-6 1.3488e-05 90 | 1.14e-6 9.0718e-06 91 | 1.15e-6 6.2230e-06 92 | 1.16e-6 3.8770e-06 93 | 1.17e-6 2.0483e-06 94 | 1.18e-6 6.1036e-07 95 | 1.19e-6 3.4091e-07 96 | 1.2e-6 2.1008e-07 97 | 1.21e-6 1.2518e-07 98 | 1.22e-6 7.9609e-08 99 | 1.23e-6 4.6004e-08 100 | 1.24e-6 2.3682e-08 101 | 1.25e-6 9.9472e-09 102 | 1.26e-6 3.6096e-09 103 | 1.27e-6 2.0213e-09 104 | 1.28e-6 1.2223e-09 105 | 1.29e-6 7.2885e-10 106 | 1.3e-6 4.6553e-10 107 | 1.31e-6 2.8147e-10 108 | 1.32e-6 1.6807e-10 109 | 1.33e-6 8.4670e-11 110 | 1.34e-6 3.7322e-11 111 | 1.35e-6 1.8263e-11 112 | 1.36e-6 1.0281e-11 113 | 1.37e-6 6.5413e-12 114 | 1.38e-6 4.1730e-12 115 | 1.39e-6 2.5441e-12 116 | 1.4e-6 1.5597e-12 117 | 1.41e-6 9.5374e-13 118 | 1.42e-6 5.6500e-13 119 | 1.43e-6 2.8449e-13 120 | 1.44e-6 2.0626e-13 121 | 1.45e-6 1.3846e-13 122 | --------------------------------------------------------------------------------