Exemple #1
0
    def add_line(self, position=0, spacing=0.1, tag=f"default_line"):
        """
        Add a line to the mesh

        position: Position
        spacing: Positive spacing at this location
        tag: a tag for matching contacts

        The spacing option is *positive spacing* to the next line that you have
        added.

        Additional lines are spaced from the first line using ps to the next
        specified line. The spacing of the lines are gradually spaced out to
        meet the spacing line of the next added line.

        So if you have thre lines::

            x=0.0 spacing=0.1
            x=1.0 spacing=1.0
            x=10.0 spacing=1.0

        The positions of the nodes should be about: 10 nodes from `0.0 um` to
        `0.1 um` and 10 nodes from `1.0 um` to `10.0 um` and no nodes from 10
        up.

        The purpose of this is to have tight mesh spacing in areas where it is
        important. If you had tight spacing everywhere, it could make the
        simulation much slower.
        """
        add_1d_mesh_line(mesh=self.name,
                         pos=position * self.scale,
                         ps=spacing * self.scale,
                         tag=tag)
Exemple #2
0
def simple_mesh(meshname='default_mesh', region='default_region', material='Si',
                top='top', bottom='bottom', thickness=10, spacing=0.1):
    """
    Creates a simple 1D mesh made of Si with metal contacts


    :param meshname:
    :param region:
    :param material:
    :param top:
    :param bottom:
    :param thickness: in nm, specify the thickness of the resistor
    :param spacing:
    :return:
    """
    thickness = thickness * 1E-4
    spacing = spacing * 1E-4  # convert nm to cm
    ds.create_1d_mesh(mesh=meshname)
    ds.add_1d_mesh_line(mesh=meshname, pos=0, ps=spacing, tag=top)
    ds.add_1d_mesh_line(mesh=meshname, pos=thickness, ps=spacing, tag=bottom)
    ds.add_1d_region(mesh=meshname, tag1=top, tag2=bottom, region=region, material=material)
    ds.add_1d_contact(material='metal', mesh=meshname, name=f"{top}_contact", tag=top)
    ds.add_1d_contact(material='metal', mesh=meshname, name=f"{bottom}_contact", tag=bottom)
    ds.finalize_mesh(mesh=meshname)
    return meshname, region, top, bottom
Exemple #3
0
def CreateMesh2(device, region):
    create_1d_mesh(mesh="dio")
    add_1d_mesh_line(mesh="dio", pos=0, ps=1e-7, tag="top")
    add_1d_mesh_line(mesh="dio", pos=0.5e-5, ps=1e-8, tag="mid")
    add_1d_mesh_line(mesh="dio", pos=1e-5, ps=1e-7, tag="bot")
    add_1d_contact(mesh="dio", name="top", tag="top", material="metal")
    add_1d_contact(mesh="dio", name="bot", tag="bot", material="metal")
    add_1d_region(mesh="dio",
                  material="Si",
                  region=region,
                  tag1="top",
                  tag2="bot")
    finalize_mesh(mesh="dio")
    create_device(mesh="dio", device=device)
Exemple #4
0
def p_n_junction(meshname='default_mesh', region1='p_region', region2='n_region', material1='CdS', material2='CdTe', thickness1=0.2, thickness2=2, spacing=0.05, top='top', interface='interface', bottom='bottom'):
    thickness1 = thickness1 * 1E-4
    thickness2 = thickness2 * 1E-4
    spacing = spacing * 1E-4  # convert nm to cm
    ds.create_1d_mesh(mesh=meshname)
    ds.add_1d_mesh_line(mesh=meshname, pos=0, ps=spacing/10, tag=top)
    ds.add_1d_mesh_line(mesh=meshname, pos=thickness1, ps=spacing/50, tag=interface)
    ds.add_1d_region(mesh=meshname, tag1=top, tag2=interface, region=region1, material='Si')
    ds.add_1d_mesh_line(mesh=meshname, pos=thickness1+thickness2, ps=spacing, tag=bottom)
    ds.add_1d_region(mesh=meshname, tag1=interface, tag2=bottom, region=region2, material='InAs')
    ds.add_1d_contact(material='metal', mesh=meshname, name=f"{top}_contact", tag=top)
    ds.add_1d_contact(material='metal', mesh=meshname, name=f"{bottom}_contact", tag=bottom)
    ds.add_1d_interface(mesh=meshname, tag=interface, name=interface)
    ds.finalize_mesh(mesh=meshname)
    return meshname
Exemple #5
0
def CreateMesh(device, region, meshname='diode'):
    '''
      Meshing
    '''
    create_1d_mesh(mesh=meshname)
    add_1d_mesh_line(mesh=meshname, pos=0, ps=1e-7, tag="top")
    add_1d_mesh_line(mesh=meshname, pos=0.5e-5, ps=1e-9, tag="mid")
    add_1d_mesh_line(mesh=meshname, pos=1e-5, ps=1e-7, tag="bot")
    add_1d_contact(mesh=meshname, name="top", tag="top", material="metal")
    add_1d_contact(mesh=meshname, name="bot", tag="bot", material="metal")
    add_1d_region(mesh=meshname,
                  material="Si",
                  region=region,
                  tag1="top",
                  tag2="bot")
    finalize_mesh(mesh=meshname)
    create_device(mesh=meshname, device=device)
Exemple #6
0
    'N_val': 1.8E19,
    'mobility_n': 25,
    'mobility_p': 100,
    'p_doping': 0,
    'n_doping': 1.1E18
}

# Devsim requires you create the entire mesh first include interfaces before specifying regions
# Create mesh

ds.create_1d_mesh(mesh=meshname)
# n1
top_tag = f"top_{CdS_region}"
interface_tag = f"bot_{CdS_region}"
bottom_tag = f"bot_{CdTe_region}"
ds.add_1d_mesh_line(mesh=meshname, pos=0, ps=spacing, tag=top_tag)
# add_1d_mesh_line(mesh=meshname, pos=n1_thick/2, ps=spacing, tag="mid_n1")
ds.add_1d_mesh_line(mesh=meshname,
                    pos=CdS_thickness,
                    ps=spacing,
                    tag=interface_tag)
ds.add_1d_region(mesh=meshname,
                 material="CdS",
                 region=CdS_region,
                 tag1=top_tag,
                 tag2=interface_tag)
ds.add_1d_contact(mesh=meshname, name=top_tag, tag=top_tag, material="metal")
# b
# add_1d_mesh_line(mesh=meshname, pos=n1_thick, ps=spacing, tag="top_b")
ds.add_1d_mesh_line(mesh=meshname,
                    pos=CdS_thickness + CdTe_thickness,
    for i in get_contact_list(device=device):
        if circuit_contacts and i in circuit_contacts:
            CreateSiliconDriftDiffusionAtContact(device, region, i, True)
        else:
            CreateSiliconDriftDiffusionAtContact(device, region, i)


#---- Start ----
device = "MyDevice"
region = "MyRegion"

# Make a mesh for this device and region
# CreateMesh(device=device, region=region)
meshname = 'diode'
create_1d_mesh(mesh=meshname)
add_1d_mesh_line(mesh=meshname, pos=0, ps=1e-7, tag="top")
add_1d_mesh_line(mesh=meshname, pos=0.5e-5, ps=1e-9, tag="mid")
add_1d_mesh_line(mesh=meshname, pos=1e-5, ps=1e-7, tag="bot")
add_1d_contact(mesh=meshname, name="top", tag="top", material="metal")
add_1d_contact(mesh=meshname, name="bot", tag="bot", material="metal")
add_1d_region(mesh=meshname,
              material="Si",
              region=region,
              tag1="top",
              tag2="bot")
finalize_mesh(mesh=meshname)
create_device(mesh=meshname, device=device)
SetSiliconParameters(device, region, 300)
set_parameter(device=device, region=region, name="taun", value=1e-8)
set_parameter(device=device, region=region, name="taup", value=1e-8)
Exemple #8
0
spacing = min([n1_thick, b_thick, n2_thick]) * 0.1
b_doping = 5E15
n_eg = 0.121  # eV
n_affinity = 0.052  # less than chi of InAs
b_eg = 1.636  # eV
b_affinity = 1.569  # less than chi of InAs
affinities = [n_affinity, b_affinity, n_affinity]
n_band_gap = 0.121  # eV
b_band_gap = 1.636  # eV

# Devsim requires you create the entire mesh first include interfaces before specifying regions
# Create mesh

ds.create_1d_mesh(mesh=meshname)
# n1
ds.add_1d_mesh_line(mesh=meshname, pos=0, ps=spacing, tag="top_n1")
# add_1d_mesh_line(mesh=meshname, pos=n1_thick/2, ps=spacing, tag="mid_n1")
ds.add_1d_mesh_line(mesh=meshname, pos=n1_thick, ps=spacing, tag="bot_n1")
ds.add_1d_region(mesh=meshname,
                 material="InAs",
                 region=n1_region,
                 tag1="top_n1",
                 tag2="bot_n1")
ds.add_1d_contact(mesh=meshname, name="top_n1", tag="top_n1", material="metal")
# b
# add_1d_mesh_line(mesh=meshname, pos=n1_thick, ps=spacing, tag="top_b")
ds.add_1d_mesh_line(mesh=meshname,
                    pos=n1_thick + (b_thick / 2),
                    ps=spacing,
                    tag="mid_b")
ds.add_1d_mesh_line(mesh=meshname,