コード例 #1
0
def material_map(sigma):
    sigma_Si = sigma
    cSi_range = mp.FreqRange(min=um_scale, max=um_scale / 0.4)

    cSi_frq1 = 3.64 / um_scale
    cSi_gam1 = 0
    cSi_sig1 = 8
    cSi_frq2 = 2.76 / um_scale
    cSi_gam2 = 2 * 0.063 / um_scale
    cSi_sig2 = 2.85
    cSi_frq3 = 1.73 / um_scale
    cSi_gam3 = 2 * 2.5 / um_scale
    cSi_sig3 = -0.107

    cSi_susc = [
        mp.LorentzianSusceptibility(frequency=cSi_frq1,
                                    gamma=cSi_gam1,
                                    sigma=cSi_sig1 * sigma_Si),
        mp.LorentzianSusceptibility(frequency=cSi_frq2,
                                    gamma=cSi_gam2,
                                    sigma=cSi_sig2 * sigma_Si),
        mp.LorentzianSusceptibility(frequency=cSi_frq3,
                                    gamma=cSi_gam3,
                                    sigma=cSi_sig3 * sigma_Si)
    ]

    cSi = mp.Medium(epsilon=1.0,
                    E_susceptibilities=cSi_susc,
                    valid_freq_range=cSi_range)
    return cSi
コード例 #2
0
ファイル: material_dispersion.py プロジェクト: jwt625/meep
    def setUp(self):
        susceptibilities = [
            mp.LorentzianSusceptibility(frequency=1.1, gamma=1e-5, sigma=0.5),
            mp.LorentzianSusceptibility(frequency=0.5, gamma=0.1, sigma=2e-5)
        ]

        default_material = mp.Medium(epsilon=2.25,
                                     E_susceptibilities=susceptibilities)

        fcen = 1.0
        df = 2.0

        sources = mp.Source(mp.GaussianSource(fcen, fwidth=df),
                            component=mp.Ez,
                            center=mp.Vector3())

        kmin = 0.3
        kmax = 2.2
        k_interp = 5

        self.kpts = mp.interpolate(
            k_interp, [mp.Vector3(kmin), mp.Vector3(kmax)])

        self.sim = mp.Simulation(cell_size=mp.Vector3(),
                                 geometry=[],
                                 sources=[sources],
                                 default_material=default_material,
                                 resolution=20)
コード例 #3
0
def calc(varibles,orginal,depth):

    um_scale = 1
    say = 0
    eV_um_scale = um_scale/1.23984193
    Au_plasma_frq = 9.03*eV_um_scale
    metal_range = mp.FreqRange(min=um_scale/6.1992, max=um_scale/.24797)
    out = []
    var = [np.linspace(varibles[j][0],varibles[j][1],5) for j in range(6)]
    correlation = -1
    Au_f0 = 0.760
    for i in range(5):
        Au_frq0 = var[0][i]
        Au_gam0 = 0.053*eV_um_scale
        Au_sig0 = Au_f0*Au_plasma_frq**2/Au_frq0**2
        Au_f1 = 0.024
        for j in range(5):
            Au_frq1 = var[1][j]*eV_um_scale      # 2.988 um
            Au_gam1 = 0.241*eV_um_scale
            Au_sig1 = Au_f1*Au_plasma_frq**2/Au_frq1**2
            Au_f2 = 0.010
            for k in range(5):
                Au_frq2 = var[2][k]*eV_um_scale      # 1.494 um
                Au_gam2 = 0.345*eV_um_scale
                Au_sig2 = Au_f2*Au_plasma_frq**2/Au_frq2**2
                Au_f3 = 0.071
                for l in range(5):
                    Au_frq3 = var[3][l]*eV_um_scale      # 0.418 um
                    Au_gam3 = 0.870*eV_um_scale
                    Au_sig3 = Au_f3*Au_plasma_frq**2/Au_frq3**2
                    Au_f4 = 0.601
                    for m in range(5):
                        Au_frq4 = var[4][m]*eV_um_scale      # 0.288 um
                        Au_gam4 = 2.494*eV_um_scale
                        Au_sig4 = Au_f4*Au_plasma_frq**2/Au_frq4**2
                        Au_f5 = 4.384
                        for n in range(5):
                            Au_frq5 = var[5][n]*eV_um_scale      # 0.093 um
                            Au_gam5 = 2.214*eV_um_scale
                            Au_sig5 = Au_f5*Au_plasma_frq**2/Au_frq5**2


                            Au_susc = [mp.DrudeSusceptibility(frequency=Au_frq0, gamma=Au_gam0, sigma=Au_sig0),
                                    mp.LorentzianSusceptibility(frequency=Au_frq1, gamma=Au_gam1, sigma=Au_sig1),
                                    mp.LorentzianSusceptibility(frequency=Au_frq2, gamma=Au_gam2, sigma=Au_sig2),
                                    mp.LorentzianSusceptibility(frequency=Au_frq3, gamma=Au_gam3, sigma=Au_sig3),
                                    mp.LorentzianSusceptibility(frequency=Au_frq4, gamma=Au_gam4, sigma=Au_sig4),
                                    mp.LorentzianSusceptibility(frequency=Au_frq5, gamma=Au_gam5, sigma=Au_sig5)]
                            Au = mp.Medium(epsilon=1.0, E_susceptibilities=Au_susc, valid_freq_range=metal_range)
                            freqs = np.linspace(um_scale/0.7,um_scale/0.35,101)
                            au = np.empty(101,dtype=np.cdouble)
                            say=say+1
                            for ii in range (101):
                                au[ii]= Au.epsilon(freqs[ii])[1][1]  
                            temp = np.corrcoef(au,orginal)[0][1]
                            if(correlation<temp):
                                correlation = temp
                                print(correlation)
                                out = [i,j,k,l,m,n]
                                print(out)
コード例 #4
0
def lossy_Pd(r):
    """Give a input r between 0 and 1, the function will return a modified
    Pd with lower reflection. The absorption coefficient is lower
    too. We have to use a thicker layer the prevent any transmission.

    """
    um_scale = 1.0

    # conversion factor for eV to 1/um [=1/hc]
    eV_um_scale = um_scale / 1.23984193
    metal_range = mp.FreqRange(min=um_scale / 12.4, max=um_scale / 0.2)

    Pd_plasma_frq = 9.72 * eV_um_scale
    Pd_f0 = 0.330
    Pd_frq0 = 1e-10
    Pd_gam0 = 0.008 * eV_um_scale
    Pd_sig0 = Pd_f0 * Pd_plasma_frq**2 / Pd_frq0**2
    Pd_f1 = 0.649
    Pd_frq1 = 0.336 * eV_um_scale  # 3.690 um
    Pd_gam1 = 2.950 * eV_um_scale
    Pd_sig1 = Pd_f1 * Pd_plasma_frq**2 / Pd_frq1**2
    Pd_f2 = 0.121
    Pd_frq2 = 0.501 * eV_um_scale  # 2.475 um
    Pd_gam2 = 0.555 * eV_um_scale
    Pd_sig2 = Pd_f2 * Pd_plasma_frq**2 / Pd_frq2**2
    Pd_f3 = 0.638
    Pd_frq3 = 1.659 * eV_um_scale  # 0.747 um
    Pd_gam3 = 4.621 * eV_um_scale
    Pd_sig3 = Pd_f3 * Pd_plasma_frq**2 / Pd_frq3**2
    Pd_f4 = 0.453
    Pd_frq4 = 5.715 * eV_um_scale  # 0.217 um
    Pd_gam4 = 3.236 * eV_um_scale
    Pd_sig4 = Pd_f4 * Pd_plasma_frq**2 / Pd_frq4**2
    Pd_susc = [
        mp.DrudeSusceptibility(frequency=Pd_frq0,
                               gamma=Pd_gam0,
                               sigma=Pd_sig0 * r),
        mp.LorentzianSusceptibility(frequency=Pd_frq1,
                                    gamma=Pd_gam1,
                                    sigma=Pd_sig1 * r),
        mp.LorentzianSusceptibility(frequency=Pd_frq2,
                                    gamma=Pd_gam2,
                                    sigma=Pd_sig2 * r),
        mp.LorentzianSusceptibility(frequency=Pd_frq3,
                                    gamma=Pd_gam3,
                                    sigma=Pd_sig3 * r),
        mp.LorentzianSusceptibility(frequency=Pd_frq4,
                                    gamma=Pd_gam4,
                                    sigma=Pd_sig4 * r)
    ]

    Pd = mp.Medium(epsilon=1.0,
                   E_susceptibilities=Pd_susc,
                   valid_freq_range=metal_range)

    return Pd
コード例 #5
0
    def test_no_geometry(self):
        mat = mp.Medium(epsilon=12,
                        epsilon_offdiag=mp.Vector3(x=1),
                        mu_offdiag=mp.Vector3(x=20),
                        E_chi2_diag=mp.Vector3(1, 1),
                        H_chi3_diag=mp.Vector3(x=1),
                        E_susceptibilities=[
                            mp.LorentzianSusceptibility(),
                            mp.NoisyLorentzianSusceptibility()
                        ],
                        H_susceptibilities=[mp.DrudeSusceptibility()],
                        D_conductivity_diag=mp.Vector3(y=1),
                        B_conductivity_diag=mp.Vector3(x=1, z=1))
        fs = self.get_fragment_stats(mp.Vector3(),
                                     mp.Vector3(10, 10),
                                     2,
                                     def_mat=mat,
                                     geom=[])

        self.assertEqual(len(fs), 1)
        self.check_stats(fs[0],
                         a_eps=10000,
                         a_mu=10000,
                         nonlin=30000,
                         susc=30000,
                         cond=30000)
コード例 #6
0
    def test_transform(self):

        e_sus = [mp.LorentzianSusceptibility(sigma_diag=mp.Vector3(1, 2, 3),
                                             sigma_offdiag=mp.Vector3(12, 13, 14)),
                 mp.DrudeSusceptibility(sigma_diag=mp.Vector3(1, 2, 3),
                                        sigma_offdiag=mp.Vector3(12, 13, 14))]

        mat = mp.Medium(epsilon_diag=mp.Vector3(1, 2, 3), epsilon_offdiag=mp.Vector3(12, 13, 14),
                        E_susceptibilities=e_sus)

        rot_angle = math.radians(23.9)
        rot_matrix = mp.Matrix(mp.Vector3(math.cos(rot_angle), math.sin(rot_angle), 0),
                               mp.Vector3(-math.sin(rot_angle), math.cos(rot_angle), 0),
                               mp.Vector3(0, 0, 1))
        mat.transform(rot_matrix)

        expected_diag = mp.Vector3(-7.72552, 10.72552, 3)
        expected_offdiag = mp.Vector3(7.69024, 6.21332, 18.06640)

        self.assertTrue(mat.epsilon_diag.close(expected_diag, tol=4))
        self.assertTrue(mat.epsilon_offdiag.close(expected_offdiag, tol=4))
        self.assertEqual(mat.mu_diag, mp.Vector3(1, 1, 1))
        self.assertEqual(mat.mu_offdiag, mp.Vector3())
        self.assertEqual(len(mat.E_susceptibilities), 2)
        self.assertTrue(mat.E_susceptibilities[0].sigma_diag.close(expected_diag, tol=4))
        self.assertTrue(mat.E_susceptibilities[0].sigma_offdiag.close(expected_offdiag, tol=4))
        self.assertTrue(mat.E_susceptibilities[1].sigma_diag.close(expected_diag, tol=4))
        self.assertTrue(mat.E_susceptibilities[1].sigma_offdiag.close(expected_offdiag, tol=4))
コード例 #7
0
    def get_fragment_stats(self, block_size, cell_size, dims, box_center=mp.Vector3(), dft_vecs=None,
                           def_mat=mp.air, sym=[]):
        mat = mp.Medium(
            epsilon=12,
            epsilon_offdiag=mp.Vector3(z=1),
            mu_offdiag=mp.Vector3(x=20),
            E_chi2_diag=mp.Vector3(1, 1),
            H_chi3_diag=mp.Vector3(z=1),
            E_susceptibilities=[mp.LorentzianSusceptibility(), mp.NoisyLorentzianSusceptibility()],
            H_susceptibilities=[mp.DrudeSusceptibility()],
            D_conductivity_diag=mp.Vector3(y=1),
            B_conductivity_diag=mp.Vector3(x=1, z=1)
        )

        geom = [mp.Block(size=block_size, center=box_center, material=mat)]
        sim = mp.Simulation(cell_size=cell_size, resolution=10, geometry=geom, dimensions=dims,
                            default_material=def_mat, symmetries=sym)

        if dft_vecs:
            if dft_vecs['flux_regions']:
                sim.add_flux(1, 0.5, 5, *dft_vecs['flux_regions'])
            if dft_vecs['n2f_regions']:
                sim.add_near2far(1, 0.5, 7, *dft_vecs['n2f_regions'])
            if dft_vecs['force_regions']:
                sim.add_force(1, 0.5, 9, *dft_vecs['force_regions'])
            if dft_vecs['fields_components']:
                sim.add_dft_fields(dft_vecs['fields_components'], 0, 1, 5, where=dft_vecs['fields_where'],
                                   center=dft_vecs['fields_center'], size=dft_vecs['fields_size'])

        gv = sim._create_grid_volume(False)
        stats = sim._compute_fragment_stats(gv)

        return stats
コード例 #8
0
def main(args):

    resolution = 20
    cell_size = mp.Vector3(z=10)
    dimensions = 1

    # conversion factor fro eV to 1/um
    eV_um_scale = 1 / 1.23984193

    # Al, from Rakic et al., Applied Optics, vol. 32, p. 5274 (1998)
    Al_eps_inf = 1
    Al_plasma_frq = 14.98 * eV_um_scale

    Al_f0 = 0.523
    Al_frq0 = 1e-10
    Al_gam0 = 0.047 * eV_um_scale
    Al_sig0 = (Al_f0 * math.sqrt(Al_plasma_frq)) / (math.sqrt(Al_frq0))

    Al_f1 = 0.050
    Al_frq1 = 1.544 * eV_um_scale  # 803 nm
    Al_gam1 = 0.312 * eV_um_scale
    Al_sig1 = (Al_f1 * math.sqrt(Al_plasma_frq)) / (math.sqrt(Al_frq1))

    E_susceptibilities = [
        mp.DrudeSusceptibility(frequency=Al_frq0, gamma=Al_gam0,
                               sigma=Al_sig0),
        mp.LorentzianSusceptibility(frequency=Al_frq1,
                                    gamma=Al_gam1,
                                    sigma=Al_sig1)
    ]

    Al = mp.Medium(epsilon=Al_eps_inf, E_susceptibilities=E_susceptibilities)

    pml_layers = [
        mp.PML(1, direction=mp.Z) if args.pml else mp.Absorber(1,
                                                               direction=mp.Z)
    ]

    sources = [
        mp.Source(src=mp.GaussianSource(1 / 0.803, fwidth=0.1),
                  center=mp.Vector3(),
                  component=mp.Ex)
    ]

    def print_stuff(sim):
        print("ex:, {}, {}".format(sim.meep_time(),
                                   sim.get_field_point(mp.Ex, mp.Vector3())))

    sim = mp.Simulation(cell_size=cell_size,
                        resolution=resolution,
                        dimensions=dimensions,
                        default_material=Al,
                        boundary_layers=pml_layers,
                        sources=sources)

    sim.run(mp.at_every(10, print_stuff),
            until_after_sources=mp.stop_when_fields_decayed(
                50, mp.Ex, mp.Vector3(), 1e-6))
コード例 #9
0
    def test_material_dispersion_with_user_material(self):
        susceptibilities = [
            mp.LorentzianSusceptibility(frequency=1.1, gamma=1e-5, sigma=0.5),
            mp.LorentzianSusceptibility(frequency=0.5, gamma=0.1, sigma=2e-5)
        ]

        def mat_func(p):
            return mp.Medium(epsilon=2.25, E_susceptibilities=susceptibilities)

        fcen = 1.0
        df = 2.0

        sources = mp.Source(mp.GaussianSource(fcen, fwidth=df),
                            component=mp.Ez,
                            center=mp.Vector3())

        kmin = 0.3
        kmax = 2.2
        k_interp = 5

        kpts = mp.interpolate(k_interp, [mp.Vector3(kmin), mp.Vector3(kmax)])

        self.sim = mp.Simulation(cell_size=mp.Vector3(),
                                 geometry=[],
                                 sources=[sources],
                                 material_function=mat_func,
                                 default_material=mp.air,
                                 resolution=20)

        all_freqs = self.sim.run_k_points(200, kpts)
        res = [f.real for fs in all_freqs for f in fs]

        expected = [
            0.1999342026399106,
            0.41053963810375294,
            0.6202409070451909,
            0.8285737385146619,
            1.0350739448523063,
            1.2392775309110078,
            1.4407208712852109,
        ]

        np.testing.assert_allclose(expected, res)
コード例 #10
0
ファイル: absorber_1d.py プロジェクト: jlollis/meep
    def setUp(self):

        resolution = 20
        cell_size = mp.Vector3(z=10)
        dimensions = 1

        # conversion factor from eV to 1/um
        eV_um_scale = 1 / 1.23984193

        # Al, from Rakic et al., Applied Optics, vol. 32, p. 5274 (1998)
        Al_eps_inf = 1
        Al_plasma_frq = 14.98 * eV_um_scale

        Al_f0 = 0.523
        Al_frq0 = 1e-10
        Al_gam0 = 0.047 * eV_um_scale
        Al_sig0 = (Al_f0 * math.sqrt(Al_plasma_frq)) / (math.sqrt(Al_frq0))

        Al_f1 = 0.050
        Al_frq1 = 1.544 * eV_um_scale  # 803 nm
        Al_gam1 = 0.312 * eV_um_scale
        Al_sig1 = (Al_f1 * math.sqrt(Al_plasma_frq)) / (math.sqrt(Al_frq1))

        E_susceptibilities = [
            mp.DrudeSusceptibility(frequency=Al_frq0,
                                   gamma=Al_gam0,
                                   sigma=Al_sig0),
            mp.LorentzianSusceptibility(frequency=Al_frq1,
                                        gamma=Al_gam1,
                                        sigma=Al_sig1)
        ]

        Al = mp.Medium(epsilon=Al_eps_inf,
                       E_susceptibilities=E_susceptibilities)

        absorber_layers = [mp.Absorber(1, direction=mp.Z)]

        sources = [
            mp.Source(src=mp.GaussianSource(1 / 0.803, fwidth=0.1),
                      center=mp.Vector3(),
                      component=mp.Ex)
        ]

        self.sim = mp.Simulation(cell_size=cell_size,
                                 resolution=resolution,
                                 dimensions=dimensions,
                                 default_material=Al,
                                 boundary_layers=absorber_layers,
                                 sources=sources)
コード例 #11
0
ファイル: SiP_Materials.py プロジェクト: waffle-iron/BYUqot
# Reference:
# H. H. Li. Refractive index of silicon and germanium and its wavelength and
# temperature derivatives, J. Phys. Chem. Ref. Data 9, 561-658 (1993)

Si_range = mp.FreqRange(min=1/1.8, max=1/1.15)

eps = 7.9874
eps_lorentz = 3.6880
omega0 = 3.9328e15
delta0 = 0

Si_frq1 = omega0 / (2 * np.pi * c) * 1e-6
Si_gam1 = 0
Si_sig1 = eps_lorentz

Si_susc = [ mp.LorentzianSusceptibility(frequency=Si_frq1, gamma=Si_gam1, sigma=Si_sig1) ]

Si = mp.Medium(epsilon=eps, E_susceptibilities=Si_susc, valid_freq_range=Si_range)

# ------------------------------------------------------------------ #
# Silicon Dioxide (SiO2)
# ------------------------------------------------------------------ #
# silicon dioxide (SiO2) from Horiba Technical Note 08: Lorentz Dispersion Model
# ref: http://www.horiba.com/fileadmin/uploads/Scientific/Downloads/OpticalSchool_CN/TN/ellipsometer/Lorentz_Dispersion_Model.pdf
# wavelength range: 0.25 - 1.77 um

SiO2_range = mp.FreqRange(min=1/1.77, max=1/0.25)

SiO2_frq1 = 1/(0.103320160833333*um_scale)
SiO2_gam1 = 1/(12.3984193000000*um_scale)
SiO2_sig1 = 1.12
コード例 #12
0
ファイル: v_materials.py プロジェクト: 0xInfty/ThesisPython
def import_medium(name, from_um_factor=1, paper="R"):
    """Returns Medium instance from string with specified length scale
    
    It's widely based on Meep Materials Library, merely adapted to change 
    according to the length unit scale used.
    
    Parameters
    ----------
    name: str
        Name of the desired material.
    from_um_factor=1 : int, float, optional
        Factor to transform from SI μm to the chosen length unit. For example, 
        to work with 100 nm as 1 Meep unit, from_um_factor=.1 must be specified.
    paper="R": str
        Name of desired source for experimental input data of medium.
    
    Returns
    -------
    medium : mp.Medium
        The mp.Medium instance of the desired material.
    
    Raises
    ------
    "No media called ... is available" : SyntaxError
        If no material is found whose name matches the string given.
    """

    if "Ag" not in name and "Au" not in name:
        raise SyntaxError("No media called {} is available".format(name))
        return

    # Default unit length is 1 um
    eV_from_um_factor = from_um_factor / 1.23984193  # Conversion factor: eV to 1/um [=1/hc]
    # from_um_factor used to be um_scale (but that's a shady name)

    ############ GOLD #################################################

    if name == "Au" and paper == "R":

        #------------------------------------------------------------------
        # Elemental metals from A.D. Rakic et al., Applied Optics, Vol. 37, No. 22, pp. 5271-83, 1998
        # Wavelength range: 0.2 - 12.4 um
        # Gold (Au)

        metal_range = mp.FreqRange(min=from_um_factor * 1e3 / 6199.2,
                                   max=from_um_factor * 1e3 / 247.97)

        Au_plasma_frq = 9.03 * eV_from_um_factor
        Au_f0 = 0.760
        Au_frq0 = 1e-10
        Au_gam0 = 0.053 * eV_from_um_factor
        Au_sig0 = Au_f0 * Au_plasma_frq**2 / Au_frq0**2
        Au_f1 = 0.024
        Au_frq1 = 0.415 * eV_from_um_factor  # 2.988 um
        Au_gam1 = 0.241 * eV_from_um_factor
        Au_sig1 = Au_f1 * Au_plasma_frq**2 / Au_frq1**2
        Au_f2 = 0.010
        Au_frq2 = 0.830 * eV_from_um_factor  # 1.494 um
        Au_gam2 = 0.345 * eV_from_um_factor
        Au_sig2 = Au_f2 * Au_plasma_frq**2 / Au_frq2**2
        Au_f3 = 0.071
        Au_frq3 = 2.969 * eV_from_um_factor  # 0.418 um
        Au_gam3 = 0.870 * eV_from_um_factor
        Au_sig3 = Au_f3 * Au_plasma_frq**2 / Au_frq3**2
        Au_f4 = 0.601
        Au_frq4 = 4.304 * eV_from_um_factor  # 0.288 um
        Au_gam4 = 2.494 * eV_from_um_factor
        Au_sig4 = Au_f4 * Au_plasma_frq**2 / Au_frq4**2
        Au_f5 = 4.384
        Au_frq5 = 13.32 * eV_from_um_factor  # 0.093 um
        Au_gam5 = 2.214 * eV_from_um_factor
        Au_sig5 = Au_f5 * Au_plasma_frq**2 / Au_frq5**2

        Au_susc = [
            mp.DrudeSusceptibility(frequency=Au_frq0,
                                   gamma=Au_gam0,
                                   sigma=Au_sig0),
            mp.LorentzianSusceptibility(frequency=Au_frq1,
                                        gamma=Au_gam1,
                                        sigma=Au_sig1),
            mp.LorentzianSusceptibility(frequency=Au_frq2,
                                        gamma=Au_gam2,
                                        sigma=Au_sig2),
            mp.LorentzianSusceptibility(frequency=Au_frq3,
                                        gamma=Au_gam3,
                                        sigma=Au_sig3),
            mp.LorentzianSusceptibility(frequency=Au_frq4,
                                        gamma=Au_gam4,
                                        sigma=Au_sig4),
            mp.LorentzianSusceptibility(frequency=Au_frq5,
                                        gamma=Au_gam5,
                                        sigma=Au_sig5)
        ]

        Au = mp.Medium(epsilon=1.0,
                       E_susceptibilities=Au_susc,
                       valid_freq_range=metal_range)
        Au.from_um_factor = from_um_factor

        return Au

    elif name == "Au" and paper == "JC":

        #------------------------------------------------------------------
        # Metals from D. Barchiesi and T. Grosges, J. Nanophotonics, Vol. 8, 08996, 2015
        # Wavelength range: 0.4 - 0.8 um
        # Gold (Au)
        # Fit to P.B. Johnson and R.W. Christy, Physical Review B, Vol. 6, pp. 4370-9, 1972

        # metal_visible_range = mp.FreqRange(min=from_um_factor*1e3/800,
        #                                    max=from_um_factor*1e3/400)

        # Au_JC_visible_frq0 = 1*from_um_factor/0.139779231751333
        # Au_JC_visible_gam0 = 1*from_um_factor/26.1269913352870
        # Au_JC_visible_sig0 = 1

        # Au_JC_visible_frq1 = 1*from_um_factor/0.404064525036786
        # Au_JC_visible_gam1 = 1*from_um_factor/1.12834046202759
        # Au_JC_visible_sig1 = 2.07118534879440

        # Au_JC_visible_susc = [mp.DrudeSusceptibility(frequency=Au_JC_visible_frq0, gamma=Au_JC_visible_gam0, sigma=Au_JC_visible_sig0),
        #                       mp.LorentzianSusceptibility(frequency=Au_JC_visible_frq1, gamma=Au_JC_visible_gam1, sigma=Au_JC_visible_sig1)]

        # Au_JC_visible = mp.Medium(epsilon=6.1599,
        #                           E_susceptibilities=Au_JC_visible_susc,
        #                           valid_freq_range=metal_visible_range)
        # Au_JC_visible.from_um_factor = from_um_factor

        # return Au_JC_visible

        #------------------------------------------------------------------
        # Metal from my own fit
        # Wavelength range: 0.1879 - 1.937 um
        # Gold (Au)
        # Fit to P.B. Johnson and R.W. Christy, Physical Review B, Vol. 6, pp. 4370-9, 1972

        Au_JC_range = mp.FreqRange(min=from_um_factor / 1.937,
                                   max=from_um_factor / .1879)

        freq_0 = 1.000000082740371e-10 * from_um_factor
        gamma_0 = 4.4142682842363e-09 * from_um_factor
        sigma_0 = 3.3002903009040977e+21

        freq_1 = 0.3260039379724786 * from_um_factor
        gamma_1 = 0.03601307014052124 * from_um_factor
        sigma_1 = 103.74591029640469

        freq_2 = 0.47387215165339414 * from_um_factor
        gamma_2 = 0.34294093699162054 * from_um_factor
        sigma_2 = 14.168079504545002

        freq_3 = 2.3910144662345445 * from_um_factor
        gamma_3 = 0.5900378254265015 * from_um_factor
        sigma_3 = 0.8155991478264435

        freq_4 = 3.3577076082530537 * from_um_factor
        gamma_4 = 1.6689250252226686 * from_um_factor
        sigma_4 = 2.038193481751111

        freq_5 = 8.915719663759013 * from_um_factor
        gamma_5 = 7.539763092679264 * from_um_factor
        sigma_5 = 3.74409654935571

        Au_JC_susc = [
            mp.DrudeSusceptibility(frequency=freq_0,
                                   gamma=gamma_0,
                                   sigma=sigma_0),
            mp.LorentzianSusceptibility(frequency=freq_1,
                                        gamma=gamma_1,
                                        sigma=sigma_1),
            mp.LorentzianSusceptibility(frequency=freq_2,
                                        gamma=gamma_2,
                                        sigma=sigma_2),
            mp.LorentzianSusceptibility(frequency=freq_3,
                                        gamma=gamma_3,
                                        sigma=sigma_3),
            mp.LorentzianSusceptibility(frequency=freq_4,
                                        gamma=gamma_4,
                                        sigma=sigma_4),
            mp.LorentzianSusceptibility(frequency=freq_5,
                                        gamma=gamma_5,
                                        sigma=sigma_5)
        ]

        Au_JC = mp.Medium(
            epsilon=1.0,  #6.1599, 
            E_susceptibilities=Au_JC_susc,
            valid_freq_range=Au_JC_range)
        Au_JC.from_um_factor = from_um_factor

        return Au_JC

    elif name == "Au" and paper == "P":

        #------------------------------------------------------------------
        # Metals from D. Barchiesi and T. Grosges, J. Nanophotonics, Vol. 8, 08996, 2015
        # Wavelength range: 0.4 - 0.8 um
        # Gold (Au)
        # Fit to E.D. Palik, Handbook of Optical Constants, Academic Press, 1985

        metal_visible_range = mp.FreqRange(min=from_um_factor * 1e3 / 800,
                                           max=from_um_factor * 1e3 / 400)

        Au_visible_frq0 = 1 * from_um_factor / 0.0473629248511456
        Au_visible_gam0 = 1 * from_um_factor / 0.255476199605166
        Au_visible_sig0 = 1

        Au_visible_frq1 = 1 * from_um_factor / 0.800619321082804
        Au_visible_gam1 = 1 * from_um_factor / 0.381870287531951
        Au_visible_sig1 = -169.060953137985

        Au_visible_susc = [
            mp.DrudeSusceptibility(frequency=Au_visible_frq0,
                                   gamma=Au_visible_gam0,
                                   sigma=Au_visible_sig0),
            mp.LorentzianSusceptibility(frequency=Au_visible_frq1,
                                        gamma=Au_visible_gam1,
                                        sigma=Au_visible_sig1)
        ]

        Au_visible = mp.Medium(epsilon=0.6888,
                               E_susceptibilities=Au_visible_susc,
                               valid_freq_range=metal_visible_range)
        Au_visible.from_um_factor = from_um_factor

        return Au_visible

    elif name == "Au":
        raise ValueError("No source found for Au with that name")

    ############ SILVER ###############################################

    if name == "Ag" and paper == "R":

        #------------------------------------------------------------------
        # Elemental metals from A.D. Rakic et al., Applied Optics, Vol. 37, No. 22, pp. 5271-83, 1998
        # Wavelength range: 0.2 - 12.4 um
        # Silver (Ag)

        metal_range = mp.FreqRange(min=from_um_factor * 1e3 / 12398,
                                   max=from_um_factor * 1e3 / 247.97)

        Ag_plasma_frq = 9.01 * eV_from_um_factor
        Ag_f0 = 0.845
        Ag_frq0 = 1e-10
        Ag_gam0 = 0.048 * eV_from_um_factor
        Ag_sig0 = Ag_f0 * Ag_plasma_frq**2 / Ag_frq0**2
        Ag_f1 = 0.065
        Ag_frq1 = 0.816 * eV_from_um_factor  # 1.519 um
        Ag_gam1 = 3.886 * eV_from_um_factor
        Ag_sig1 = Ag_f1 * Ag_plasma_frq**2 / Ag_frq1**2
        Ag_f2 = 0.124
        Ag_frq2 = 4.481 * eV_from_um_factor  # 0.273 um
        Ag_gam2 = 0.452 * eV_from_um_factor
        Ag_sig2 = Ag_f2 * Ag_plasma_frq**2 / Ag_frq2**2
        Ag_f3 = 0.011
        Ag_frq3 = 8.185 * eV_from_um_factor  # 0.152 um
        Ag_gam3 = 0.065 * eV_from_um_factor
        Ag_sig3 = Ag_f3 * Ag_plasma_frq**2 / Ag_frq3**2
        Ag_f4 = 0.840
        Ag_frq4 = 9.083 * eV_from_um_factor  # 0.137 um
        Ag_gam4 = 0.916 * eV_from_um_factor
        Ag_sig4 = Ag_f4 * Ag_plasma_frq**2 / Ag_frq4**2
        Ag_f5 = 5.646
        Ag_frq5 = 20.29 * eV_from_um_factor  # 0.061 um
        Ag_gam5 = 2.419 * eV_from_um_factor
        Ag_sig5 = Ag_f5 * Ag_plasma_frq**2 / Ag_frq5**2

        Ag_susc = [
            mp.DrudeSusceptibility(frequency=Ag_frq0,
                                   gamma=Ag_gam0,
                                   sigma=Ag_sig0),
            mp.LorentzianSusceptibility(frequency=Ag_frq1,
                                        gamma=Ag_gam1,
                                        sigma=Ag_sig1),
            mp.LorentzianSusceptibility(frequency=Ag_frq2,
                                        gamma=Ag_gam2,
                                        sigma=Ag_sig2),
            mp.LorentzianSusceptibility(frequency=Ag_frq3,
                                        gamma=Ag_gam3,
                                        sigma=Ag_sig3),
            mp.LorentzianSusceptibility(frequency=Ag_frq4,
                                        gamma=Ag_gam4,
                                        sigma=Ag_sig4),
            mp.LorentzianSusceptibility(frequency=Ag_frq5,
                                        gamma=Ag_gam5,
                                        sigma=Ag_sig5)
        ]

        Ag = mp.Medium(epsilon=1.0,
                       E_susceptibilities=Ag_susc,
                       valid_freq_range=metal_range)
        Ag.from_um_factor = from_um_factor

        return Ag

    elif name == "Ag" and paper == "P":

        #------------------------------------------------------------------
        # Metals from D. Barchiesi and T. Grosges, J. Nanophotonics, Vol. 8, 08996, 2015
        # Wavelength range: 0.4 - 0.8 um
        ## WARNING: unstable; field divergence may occur
        # Silver (Au)
        # Fit to E.D. Palik, Handbook of Optical Constants, Academic Press, 1985

        metal_visible_range = mp.FreqRange(min=from_um_factor * 1e3 / 800,
                                           max=from_um_factor * 1e3 / 400)

        Ag_visible_frq0 = 1 * from_um_factor / 0.142050162130618
        Ag_visible_gam0 = 1 * from_um_factor / 18.0357292925015
        Ag_visible_sig0 = 1

        Ag_visible_frq1 = 1 * from_um_factor / 0.115692151792108
        Ag_visible_gam1 = 1 * from_um_factor / 0.257794324096575
        Ag_visible_sig1 = 3.74465275944019

        Ag_visible_susc = [
            mp.DrudeSusceptibility(frequency=Ag_visible_frq0,
                                   gamma=Ag_visible_gam0,
                                   sigma=Ag_visible_sig0),
            mp.LorentzianSusceptibility(frequency=Ag_visible_frq1,
                                        gamma=Ag_visible_gam1,
                                        sigma=Ag_visible_sig1)
        ]

        Ag_visible = mp.Medium(epsilon=0.0067526,
                               E_susceptibilities=Ag_visible_susc,
                               valid_freq_range=metal_visible_range)
        Ag_visible.from_um_factor = from_um_factor

        return Ag_visible

    elif name == "Ag":
        raise ValueError("No source found for Ag with that name")

    else:
        raise ValueError("No source found for that material")
コード例 #13
0
for n in range(num_lorentzians):
    mymaterial_freq = ps[idx_opt][0][3 * n + 1]
    mymaterial_gamma = ps[idx_opt][0][3 * n + 2]

    if mymaterial_freq == 0:
        mymaterial_sigma = ps[idx_opt][0][3 * n + 0]
        E_susceptibilities.append(
            mp.DrudeSusceptibility(frequency=1.0,
                                   gamma=mymaterial_gamma,
                                   sigma=mymaterial_sigma))
    else:
        mymaterial_sigma = ps[idx_opt][0][3 * n + 0] / mymaterial_freq**2
        E_susceptibilities.append(
            mp.LorentzianSusceptibility(frequency=mymaterial_freq,
                                        gamma=mymaterial_gamma,
                                        sigma=mymaterial_sigma))

mymaterial = mp.Medium(epsilon=eps_inf, E_susceptibilities=E_susceptibilities)

# plot the fit and the actual data for comparison

mymaterial_eps = [mymaterial.epsilon(f)[0][0] for f in freqs_reduced]

plt.subplot(1, 2, 1)
plt.plot(wl_reduced, np.real(eps_reduced), 'bo-', label='actual')
plt.plot(wl_reduced, np.real(mymaterial_eps), 'ro-', label='fit')
plt.xlabel('wavelength (nm)')
plt.ylabel(r'real($\epsilon$)')
plt.legend()
コード例 #14
0
ファイル: material-dispersion.py プロジェクト: jwt625/meep
from __future__ import division

import meep as mp


cell = mp.Vector3()
resolution = 20

# We'll use a dispersive material with two polarization terms, just for
# illustration.  The first one is a strong resonance at omega=1.1,
# which leads to a polaritonic gap in the dispersion relation.  The second
# one is a weak resonance at omega=0.5, whose main effect is to add a
# small absorption loss around that frequency.

susceptibilities = [
    mp.LorentzianSusceptibility(frequency=1.1, gamma=1e-5, sigma=0.5),
    mp.LorentzianSusceptibility(frequency=0.5, gamma=0.1, sigma=2e-5)
]

default_material = mp.Medium(epsilon=2.25, E_susceptibilities=susceptibilities)

fcen = 1.0
df = 2.0

sources = [mp.Source(mp.GaussianSource(fcen, fwidth=df), component=mp.Ez, center=mp.Vector3())]

kmin = 0.3
kmax = 2.2
k_interp = 99

kpts = mp.interpolate(k_interp, [mp.Vector3(kmin), mp.Vector3(kmax)])
コード例 #15
0
# based on experimental data for intrinsic silicon at T=300K from M.A. Green and M. Keevers, Progress in Photovoltaics, Vol. 3, pp. 189-92, 1995
# wavelength range: 0.4 - 1.0 um

cSi_range = mp.FreqRange(min=1, max=1/0.4)

cSi_frq1 = 3.64/um_scale
cSi_gam1 = 0
cSi_sig1 = 8
cSi_frq2 = 2.76/um_scale
cSi_gam2 = 2*0.063/um_scale
cSi_sig2 = 2.85
cSi_frq3 = 1.73/um_scale
cSi_gam3 = 2*2.5/um_scale
cSi_sig3 = -0.107

cSi_susc = [ mp.LorentzianSusceptibility(frequency=cSi_frq1, gamma=cSi_gam1, sigma=cSi_sig1),
             mp.LorentzianSusceptibility(frequency=cSi_frq2, gamma=cSi_gam2, sigma=cSi_sig2),
             mp.LorentzianSusceptibility(frequency=cSi_frq3, gamma=cSi_gam3, sigma=cSi_sig3) ]

cSi = mp.Medium(epsilon=1.0, E_susceptibilities=cSi_susc, valid_freq_range=cSi_range)

#------------------------------------------------------------------

# amorphous silicon (a-Si) from Horiba Technical Note 08: Lorentz Dispersion Model
# ref: http://www.horiba.com/fileadmin/uploads/Scientific/Downloads/OpticalSchool_CN/TN/ellipsometer/Lorentz_Dispersion_Model.pdf
# wavelength range: 0.21 - 0.83 um

aSi_range = mp.FreqRange(min=1/0.83, max=1/0.21)

aSi_frq1 = 1/(0.315481407124682*um_scale)
aSi_gam1 = 1/(0.645751005208333*um_scale)
コード例 #16
0
cSi_range = mp.FreqRange(min=um_scale, max=um_scale / 0.4)

cSi_frq1 = 3.64 / um_scale
cSi_gam1 = 0
cSi_sig1 = 8
cSi_frq2 = 2.76 / um_scale
cSi_gam2 = 2 * 0.063 / um_scale
cSi_sig2 = 2.85
cSi_frq3 = 1.73 / um_scale
cSi_gam3 = 2 * 2.5 / um_scale
cSi_sig3 = -0.107

cSi_susc = [
    mp.LorentzianSusceptibility(frequency=cSi_frq1,
                                gamma=cSi_gam1,
                                sigma=cSi_sig1),
    mp.LorentzianSusceptibility(frequency=cSi_frq2,
                                gamma=cSi_gam2,
                                sigma=cSi_sig2),
    mp.LorentzianSusceptibility(frequency=cSi_frq3,
                                gamma=cSi_gam3,
                                sigma=cSi_sig3)
]

cSi = mp.Medium(epsilon=1.0,
                E_susceptibilities=cSi_susc,
                valid_freq_range=cSi_range)

#------------------------------------------------------------------
コード例 #17
0
ファイル: materials_library.py プロジェクト: kianvde/meep
Ag_frq2 = 4.481 * eV_um_scale  # 0.273 um
Ag_gam2 = 0.452 * eV_um_scale
Ag_sig2 = Ag_f2 * Ag_plasma_frq**2 / Ag_frq2**2
Ag_f3 = 0.011
Ag_frq3 = 8.185 * eV_um_scale  # 0.152 um
Ag_gam3 = 0.065 * eV_um_scale
Ag_sig3 = Ag_f3 * Ag_plasma_frq**2 / Ag_frq3**2
Ag_f4 = 0.840
Ag_frq4 = 9.083 * eV_um_scale  # 0.137 um
Ag_gam4 = 0.916 * eV_um_scale
Ag_sig4 = Ag_f4 * Ag_plasma_frq**2 / Ag_frq4**2

Ag_susc = [
    mp.DrudeSusceptibility(frequency=Ag_frq0, gamma=Ag_gam0, sigma=Ag_sig0),
    mp.LorentzianSusceptibility(frequency=Ag_frq1,
                                gamma=Ag_gam1,
                                sigma=Ag_sig1),
    mp.LorentzianSusceptibility(frequency=Ag_frq2,
                                gamma=Ag_gam2,
                                sigma=Ag_sig2),
    mp.LorentzianSusceptibility(frequency=Ag_frq3,
                                gamma=Ag_gam3,
                                sigma=Ag_sig3),
    mp.LorentzianSusceptibility(frequency=Ag_frq4,
                                gamma=Ag_gam4,
                                sigma=Ag_sig4)
]

Ag = mp.Medium(epsilon=1.0, E_susceptibilities=Ag_susc)

#------------------------------------------------------------------
コード例 #18
0
ファイル: sparam.py プロジェクト: waffle-iron/BYUqot
import meep as mp
import numpy as np
import matplotlib.pyplot as plt

# ---------------------------------------------------------------------------- #
# Important constants and materials
# ---------------------------------------------------------------------------- #

eps0 = 7.40523989e+02
susceptibilities = [
    mp.DrudeSusceptibility(frequency=5.28366673e-01,
                           gamma=1.62316031,
                           sigma=1.17034609e-03),
    mp.LorentzianSusceptibility(frequency=4.19962269e+02,
                                gamma=1.84154007e+03,
                                sigma=7.44917949e+02)
]
FR4 = mp.Medium(epsilon=eps0, E_susceptibilities=susceptibilities)

# ---------------------------------------------------------------------------- #
# Create Geometry
# ---------------------------------------------------------------------------- #
ww = 0.5  # waveguide width (microns)
wl = 10  # waveguie height (microns)

waveguide = mp.Block(material=FR4,
                     center=mp.Vector3(0, 0, 0),
                     size=mp.Vector3(wl, ww, mp.inf))

geometry = [waveguide]
コード例 #19
0
import meep as mp
import numpy as np

freq = 2
freqs = np.array(freq)[np.newaxis, np.newaxis, np.newaxis]
diag = mp.Vector3(1, 1, 1)
offdiag = mp.Vector3()
a = np.expand_dims(mp.Matrix(diag=diag, offdiag=offdiag), axis=0)
# print(a)
# print(freqs)
um_scale = 1
eV_um_scale = um_scale / 1.23984193
Au_plasma_frq = 9.03 * eV_um_scale
Au_f3 = 0.071
Au_frq3 = 2.969 * eV_um_scale  # 0.418 um
Au_gam3 = 0.870 * eV_um_scale
Au_sig3 = Au_f3 * Au_plasma_frq**2 / Au_frq3**2
c = mp.LorentzianSusceptibility(frequency=Au_frq3,
                                gamma=Au_gam3,
                                sigma=Au_sig3)
d = c.eval_susceptibility(freqs)
print(d)
print(np.squeeze(d + a))
t = Au_frq3 * Au_frq3 / (Au_frq3 * Au_frq3 - freq * freq -
                         1j * Au_gam3 * freq) * Au_sig3
print(t)
コード例 #20
0
ファイル: ground.py プロジェクト: houge9089/meep_scripts
def main(args):

    resolution = 30

    nSiO2 = 1.4
    SiO2 = mp.Medium(index=nSiO2)

    # conversion factor for eV to 1/um
    eV_um_scale = 1 / 1.23984193

    # W, from Rakic et al., Applied Optics, vol. 32, p. 5274 (1998)
    W_eps_inf = 1
    W_plasma_frq = 13.22 * eV_um_scale
    W_f0 = 0.206
    W_frq0 = 1e-10
    W_gam0 = 0.064 * eV_um_scale
    W_sig0 = W_f0 * W_plasma_frq**2 / W_frq0**2
    W_f1 = 0.054
    W_frq1 = 1.004 * eV_um_scale  # 1.235 um
    W_gam1 = 0.530 * eV_um_scale
    W_sig1 = W_f1 * W_plasma_frq**2 / W_frq1**2
    W_f2 = 0.166
    W_frq2 = 1.917 * eV_um_scale  # 0.647
    W_gam2 = 1.281 * eV_um_scale
    W_sig2 = W_f2 * W_plasma_frq**2 / W_frq2**2

    W_susc = [
        mp.DrudeSusceptibility(frequency=W_frq0, gamma=W_gam0, sigma=W_sig0),
        mp.LorentzianSusceptibility(frequency=W_frq1,
                                    gamma=W_gam1,
                                    sigma=W_sig1),
        mp.LorentzianSusceptibility(frequency=W_frq2,
                                    gamma=W_gam2,
                                    sigma=W_sig2)
    ]

    W = mp.Medium(epsilon=W_eps_inf, E_susceptibilities=W_susc)

    # crystalline Si, from M.A. Green, Solar Energy Materials and Solar Cells, vol. 92, pp. 1305-1310 (2008)
    # fitted Lorentzian parameters, only for 600nm-1100nm
    Si_eps_inf = 9.14
    Si_eps_imag = -0.0334
    Si_eps_imag_frq = 1 / 1.55
    Si_frq = 2.2384
    Si_gam = 4.3645e-02
    Si_sig = 14.797 / Si_frq**2

    Si = mp.Medium(epsilon=Si_eps_inf,
                   D_conductivity=2 * math.pi * Si_eps_imag_frq * Si_eps_imag /
                   Si_eps_inf,
                   E_susceptibilities=[
                       mp.LorentzianSusceptibility(frequency=Si_frq,
                                                   gamma=Si_gam,
                                                   sigma=Si_sig)
                   ])

    a = args.a  # lattice periodicity
    cone_r = args.cone_r  # cone radius
    cone_h = args.cone_h  # cone height
    wire_w = args.wire_w  # metal-grid wire width
    wire_h = args.wire_h  # metal-grid wire height
    trench_w = args.trench_w  # trench width
    trench_h = args.trench_h  # trench height
    Np = args.Np  # number of periods in supercell

    dair = 1.0  # air gap thickness
    dmcl = 1.7  # micro lens thickness
    dsub = 3000.0  # substrate thickness
    dpml = 1.0  # PML thickness

    sxy = Np * a
    sz = dpml + dair + dmcl + dsub + dpml
    cell_size = mp.Vector3(sxy, sxy, sz)

    boundary_layers = [
        mp.PML(dpml, direction=mp.Z, side=mp.High),
        mp.Absorber(dpml, direction=mp.Z, side=mp.Low)
    ]

    geometry = []

    if args.substrate:
        geometry = [
            mp.Sphere(material=SiO2,
                      radius=dmcl,
                      center=mp.Vector3(0, 0, 0.5 * sz - dpml - dair - dmcl)),
            mp.Block(material=Si,
                     size=mp.Vector3(mp.inf, mp.inf, dsub + dpml),
                     center=mp.Vector3(0, 0, -0.5 * sz + 0.5 * (dsub + dpml))),
            mp.Block(
                material=W,
                size=mp.Vector3(mp.inf, wire_w, wire_h),
                center=mp.Vector3(0, -0.5 * sxy + 0.5 * wire_w,
                                  -0.5 * sz + dpml + dsub + 0.5 * wire_h)),
            mp.Block(
                material=W,
                size=mp.Vector3(mp.inf, wire_w, wire_h),
                center=mp.Vector3(0, +0.5 * sxy - 0.5 * wire_w,
                                  -0.5 * sz + dpml + dsub + 0.5 * wire_h)),
            mp.Block(
                material=W,
                size=mp.Vector3(wire_w, mp.inf, wire_h),
                center=mp.Vector3(-0.5 * sxy + 0.5 * wire_w, 0,
                                  -0.5 * sz + dpml + dsub + 0.5 * wire_h)),
            mp.Block(material=W,
                     size=mp.Vector3(wire_w, mp.inf, wire_h),
                     center=mp.Vector3(+0.5 * sxy - 0.5 * wire_w, 0,
                                       -0.5 * sz + dpml + dsub + 0.5 * wire_h))
        ]

    if args.substrate and args.texture:
        for nx in range(Np):
            for ny in range(Np):
                cx = -0.5 * sxy + (nx + 0.5) * a
                cy = -0.5 * sxy + (ny + 0.5) * a
                geometry.append(
                    mp.Cone(material=SiO2,
                            radius=0,
                            radius2=cone_r,
                            height=cone_h,
                            center=mp.Vector3(
                                cx, cy,
                                0.5 * sz - dpml - dair - dmcl - 0.5 * cone_h)))

    if args.substrate:
        geometry.append(
            mp.Block(material=SiO2,
                     size=mp.Vector3(mp.inf, trench_w, trench_h),
                     center=mp.Vector3(
                         0, -0.5 * sxy + 0.5 * trench_w,
                         0.5 * sz - dpml - dair - dmcl - 0.5 * trench_h)))
        geometry.append(
            mp.Block(material=SiO2,
                     size=mp.Vector3(mp.inf, trench_w, trench_h),
                     center=mp.Vector3(
                         0, +0.5 * sxy - 0.5 * trench_w,
                         0.5 * sz - dpml - dair - dmcl - 0.5 * trench_h)))
        geometry.append(
            mp.Block(material=SiO2,
                     size=mp.Vector3(trench_w, mp.inf, trench_h),
                     center=mp.Vector3(
                         -0.5 * sxy + 0.5 * trench_w, 0,
                         0.5 * sz - dpml - dair - dmcl - 0.5 * trench_h)))
        geometry.append(
            mp.Block(material=SiO2,
                     size=mp.Vector3(trench_w, mp.inf, trench_h),
                     center=mp.Vector3(
                         +0.5 * sxy - 0.5 * trench_w, 0,
                         0.5 * sz - dpml - dair - dmcl - 0.5 * trench_h)))

    k_point = mp.Vector3(0, 0, 0)

    lambda_min = 0.7  # minimum source wavelength
    lambda_max = 1.0  # maximum source wavelength
    fmin = 1 / lambda_max
    fmax = 1 / lambda_min
    fcen = 0.5 * (fmin + fmax)
    df = fmax - fmin

    sources = [
        mp.Source(mp.GaussianSource(fcen, fwidth=df),
                  component=mp.Ex,
                  center=mp.Vector3(0, 0, 0.5 * sz - dpml - 0.5 * dair),
                  size=mp.Vector3(sxy, sxy, 0))
    ]

    sim = mp.Simulation(resolution=resolution,
                        cell_size=cell_size,
                        boundary_layers=boundary_layers,
                        geometry=geometry,
                        dimensions=3,
                        k_point=k_point,
                        sources=sources)

    nfreq = 50
    refl = sim.add_flux(
        fcen, df, nfreq,
        mp.FluxRegion(center=mp.Vector3(0, 0, 0.5 * sz - dpml),
                      size=mp.Vector3(sxy, sxy, 0)))
    trans_grid = sim.add_flux(
        fcen, df, nfreq,
        mp.FluxRegion(center=mp.Vector3(0, 0,
                                        -0.5 * sz + dpml + dsub + wire_h),
                      size=mp.Vector3(sxy, sxy, 0)))
    trans_sub_top = sim.add_flux(
        fcen, df, nfreq,
        mp.FluxRegion(center=mp.Vector3(0, 0, -0.5 * sz + dpml + dsub),
                      size=mp.Vector3(sxy, sxy, 0)))
    trans_sub_bot = sim.add_flux(
        fcen, df, nfreq,
        mp.FluxRegion(center=mp.Vector3(0, 0, -0.5 * sz + dpml),
                      size=mp.Vector3(sxy, sxy, 0)))

    sim.run(mp.at_beginning(mp.output_epsilon), until=0)

    if args.substrate:
        sim.load_minus_flux('refl-flux', refl)

    sim.run(until_after_sources=mp.stop_when_fields_decayed(
        50, mp.Ex, mp.Vector3(0, 0, -0.5 * sz + dpml + 0.5 * dsub), 1e-9))

    if not args.substrate:
        sim.save_flux('refl-flux', refl)

    sim.display_fluxes(refl, trans_grid, trans_sub_top, trans_sub_bot)
コード例 #21
0
Au_sig2 = Au_f2*Au_plasma_frq**2/Au_frq2**2
Au_f3 = 0.071
Au_frq3 = var[0]*eV_um_scale      # 0.418 um
Au_gam3 = 0.870*eV_um_scale
Au_sig3 = Au_f3*Au_plasma_frq**2/Au_frq3**2
Au_f4 = 0.601
Au_frq4 = var[0]*eV_um_scale      # 0.288 um
Au_gam4 = 2.494*eV_um_scale
Au_sig4 = Au_f4*Au_plasma_frq**2/Au_frq4**2
Au_f5 = 4.384
Au_frq5 = var[4]*eV_um_scale      # 0.093 um
Au_gam5 = 2.214*eV_um_scale
Au_sig5 = Au_f5*Au_plasma_frq**2/Au_frq5**2

Au_susc = [mp.DrudeSusceptibility(frequency=Au_frq0, gamma=Au_gam0, sigma=Au_sig0),
           mp.LorentzianSusceptibility(frequency=Au_frq1, gamma=Au_gam1, sigma=Au_sig1),
           mp.LorentzianSusceptibility(frequency=Au_frq2, gamma=Au_gam2, sigma=Au_sig2),
           mp.LorentzianSusceptibility(frequency=Au_frq3, gamma=Au_gam3, sigma=Au_sig3),
           mp.LorentzianSusceptibility(frequency=Au_frq4, gamma=Au_gam4, sigma=Au_sig4),
           mp.LorentzianSusceptibility(frequency=Au_frq5, gamma=Au_gam5, sigma=Au_sig5)]

Auour = mp.Medium(epsilon=1.0, E_susceptibilities=Au_susc, valid_freq_range=metal_range)
freqs = np.linspace(um_scale/0.7,um_scale/0.35,101)
au = np.empty(101,dtype=np.cdouble)
freqs = np.linspace(um_scale/0.7,um_scale/0.35,101)
au = np.empty(101,dtype=np.cdouble)
auour = np.empty(101,dtype=np.cdouble)
for i in range (101):
    auour[i]= Auour.epsilon(freqs[i])[1][1]
    au[i]= Au.epsilon(freqs[i])[1][1]
mix1 = np.empty(101,dtype=np.cdouble)
コード例 #22
0
# Speed of light in vacuum, m/s
c = 3e8

# default unit length is 1 um
um_scale = 1.0

SiO2_range = mp.FreqRange(min=1 / 1.77, max=1 / 0.25)

SiO2_frq1 = 1 / (0.103320160833333 * um_scale)
SiO2_gam1 = 0  #1/(12.3984193000000*um_scale)
SiO2_sig1 = 1.12

SiO2_susc = [
    mp.LorentzianSusceptibility(frequency=SiO2_frq1,
                                gamma=SiO2_gam1,
                                sigma=SiO2_sig1)
]

SiO2 = mp.Medium(epsilon=1.0,
                 E_susceptibilities=SiO2_susc,
                 valid_freq_range=SiO2_range)

# ---------------------------------------------------------------------------- #
# Let's view silicon's theoretical refractive index plot
# ---------------------------------------------------------------------------- #

# Data from Lukas's handbook
eps = 1
eps_lorentz = SiO2_sig1
omega0 = 2 * np.pi * 3e8 * SiO2_frq1 * 1e6