5. Parameters

Parameters can be set using the commands in Material Commands. There are two complementary formalisms for doing this.

5.1. Parameters

Parameters are set globally, on devices, or on regions of a device. The models on each device region are automatically updated whenever parameters change.

devsim.set_parameter(device="device", region="region",
  name="ThermalVoltage", value=0.0259)

They may also be used to control program behavior, as listed in Table 5.1:

Table 5.1 Parameters controlling program behavior.

Parameter

Description

debug_level

info, verbose Section 9.3.5

threads_available

value=1, Section 9.3.6

threads_task_size

value=?, Section 9.3.6

node_volume_model

Section 4.6

edge_couple_model

Section 4.6

edge_node0_volume_model

Section 4.6

edge_node1_volume_model

Section 4.6

element_edge_couple_model

Section 4.6

element_node0_volume_model

Section 4.6

element_node1_volume_model

Section 4.6

extended_solver

value=False Extended precision matrix and RHS assembly and error evaluations. Linear solver and circuit assembly is still double precision``

extended_model

value=False Extended precision model evaluation

extended_equation

value=False Extended precision equation evaluation

surface_area_model

Model for integration of flux and hybrid interfaces.

5.2. Environment Variables

Environment variables to control program behavior are listed in Table 5.2:. Please consult Section 2: for the most up to information concerning their usage.

Table 5.2 Environment controlling program behavior.

Environment Variable

Description

DEVSIM_MATH_LIBS

List of BLAS/LAPACK libraries to load instead of system defaults

DEVSIM_NEW_SYMBOLIC

When set, do a new symbolic matrix factorization during direct solve iterations

5.3. Material database entries

Alternatively, parameters may be set based on material types. A database file is used for getting values on the regions of the device.

devsim.create_db(filename="foodb")
devsim.add_db_entry(material="global", parameter="q", value=1.60217646e-19,
  unit="coul", description="Electron Charge")
devsim.add_db_entry(material="Si", parameter="one",
  value=1, unit="", description="")
devsim.close_db

When a database entry is not available for a specific material, the parameter will be looked up on the global material entry.

5.4. Discussion

Both parameters and material database entries may be used in model expressions. Parameters have precedence in this situation. If a parameter is not found, then DEVSIM will also look for a circuit node by the name used in the model expression.