API Reference
This section provides detailed API documentation for all PyPADRE classes.
Device Factory Functions
Simulation
Base Classes
Base classes for PADRE input deck components.
- class nanohubpadre.base.PadreCommand[source]
Bases:
ABCBase class for all PADRE input deck commands.
- class nanohubpadre.base.Comment(text: str)[source]
Bases:
PadreCommandA comment line in the PADRE input deck.
Mesh
Mesh-related classes for PADRE simulations.
Provides classes for defining rectangular and triangular meshes, including X.MESH, Y.MESH, Z.MESH, and MESH commands.
- class nanohubpadre.mesh.XMesh(node: int, location: float, ratio: float | None = None, density: float | None = None)[source]
Bases:
PadreCommandDefine X grid line locations in a rectangular mesh.
- Parameters:
Example
>>> x = XMesh(node=1, location=0.0) >>> x = XMesh(node=30, location=2.0, ratio=1.2)
- class nanohubpadre.mesh.YMesh(node: int, location: float, ratio: float | None = None, density: float | None = None)[source]
Bases:
PadreCommandDefine Y grid line locations in a rectangular mesh.
- Parameters:
Example
>>> y = YMesh(node=1, location=-0.04) # oxide surface >>> y = YMesh(node=20, location=1.0, ratio=1.4)
- class nanohubpadre.mesh.ZMesh(node: int, location: float, ratio: float | None = None, density: float | None = None)[source]
Bases:
PadreCommandDefine Z grid plane locations for 3D meshes.
- Parameters:
- class nanohubpadre.mesh.Mesh(rectangular: bool | None = None, nx: int | None = None, ny: int | None = None, nz: int | None = None, width: float | None = None, infile: str | None = None, outfile: str | None = None, previous: bool | None = None, tri: bool | None = None, cylindrical: bool = False, ascii_in: bool = True, ascii_out: bool = True, smooth_key: int | None = None, it_smooth: int | None = None, hetero: bool = False, condense: str | None = None, flip_y: bool | None = None, scale: int | None = None, diag_flip: bool = False, pack_reg: bool = False, unpack_reg: bool = False)[source]
Bases:
PadreCommandDefine mesh configuration for PADRE simulation.
The Mesh class handles rectangular mesh generation, loading previous meshes, or reading triangular meshes from external files.
- Parameters:
rectangular (bool, optional) – Create a rectangular mesh using X.MESH/Y.MESH lines
nx (int, optional) – Number of nodes in x-direction (implies rectangular=True)
ny (int, optional) – Number of nodes in y-direction
nz (int, optional) – Number of grid planes in z-direction (default=1 for 2D)
width (float, optional) – Width in z-dimension for 2D/3D simulations (microns)
infile (str, optional) – Input mesh file (from previous PADRE run or tri generator)
outfile (str, optional) – Output mesh file name
previous (bool, optional) – Load a previously generated PADRE mesh
tri (bool, optional) – Load mesh from tri mesh generator
cylindrical (bool, optional) – Use cylindrical symmetry about x=xmin
ascii_in (bool, optional) – Input file is ASCII format (default True)
ascii_out (bool, optional) – Output file in ASCII format (default True)
smooth_key (int, optional) – Mesh smoothing options (see PADRE manual)
it_smooth (int, optional) – Maximum smoothing iterations
hetero (bool, optional) – Force heterostructure data format
condense (str, optional) – Region condensation (“all”, “ins”, “semi”, “none”)
Example
>>> # Rectangular mesh >>> mesh = Mesh(nx=40, ny=17, outfile="mesh1.pg") >>> >>> # Load previous mesh >>> mesh = Mesh(infile="mesh1.pg") >>> >>> # 3D mesh >>> mesh = Mesh(infile="mesh2d", nz=10, width=5, outfile="mesh3d")
- __init__(rectangular: bool | None = None, nx: int | None = None, ny: int | None = None, nz: int | None = None, width: float | None = None, infile: str | None = None, outfile: str | None = None, previous: bool | None = None, tri: bool | None = None, cylindrical: bool = False, ascii_in: bool = True, ascii_out: bool = True, smooth_key: int | None = None, it_smooth: int | None = None, hetero: bool = False, condense: str | None = None, flip_y: bool | None = None, scale: int | None = None, diag_flip: bool = False, pack_reg: bool = False, unpack_reg: bool = False)[source]
- add_x_mesh(node: int, location: float, ratio: float | None = None, density: float | None = None) Mesh[source]
Add an X.MESH line.
- add_y_mesh(node: int, location: float, ratio: float | None = None, density: float | None = None) Mesh[source]
Add a Y.MESH line.
- add_z_mesh(node: int, location: float, ratio: float | None = None, density: float | None = None) Mesh[source]
Add a Z.MESH line.
- classmethod rectangular_grid(x_nodes: List[tuple], y_nodes: List[tuple], outfile: str | None = None) Mesh[source]
Create a rectangular mesh from node specifications.
- Parameters:
Example
>>> mesh = Mesh.rectangular_grid( ... x_nodes=[(1, 0), (30, 2)], ... y_nodes=[(1, -0.04), (5, 0), (20, 1, 1.4)], ... outfile="mesh.pg" ... )
Region
Region definition for PADRE simulations.
Defines material regions within the device mesh.
- class nanohubpadre.region.Region(number: int, material: str | None = None, semiconductor: bool | None = None, insulator: bool | None = None, ix_low: int | None = None, ix_high: int | None = None, iy_low: int | None = None, iy_high: int | None = None, x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_min: float | None = None, z_max: float | None = None, newnum: int | None = None, silicon: bool = False, gaas: bool = False, germanium: bool = False, oxide: bool = False, nitride: bool = False, sapphire: bool = False)[source]
Bases:
PadreCommandDefine a material region in the device mesh.
Every element in the mesh must be assigned to some material region.
- Parameters:
number (int) – Region number identifier
material (str, optional) – Material name (e.g., “silicon”, “gaas”, “sio2”, “si3n4”)
semiconductor (bool, optional) – Mark region as semiconductor (carrier transport computed)
insulator (bool, optional) – Mark region as insulator (only displacement currents)
meshes) (Position by indices (for rectangular)
ix_low (int, optional) – X index bounds
ix_high (int, optional) – X index bounds
iy_low (int, optional) – Y index bounds
iy_high (int, optional) – Y index bounds
coordinates (Position by)
x_min (float, optional) – X coordinate bounds (microns)
x_max (float, optional) – X coordinate bounds (microns)
y_min (float, optional) – Y coordinate bounds (microns)
y_max (float, optional) – Y coordinate bounds (microns)
z_min (float, optional) – Z coordinate bounds (microns)
z_max (float, optional) – Z coordinate bounds (microns)
newnum (int, optional) – Assign a new region number to this subregion
compatibility) (Predefined materials (for backward)
silicon
gaas
germanium
oxide
nitride
sapphire
Example
>>> # Silicon substrate region >>> r1 = Region(number=1, material="silicon", semiconductor=True, ... ix_low=1, ix_high=25, iy_low=4, iy_high=20) >>> >>> # Gate oxide >>> r2 = Region(number=2, material="sio2", insulator=True, ... x_min=0, x_max=1, y_min=-0.04, y_max=0)
- SEMICONDUCTORS = {'aga45', 'gaas', 'germanium', 'iga53', 'poly', 'sige', 'silicon'}
- INSULATORS = {'nitride', 'oxide', 'sapphire', 'si3n4', 'sio2'}
- __init__(number: int, material: str | None = None, semiconductor: bool | None = None, insulator: bool | None = None, ix_low: int | None = None, ix_high: int | None = None, iy_low: int | None = None, iy_high: int | None = None, x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_min: float | None = None, z_max: float | None = None, newnum: int | None = None, silicon: bool = False, gaas: bool = False, germanium: bool = False, oxide: bool = False, nitride: bool = False, sapphire: bool = False)[source]
Electrode
Electrode definition for PADRE simulations.
Defines electrode locations on device boundaries.
- class nanohubpadre.electrode.Electrode(number: int, ix_low: int | None = None, ix_high: int | None = None, iy_low: int | None = None, iy_high: int | None = None, x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_min: float | None = None, z_max: float | None = None, region: int | None = None, clear: bool = False, include: int | None = None, dump: int | None = None)[source]
Bases:
PadreCommandDefine an electrode on the device.
Electrodes can be defined by index bounds (rectangular mesh) or by spatial coordinates.
- Parameters:
number (int) – Electrode number (1-10, using 0 for 10)
indices (Position by)
ix_low (int, optional) – X index bounds
ix_high (int, optional) – X index bounds
iy_low (int, optional) – Y index bounds
iy_high (int, optional) – Y index bounds
coordinates (Position by)
x_min (float, optional) – X coordinate bounds (microns)
x_max (float, optional) – X coordinate bounds (microns)
y_min (float, optional) – Y coordinate bounds (microns)
y_max (float, optional) – Y coordinate bounds (microns)
z_min (float, optional) – Z coordinate bounds (microns)
z_max (float, optional) – Z coordinate bounds (microns)
region (int, optional) – Restrict electrode to specified region number
operations (Special)
clear (bool, optional) – Reinitialize/clear this electrode
include (int, optional) – Include another electrode into this one
dump (int, optional) – Print terminal info separately for included electrode
Example
>>> # Back contact >>> e1 = Electrode(number=1, ix_low=1, ix_high=40, iy_low=17, iy_high=17) >>> >>> # Gate electrode >>> e2 = Electrode(number=2, x_min=-1, x_max=1, y_min=-0.05, y_max=-0.05)
- __init__(number: int, ix_low: int | None = None, ix_high: int | None = None, iy_low: int | None = None, iy_high: int | None = None, x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_min: float | None = None, z_max: float | None = None, region: int | None = None, clear: bool = False, include: int | None = None, dump: int | None = None)[source]
Doping
Doping profile definitions for PADRE simulations.
Supports uniform, Gaussian, linear, and file-based doping profiles.
- class nanohubpadre.doping.Doping(uniform: bool = False, gaussian: bool = False, linear: bool = False, suprem3: bool = False, new_suprem3: bool = False, table_1d: bool = False, profile_2d: bool = False, bison: bool = False, reload: bool = False, n_type: bool = False, p_type: bool = False, donor: bool = False, acceptor: bool = False, boron: bool = False, phosphorus: bool = False, arsenic: bool = False, antimony: bool = False, concentration: float | None = None, dose: float | None = None, characteristic: float | None = None, junction: float | None = None, peak: float | None = None, x_left: float | None = None, x_right: float | None = None, y_top: float | None = None, y_bottom: float | None = None, z_front: float | None = None, z_back: float | None = None, x_origin: float | None = None, y_origin: float | None = None, region: int | List[int] | None = None, infile: str | None = None, outfile: str | None = None, ascii_in: bool = True, ascii_out: bool = True, direction: str = 'y', ratio_lateral: float | None = None, lat_char: float | None = None, z_char: float | None = None, erfc_lateral: bool = False, start: float | None = None, initialize: bool = False, compensate: bool = False, negate: bool = False, maxdop: float | None = None)[source]
Bases:
PadreCommandDefine doping profiles in the device.
Supports multiple profile types: uniform, Gaussian, linear, SUPREM-III, 1D tables, and 2D profiles.
- Parameters:
of) (Dopant type (one)
uniform (bool) – Uniform doping concentration
gaussian (bool) – Gaussian profile
linear (bool) – Linear profile
suprem3 (bool) – Read from SUPREM-III output
new_suprem3 (bool) – Read from newer SUPREM-III “export” format
table_1d (bool) – Read from 1D depth vs concentration table
profile_2d (bool) – Load 2D profile from BIPAD format file
bison (bool) – Load 2D profile from BISON format
reload (bool) – Reload from previous PADRE doping file
of)
n_type (bool) – N-type dopant
p_type (bool) – P-type dopant
donor (bool) – Donor impurity (same as n_type)
acceptor (bool) – Acceptor impurity (same as p_type)
parameters (Profile)
concentration (float) – Peak concentration (atoms/cm^3)
dose (float) – Total dose
characteristic (float) – Characteristic length (microns)
junction (float) – Junction depth (microns)
peak (float) – Peak position along profile direction
bounds (Location)
x_left (float) – X bounds (microns)
x_right (float) – X bounds (microns)
y_top (float) – Y bounds (microns)
y_bottom (float) – Y bounds (microns)
z_front (float) – Z bounds (microns)
z_back (float) – Z bounds (microns)
x_origin (float) – Origin for 2D profiles
y_origin (float) – Origin for 2D profiles
input (File)
infile (str) – Input file name
outfile (str) – Output doping file
direction (str) – Profile direction (“x” or “y”, default “y”)
ratio_lateral (float) – Lateral to principal characteristic length ratio
lat_char (float) – Lateral characteristic length
erfc_lateral (bool) – Use error function for lateral profile
Example
>>> # Uniform substrate doping >>> d1 = Doping(uniform=True, concentration=1e16, p_type=True) >>> >>> # Gaussian N+ source/drain >>> d2 = Doping(gaussian=True, concentration=9e19, n_type=True, ... x_right=4, junction=1.3, ratio_lateral=0.6, ... erfc_lateral=True)
- __init__(uniform: bool = False, gaussian: bool = False, linear: bool = False, suprem3: bool = False, new_suprem3: bool = False, table_1d: bool = False, profile_2d: bool = False, bison: bool = False, reload: bool = False, n_type: bool = False, p_type: bool = False, donor: bool = False, acceptor: bool = False, boron: bool = False, phosphorus: bool = False, arsenic: bool = False, antimony: bool = False, concentration: float | None = None, dose: float | None = None, characteristic: float | None = None, junction: float | None = None, peak: float | None = None, x_left: float | None = None, x_right: float | None = None, y_top: float | None = None, y_bottom: float | None = None, z_front: float | None = None, z_back: float | None = None, x_origin: float | None = None, y_origin: float | None = None, region: int | List[int] | None = None, infile: str | None = None, outfile: str | None = None, ascii_in: bool = True, ascii_out: bool = True, direction: str = 'y', ratio_lateral: float | None = None, lat_char: float | None = None, z_char: float | None = None, erfc_lateral: bool = False, start: float | None = None, initialize: bool = False, compensate: bool = False, negate: bool = False, maxdop: float | None = None)[source]
- classmethod gaussian_n(concentration: float, junction: float, peak: float = 0, **kwargs) Doping[source]
Create Gaussian N-type doping profile.
Contact
Contact boundary conditions for PADRE simulations.
Defines physical parameters for electrodes including work functions, surface recombination, and lumped elements.
- class nanohubpadre.contact.Contact(number: int | None = None, all_contacts: bool = False, neutral: bool = False, aluminum: bool = False, p_polysilicon: bool = False, n_polysilicon: bool = False, molybdenum: bool = False, tungsten: bool = False, mo_disilicide: bool = False, tu_disilicide: bool = False, workfunction: float | None = None, min_workfunction: float | None = None, surf_rec: bool = False, n_surf_rec: bool = False, p_surf_rec: bool = False, vsurfn: float | None = None, vsurfp: float | None = None, barrierl: bool = False, alpha: float | None = None, beta: float | None = None, current: float | None = None, resistance: float | None = None, capacitance: float | None = None, inductance: float | None = None, distributed: bool = False, con_resist: float | None = None, r_table: str | None = None, r_scale: float | None = None, one_d_base: bool = False)[source]
Bases:
PadreCommandDefine physical parameters for an electrode contact.
- Parameters:
number (int, optional) – Electrode number to configure
all_contacts (bool) – Apply to all electrodes
of) (Work function specification (one)
neutral (bool) – Charge-neutral ohmic contact (default)
aluminum (bool) – Aluminum contact (4.17 V)
p_polysilicon (bool) – P+ polysilicon (4.17 + Egap V)
n_polysilicon (bool) – N+ polysilicon (4.17 V)
molybdenum (bool) – Molybdenum (4.53 V)
tungsten (bool) – Tungsten (4.63 V)
mo_disilicide (bool) – Mo disilicide (4.80 V)
tu_disilicide (bool) – W disilicide (4.80 V)
workfunction (float) – Custom work function (V)
min_workfunction (float) – Minority carrier barrier height (V)
recombination (Surface)
surf_rec (bool) – Enable surface recombination for both carriers
n_surf_rec (bool) – Enable electron surface recombination
p_surf_rec (bool) – Enable hole surface recombination
vsurfn (float) – Electron surface recombination velocity (cm/s)
vsurfp (float) – Hole surface recombination velocity (cm/s)
barrierl (bool) – Enable barrier lowering
alpha (float) – Linear dipole barrier lowering coefficient
conditions (Boundary)
current (float) – Current boundary condition (A/um)
resistance (float) – Lumped resistance (Ohms)
capacitance (float) – Lumped capacitance (F)
inductance (float) – Lumped inductance (H)
distributed (bool) – Distribute lumped element along contact
con_resist (float) – Distributed contact resistance (Ohm-cm^2)
Example
>>> # Ohmic contacts for all electrodes >>> c_all = Contact(all_contacts=True, neutral=True) >>> >>> # Schottky contact with surface recombination >>> c2 = Contact(number=2, aluminum=True, surf_rec=True, barrierl=True) >>> >>> # Add lumped resistor >>> c3 = Contact(number=3, resistance=1e5)
- __init__(number: int | None = None, all_contacts: bool = False, neutral: bool = False, aluminum: bool = False, p_polysilicon: bool = False, n_polysilicon: bool = False, molybdenum: bool = False, tungsten: bool = False, mo_disilicide: bool = False, tu_disilicide: bool = False, workfunction: float | None = None, min_workfunction: float | None = None, surf_rec: bool = False, n_surf_rec: bool = False, p_surf_rec: bool = False, vsurfn: float | None = None, vsurfp: float | None = None, barrierl: bool = False, alpha: float | None = None, beta: float | None = None, current: float | None = None, resistance: float | None = None, capacitance: float | None = None, inductance: float | None = None, distributed: bool = False, con_resist: float | None = None, r_table: str | None = None, r_scale: float | None = None, one_d_base: bool = False)[source]
- classmethod ohmic(number: int | None = None, all_contacts: bool = False) Contact[source]
Create an ohmic (charge-neutral) contact.
Material
Material property definitions for PADRE simulations.
Defines physical parameters for semiconductor and insulator materials.
- class nanohubpadre.material.Alloy(name: str, material1: str, x1: float, material2: str, x2: float, material3: str | None = None, x3: float | None = None, material4: str | None = None, x4: float | None = None)[source]
Bases:
PadreCommandDefine an alloy material from predefined materials.
The alloy can then be used with MATERIAL lines to create new material systems with interpolated properties.
- Parameters:
name (str) – Name of the alloy to create
material1 (str) – First material name
x1 (float) – Compositional fraction for material1 (0-1)
material2 (str) – Second material name
x2 (float) – Compositional fraction for material2
material3 (str, optional) – Third material name
x3 (float, optional) – Compositional fraction for material3
material4 (str, optional) – Fourth material name
x4 (float, optional) – Compositional fraction for material4
Example
>>> # SiGe alloy >>> alloy = Alloy(name="sige", ... material1="silicon", x1=0, ... material2="germanium", x2=1)
- class nanohubpadre.material.Material(name: str, default: str | None = None, alloy: str | None = None, composition: float | None = None, n_type: bool = False, p_type: bool = False, no_charge: bool = False, eg300: float | None = None, eg_alpha: float | None = None, eg_beta: float | None = None, affinity: float | None = None, decdev: float | None = None, decdeg: float | None = None, ec_off: float | None = None, refoff: str | None = None, permittivity: float | None = None, qf: float | None = None, nc300: float | None = None, nv300: float | None = None, gcb: float | None = None, gvb: float | None = None, edb: float | None = None, eab: float | None = None, arichn: float | None = None, arichp: float | None = None, mun: float | None = None, mup: float | None = None, vsatn: float | None = None, vsatp: float | None = None, tauwn: float | None = None, tauwp: float | None = None, taun0: float | List[float] | None = None, taup0: float | List[float] | None = None, taur0: float | None = None, ntaun: float | None = None, ntaup: float | None = None, ntaur: float | None = None, b0dir: float | None = None, augn: float | None = None, augp: float | None = None, trap_type: str | None = None, etrap: float | List[float] | None = None, ntrap: float | List[float] | None = None, gen_con: float | None = None, in_model: str | None = None, ip_model: str | None = None, en_model: str | None = None, ep_model: str | None = None, gn_model: str | None = None, gp_model: str | None = None, cn_model: str | None = None, cp_model: str | None = None, dn_model: str | None = None, dp_model: str | None = None, wn_model: str | None = None, wp_model: str | None = None, bgnn_model: str | None = None, bgnp_model: str | None = None, ln_mu: List[float] | None = None, lp_mu: List[float] | None = None, iin_mu: List[float] | None = None, iip_mu: List[float] | None = None, en_mu: List[float] | None = None, ep_mu: List[float] | None = None, gn_mu: List[float] | None = None, gp_mu: List[float] | None = None, en_ion: List[float] | None = None, ep_ion: List[float] | None = None, an_ion: List[float] | None = None, ap_ion: List[float] | None = None, bn_ion: List[float] | None = None, bp_ion: List[float] | None = None, n_bgn: List[float] | None = None, p_bgn: List[float] | None = None)[source]
Bases:
PadreCommandDefine material properties for a region.
Many parameters have defaults for standard materials (silicon, gaas, etc.).
- Parameters:
name (str) – Material name (new or predefined)
default (str, optional) – Copy parameters from this material
alloy (str, optional) – Alloy name to interpolate from
composition (float, optional) – Compositional fraction for alloy (0-1)
structure (Band)
eg300 (float) – Energy gap at 300K (eV)
eg_alpha (float) – Eg temperature coefficient alpha
eg_beta (float) – Eg temperature coefficient beta
affinity (float) – Electron affinity (eV)
ec_off (float) – Conduction band offset (eV)
Constants
permittivity (float) – Dielectric permittivity (F/cm)
nc300 (float) – Conduction band density at 300K (/cm^3)
nv300 (float) – Valence band density at 300K (/cm^3)
mun (float) – Electron mobility at 300K (cm^2/V-s)
mup (float) – Hole mobility at 300K (cm^2/V-s)
vsatn (float) – Electron saturation velocity at 300K (cm/s)
vsatp (float) – Hole saturation velocity at 300K (cm/s)
Lifetimes
ntaun (float) – Electron lifetime concentration parameter (/cm^3)
ntaup (float) – Hole lifetime concentration parameter (/cm^3)
Auger
augn (float) – Electron Auger coefficient (cm^6/s)
augp (float) – Hole Auger coefficient (cm^6/s)
Models
in_model (str) – Ionized impurity scattering model
en_model (str) – Velocity saturation model (electrons)
ep_model (str) – Velocity saturation model (holes)
gn_model (str) – Gate-field mobility model (electrons)
gp_model (str) – Gate-field mobility model (holes)
bgnn_model (str) – Band-gap narrowing model (electrons)
bgnp_model (str) – Band-gap narrowing model (holes)
n_type (bool) – Set separate values for n-type/p-type material
p_type (bool) – Set separate values for n-type/p-type material
Example
>>> # Define silicon with custom lifetimes >>> mat = Material(name="silicon", taun0=1e-6, taup0=1e-6) >>> >>> # SiGe alloy material >>> mat = Material(name="sige30", alloy="sige", composition=0.3, ... eg300=0.830)
- __init__(name: str, default: str | None = None, alloy: str | None = None, composition: float | None = None, n_type: bool = False, p_type: bool = False, no_charge: bool = False, eg300: float | None = None, eg_alpha: float | None = None, eg_beta: float | None = None, affinity: float | None = None, decdev: float | None = None, decdeg: float | None = None, ec_off: float | None = None, refoff: str | None = None, permittivity: float | None = None, qf: float | None = None, nc300: float | None = None, nv300: float | None = None, gcb: float | None = None, gvb: float | None = None, edb: float | None = None, eab: float | None = None, arichn: float | None = None, arichp: float | None = None, mun: float | None = None, mup: float | None = None, vsatn: float | None = None, vsatp: float | None = None, tauwn: float | None = None, tauwp: float | None = None, taun0: float | List[float] | None = None, taup0: float | List[float] | None = None, taur0: float | None = None, ntaun: float | None = None, ntaup: float | None = None, ntaur: float | None = None, b0dir: float | None = None, augn: float | None = None, augp: float | None = None, trap_type: str | None = None, etrap: float | List[float] | None = None, ntrap: float | List[float] | None = None, gen_con: float | None = None, in_model: str | None = None, ip_model: str | None = None, en_model: str | None = None, ep_model: str | None = None, gn_model: str | None = None, gp_model: str | None = None, cn_model: str | None = None, cp_model: str | None = None, dn_model: str | None = None, dp_model: str | None = None, wn_model: str | None = None, wp_model: str | None = None, bgnn_model: str | None = None, bgnp_model: str | None = None, ln_mu: List[float] | None = None, lp_mu: List[float] | None = None, iin_mu: List[float] | None = None, iip_mu: List[float] | None = None, en_mu: List[float] | None = None, ep_mu: List[float] | None = None, gn_mu: List[float] | None = None, gp_mu: List[float] | None = None, en_ion: List[float] | None = None, ep_ion: List[float] | None = None, an_ion: List[float] | None = None, ap_ion: List[float] | None = None, bn_ion: List[float] | None = None, bp_ion: List[float] | None = None, n_bgn: List[float] | None = None, p_bgn: List[float] | None = None)[source]
Models
Physical models configuration for PADRE simulations.
Controls recombination, mobility, and other physical models.
- class nanohubpadre.models.Models(temperature: float = 300.0, srh: bool = False, auger: bool = False, direct: bool = False, deeptrap: bool = False, conlife: bool = False, impact: bool = False, tunneling: bool = False, laser: bool = False, bgn: bool = False, statistics: str = 'boltzmann', incomplete: bool = False, conmob: bool = False, ccmob: bool = False, fldmob: bool = False, gatmob: bool = False, flddif: bool = False, neutral: bool = False, e_region: int | List[int] | None = None, g_region: int | List[int] | None = None, d_region: int | List[int] | None = None, e_drive: str | None = None, g_drive: str | None = None, d_drive: str | None = None, i_drive: str | None = None, i_current: str | None = None, jtherm: bool = True, et_form: bool = False, c1_sign: int | None = None, c2_sign: int | None = None, c1_type: int | None = None, c2_type: int | None = None, gen_nois: bool = False, diff_noi: bool = False, one_over_f_n: bool = False, print_models: bool = False)[source]
Bases:
PadreCommandConfigure physical models for the simulation.
- Parameters:
temperature (float) – Ambient temperature in Kelvin (default 300K)
models (Mobility)
srh (bool) – Shockley-Read-Hall recombination
auger (bool) – Auger recombination
direct (bool) – Direct radiative recombination
deeptrap (bool) – Deep-level traps
conlife (bool) – Concentration-dependent lifetimes
impact (bool) – Impact ionization generation
tunneling (bool) – Band-to-band tunneling
laser (bool) – Stimulated emission
structure (Band)
bgn (bool) – Band-gap narrowing
statistics (str) – Carrier statistics (“boltzmann”, “fermi”, “2dgas”)
incomplete (bool) – Incomplete ionization
models
conmob (bool) – Concentration-dependent mobility (ionized impurity scattering)
ccmob (bool) – Carrier-carrier scattering
fldmob (bool) – Field-dependent mobility (velocity saturation)
gatmob (bool) – Gate-field dependent mobility
flddif (bool) – Field-dependent diffusivity
neutral (bool) – Neutral impurity scattering
selection (Region)
e_region (int or list) – Regions for velocity saturation model
specification (Driving force)
e_drive (str) – Parallel field drive term
g_drive (str) – Gate field drive term
d_drive (str) – Diffusivity drive term
i_drive (str) – Impact ionization drive term
print_models (bool) – Print model status and coefficients
Example
>>> # Basic drift-diffusion with SRH >>> models = Models(temperature=300, srh=True, conmob=True, fldmob=True) >>> >>> # Energy balance simulation >>> models = Models(srh=True, auger=True, bgn=True, ... statistics="fermi", fldmob=True)
- DRIVE_OPTIONS = ['eoj', 'eoqf', 'ex', 'ey', 'emag', 'qf', 'qfb']
- G_DRIVE_OPTIONS = ['exj', 'exqf', 'ex', 'ey', 'emag']
- __init__(temperature: float = 300.0, srh: bool = False, auger: bool = False, direct: bool = False, deeptrap: bool = False, conlife: bool = False, impact: bool = False, tunneling: bool = False, laser: bool = False, bgn: bool = False, statistics: str = 'boltzmann', incomplete: bool = False, conmob: bool = False, ccmob: bool = False, fldmob: bool = False, gatmob: bool = False, flddif: bool = False, neutral: bool = False, e_region: int | List[int] | None = None, g_region: int | List[int] | None = None, d_region: int | List[int] | None = None, e_drive: str | None = None, g_drive: str | None = None, d_drive: str | None = None, i_drive: str | None = None, i_current: str | None = None, jtherm: bool = True, et_form: bool = False, c1_sign: int | None = None, c2_sign: int | None = None, c1_type: int | None = None, c2_type: int | None = None, gen_nois: bool = False, diff_noi: bool = False, one_over_f_n: bool = False, print_models: bool = False)[source]
Solver
Solver configuration for PADRE simulations.
Includes SOLVE, METHOD, SYSTEM, and LINALG commands.
- class nanohubpadre.solver.System(carriers: int = 0, electrons: bool = False, holes: bool = False, n_temperature: bool = False, p_temperature: bool = False, newton: bool = False, gummel: bool = False, coupling: List[str] | None = None, print_info: bool = False, symmetric: bool = True)[source]
Bases:
PadreCommandDefine which PDEs to solve and their coupling.
- Parameters:
carriers (int) – Number of carriers (0, 1, or 2)
electrons (bool) – Solve electron continuity equation
holes (bool) – Solve hole continuity equation
n_temperature (bool) – Solve electron energy balance
p_temperature (bool) – Solve hole energy balance
Coupling
newton (bool) – Fully coupled Newton iteration
gummel (bool) – Decoupled Gummel iteration
print_info (bool) – Print memory allocation info
Example
>>> # Two-carrier drift-diffusion >>> sys = System(carriers=2, newton=True) >>> >>> # Energy balance with custom coupling >>> sys = System(electrons=True, n_temperature=True, ... coupling=["12", "4"])
- class nanohubpadre.solver.LinAlg(dir_def: bool = False, iter_def: bool = False, method: str | None = None, precondition: str | None = None, acceleration: str | None = None, s_method: str | None = None, s_precondition: str | None = None, s_acceleration: str | None = None, itmax: int | None = None, nrmax: int | None = None, lin_tol: float | None = None, lin_atol: float | None = None, nlin_tol: float | None = None, maxfill: int | None = None, k: int | None = None, restart: float | None = None, linscal: bool = True, ptscl: bool = True, scale: bool = False)[source]
Bases:
PadreCommandConfigure linear algebra solver.
- Parameters:
dir_def (bool) – Use direct solver defaults
iter_def (bool) – Use iterative solver defaults
method (str) – Method specification
precondition (str) – Preconditioner specification
acceleration (str) – Acceleration technique
itmax (int) – Maximum iterations
lin_tol (float) – Linear convergence tolerance
lin_atol (float) – Absolute tolerance
Example
>>> # Direct solver >>> la = LinAlg(dir_def=True) >>> >>> # Iterative solver >>> la = LinAlg(iter_def=True, itmax=500)
- __init__(dir_def: bool = False, iter_def: bool = False, method: str | None = None, precondition: str | None = None, acceleration: str | None = None, s_method: str | None = None, s_precondition: str | None = None, s_acceleration: str | None = None, itmax: int | None = None, nrmax: int | None = None, lin_tol: float | None = None, lin_atol: float | None = None, nlin_tol: float | None = None, maxfill: int | None = None, k: int | None = None, restart: float | None = None, linscal: bool = True, ptscl: bool = True, scale: bool = False)[source]
- class nanohubpadre.solver.Method(itlimit: int | None = None, outloops: int | None = None, min_inner: int | None = None, min_outer: int | None = None, gloops: int | None = None, x_toler: float | List[float] | None = None, rhs_toler: float | List[float] | None = None, xnorm: bool = True, rhsnorm: bool = False, l2norm: bool = True, trap: bool = True, dgmin: float | None = None, a_trap: float | None = None, n_trap: int | None = None, m_trap: int | None = None, i_trap: int | None = None, maxneg: int | None = None, dv_trap: float | None = None, di_trap: float | None = None, out_trap: bool = True, ign_inner: bool = False, stop: bool = True, damped: str = 'single', itdamp: int | None = None, delta: float | None = None, damploop: int | None = None, dfactor: float | None = None, dpower: float | None = None, dvlimit: float | None = None, truncate: bool = False, vmargin: float | None = None, second_order: bool = True, tr_print: bool = False, tauto: bool = True, tolr_time: float | None = None, tola_time: float | None = None, l2tnorm: bool = True, dt_min: float | None = None, t_lima: float | None = None, t_limb: float | None = None, extrapolate: bool = False, autonr: bool = True, nrcriterion: float | None = None, nrloop: int | None = None, ac_method: str | None = None, print_iter: bool = False, err_estimate: bool = False, lin_proj: bool = False, lin_fail: bool = False)[source]
Bases:
PadreCommandConfigure nonlinear iteration and numerical methods.
- Parameters:
control (Convergence)
itlimit (int) – Maximum inner iterations (default 20)
outloops (int) – Maximum outer iterations (default 20)
gloops (int) – Number of Gummel smoothing loops
xnorm (bool) – Use update norm (default True)
rhsnorm (bool) – Use residual norm
l2norm (bool) – Use L2 norm for residual
(trap) (Pseudo-continuation)
trap (bool) – Enable bias stepping on convergence failure
a_trap (float) – Bias reduction factor (default 0.5)
n_trap (int) – Newton iterations before trap check
dv_trap (float) – Minimum voltage step
di_trap (float) – Minimum current step
stop (bool) – Stop on convergence failure
Damping
damped (str) – Damping mode (“single”, “all”, “none”)
dvlimit (float) – Maximum potential update
stepping (Time)
second_order (bool) – Use 2nd order TR-BDF2 (default True)
tauto (bool) – Automatic time step (default True)
tolr_time (float) – Relative truncation error tolerance
tola_time (float) – Absolute truncation error tolerance
dt_min (float) – Minimum time step
Newton-Richardson
autonr (bool) – Automatic Newton-Richardson
print_iter (bool) – Print terminal values after each iteration
Example
>>> # Standard method with trap >>> m = Method(trap=True, a_trap=0.5, itlimit=30) >>> >>> # Transient with auto timestep >>> m = Method(second_order=True, tauto=True, tolr_time=1e-3)
- __init__(itlimit: int | None = None, outloops: int | None = None, min_inner: int | None = None, min_outer: int | None = None, gloops: int | None = None, x_toler: float | List[float] | None = None, rhs_toler: float | List[float] | None = None, xnorm: bool = True, rhsnorm: bool = False, l2norm: bool = True, trap: bool = True, dgmin: float | None = None, a_trap: float | None = None, n_trap: int | None = None, m_trap: int | None = None, i_trap: int | None = None, maxneg: int | None = None, dv_trap: float | None = None, di_trap: float | None = None, out_trap: bool = True, ign_inner: bool = False, stop: bool = True, damped: str = 'single', itdamp: int | None = None, delta: float | None = None, damploop: int | None = None, dfactor: float | None = None, dpower: float | None = None, dvlimit: float | None = None, truncate: bool = False, vmargin: float | None = None, second_order: bool = True, tr_print: bool = False, tauto: bool = True, tolr_time: float | None = None, tola_time: float | None = None, l2tnorm: bool = True, dt_min: float | None = None, t_lima: float | None = None, t_limb: float | None = None, extrapolate: bool = False, autonr: bool = True, nrcriterion: float | None = None, nrloop: int | None = None, ac_method: str | None = None, print_iter: bool = False, err_estimate: bool = False, lin_proj: bool = False, lin_fail: bool = False)[source]
- class nanohubpadre.solver.Solve(initial: bool = False, previous: bool = False, project: bool = False, euler: bool = False, local: bool = False, v1: float | None = None, v2: float | None = None, v3: float | None = None, v4: float | None = None, v5: float | None = None, v6: float | None = None, v7: float | None = None, v8: float | None = None, v9: float | None = None, v0: float | None = None, i1: float | None = None, i2: float | None = None, i3: float | None = None, i4: float | None = None, i5: float | None = None, i6: float | None = None, i7: float | None = None, i8: float | None = None, i9: float | None = None, i0: float | None = None, vstep: float | None = None, istep: float | None = None, nsteps: int | None = None, electrode: int | List[int] | None = None, multiply: bool = False, n_bias: float | None = None, p_bias: float | None = None, generation: float | None = None, dose_rad: float | None = None, absorption: float | None = None, dir_gen: str = 'y', pk_gen: float | None = None, reg_gen: List[int] | None = None, tstep: float | None = None, tstop: float | None = None, tdelta: float | None = None, tend_refine: bool = False, ramptime: float | None = None, endramp: float | None = None, seu: bool = False, dt_seu: float | None = None, g_tau: float | None = None, ac_analysis: bool = False, frequency: float | None = None, fstep: float | None = None, mult_freq: bool = False, nfsteps: int | None = None, vss: float | None = None, terminal: int | None = None, s_omega: float | None = None, max_inner: int | None = None, tolerance: float | None = None, noise_anal: bool = False, i_noise: bool = False, e_noise: int | None = None, outfile: str | None = None, currents: bool = True, no_append: bool = False, ascii: bool = True, save: int | None = None, t_save: List[float] | None = None, nfile: str | None = None, mostrans: int | None = None)[source]
Bases:
PadreCommandSolve for one or more bias points.
- Parameters:
guess (Initial)
initial (bool) – Compute equilibrium solution (first solve)
previous (bool) – Use previous solution as guess
project (bool) – Project from two previous solutions
euler (bool) – Euler projection guess
local (bool) – Local quasi-Fermi guess (good for reverse bias)
specification (Bias)
v1-v0 (float) – Voltage on electrode 1-10
i1-i0 (float) – Current on electrode 1-10 (for current BC)
vstep (float) – Voltage step for stepping
istep (float) – Current step for stepping
nsteps (int) – Number of steps
multiply (bool) – Multiply by step instead of add
Generation
generation (float) – Blanket generation rate (/s-cm^3)
dose_rad (float) – Radiation dose (rad)
absorption (float) – Absorption coefficient (/um)
Transient
tstep (float) – Time step (seconds)
tstop (float) – Stop time (seconds)
tdelta (float) – Time interval to simulate
ramptime (float) – Ramp duration for bias changes
endramp (float) – End time of ramp
seu (bool) – Single event upset mode
dt_seu (float) – SEU pulse width
analysis (AC)
ac_analysis (bool) – Perform AC analysis
frequency (float) – AC frequency (Hz)
fstep (float) – Frequency step
nfsteps (int) – Number of frequency steps
mult_freq (bool) – Multiply frequency by step
vss (float) – Small-signal voltage (default 0.1*kT/q)
terminal (int) – Terminal for AC excitation
Output
outfile (str) – Solution output file
currents (bool) – Save current data
ascii (bool) – ASCII output format
save (int) – Save frequency (every n points)
Example
>>> # Initial equilibrium >>> s = Solve(initial=True, outfile="sol0") >>> >>> # Voltage sweep >>> s = Solve(v1=0.5, vstep=0.1, nsteps=10, electrode=1, ... outfile="sol_a") >>> >>> # Transient simulation >>> s = Solve(v1=2, tstep=1e-12, tstop=1e-9, ramptime=10e-9, ... outfile="trans")
- __init__(initial: bool = False, previous: bool = False, project: bool = False, euler: bool = False, local: bool = False, v1: float | None = None, v2: float | None = None, v3: float | None = None, v4: float | None = None, v5: float | None = None, v6: float | None = None, v7: float | None = None, v8: float | None = None, v9: float | None = None, v0: float | None = None, i1: float | None = None, i2: float | None = None, i3: float | None = None, i4: float | None = None, i5: float | None = None, i6: float | None = None, i7: float | None = None, i8: float | None = None, i9: float | None = None, i0: float | None = None, vstep: float | None = None, istep: float | None = None, nsteps: int | None = None, electrode: int | List[int] | None = None, multiply: bool = False, n_bias: float | None = None, p_bias: float | None = None, generation: float | None = None, dose_rad: float | None = None, absorption: float | None = None, dir_gen: str = 'y', pk_gen: float | None = None, reg_gen: List[int] | None = None, tstep: float | None = None, tstop: float | None = None, tdelta: float | None = None, tend_refine: bool = False, ramptime: float | None = None, endramp: float | None = None, seu: bool = False, dt_seu: float | None = None, g_tau: float | None = None, ac_analysis: bool = False, frequency: float | None = None, fstep: float | None = None, mult_freq: bool = False, nfsteps: int | None = None, vss: float | None = None, terminal: int | None = None, s_omega: float | None = None, max_inner: int | None = None, tolerance: float | None = None, noise_anal: bool = False, i_noise: bool = False, e_noise: int | None = None, outfile: str | None = None, currents: bool = True, no_append: bool = False, ascii: bool = True, save: int | None = None, t_save: List[float] | None = None, nfile: str | None = None, mostrans: int | None = None)[source]
Log
Logging configuration for PADRE simulations.
Controls I-V and AC data logging.
- class nanohubpadre.log.Log(ivfile: str | None = None, acfile: str | None = None, last: bool = False, no_trap: bool = False, off: bool = False)[source]
Bases:
PadreCommandConfigure I-V and AC data logging.
- Parameters:
Example
>>> # Log IV and AC data >>> log = Log(ivfile="iv_data", acfile="ac_data") >>> >>> # Turn off logging >>> log = Log(off=True)
Options
Options configuration for PADRE simulations.
Sets global run options including plotting devices.
- class nanohubpadre.options.Options(hp2648: bool = False, hp2623: bool = False, tek4107: bool = False, tek4014: bool = False, vt240: bool = False, pic: bool = False, splot: bool = False, postscript: bool = False, x_screen: float | None = None, y_screen: float | None = None, x_offset: float | None = None, y_offset: float | None = None, news: bool = False, g_debug: bool = False, n_debug: bool = False, ns_debug: bool = False, cpustat: bool = False, cpufile: str | None = None, max_cpu: float | None = None, mode: str | None = None, size_buf: float | None = None, wee_size: bool = False, med_size: bool = False, big_size: bool = False, wow_size: bool = False, crush: bool = False)[source]
Bases:
PadreCommandConfigure global run options.
- Parameters:
of) (Plot devices (one)
hp2648 (bool) – HP2648 graphics terminal
hp2623 (bool) – HP2623 graphics terminal
tek4107 (bool) – Tektronix 4107 color terminal
tek4014 (bool) – Tektronix 4014 terminal
vt240 (bool) – DEC VT240 terminal
pic (bool) – PIC language output
splot (bool) – SPLOT format for 1D plots
postscript (bool) – PostScript output
size (Screen)
x_screen (float) – Screen width (inches, default 10)
y_screen (float) – Screen height (inches, default 5)
x_offset (float) – X offset from bottom-left (inches)
y_offset (float) – Y offset from bottom-left (inches)
Debug
news (bool) – Print version news
g_debug (bool) – Print general debug info
n_debug (bool) – Print numerical debug info
cpustat (bool) – Print CPU profile
cpufile (str) – CPU profile output file
max_cpu (float) – Maximum CPU time (seconds)
mode (str) – Compatibility mode (“2.1” or “2.3”)
Example
>>> # PostScript output >>> opt = Options(postscript=True) >>> >>> # Custom screen size >>> opt = Options(tek4107=True, x_screen=6, y_screen=5)
- __init__(hp2648: bool = False, hp2623: bool = False, tek4107: bool = False, tek4014: bool = False, vt240: bool = False, pic: bool = False, splot: bool = False, postscript: bool = False, x_screen: float | None = None, y_screen: float | None = None, x_offset: float | None = None, y_offset: float | None = None, news: bool = False, g_debug: bool = False, n_debug: bool = False, ns_debug: bool = False, cpustat: bool = False, cpufile: str | None = None, max_cpu: float | None = None, mode: str | None = None, size_buf: float | None = None, wee_size: bool = False, med_size: bool = False, big_size: bool = False, wow_size: bool = False, crush: bool = False)[source]
- class nanohubpadre.options.Load(infile: str, ascii: bool = True)[source]
Bases:
PadreCommandLoad a previously saved solution.
Example
>>> load = Load(infile="initsol")
Interface
Interface definition for PADRE simulations.
Defines surface recombination and fixed charges at interfaces.
- class nanohubpadre.interface.Interface(number: int, qf: float | None = None, s_n: float | List[float] | None = None, s_p: float | List[float] | None = None, trap_type: str | None = None, etrap: float | List[float] | None = None, ntrap: float | List[float] | None = None)[source]
Bases:
PadreCommandDefine interface properties (recombination, fixed charge).
- Parameters:
number (int) – Interface number
qf (float, optional) – Fixed charge density (/cm^2)
s_n (float or list, optional) – Electron surface recombination velocity (cm/s)
s_p (float or list, optional) – Hole surface recombination velocity (cm/s)
trap_type (str, optional) – Trap types (“n”, “p”, “0” for each level)
etrap (float or list, optional) – Trap energy levels (Et - Ei in eV)
Example
>>> # Si-SiO2 interface with fixed charge and recombination >>> intf = Interface(number=1, qf=1e10, s_n=1e4, s_p=1e4)
- class nanohubpadre.interface.Surface(number: int, interface: bool = False, electrode: bool = False, x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_min: float | None = None, z_max: float | None = None, reg1: int | None = None, reg2: int | None = None)[source]
Bases:
PadreCommandDefine surface/interface location for later reference.
- Parameters:
number (int) – Surface/electrode number
interface (bool) – Define as interface (vs electrode)
electrode (bool) – Define as electrode
x_min (float) – X bounds (microns)
x_max (float) – X bounds (microns)
y_min (float) – Y bounds (microns)
y_max (float) – Y bounds (microns)
z_min (float) – Z bounds (microns)
z_max (float) – Z bounds (microns)
reg1 (int) – Region numbers for interface boundary
reg2 (int) – Region numbers for interface boundary
Example
>>> # Interface between regions 1 and 4 >>> surf = Surface(number=1, interface=True, reg1=1, reg2=4, ... x_min=-4, x_max=4, y_min=-0.5, y_max=4)
Regrid
Mesh refinement/coarsening for PADRE simulations.
REGRID performs one-time refinement, ADAPT enables automatic adaptation.
- class nanohubpadre.regrid.Regrid(potential: bool = False, qfn: bool = False, qfp: bool = False, n_temp: bool = False, p_temp: bool = False, doping: bool = False, ion_imp: bool = False, electron: bool = False, hole: bool = False, net_chrg: bool = False, net_carr: bool = False, min_carr: bool = False, p_track: bool = False, hetero: bool = False, error: bool = False, r_step: float | None = None, c_step: float | None = None, change: bool = True, relative: bool = False, dv_min: float | None = None, r_threshold: float | None = None, n_threshold: int | None = None, f_threshold: float | None = None, refine: bool = False, coarsen: bool = False, localdop: bool = False, logarithm: bool = False, absolute: bool = False, x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_min: float | None = None, z_max: float | None = None, region: int | None = None, ignore: int | None = None, box_refine: bool = False, max_level: int | None = None, rel_level: int | None = None, lev_ignore: bool = False, hmin: float | None = None, hdir: bool = True, debye: float | None = None, freeze: bool = False, smooth_k: int | None = None, it_smooth: int | None = None, condense: str | None = None, reorder: bool = False, three_d_refine: bool = False, dz_level: int | None = None, outfile: str | None = None, out_green: str | None = None, in_green: str | None = None, no_green: bool = False, dopfile: str | None = None, ascii: bool = True, stats: bool = False, fem: bool = True)[source]
Bases:
PadreCommandPerform mesh refinement or coarsening.
- Parameters:
of) (Variable to refine on (one)
potential (bool) – Mid-gap potential
qfn (bool) – Electron quasi-Fermi level
qfp (bool) – Hole quasi-Fermi level
doping (bool) – Net doping concentration
electron (bool) – Electron concentration
hole (bool) – Hole concentration
error (bool) – Potential error estimate
Criterion
r_step (float) – Refinement criterion (change threshold)
c_step (float) – Coarsening criterion
logarithm (bool) – Use logarithmic comparison
absolute (bool) – Use absolute value
relative (bool) – Use relative comparison
refine (bool) – Force refinement
coarsen (bool) – Force coarsening
bounds (Location)
x_min (float) – X bounds (microns)
x_max (float) – X bounds (microns)
y_min (float) – Y bounds (microns)
y_max (float) – Y bounds (microns)
z_min (float) – Z bounds (microns)
z_max (float) – Z bounds (microns)
region (int) – Region to refine
ignore (int) – Region to ignore
Control
max_level (int) – Maximum refinement level
rel_level (int) – Relative level change allowed
lev_ignore (bool) – Ignore level limits
hmin (float) – Minimum edge length (microns)
debye (float) – Minimum edge as multiple of Debye length
smooth_k (int) – Smoothing key
it_smooth (int) – Smoothing iterations
Files
outfile (str) – Output mesh file
dopfile (str) – Doping file for re-doping
ascii (bool) – ASCII file format
Example
>>> # Refine on doping gradient >>> rg = Regrid(doping=True, logarithm=True, r_step=6, ... outfile="grid1", dopfile="dop1") >>> >>> # Refine until minimum spacing reached >>> rg = Regrid(doping=True, logarithm=True, r_step=6, ... lev_ignore=True, hmin=0.01, outfile="grid2")
- __init__(potential: bool = False, qfn: bool = False, qfp: bool = False, n_temp: bool = False, p_temp: bool = False, doping: bool = False, ion_imp: bool = False, electron: bool = False, hole: bool = False, net_chrg: bool = False, net_carr: bool = False, min_carr: bool = False, p_track: bool = False, hetero: bool = False, error: bool = False, r_step: float | None = None, c_step: float | None = None, change: bool = True, relative: bool = False, dv_min: float | None = None, r_threshold: float | None = None, n_threshold: int | None = None, f_threshold: float | None = None, refine: bool = False, coarsen: bool = False, localdop: bool = False, logarithm: bool = False, absolute: bool = False, x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_min: float | None = None, z_max: float | None = None, region: int | None = None, ignore: int | None = None, box_refine: bool = False, max_level: int | None = None, rel_level: int | None = None, lev_ignore: bool = False, hmin: float | None = None, hdir: bool = True, debye: float | None = None, freeze: bool = False, smooth_k: int | None = None, it_smooth: int | None = None, condense: str | None = None, reorder: bool = False, three_d_refine: bool = False, dz_level: int | None = None, outfile: str | None = None, out_green: str | None = None, in_green: str | None = None, no_green: bool = False, dopfile: str | None = None, ascii: bool = True, stats: bool = False, fem: bool = True)[source]
- class nanohubpadre.regrid.Adapt(it_resolve: int | None = None, n_resolve: float | None = None, off: bool = False, **kwargs)[source]
Bases:
RegridAutomatic mesh adaptation at each bias point.
Same parameters as Regrid, plus:
- Parameters:
Example
>>> # Adaptive refinement on error >>> adapt = Adapt(error=True, r_threshold=0.01, c_step=0.001, ... n_threshold=500, outfile="rmesh_a")
Plotting
Plotting commands for PADRE simulations.
Includes PLOT.1D, PLOT.2D, CONTOUR, and VECTOR commands.
- class nanohubpadre.plotting.Plot2D(x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_pos: float | None = None, top: bool = False, bottom: bool = False, left: bool = False, right: bool = False, grid: bool = False, mesh: bool = False, obtuse: bool = False, crosses: bool = False, boundary: bool = False, interface: int = 1, depl_edg: bool = False, junction: bool = False, no_tic: bool = False, no_top: bool = False, no_fill: bool = False, no_clear: bool = False, no_end: bool = False, no_diag: bool = False, labels: bool = False, title: bool = False, flip_x: bool = False, tilt: bool = False, a_elevation: float = 30, a_azimuth: float = -30, pause: bool = False, spline: bool = False, nspline: int = 100, l_elect: int | None = None, l_deple: int | None = None, l_junct: int | None = None, l_bound: int | None = None, l_grid: int | None = None, color: bool = False, grey: bool = False, outfile: str | None = None, geomfile: str | None = None, criter: float | None = None)[source]
Bases:
PadreCommandSet up 2D plot area and optionally plot grid/boundaries.
- Parameters:
definition (Area)
x_min (float) – X bounds (microns)
x_max (float) – X bounds (microns)
y_min (float) – Y bounds (microns)
y_max (float) – Y bounds (microns)
z_pos (float) – Z position for xy-plane slice
plot (What to)
grid (bool) – Plot the mesh grid
boundary (bool) – Plot region boundaries
junction (bool) – Plot doping junctions
depl_edg (bool) – Plot depletion edges
crosses (bool) – Mark grid points with crosses
Control
no_fill (bool) – Draw to scale (don’t fill screen)
no_clear (bool) – Don’t clear screen before plot
no_tic (bool) – No tic marks
title (bool) – Show title
labels (bool) – Show color labels
flip_x (bool) – Mirror plot about y-axis
tilt (bool) – 3D tilted view
a_elevation (float) – Elevation angle for tilt
a_azimuth (float) – Azimuth angle for tilt
pause (bool) – Pause after plot
outfile (str) – Output plot file
Example
>>> # Plot grid to scale >>> p = Plot2D(grid=True, no_fill=True) >>> >>> # Plot boundaries and junctions in region >>> p = Plot2D(x_min=0, x_max=5, y_min=0, y_max=10, ... junction=True, boundary=True)
- __init__(x_min: float | None = None, x_max: float | None = None, y_min: float | None = None, y_max: float | None = None, z_pos: float | None = None, top: bool = False, bottom: bool = False, left: bool = False, right: bool = False, grid: bool = False, mesh: bool = False, obtuse: bool = False, crosses: bool = False, boundary: bool = False, interface: int = 1, depl_edg: bool = False, junction: bool = False, no_tic: bool = False, no_top: bool = False, no_fill: bool = False, no_clear: bool = False, no_end: bool = False, no_diag: bool = False, labels: bool = False, title: bool = False, flip_x: bool = False, tilt: bool = False, a_elevation: float = 30, a_azimuth: float = -30, pause: bool = False, spline: bool = False, nspline: int = 100, l_elect: int | None = None, l_deple: int | None = None, l_junct: int | None = None, l_bound: int | None = None, l_grid: int | None = None, color: bool = False, grey: bool = False, outfile: str | None = None, geomfile: str | None = None, criter: float | None = None)[source]
- class nanohubpadre.plotting.Contour(potential: bool = False, qfn: bool = False, qfp: bool = False, n_temp: bool = False, p_temp: bool = False, band_val: bool = False, band_cond: bool = False, doping: bool = False, ion_imp: bool = False, electrons: bool = False, holes: bool = False, net_charge: bool = False, net_carrier: bool = False, j_conduc: bool = False, j_electr: bool = False, v_electr: bool = False, j_hole: bool = False, v_hole: bool = False, j_displa: bool = False, j_total: bool = False, e_field: bool = False, recomb: bool = False, flowlines: bool = False, min_value: float | None = None, max_value: float | None = None, del_value: float | None = None, ncontours: int | None = None, constrain: bool = True, line_type: int = 1, absolute: bool = False, logarithm: bool = False, x_compon: bool = False, y_compon: bool = False, mix_mater: bool = False, pause: bool = False, color: bool = False, grey: bool = False)[source]
Bases:
PadreCommandPlot contours of a quantity (requires preceding PLOT.2D).
- Parameters:
of) (Quantity (one)
potential (bool) – Potentials
qfn (bool) – Potentials
qfp (bool) – Potentials
electrons (bool) – Carrier concentrations
holes (bool) – Carrier concentrations
doping (bool) – Doping concentration
e_field (bool) – Electric field magnitude
j_electr (bool) – Current densities
j_hole (bool) – Current densities
j_total (bool) – Current densities
recomb (bool) – Recombination rate
flowlines (bool) – Current flowlines
Range
min_value (float) – Contour bounds
max_value (float) – Contour bounds
del_value (float) – Contour spacing
ncontours (int) – Number of contours
Control
logarithm (bool) – Logarithmic scale
absolute (bool) – Absolute value
x_compon (bool) – Vector components
y_compon (bool) – Vector components
line_type (int) – Line style
color (bool) – Color fill
grey (bool) – Grey scale fill
pause (bool) – Pause after plot
Example
>>> # Potential contours >>> c = Contour(potential=True, min_value=-1, max_value=3, del_value=0.25) >>> >>> # Log doping contours >>> c = Contour(doping=True, logarithm=True, absolute=True, ... min_value=10, max_value=20, del_value=1)
- __init__(potential: bool = False, qfn: bool = False, qfp: bool = False, n_temp: bool = False, p_temp: bool = False, band_val: bool = False, band_cond: bool = False, doping: bool = False, ion_imp: bool = False, electrons: bool = False, holes: bool = False, net_charge: bool = False, net_carrier: bool = False, j_conduc: bool = False, j_electr: bool = False, v_electr: bool = False, j_hole: bool = False, v_hole: bool = False, j_displa: bool = False, j_total: bool = False, e_field: bool = False, recomb: bool = False, flowlines: bool = False, min_value: float | None = None, max_value: float | None = None, del_value: float | None = None, ncontours: int | None = None, constrain: bool = True, line_type: int = 1, absolute: bool = False, logarithm: bool = False, x_compon: bool = False, y_compon: bool = False, mix_mater: bool = False, pause: bool = False, color: bool = False, grey: bool = False)[source]
- class nanohubpadre.plotting.Plot1D(x_start: float | None = None, y_start: float | None = None, x_end: float | None = None, y_end: float | None = None, z_pos: float | None = None, coordinate: str | None = None, potential: bool = False, qfn: bool = False, qfp: bool = False, n_temp: bool = False, p_temp: bool = False, doping: bool = False, ion_imp: bool = False, electrons: bool = False, holes: bool = False, net_charge: bool = False, net_carrier: bool = False, j_conduc: bool = False, j_electr: bool = False, v_electr: bool = False, j_hole: bool = False, v_hole: bool = False, j_displa: bool = False, j_total: bool = False, e_field: bool = False, recomb: bool = False, band_val: bool = False, band_con: bool = False, x_axis: str | None = None, y_axis: str | None = None, frequency: float | None = None, infile: str | None = None, right_axis: bool = False, short_axis: bool = False, min_value: float | None = None, max_value: float | None = None, x_min: float | None = None, x_max: float | None = None, x_scale: float = 1.0, y_scale: float = 1.0, unscale: bool = False, x_label: str | None = None, y_label: str | None = None, x_mark: float | None = None, y_mark: float | None = None, title: bool = True, no_clear: bool = False, no_axis: bool = False, unchanged: bool = False, no_end: bool = False, no_order: bool = False, order_y: bool = False, unique: float = 1e-06, points: bool = False, no_line: bool = False, pause: bool = False, line_type: int = 1, absolute: bool = False, logarithm: bool = False, x_log: bool = False, decibels: bool = False, integral: bool = False, negative: bool = False, inverse: bool = False, d_order: float = 0, x_component: bool = False, y_component: bool = False, spline: bool = False, nspline: int = 100, outfile: str | None = None, ascii: bool = False)[source]
Bases:
PadreCommand1D line plot through device or I-V curve plot.
- Parameters:
device (Mode A - Line through)
x_start (float) – Start point (A)
y_start (float) – Start point (A)
x_end (float) – End point (B)
y_end (float) – End point (B)
z_pos (float) – Z position
of) (Quantity (one)
potential
qfn
qfp
doping
electrons
holes
etc.
plot (Mode B - I-V)
x_axis (str) – X axis quantity (e.g., “V1”, “V2”, “I1”)
y_axis (str) – Y axis quantity
infile (str) – Log file to plot from
frequency (float) – Frequency for AC plots
control (Plot)
min_value (float) – Y axis bounds
max_value (float) – Y axis bounds
x_min (float) – X axis bounds
x_max (float) – X axis bounds
x_scale (float) – Scale factors
y_scale (float) – Scale factors
x_label (str) – Axis labels
y_label (str) – Axis labels
control
logarithm (bool) – Log Y scale
x_log (bool) – Log X scale
absolute (bool) – Absolute value
points (bool) – Mark data points
no_line (bool) – Don’t connect points
line_type (int) – Line style
no_clear (bool) – Don’t clear screen
unchanged (bool) – Keep same axes
pause (bool) – Pause after plot
outfile (str) – Output file
Example
>>> # Plot potential along a line >>> p = Plot1D(potential=True, x_start=0, y_start=0, ... x_end=5, y_end=0) >>> >>> # I-V curve >>> p = Plot1D(x_axis="V2", y_axis="I1")
- __init__(x_start: float | None = None, y_start: float | None = None, x_end: float | None = None, y_end: float | None = None, z_pos: float | None = None, coordinate: str | None = None, potential: bool = False, qfn: bool = False, qfp: bool = False, n_temp: bool = False, p_temp: bool = False, doping: bool = False, ion_imp: bool = False, electrons: bool = False, holes: bool = False, net_charge: bool = False, net_carrier: bool = False, j_conduc: bool = False, j_electr: bool = False, v_electr: bool = False, j_hole: bool = False, v_hole: bool = False, j_displa: bool = False, j_total: bool = False, e_field: bool = False, recomb: bool = False, band_val: bool = False, band_con: bool = False, x_axis: str | None = None, y_axis: str | None = None, frequency: float | None = None, infile: str | None = None, right_axis: bool = False, short_axis: bool = False, min_value: float | None = None, max_value: float | None = None, x_min: float | None = None, x_max: float | None = None, x_scale: float = 1.0, y_scale: float = 1.0, unscale: bool = False, x_label: str | None = None, y_label: str | None = None, x_mark: float | None = None, y_mark: float | None = None, title: bool = True, no_clear: bool = False, no_axis: bool = False, unchanged: bool = False, no_end: bool = False, no_order: bool = False, order_y: bool = False, unique: float = 1e-06, points: bool = False, no_line: bool = False, pause: bool = False, line_type: int = 1, absolute: bool = False, logarithm: bool = False, x_log: bool = False, decibels: bool = False, integral: bool = False, negative: bool = False, inverse: bool = False, d_order: float = 0, x_component: bool = False, y_component: bool = False, spline: bool = False, nspline: int = 100, outfile: str | None = None, ascii: bool = False)[source]
- class nanohubpadre.plotting.Vector(j_conduc: bool = False, j_electr: bool = False, v_electr: bool = False, j_hole: bool = False, v_hole: bool = False, j_displa: bool = False, j_total: bool = False, e_field: bool = False, logarithm: bool = False, minimum: float | None = None, maximum: float | None = None, scale: float = 1.0, clipfact: float = 0.1, line_type: int = 1)[source]
Bases:
PadreCommandPlot vector quantities (requires preceding PLOT.2D).
- Parameters:
of) (Quantity (one)
j_conduc (bool) – Current densities
j_electr (bool) – Current densities
j_hole (bool) – Current densities
j_total (bool) – Current densities
j_displa (bool) – Current densities
v_electr (bool) – Velocities
v_hole (bool) – Velocities
e_field (bool) – Electric field
Control
logarithm (bool) – Logarithmic scaling
minimum (float) – Magnitude bounds
maximum (float) – Magnitude bounds
scale (float) – Scale factor
clipfact (float) – Threshold for not plotting
line_type (int) – Line style
Example
>>> # Plot electron and hole currents >>> v1 = Vector(j_electr=True, line_type=2) >>> v2 = Vector(j_hole=True, line_type=3)
- __init__(j_conduc: bool = False, j_electr: bool = False, v_electr: bool = False, j_hole: bool = False, v_hole: bool = False, j_displa: bool = False, j_total: bool = False, e_field: bool = False, logarithm: bool = False, minimum: float | None = None, maximum: float | None = None, scale: float = 1.0, clipfact: float = 0.1, line_type: int = 1)[source]
Plot3D
Quick Reference
Device Factory Functions
Function |
Description |
|---|---|
|
PN junction diode |
|
MOS capacitor for C-V analysis |
|
NMOS/PMOS transistor |
|
Metal-semiconductor FET |
|
NPN/PNP bipolar transistor |
|
Schottky barrier diode |
|
PN junction solar cell |
Aliases: pn_diode, mos_capacitor, mosfet, mesfet, bjt,
schottky_diode, solar_cell
Core Classes
Class |
Description |
|---|---|
|
Main simulation container |
|
Mesh definition with X/Y/Z lines |
|
X grid line specification |
|
Y grid line specification |
|
Z grid plane specification |
|
Material region definition |
|
Electrode contact definition |
|
Doping profile specification |
|
Contact boundary conditions |
|
Material property customization |
|
Alloy material definition |
Models and Solver
Class |
Description |
|---|---|
|
Physical model configuration |
|
Carrier and solver type selection |
|
Solver method parameters |
|
Linear algebra solver options |
Solution Control
Class |
Description |
|---|---|
|
Solve command for bias conditions |
|
I-V and AC data logging |
|
Load previous solution |
|
Global simulation options |
Output
Class |
Description |
|---|---|
|
1D line plot output |
|
2D contour/surface plot |
|
Contour plot |
|
Vector field plot |
|
3D scatter plot output |
Advanced
Class |
Description |
|---|---|
|
Interface properties |
|
Surface recombination |
|
Mesh refinement |
|
Adaptive mesh refinement |
|
Comment line |
|
Title line |
Common Parameters
Position Parameters
Most classes support both index-based and coordinate-based positioning:
Index-based (for rectangular meshes):
ix_low,ix_high: X index boundsiy_low,iy_high: Y index bounds
Coordinate-based (in microns):
x_min,x_max: X coordinate boundsy_min,y_max: Y coordinate boundsz_min,z_max: Z coordinate bounds
Doping Parameters
concentration: Peak doping concentration (/cm³)junction: Junction depth (microns)peak: Peak position (microns)characteristic: Characteristic length (microns)region: Target region number(s)
Model Flags
srh: Shockley-Read-Hall recombinationauger: Auger recombinationdirect: Radiative recombinationbgn: Band-gap narrowingimpact: Impact ionizationconmob: Concentration-dependent mobilityfldmob: Field-dependent mobilitygatmob: Gate-field mobility
Solve Parameters
initial: Solve for equilibriumprevious: Use previous solutionproject: Projected continuationv1-v10: Electrode voltagesvstep: Voltage step sizensteps: Number of stepselectrode: Electrode to sweepac_analysis: Enable AC analysisfrequency: AC frequency (Hz)