def run_initial_bias(use_circuit_bias, net_doping=1e16): ''' use_circuit for topbias ''' test_common.SetupResistorConstants(device, region) test_common.SetupInitialResistorSystem(device, region, net_doping) test_common.SetupInitialResistorContact(device=device, contact='top', use_circuit_bias=use_circuit_bias) test_common.SetupInitialResistorContact(device=device, contact='bot') ##### ##### Initial DC Solution ##### devsim.solve(type='dc', absolute_error=1.0, relative_error=1e-10, maximum_iterations=30) for name in ("Potential", "IntrinsicElectrons"): devsim.print_node_values(device=device, region=region, name=name) test_common.SetupCarrierResistorSystem(device, region) test_common.SetupCarrierResistorContact(device=device, contact='top', use_circuit_bias=use_circuit_bias) test_common.SetupCarrierResistorContact(device, contact='bot')
import devsim import test_common device = 'MyDevice' regions = ('MySi1', 'MySi2') interface = 'MyInt' contacts = ('top', 'bot') test_common.CreateSimpleMeshWithInterface(device=device, region0=regions[0], region1=regions[1], interface=interface) for region in regions: test_common.SetupResistorConstants(device, region) test_common.SetupInitialResistorSystem(device, region, net_doping=1e16) for contact in contacts: test_common.SetupInitialResistorContact(device, contact=contact) test_common.SetupContinuousPotentialAtInterface(device, interface) ##### ##### Initial DC Solution ##### devsim.set_parameter(name="topbias", value=0.0) devsim.set_parameter(name="botbias", value=0.0) devsim.solve(type='dc', absolute_error=1.0, relative_error=1e-10, maximum_iterations=30)
import devsim import test_common devices = ("MyDevice1", "MyDevice2") region = "MyRegion" #### #### Meshing #### test_common.CreateSimpleMesh(device=devices[0], region=region) devsim.create_device(mesh="dog", device=devices[1]) for device in devices: test_common.SetupResistorConstants(device=device, region="") test_common.SetupInitialResistorSystem(device, region) devsim.add_circuit_node(name="cnode1", variable_update="log_damp") devsim.circuit_element(name="R1", n1="cnode1", n2=0, value=1e15) # ground these contacts devsim.set_parameter(device="MyDevice1", name="topbias", value=0.0) devsim.set_parameter(device="MyDevice2", name="botbias", value=0.0) test_common.SetupInitialResistorContact(device="MyDevice1", contact="top", use_circuit_bias=True, circuit_node="cnode1") test_common.SetupInitialResistorContact(device="MyDevice1", contact="bot", use_circuit_bias=False,