Esempio n. 1
0
             sp=1,
             kind='DA')
]
# And, finally, we put everything together, adding also the surface recombination velocities sn and sp.
# setting kind = 'DA' in the Junction definition tells the electrical solver later to use the depletion approximation
optical_struct = SolarCell(ARC + top_junction + middle_junction + DBRa + DBRb +
                           DBRc + bottom_junction,
                           shading=0.05)

wl = np.linspace(250, 1700, 400) * 1e-9

options = State()
options.wavelength = wl
options.optics_method = 'TMM'
options.no_back_reflection = False
options.pol = 'p'
options.BL_correction = True
options.coherency_list = 111 * ['c']
options.theta = 30
solar_cell_solver(optical_struct, 'qe', options)

plt.figure()
plt.plot(
    wl * 1e9,
    optical_struct[0].layer_absorption + optical_struct[1].layer_absorption)
plt.plot(wl * 1e9, optical_struct[2].layer_absorption)
plt.plot(wl * 1e9, optical_struct[3].layer_absorption)
plt.plot(wl * 1e9, optical_struct[100].layer_absorption)
plt.plot(wl * 1e9, optical_struct.absorbed, '--')
plt.plot(wl * 1e9, optical_struct.transmitted, '--')
plt.plot(wl * 1e9, optical_struct.reflected, '--')
Esempio n. 2
0
from solcore.structure import Layer, Junction, TunnelJunction
from solcore.absorption_calculator import calculate_rat_rcwa, calculate_absorption_profile_rcwa

import numpy as np
import types
from solcore.state import State

rcwa_options = State()
rcwa_options.size = [500, 500]
rcwa_options.orders = 4
rcwa_options.theta = 0
rcwa_options.phi = 0
rcwa_options.pol = 'u'


def solve_rcwa(solar_cell, options):
    """ Calculates the reflection, transmission and absorption of a solar cell object using the transfer matrix method

    :param solar_cell:
    :param options:
    :return:
    """
    wl = options.wavelength

    # We include the shadowing losses
    initial = (1 - solar_cell.shading) if hasattr(solar_cell, 'shading') else 1

    # Now we calculate the absorbed and transmitted light. We first get all the relevant parameters from the objects
    widths = []
    offset = 0
    all_layers = []
            DiscretizationResolution=4,
            PolarizationDecomposition=False,
            PolarizationBasis='Default',
            LanczosSmoothing=True,
            SubpixelSmoothing=True,
            ConserveMemory=False,
            WeismannFormulation=True)

light_source = LightSource(source_type='standard', version='AM0')

options = State()
options['rcwa_options'] = ropt
options.optics_method = 'RCWA'
options.wavelength = wavelengths
options.light_source = light_source
options.pol = 's'
options.mpp = True
options.light_iv = True
options.position = 1e-10
options.voltages = np.linspace(-1.5, 1.5, 100)
options.size = size
options.orders = 20
options.parallel = True

window_material = InGaP(In=0.485, Na=si(5e18, 'cm-3'))
# window_material.n_data = np.stack([wavelengths, InGaP_nk.n(wavelengths)])
# window_material.k_data = np.stack([wavelengths, InGaP_nk.k(wavelengths)])
# window_material.n_path = '/home/phoebe/Documents/rayflare/examples/data/InGaP_n.txt'
# window_material.k_path = '/home/phoebe/Documents/rayflare/examples/data/InGaP_k.txt'

to_save_for_WVASE = np.stack([