def setup_atox(device, region): CreateSolution(device=device, region=region, name="AtOx") for i in ds.get_interface_list(device=device): rlist = ds.get_region_list(device=device, interface=i) if region in rlist: if rlist[0] == region: ds.interface_model(device=device, interface=i, name="iindex", equation="node_index@r0") else: ds.interface_model(device=device, interface=i, name="iindex", equation="node_index@r1") nlist = ds.get_interface_model_values(device=device, interface=i, name="iindex") for j in nlist: print(j) ds.set_node_value(device=device, region=region, index=int(j), name="AtOx", value=1.0)
def SetupCarrierResistorContact(device, contact, use_circuit_bias=False, circuit_node=""): ''' Electron continuity equation at contact ''' if circuit_node: bias_name = circuit_node else: bias_name = contact + "bias" region = devsim.get_region_list(device=device, contact=contact)[0] if 'celec' not in devsim.get_node_model_list(device=device, region=region): devsim.node_model( device=device, region=region, name="celec", equation= "0.5*(NetDoping+(NetDoping^2 + 4 * IntrinsicDensity^2)^(0.5))") for name, equation in ( ("%snodeelectrons" % contact, "Electrons - celec"), ("%snodeelectrons:Electrons" % contact, "1."), ): devsim.contact_node_model(device=device, contact=contact, name=name, equation=equation) if use_circuit_bias: devsim.contact_equation(device=device, contact=contact, name="ElectronContinuityEquation", variable_name="Electrons", node_model="%snodeelectrons" % contact, edge_current_model="ElectronCurrent", circuit_node=bias_name) else: devsim.contact_equation(device=device, contact=contact, name="ElectronContinuityEquation", variable_name="Electrons", node_model="%snodeelectrons" % contact, edge_current_model="ElectronCurrent")
def setup_dd_si(device, region): # this is our solution variable CreateSolution(device, region, "Potential") CreateSolution(device, region, "Electrons") CreateSolution(device, region, "Holes") #These are needed for the Arora model CreateBandEdgeModels(device, region, ("Potential", "Le", "Lh")) #these are needed for velocity saturation #CreateEField(device, region) #CreateDField(device, region) opts = CreateAroraMobilityLF(device, region) #opts = CreateHFMobility(device, region, **opts) CreateSiliconDriftDiffusion(device, region, **opts) for i in ds.get_contact_list(device=device): r = ds.get_region_list(device=device, contact=i)[0] if r == region: set_parameter(name=GetContactBiasName(i), value=0.0) CreateSiliconDriftDiffusionContact(device, region, i, opts['Jn'], opts['Jp']) return opts
def format_value(value): if isinstance(value, str): ret = '"%s"' % value elif isinstance(value, float): ret = "%g" % value else: ret = value return ret with open("mos_2d_params.py", "w") as ofh: ofh.write('import devsim\n') for p in devsim.get_parameter_list(): v = format_value(devsim.get_parameter(name=p)) ofh.write('devsim.set_parameter(name="%s", value=%s)\n' % (p, v)) for i in devsim.get_device_list(): for p in devsim.get_parameter_list(device=i): v = format_value(devsim.get_parameter(device=i, name=p)) ofh.write( 'devsim.set_parameter(device="%s", name="%s", value=%s)\n' % (i, p, v)) for i in devsim.get_device_list(): for j in devsim.get_region_list(device=i): for p in devsim.get_parameter_list(device=i, region=j): v = format_value( devsim.get_parameter(device=i, region=j, name=p)) ofh.write( 'devsim.set_parameter(device="%s", region="%s", name="%s", value=%s)\n' % (i, j, p, v))
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import devsim devsim.load_devices( file="mesh1.msh") for x in devsim.get_device_list(): for y in devsim.get_region_list(device=x): print("%s %s" % (x, y)) device="MyDevice" region="MyRegion" devsim.set_parameter( device=device, region=region, name="Permittivity", value=3.9*8.85e-14) devsim.set_parameter( device=device, region=region, name="ElectricCharge", value=1.6e-19) devsim.node_solution( device=device, region=region, name="Potential") devsim.edge_from_node_model(device=device, region=region, node_model="Potential") devsim.edge_model( device=device, region=region, name="ElectricField", equation="(Potential@n0 - Potential@n1)*EdgeInverseLength") devsim.edge_model( device=device, region=region, name="ElectricField:Potential@n0", equation="EdgeInverseLength")