def CreateSimpleMeshWithInterface(device, region0, region1, interface, material1='Si', material2='Si'): ''' Commonly used for the regressions device length: 1 spacing: 0.1 contacts: top (x=0), bot (x=1) interface: mid (x=0.5) ''' devsim.create_1d_mesh(mesh='dog') devsim.add_1d_mesh_line(mesh='dog', pos=0, ps=0.1, tag='top') devsim.add_1d_mesh_line(mesh='dog', pos=0.5, ps=0.1, tag='mid') devsim.add_1d_mesh_line(mesh='dog', pos=1, ps=0.1, tag='bot') devsim.add_1d_contact(mesh='dog', name='top', tag='top', material='metal') devsim.add_1d_contact(mesh='dog', name='bot', tag='bot', material='metal') devsim.add_1d_interface(mesh='dog', name=interface, tag='mid') devsim.add_1d_region(mesh='dog', material=material1, region=region0, tag1='top', tag2='mid') devsim.add_1d_region(mesh='dog', material=material2, region=region1, tag1='mid', tag2='bot') devsim.finalize_mesh(mesh='dog') devsim.create_device(mesh='dog', device=device)
def instantiate(filename, device, interface_siox, region_ox, region_si, contact_ox, contact_si, ox_material, si_material): ds.create_gmsh_mesh(mesh=device, file=filename) ds.add_gmsh_region(mesh=device, gmsh_name="oxide", region=region_ox, material=ox_material) ds.add_gmsh_region(mesh=device, gmsh_name="silicon", region=region_si, material=si_material) ds.add_gmsh_contact(mesh=device, gmsh_name="gate", region=region_ox, material="metal", name=contact_ox) ds.add_gmsh_contact(mesh=device, gmsh_name="sub", region=region_si, material="metal", name=contact_si) ds.add_gmsh_interface(mesh=device, gmsh_name="interface", region0=region_ox, region1=region_si, name=interface_siox) ds.finalize_mesh(mesh=device) ds.create_device(mesh=device, device=device)
def make_moscap(device, interface_siox, region_ox, region_si, contact_ox, contact_si, tox, tsi, ox_material, si_material): ''' need to generalize, but good enough for our examples ''' ds.create_1d_mesh(mesh="moscap") if False: ds.add_1d_mesh_line(mesh="moscap", pos=tox, ps=1e-7, tag="d0") ds.add_1d_mesh_line(mesh="moscap", pos=0.0, ns=1e-9, ps=1e-7, tag="d1") if tsi > 1e-6: ds.add_1d_mesh_line(mesh="moscap", pos=-1e-6, ps=5e-9) ds.add_1d_mesh_line(mesh="moscap", pos=-tsi, ps=1e-7, tag="d2") ds.add_1d_contact(mesh="moscap", name=contact_ox, tag="d0", material="metal") ds.add_1d_contact(mesh="moscap", name=contact_si, tag="d2", material="metal") ds.add_1d_interface(mesh="moscap", name=interface_siox, tag="d1") ds.add_1d_region(mesh="moscap", material=ox_material, region=region_ox, tag1="d0", tag2="d1") ds.add_1d_region(mesh="moscap", material=si_material, region=region_si, tag1="d1", tag2="d2") else: ds.add_1d_mesh_line(mesh="moscap", pos=-tox, ps=1e-7, tag="d0") ds.add_1d_mesh_line(mesh="moscap", pos=0.0, ps=1e-9, ns=1e-7, tag="d1") if tsi > 1e-6: ds.add_1d_mesh_line(mesh="moscap", pos=1e-6, ps=5e-9) ds.add_1d_mesh_line(mesh="moscap", pos=tsi, ps=1e-7, tag="d2") ds.add_1d_contact(mesh="moscap", name=contact_ox, tag="d0", material="metal") ds.add_1d_contact(mesh="moscap", name=contact_si, tag="d2", material="metal") ds.add_1d_interface(mesh="moscap", name=interface_siox, tag="d1") ds.add_1d_region(mesh="moscap", material=ox_material, region=region_ox, tag1="d0", tag2="d1") ds.add_1d_region(mesh="moscap", material=si_material, region=region_si, tag1="d1", tag2="d2") ds.finalize_mesh(mesh="moscap") ds.create_device(mesh="moscap", device=device)
def CreateNoiseMesh(device, region, material='Si'): ''' Commonly used for the regressions device length: 1 spacing: 0.1 contacts: top (x=0), bot (x=1) ''' devsim.create_1d_mesh (mesh='dog') devsim.add_1d_mesh_line(mesh='dog', pos=0, ps=5e-7, tag='top') devsim.add_1d_mesh_line(mesh='dog', pos=1e-5, ps=5e-7, tag='bot') devsim.add_1d_contact (mesh='dog', name='top', tag='top', material='metal') devsim.add_1d_contact (mesh='dog', name='bot', tag='bot', material='metal') devsim.add_1d_region (mesh='dog', material=material, region=region, tag1='top', tag2='bot') devsim.finalize_mesh (mesh='dog') devsim.create_device (mesh='dog', device=device)
def createMesh(device, region): devsim.create_2d_mesh(mesh="dog") devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=0, ps=1e-6) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=0.5e-5, ps=1e-8) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=1e-5, ps=1e-6) devsim.add_2d_mesh_line(mesh="dog", dir="y", pos=0, ps=1e-6) devsim.add_2d_mesh_line(mesh="dog", dir="y", pos=1e-5, ps=1e-6) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=-1e-8, ps=1e-8) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=1.001e-5, ps=1e-8) devsim.add_2d_region(mesh="dog", material="Si", region=region) devsim.add_2d_region(mesh="dog", material="Si", region="air1", xl=-1e-8, xh=0) devsim.add_2d_region(mesh="dog", material="Si", region="air2", xl=1.0e-5, xh=1.001e-5) devsim.add_2d_contact(mesh="dog", name="top", region=region, yl=0.8e-5, yh=1e-5, xl=0, xh=0, bloat=1e-10, material="metal") devsim.add_2d_contact(mesh="dog", name="bot", region=region, xl=1e-5, xh=1e-5, bloat=1e-10, material="metal") devsim.finalize_mesh(mesh="dog") devsim.create_device(mesh="dog", device=device)
# check my parser to verify that adding is possible (via dynamic_cast) # note this region won't have equation numbers devsim.add_2d_region( mesh="dog", material="gas", region="gas1", yl=-.001, yh=0.0) devsim.add_2d_region( mesh="dog", material="gas", region="gas2", yl=1.0, yh=1.001) devsim.add_2d_region( mesh="dog", material="Oxide", region="r0", xl=xmin, xh=xmax, yl=ymid1, yh=ymin) devsim.add_2d_region( mesh="dog", material="Silicon", region="r1", xl=xmin, xh=xmax, yl=ymid2, yh=ymid1) devsim.add_2d_region( mesh="dog", material="Silicon", region="r2", xl=xmin, xh=xmax, yl=ymid2, yh=ymax) #warn when leftover triangles are not encapsulated by region # not specifying bounding box means all intersecting nodes #bounding box is optional devsim.add_2d_interface( mesh="dog", name="i0", region0="r0", region1="r1") devsim.add_2d_interface( mesh="dog", name="i1", region0="r1", region1="r2", xl=0, xh=1, yl=ymid2, yh=ymid2, bloat=1.0e-10) devsim.add_2d_contact( mesh="dog", name="top", region="r0", yl=ymin, yh=ymin, bloat=1.0e-10, material="metal") devsim.add_2d_contact( mesh="dog", name="bot", region="r2", yl=ymax, yh=ymax, bloat=1.0e-10, material="metal") #contact can only apply interface devsim.finalize_mesh( mesh="dog") devsim.create_device(mesh="dog", device=device) devsim.node_model(device=device, name="NetDoping", region="gas1", equation="1e18") devsim.node_model(device=device, name="NetDoping", region="r0", equation="1e18") devsim.node_model(device=device, name="NetDoping", region="r1", equation="-1e15") devsim.node_model(device=device, name="NetDoping", region="r2", equation="-1e15") devsim.node_model(device=device, name="NetDoping", region="gas2", equation="-1e15") devsim.interface_normal_model(device=device, region="r0", interface="i0") devsim.interface_normal_model(device=device, region="r1", interface="i0") devsim.interface_normal_model(device=device, region="r1", interface="i1") devsim.interface_normal_model(device=device, region="r2", interface="i1") devsim.set_parameter(name="raxis_zero", value=0.0) devsim.set_parameter(name="raxis_variable", value="x")
name="bot", region="air", yl=y1, yh=y2, xl=x1, xh=x4, material="metal") devsim.add_2d_contact(mesh=device, name="top", region="air", yl=y3, yh=y4, xl=x2, xh=x3, material="metal") devsim.finalize_mesh(mesh=device) devsim.create_device(mesh=device, device=device) ### ### Set parameters on the region ### devsim.set_parameter(device=device, region=region, name="Permittivity", value=3.9 * 8.85e-14) ### ### Create the Potential solution variable ### devsim.node_solution(device=device, region=region, name="Potential")
devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_device_right, ps=max_x_spacing) devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_device_left, ps=max_x_spacing) devsim.add_2d_region(mesh="mos", material="Air" , region="air") devsim.add_2d_region(mesh="mos", material="Silicon", region="bulk", xl=x_bulk_left, xh=x_bulk_right, yl=y_bulk_bottom, yh=y_bulk_top) devsim.add_2d_region(mesh="mos", material="Silicon", region="gate", xl=x_gate_left, xh=x_gate_right, yl=y_oxide_top, yh=y_gate_top) devsim.add_2d_region(mesh="mos", material="Oxide" , region="oxide", xl=x_gate_left, xh=x_gate_right, yl=y_bulk_top, yh=y_oxide_top) devsim.add_2d_contact(mesh="mos", name="gate", region="gate", yl=y_gate_top, yh=y_gate_top, material="metal") devsim.add_2d_contact(mesh="mos", name="body", region="bulk", yl=y_bulk_bottom, yh=y_bulk_bottom, material="metal") devsim.add_2d_contact(mesh="mos", name="source", region="bulk", yl=y_bulk_top, yh=y_bulk_top, xl=x_device_left, xh=x_gate_left, material="metal") devsim.add_2d_contact(mesh="mos", name="drain" , region="bulk", yl=y_bulk_top, yh=y_bulk_top, xl=x_gate_right, xh=x_device_right, material="metal") devsim.add_2d_interface(mesh="mos", name="gate_oxide", region0="gate", region1="oxide") devsim.add_2d_interface(mesh="mos", name="bulk_oxide", region0="bulk", region1="oxide") devsim.finalize_mesh(mesh="mos") devsim.create_device(mesh="mos", device=device) format_dict= { 'gate_doping' : gate_doping, 'source_doping' : source_doping, 'drain_doping' : drain_doping, 'body_doping' : body_doping, 'bulk_doping' : bulk_doping, 'x_gate_left' : x_gate_left, 'x_gate_right' : x_gate_right, 'x_diffusion_decay' : x_diffusion_decay, 'y_diffusion' : y_diffusion, 'y_diffusion_decay' : y_diffusion_decay, 'y_bulk_bottom' : y_bulk_bottom,