示例#1
0
def get_iv(**kwargs):
    candidate = dpv.objects.update(material, **kwargs)
    des = dpv.make_design(n_points=500,
                          Ls=[1e-4, 1e-4],
                          mats=candidate,
                          Ns=[1e17, -1e17],
                          Snl=1e7,
                          Snr=0,
                          Spl=0,
                          Spr=1e7)
    results = dpv.simulate(des, verbose=False)
    return results["iv"][1]
示例#2
0
文件: psc.py 项目: romanodev/deltapv
def x2des(x, perov=Perov):
    Eg_ETM = x[0]
    Chi_ETM = x[1]
    eps_ETM = x[2]
    Nc_ETM = 10**x[3]
    Nv_ETM = 10**x[4]
    mn_ETM = 10**x[5]
    mp_ETM = 10**x[6]
    Eg_HTM = x[7]
    Chi_HTM = x[8]
    eps_HTM = x[9]
    Nc_HTM = 10**x[10]
    Nv_HTM = 10**x[11]
    mn_HTM = 10**x[12]
    mp_HTM = 10**x[13]
    Nd_ETM = 10**x[14]
    Na_HTM = 10**x[15]

    ETM = dpv.create_material(Eg=Eg_ETM,
                              Chi=Chi_ETM,
                              eps=eps_ETM,
                              Nc=Nc_ETM,
                              Nv=Nv_ETM,
                              mn=mn_ETM,
                              mp=mp_ETM,
                              tn=tau,
                              tp=tau,
                              A=A)
    HTM = dpv.create_material(Eg=Eg_HTM,
                              Chi=Chi_HTM,
                              eps=eps_HTM,
                              Nc=Nc_HTM,
                              Nv=Nv_HTM,
                              mn=mn_HTM,
                              mp=mp_HTM,
                              tn=tau,
                              tp=tau,
                              A=A)

    des = dpv.make_design(n_points=N,
                          Ls=[L_ETM, L_Perov, L_HTM],
                          mats=[ETM, perov, HTM],
                          Ns=[Nd_ETM, 0, -Na_HTM],
                          Snl=S,
                          Snr=S,
                          Spl=S,
                          Spr=S)

    return des
示例#3
0
文件: test.py 项目: romanodev/deltapv
    def test_iv(self):
        L = 3e-4
        J = 5e-6
        material = dpv.create_material(Chi=3.9,
                                       Eg=1.5,
                                       eps=9.4,
                                       Nc=8e17,
                                       Nv=1.8e19,
                                       mn=100,
                                       mp=100,
                                       Et=0,
                                       tn=1e-8,
                                       tp=1e-8,
                                       A=1e4)
        design = dpv.make_design(n_points=500,
                                 Ls=[J, L - J],
                                 mats=[material, material],
                                 Ns=[1e17, -1e15],
                                 Snl=1e7,
                                 Snr=0,
                                 Spl=0,
                                 Spr=1e7)
        results = dpv.simulate(design)
        v, j = results["iv"]

        v_correct = [
            0.0, 0.05, 0.1, 0.15000000000000002, 0.2, 0.25,
            0.30000000000000004, 0.35000000000000003, 0.4, 0.45, 0.5, 0.55,
            0.6000000000000001, 0.6500000000000001, 0.7000000000000001, 0.75,
            0.8, 0.85, 0.9, 0.9500000000000001
        ]

        j_correct = [
            0.01882799450659129, 0.018753370994746384, 0.018675073222852775,
            0.018592788678882418, 0.01850616015841796, 0.018414776404918568,
            0.018318159501526814, 0.01821574845029824, 0.018106874755825324,
            0.0179907188741479, 0.017866203205496447, 0.017731661626627034,
            0.017583825887487907, 0.01741498506998538, 0.017204823904941775,
            0.01689387681804267, 0.01628556057166174, 0.014630769395991339,
            0.008610345709349041, -0.018267911703588706
        ]

        self.assertTrue(jnp.allclose(v, v_correct), "Voltages do not match!")
        self.assertTrue(jnp.allclose(j, j_correct), "Currents do not match!")
示例#4
0
CdTe = dpv.create_material(Nc=8e17,
                           Nv=1.8e19,
                           Eg=1.5,
                           eps=9.4,
                           Et=0,
                           mn=320,
                           mp=40,
                           tn=5e-9,
                           tp=5e-9,
                           Chi=3.9,
                           A=1e4)

des = dpv.make_design(n_points=500,
                      Ls=[t1, t2],
                      mats=[CdS, CdTe],
                      Ns=[1e17, -1e15],
                      Snl=1.16e7,
                      Snr=1.16e7,
                      Spl=1.16e7,
                      Spr=1.16e7)
ls = dpv.incident_light()

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--save")
    args = parser.parse_args()

    results = dpv.simulate(des, ls)
    v, j = results["iv"]

    dpv.plot_iv_curve(v, j)
    dpv.plot_bars(des)
示例#5
0
material = dpv.create_material(Chi=3.9,
                               Eg=1.5,
                               eps=9.4,
                               Nc=8e17,
                               Nv=1.8e19,
                               mn=100,
                               mp=100,
                               Et=0,
                               tn=1e-8,
                               tp=1e-8,
                               A=2e4)
des = dpv.make_design(n_points=500,
                      Ls=[1e-4, 1e-4],
                      mats=material,
                      Ns=[1e17, -1e17],
                      Snl=1e7,
                      Snr=0,
                      Spl=0,
                      Spr=1e7)

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--save")
    args = parser.parse_args()

    results = dpv.simulate(des)

    dpv.plot_iv_curve(*results["iv"])
    dpv.plot_bars(des)
    dpv.plot_band_diagram(des, results["eq"], eq=True)
    dpv.plot_charge(des, results["eq"])