API Reference¶
This API documentation is generated from docstrings using mkdocstrings.
Devices¶
PN Junction diode device model.
DEFAULT_T = 300
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
Material(name, symbol, Eg0_eV, varshni_alpha_eV_per_K, varshni_beta_K, Nc_prefactor_cm3, Nv_prefactor_cm3)
dataclass
¶
PNJunctionDiode(doping_p, doping_n, area=0.0001, temperature=DEFAULT_T, tau_n=1e-06, tau_p=1e-06, D_n=25.0, D_p=10.0, L_n=0.0005, L_p=0.0005, material=None)
¶
Bases: Device
PN Junction diode device model.
Assumptions: - Ideal diode equation with temperature-dependent I_s - SRH recombination with default mid-gap trap (n1≈p1≈n_i) - Default transport parameters (D, L) are representative constants - Units: cm, cm^2, cm^3, K; q in C, k_B in J/K
Initialize the PN Junction Diode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doping_p
|
float
|
Acceptor concentration in p-region (cm^-3) |
required |
doping_n
|
float
|
Donor concentration in n-region (cm^-3) |
required |
area
|
float
|
Cross-sectional area of the diode (cm^2) |
0.0001
|
temperature
|
float
|
Temperature in Kelvin |
DEFAULT_T
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Source code in semiconductor_sim/devices/pn_junction.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
calculate_saturation_current()
¶
Calculate the saturation current (I_s) considering temperature.
Source code in semiconductor_sim/devices/pn_junction.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
¶
Calculate the current for a given array of voltages, including SRH recombination.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage_array
|
NDArray[floating]
|
Array of voltage values (V) |
required |
n_conc
|
float | NDArray[floating] | None
|
Electron concentration (cm^-3) |
None
|
p_conc
|
float | NDArray[floating] | None
|
Hole concentration (cm^-3) |
None
|
Returns:
Type | Description |
---|---|
tuple[NDArray[floating], NDArray[floating]]
|
Tuple of |
Source code in semiconductor_sim/devices/pn_junction.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
plot_iv_characteristic(voltage, current, recombination=None)
¶
Plot the IV characteristics and optionally the recombination rate.
Source code in semiconductor_sim/devices/pn_junction.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
apply_basic_style()
¶
Apply a minimal style to keep plots consistent across devices.
Source code in semiconductor_sim/utils/plotting.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
safe_expm1(x, max_arg=700.0)
¶
Compute exp(x) - 1 safely for arrays or scalars by clipping the argument to avoid overflow and using numpy.expm1 for better precision near zero.
Parameters: - x: input value(s) - max_arg: maximum absolute argument allowed before clipping (float64 ~709)
Returns: - np.ndarray: exp(x) - 1 computed safely
Source code in semiconductor_sim/utils/numerics.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
srh_recombination(n, p, temperature=float(DEFAULT_T), tau_n=1e-06, tau_p=1e-06, n1=None, p1=None)
¶
Calculate the Shockley-Read-Hall (SRH) recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float | NDArray[floating]
|
Electron concentration (cm^-3) |
required |
p
|
float | NDArray[floating]
|
Hole concentration (cm^-3) |
required |
temperature
|
float
|
Temperature in Kelvin |
float(DEFAULT_T)
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Returns:
Type | Description |
---|---|
float | NDArray[floating]
|
SRH recombination rate (cm^-3 s^-1). |
Notes
Uses a simplified SRH form assuming mid-gap trap with n1 ≈ p1 ≈ n_i by default.
Advanced users can override n1
and p1
to relax this assumption.
Source code in semiconductor_sim/models/recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
use_headless_backend(preferred='Agg')
¶
Switch Matplotlib backend to a non-interactive one if possible.
Parameters: - preferred: Backend name to use when switching (default: 'Agg').
Source code in semiconductor_sim/utils/plotting.py
10 11 12 13 14 15 16 17 18 |
|
LED device model.
DEFAULT_T = 300
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
LED(doping_p, doping_n, area=0.0001, efficiency=0.1, temperature=DEFAULT_T, B=1e-10, D_n=25.0, D_p=10.0, L_n=0.0005, L_p=0.0005, material=None)
¶
Bases: Device
Light-emitting diode (LED) model.
Assumptions: - Ideal diode IV: I = I_s * (exp(V/V_T) - 1) - Emission ~ efficiency * radiative_recombination * area (simplified) - Default transport parameters (D, L) represent typical pedagogical values - Units: cm, cm^2, cm^3, K; q in C, k_B in J/K
Initialize the LED device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doping_p
|
float
|
Acceptor concentration in p-region (cm^-3) |
required |
doping_n
|
float
|
Donor concentration in n-region (cm^-3) |
required |
area
|
float
|
Cross-sectional area of the LED (cm^2) |
0.0001
|
efficiency
|
float
|
Radiative recombination efficiency (0 to 1) |
0.1
|
temperature
|
float
|
Temperature in Kelvin |
DEFAULT_T
|
B
|
float
|
Radiative recombination coefficient (cm^3/s) |
1e-10
|
Source code in semiconductor_sim/devices/led.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
calculate_saturation_current()
¶
Calculate the saturation current (I_s) considering temperature.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The saturation current in amperes. |
Source code in semiconductor_sim/devices/led.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
¶
Calculate current and optical emission across voltage_array
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage_array
|
NDArray[floating]
|
Array of voltage values (V). |
required |
n_conc
|
float | NDArray[floating] | None
|
Electron concentration (cm^-3). If provided with |
None
|
p_conc
|
float | NDArray[floating] | None
|
Hole concentration (cm^-3). Returns:
- If both |
None
|
Source code in semiconductor_sim/devices/led.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
plot_iv_characteristic(voltage, current, emission=None, recombination=None)
¶
Plot the IV characteristics, emission intensity, and recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage
|
NDArray[floating]
|
Voltage values (V) |
required |
current
|
NDArray[floating]
|
Current values (A) |
required |
emission
|
NDArray[floating] | None
|
Emission intensities (arb. units) |
None
|
recombination
|
NDArray[floating] | None
|
Recombination rates (cm^-3 s^-1) |
None
|
Source code in semiconductor_sim/devices/led.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
|
Material(name, symbol, Eg0_eV, varshni_alpha_eV_per_K, varshni_beta_K, Nc_prefactor_cm3, Nv_prefactor_cm3)
dataclass
¶
safe_expm1(x, max_arg=700.0)
¶
Compute exp(x) - 1 safely for arrays or scalars by clipping the argument to avoid overflow and using numpy.expm1 for better precision near zero.
Parameters: - x: input value(s) - max_arg: maximum absolute argument allowed before clipping (float64 ~709)
Returns: - np.ndarray: exp(x) - 1 computed safely
Source code in semiconductor_sim/utils/numerics.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
srh_recombination(n, p, temperature=float(DEFAULT_T), tau_n=1e-06, tau_p=1e-06, n1=None, p1=None)
¶
Calculate the Shockley-Read-Hall (SRH) recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float | NDArray[floating]
|
Electron concentration (cm^-3) |
required |
p
|
float | NDArray[floating]
|
Hole concentration (cm^-3) |
required |
temperature
|
float
|
Temperature in Kelvin |
float(DEFAULT_T)
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Returns:
Type | Description |
---|---|
float | NDArray[floating]
|
SRH recombination rate (cm^-3 s^-1). |
Notes
Uses a simplified SRH form assuming mid-gap trap with n1 ≈ p1 ≈ n_i by default.
Advanced users can override n1
and p1
to relax this assumption.
Source code in semiconductor_sim/models/recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
Solar cell device model.
DEFAULT_T = 300
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
Material(name, symbol, Eg0_eV, varshni_alpha_eV_per_K, varshni_beta_K, Nc_prefactor_cm3, Nv_prefactor_cm3)
dataclass
¶
SolarCell(doping_p, doping_n, area=0.0001, light_intensity=1.0, temperature=DEFAULT_T, material=None)
¶
Bases: Device
Initialize the Solar Cell device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doping_p
|
float
|
Acceptor concentration in p-region (cm^-3) |
required |
doping_n
|
float
|
Donor concentration in n-region (cm^-3) |
required |
area
|
float
|
Cross-sectional area of the solar cell (cm^2) |
0.0001
|
light_intensity
|
float
|
Incident light intensity (arbitrary units) |
1.0
|
temperature
|
float
|
Temperature in Kelvin |
DEFAULT_T
|
Source code in semiconductor_sim/devices/solar_cell.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
calculate_dark_saturation_current()
¶
Calculate dark saturation current using material (if provided).
Source code in semiconductor_sim/devices/solar_cell.py
60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
calculate_open_circuit_voltage()
¶
Calculate the open-circuit voltage (V_oc) using the diode equation.
Source code in semiconductor_sim/devices/solar_cell.py
52 53 54 55 56 57 58 |
|
calculate_short_circuit_current()
¶
Calculate the short-circuit current (I_sc) based on light intensity.
Source code in semiconductor_sim/devices/solar_cell.py
44 45 46 47 48 49 50 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
¶
Calculate the current for a given array of voltages under illumination.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage_array
|
NDArray[floating]
|
Array of voltage values (V) |
required |
Returns:
Type | Description |
---|---|
NDArray[floating]
|
Tuple containing one element: |
...
|
|
Source code in semiconductor_sim/devices/solar_cell.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
plot_iv_characteristic(voltage, current)
¶
Plot the IV characteristics of the solar cell.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage
|
NDArray[floating]
|
Voltage values (V) |
required |
current
|
NDArray[floating]
|
Current values (A) |
required |
Source code in semiconductor_sim/devices/solar_cell.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
apply_basic_style()
¶
Apply a minimal style to keep plots consistent across devices.
Source code in semiconductor_sim/utils/plotting.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
safe_expm1(x, max_arg=700.0)
¶
Compute exp(x) - 1 safely for arrays or scalars by clipping the argument to avoid overflow and using numpy.expm1 for better precision near zero.
Parameters: - x: input value(s) - max_arg: maximum absolute argument allowed before clipping (float64 ~709)
Returns: - np.ndarray: exp(x) - 1 computed safely
Source code in semiconductor_sim/utils/numerics.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
use_headless_backend(preferred='Agg')
¶
Switch Matplotlib backend to a non-interactive one if possible.
Parameters: - preferred: Backend name to use when switching (default: 'Agg').
Source code in semiconductor_sim/utils/plotting.py
10 11 12 13 14 15 16 17 18 |
|
Tunnel diode device model.
DEFAULT_T = 300
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
TunnelDiode(doping_p, doping_n, area=0.0001, temperature=DEFAULT_T, tau_n=1e-06, tau_p=1e-06)
¶
Bases: Device
Initialize the Tunnel Diode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doping_p
|
float
|
Acceptor concentration in p-region (cm^-3) |
required |
doping_n
|
float
|
Donor concentration in n-region (cm^-3) |
required |
area
|
float
|
Cross-sectional area of the diode (cm^2) |
0.0001
|
temperature
|
float
|
Temperature in Kelvin |
DEFAULT_T
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Source code in semiconductor_sim/devices/tunnel_diode.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
calculate_saturation_current()
¶
Calculate the saturation current (I_s) considering temperature.
Source code in semiconductor_sim/devices/tunnel_diode.py
44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
¶
Calculate the current for a given array of voltages, including SRH recombination.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage_array
|
NDArray[floating]
|
Array of voltage values (V) |
required |
n_conc
|
float | NDArray[floating] | None
|
Electron concentration (cm^-3) |
None
|
p_conc
|
float | NDArray[floating] | None
|
Hole concentration (cm^-3) |
None
|
Returns:
Type | Description |
---|---|
tuple[NDArray[floating], NDArray[floating]]
|
Tuple of |
Source code in semiconductor_sim/devices/tunnel_diode.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
plot_iv_characteristic(voltage, current, recombination=None)
¶
Plot the IV characteristics and optionally the recombination rate.
Source code in semiconductor_sim/devices/tunnel_diode.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
apply_basic_style()
¶
Apply a minimal style to keep plots consistent across devices.
Source code in semiconductor_sim/utils/plotting.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
safe_expm1(x, max_arg=700.0)
¶
Compute exp(x) - 1 safely for arrays or scalars by clipping the argument to avoid overflow and using numpy.expm1 for better precision near zero.
Parameters: - x: input value(s) - max_arg: maximum absolute argument allowed before clipping (float64 ~709)
Returns: - np.ndarray: exp(x) - 1 computed safely
Source code in semiconductor_sim/utils/numerics.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
srh_recombination(n, p, temperature=float(DEFAULT_T), tau_n=1e-06, tau_p=1e-06, n1=None, p1=None)
¶
Calculate the Shockley-Read-Hall (SRH) recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float | NDArray[floating]
|
Electron concentration (cm^-3) |
required |
p
|
float | NDArray[floating]
|
Hole concentration (cm^-3) |
required |
temperature
|
float
|
Temperature in Kelvin |
float(DEFAULT_T)
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Returns:
Type | Description |
---|---|
float | NDArray[floating]
|
SRH recombination rate (cm^-3 s^-1). |
Notes
Uses a simplified SRH form assuming mid-gap trap with n1 ≈ p1 ≈ n_i by default.
Advanced users can override n1
and p1
to relax this assumption.
Source code in semiconductor_sim/models/recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
use_headless_backend(preferred='Agg')
¶
Switch Matplotlib backend to a non-interactive one if possible.
Parameters: - preferred: Backend name to use when switching (default: 'Agg').
Source code in semiconductor_sim/utils/plotting.py
10 11 12 13 14 15 16 17 18 |
|
Varactor diode device model.
DEFAULT_T = 300
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
VaractorDiode(doping_p, doping_n, area=0.0001, temperature=DEFAULT_T, tau_n=1e-06, tau_p=1e-06)
¶
Bases: Device
Initialize the Varactor Diode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doping_p
|
float
|
Acceptor concentration in p-region (cm^-3) |
required |
doping_n
|
float
|
Donor concentration in n-region (cm^-3) |
required |
area
|
float
|
Cross-sectional area of the diode (cm^2) |
0.0001
|
temperature
|
float
|
Temperature in Kelvin |
DEFAULT_T
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Source code in semiconductor_sim/devices/varactor_diode.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
calculate_saturation_current()
¶
Calculate the saturation current (I_s) considering temperature.
Source code in semiconductor_sim/devices/varactor_diode.py
43 44 45 46 47 48 49 50 51 52 53 54 |
|
capacitance(reverse_voltage)
¶
Calculate the junction capacitance for a given reverse voltage.
Source code in semiconductor_sim/devices/varactor_diode.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
¶
Calculate current for voltage_array
, including SRH recombination
if concentrations are provided.
Returns (I, R_SRH)
matching the shape of voltage_array
.
Source code in semiconductor_sim/devices/varactor_diode.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
plot_capacitance_vs_voltage(voltage_array)
¶
Plot the junction capacitance as a function of reverse voltage.
Source code in semiconductor_sim/devices/varactor_diode.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|
plot_iv_characteristic(voltage, current, recombination=None)
¶
Plot the IV characteristics and optionally the recombination rate.
Source code in semiconductor_sim/devices/varactor_diode.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
apply_basic_style()
¶
Apply a minimal style to keep plots consistent across devices.
Source code in semiconductor_sim/utils/plotting.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
safe_expm1(x, max_arg=700.0)
¶
Compute exp(x) - 1 safely for arrays or scalars by clipping the argument to avoid overflow and using numpy.expm1 for better precision near zero.
Parameters: - x: input value(s) - max_arg: maximum absolute argument allowed before clipping (float64 ~709)
Returns: - np.ndarray: exp(x) - 1 computed safely
Source code in semiconductor_sim/utils/numerics.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
srh_recombination(n, p, temperature=float(DEFAULT_T), tau_n=1e-06, tau_p=1e-06, n1=None, p1=None)
¶
Calculate the Shockley-Read-Hall (SRH) recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float | NDArray[floating]
|
Electron concentration (cm^-3) |
required |
p
|
float | NDArray[floating]
|
Hole concentration (cm^-3) |
required |
temperature
|
float
|
Temperature in Kelvin |
float(DEFAULT_T)
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Returns:
Type | Description |
---|---|
float | NDArray[floating]
|
SRH recombination rate (cm^-3 s^-1). |
Notes
Uses a simplified SRH form assuming mid-gap trap with n1 ≈ p1 ≈ n_i by default.
Advanced users can override n1
and p1
to relax this assumption.
Source code in semiconductor_sim/models/recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
use_headless_backend(preferred='Agg')
¶
Switch Matplotlib backend to a non-interactive one if possible.
Parameters: - preferred: Backend name to use when switching (default: 'Agg').
Source code in semiconductor_sim/utils/plotting.py
10 11 12 13 14 15 16 17 18 |
|
DEFAULT_T = 300
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
ZenerDiode(doping_p, doping_n, area=0.0001, zener_voltage=5.0, temperature=300, tau_n=1e-06, tau_p=1e-06)
¶
Bases: Device
Initialize the Zener Diode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doping_p
|
float
|
Acceptor concentration in p-region (cm^-3) |
required |
doping_n
|
float
|
Donor concentration in n-region (cm^-3) |
required |
area
|
float
|
Cross-sectional area of the diode (cm^2) |
0.0001
|
zener_voltage
|
float
|
Zener breakdown voltage (V) |
5.0
|
temperature
|
float
|
Temperature in Kelvin |
300
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Source code in semiconductor_sim/devices/zener_diode.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
calculate_saturation_current()
¶
Calculate the saturation current (I_s) considering temperature.
Source code in semiconductor_sim/devices/zener_diode.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
¶
Calculate the current for a given array of voltages, including SRH recombination.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage_array
|
NDArray[floating]
|
Array of voltage values (V) |
required |
n_conc
|
float | NDArray[floating] | None
|
Electron concentration (cm^-3) |
None
|
p_conc
|
float | NDArray[floating] | None
|
Hole concentration (cm^-3) |
None
|
Returns:
Name | Type | Description |
---|---|---|
current_array |
NDArray[floating]
|
Array of current values (A) |
recombination_array |
NDArray[floating]
|
Array of recombination rates (cm^-3 s^-1) |
Source code in semiconductor_sim/devices/zener_diode.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
load_ml_model()
¶
Load the pre-trained ML model for predicting Zener voltage.
Source code in semiconductor_sim/devices/zener_diode.py
65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
plot_iv_characteristic(voltage, current, recombination=None)
¶
Plot the IV characteristics and optionally the recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage
|
NDArray[floating]
|
Voltage values (V) |
required |
current
|
NDArray[floating]
|
Current values (A) |
required |
recombination
|
NDArray[floating] | None
|
Recombination rates (cm^-3 s^-1) |
None
|
Source code in semiconductor_sim/devices/zener_diode.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
predict_zener_voltage()
¶
Predict the Zener voltage using the ML model.
Returns:
Name | Type | Description |
---|---|---|
predicted_zener_voltage |
float
|
Predicted Zener voltage (V) |
Source code in semiconductor_sim/devices/zener_diode.py
79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
apply_basic_style()
¶
Apply a minimal style to keep plots consistent across devices.
Source code in semiconductor_sim/utils/plotting.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
safe_expm1(x, max_arg=700.0)
¶
Compute exp(x) - 1 safely for arrays or scalars by clipping the argument to avoid overflow and using numpy.expm1 for better precision near zero.
Parameters: - x: input value(s) - max_arg: maximum absolute argument allowed before clipping (float64 ~709)
Returns: - np.ndarray: exp(x) - 1 computed safely
Source code in semiconductor_sim/utils/numerics.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
srh_recombination(n, p, temperature=float(DEFAULT_T), tau_n=1e-06, tau_p=1e-06, n1=None, p1=None)
¶
Calculate the Shockley-Read-Hall (SRH) recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float | NDArray[floating]
|
Electron concentration (cm^-3) |
required |
p
|
float | NDArray[floating]
|
Hole concentration (cm^-3) |
required |
temperature
|
float
|
Temperature in Kelvin |
float(DEFAULT_T)
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Returns:
Type | Description |
---|---|
float | NDArray[floating]
|
SRH recombination rate (cm^-3 s^-1). |
Notes
Uses a simplified SRH form assuming mid-gap trap with n1 ≈ p1 ≈ n_i by default.
Advanced users can override n1
and p1
to relax this assumption.
Source code in semiconductor_sim/models/recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
use_headless_backend(preferred='Agg')
¶
Switch Matplotlib backend to a non-interactive one if possible.
Parameters: - preferred: Backend name to use when switching (default: 'Agg').
Source code in semiconductor_sim/utils/plotting.py
10 11 12 13 14 15 16 17 18 |
|
MOS capacitor device model.
DEFAULT_T = 300
module-attribute
¶
epsilon_0 = 8.854e-14
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
MOSCapacitor(doping_p, oxide_thickness=1e-06, oxide_permittivity=3.45, area=0.0001, temperature=DEFAULT_T, tau_n=1e-06, tau_p=1e-06)
¶
Bases: Device
Initialize the MOS Capacitor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doping_p
|
float
|
Acceptor concentration in p-region (cm^-3) |
required |
oxide_thickness
|
float
|
Oxide thickness (cm) |
1e-06
|
oxide_permittivity
|
float
|
Relative permittivity of the oxide |
3.45
|
area
|
float
|
Cross-sectional area of the capacitor (cm^2) |
0.0001
|
temperature
|
float
|
Temperature in Kelvin |
DEFAULT_T
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Source code in semiconductor_sim/devices/mos_capacitor.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
calculate_oxide_capacitance()
¶
Calculate the oxide capacitance (C_ox).
Source code in semiconductor_sim/devices/mos_capacitor.py
45 46 47 48 49 |
|
capacitance(applied_voltage)
¶
Calculate the capacitance as a function of applied voltage.
Source code in semiconductor_sim/devices/mos_capacitor.py
62 63 64 65 66 67 68 69 70 71 72 73 |
|
depletion_width(applied_voltage)
¶
Calculate the depletion width for a given applied voltage.
Source code in semiconductor_sim/devices/mos_capacitor.py
51 52 53 54 55 56 57 58 59 60 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
¶
Calculate current for voltage_array
; optionally compute SRH recombination.
Source code in semiconductor_sim/devices/mos_capacitor.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
plot_capacitance_vs_voltage(voltage)
¶
Plot the capacitance-voltage (C-V) characteristics.
Computes capacitance internally from the provided voltage array.
Source code in semiconductor_sim/devices/mos_capacitor.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
plot_iv_characteristic(voltage, current, recombination=None)
¶
Plot the IV characteristics and optionally the recombination rate.
Source code in semiconductor_sim/devices/mos_capacitor.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
apply_basic_style()
¶
Apply a minimal style to keep plots consistent across devices.
Source code in semiconductor_sim/utils/plotting.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
srh_recombination(n, p, temperature=float(DEFAULT_T), tau_n=1e-06, tau_p=1e-06, n1=None, p1=None)
¶
Calculate the Shockley-Read-Hall (SRH) recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float | NDArray[floating]
|
Electron concentration (cm^-3) |
required |
p
|
float | NDArray[floating]
|
Hole concentration (cm^-3) |
required |
temperature
|
float
|
Temperature in Kelvin |
float(DEFAULT_T)
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Returns:
Type | Description |
---|---|
float | NDArray[floating]
|
SRH recombination rate (cm^-3 s^-1). |
Notes
Uses a simplified SRH form assuming mid-gap trap with n1 ≈ p1 ≈ n_i by default.
Advanced users can override n1
and p1
to relax this assumption.
Source code in semiconductor_sim/models/recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
use_headless_backend(preferred='Agg')
¶
Switch Matplotlib backend to a non-interactive one if possible.
Parameters: - preferred: Backend name to use when switching (default: 'Agg').
Source code in semiconductor_sim/utils/plotting.py
10 11 12 13 14 15 16 17 18 |
|
Photodiode device model (teaching-simple).
Modeled as an illuminated diode: I(V) = -I_ph + I_s * (exp(V / V_T) - 1).
Assumptions:
- Constant responsivity over spectrum; photocurrent proportional to irradiance.
- Uses same dark-saturation current form as PN junction device.
- Optional material
to compute intrinsic carrier density dependence.
DEFAULT_T = 300
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
Material(name, symbol, Eg0_eV, varshni_alpha_eV_per_K, varshni_beta_K, Nc_prefactor_cm3, Nv_prefactor_cm3)
dataclass
¶
Photodiode(doping_p, doping_n, area=0.0001, irradiance_W_per_cm2=0.001, responsivity_A_per_W=0.5, temperature=DEFAULT_T, material=None)
¶
Bases: Device
Initialize a photodiode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doping_p
|
float
|
Acceptor concentration in p-region (cm^-3) |
required |
doping_n
|
float
|
Donor concentration in n-region (cm^-3) |
required |
area
|
float
|
Active area of the photodiode (cm^2) |
0.0001
|
irradiance_W_per_cm2
|
float
|
Incident optical power density (W/cm^2) |
0.001
|
responsivity_A_per_W
|
float
|
Responsivity (A/W) |
0.5
|
temperature
|
float
|
Temperature in Kelvin |
DEFAULT_T
|
material
|
Material | None
|
Optional material for intrinsic density model |
None
|
Source code in semiconductor_sim/devices/photodiode.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
¶
Return the illuminated I–V curve as a tuple with current array.
Returns:
Type | Description |
---|---|
tuple[NDArray[floating], ...]
|
(current_array,) |
Source code in semiconductor_sim/devices/photodiode.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
safe_expm1(x, max_arg=700.0)
¶
Compute exp(x) - 1 safely for arrays or scalars by clipping the argument to avoid overflow and using numpy.expm1 for better precision near zero.
Parameters: - x: input value(s) - max_arg: maximum absolute argument allowed before clipping (float64 ~709)
Returns: - np.ndarray: exp(x) - 1 computed safely
Source code in semiconductor_sim/utils/numerics.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
BARRIER_MAX_EV = 2.0
module-attribute
¶
BARRIER_MIN_EV = 0.1
module-attribute
¶
IDEALITY_MAX = 2.0
module-attribute
¶
IDEALITY_MIN = 1.0
module-attribute
¶
k_B = 1.381e-23
module-attribute
¶
q = 1.602e-19
module-attribute
¶
Device(area=0.0001, temperature=DEFAULT_T)
¶
Bases: ABC
Abstract base class for semiconductor devices.
Provides common fields and establishes a standard API for IV
characteristics. Subclasses must implement iv_characteristic
.
Source code in semiconductor_sim/devices/base.py
19 20 21 22 23 24 25 |
|
iv_characteristic(voltage_array, n_conc=None, p_conc=None)
abstractmethod
¶
Compute current vs. voltage. Implementations must return a tuple where the first element is the current array, and optional subsequent arrays include model-specific outputs (e.g., recombination rates, emission).
Source code in semiconductor_sim/devices/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
SchottkyDiode(barrier_height_eV=0.7, ideality=1.1, *, area=0.0001, temperature=300.0, A_star=120.0, series_resistance_ohm=None)
¶
Bases: Device
Teaching-simple Schottky diode using thermionic emission.
I = A * A** * T^2 * exp(-qΦ_B/kT) * [exp(qV/nkT) - 1]
Parameters - barrier_height_eV: Φ_B in eV - ideality: n (default 1.1) - area: junction area in cm^2 (default 1e-4) - temperature: K - A_star: effective Richardson constant (A/cm^2/K^2), default 120 for Si
Source code in semiconductor_sim/devices/schottky.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
Models¶
Recombination models.
DEFAULT_T = 300
module-attribute
¶
srh_recombination(n, p, temperature=float(DEFAULT_T), tau_n=1e-06, tau_p=1e-06, n1=None, p1=None)
¶
Calculate the Shockley-Read-Hall (SRH) recombination rate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
float | NDArray[floating]
|
Electron concentration (cm^-3) |
required |
p
|
float | NDArray[floating]
|
Hole concentration (cm^-3) |
required |
temperature
|
float
|
Temperature in Kelvin |
float(DEFAULT_T)
|
tau_n
|
float
|
Electron lifetime (s) |
1e-06
|
tau_p
|
float
|
Hole lifetime (s) |
1e-06
|
Returns:
Type | Description |
---|---|
float | NDArray[floating]
|
SRH recombination rate (cm^-3 s^-1). |
Notes
Uses a simplified SRH form assuming mid-gap trap with n1 ≈ p1 ≈ n_i by default.
Advanced users can override n1
and p1
to relax this assumption.
Source code in semiconductor_sim/models/recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
Radiative recombination model.
DEFAULT_T = 300
module-attribute
¶
radiative_recombination(n, p, B=1e-10, temperature=DEFAULT_T)
¶
Compute the radiative recombination rate.
Parameters: - n: Electron concentration (cm^-3) - p: Hole concentration (cm^-3) - B: Radiative recombination coefficient (cm^3/s) - temperature: Temperature in Kelvin (unused in simplified model)
Returns: - Radiative recombination rate (cm^-3 s^-1)
Notes: - Uses a simplified relation R = B * (n p - n_i^2), with n_i = 1.5e10 cm^-3. - Clamps negative values to zero for physical plausibility.
Source code in semiconductor_sim/models/radiative_recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
DEFAULT_T = 300
module-attribute
¶
auger_recombination(n, p, C=1e-31, temperature=DEFAULT_T)
¶
Calculate the Auger Recombination rate.
Parameters: n (float or array): Electron concentration (cm^-3) p (float or array): Hole concentration (cm^-3) C (float): Auger recombination coefficient (cm^6/s) temperature (float): Temperature in Kelvin
Returns:
Name | Type | Description |
---|---|---|
R_auger |
float or array
|
Auger recombination rate (cm^-3 s^-1) |
Source code in semiconductor_sim/models/auger_recombination.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
temperature_dependent_bandgap(T, E_g0=1.12, alpha=0.000473, beta=636)
¶
temperature_dependent_bandgap(T: float, E_g0: float = ..., alpha: float = ..., beta: float = ...) -> float
temperature_dependent_bandgap(T: NDArray[np.floating], E_g0: float = ..., alpha: float = ..., beta: float = ...) -> NDArray[np.floating]
Calculate the temperature-dependent bandgap energy using the Varshni equation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
T
|
float or ndarray
|
Temperature in Kelvin |
required |
E_g0
|
float
|
Bandgap energy at 0 K (eV) |
1.12
|
alpha
|
float
|
Varshni's alpha parameter (eV/K) |
0.000473
|
beta
|
float
|
Varshni's beta parameter (K) |
636
|
Returns:
Name | Type | Description |
---|---|---|
E_g |
float or ndarray
|
Bandgap energy at temperature T (eV) |
Source code in semiconductor_sim/models/bandgap.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
high_frequency_capacitance(C_dc, f, R=1000)
¶
Calculate the high-frequency capacitance using the voltage-dependent capacitance.
C_dc (float or array): DC capacitance (F) f (float): Frequency (Hz) R (float): Resistance (Ohms), default 1000 Ohms
Returns:
Name | Type | Description |
---|---|---|
C_ac |
float or array
|
AC capacitance (F) |
Source code in semiconductor_sim/models/high_frequency.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
_SI_ELECTRON = dict(mu_min=92.0, mu_0=1414.0, N_ref=1.3e+17, alpha=0.91)
module-attribute
¶
_SI_HOLE = dict(mu_min=54.3, mu_0=470.0, N_ref=2.35e+17, alpha=0.88)
module-attribute
¶
_ct_model(N, mu_min, mu_0, N_ref, alpha, T=None, T_ref=300.0, temp_exp=0.0)
¶
Source code in semiconductor_sim/models/mobility.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
mu_n(doping_cm3, T=None, material='Si')
¶
Source code in semiconductor_sim/models/mobility.py
31 32 33 34 35 36 37 38 39 |
|
mu_p(doping_cm3, T=None, material='Si')
¶
Source code in semiconductor_sim/models/mobility.py
42 43 44 45 46 47 48 49 |
|
srh_rate(n, p, n_i, tau_n, tau_p)
¶
Source code in semiconductor_sim/models/srh.py
7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Materials¶
__all__ = ['Material', 'get_material', 'list_materials', 'materials']
module-attribute
¶
materials = {'Si': Material(name='Silicon', symbol='Si', Eg0_eV=1.17, varshni_alpha_eV_per_K=0.000473, varshni_beta_K=636.0, Nc_prefactor_cm3=6200000000000000.0, Nv_prefactor_cm3=3500000000000000.0), 'Ge': Material(name='Germanium', symbol='Ge', Eg0_eV=0.742, varshni_alpha_eV_per_K=0.00048, varshni_beta_K=235.0, Nc_prefactor_cm3=1980000000000000.0, Nv_prefactor_cm3=960000000000000.0), 'GaAs': Material(name='Gallium Arsenide', symbol='GaAs', Eg0_eV=1.519, varshni_alpha_eV_per_K=0.0005405, varshni_beta_K=204.0, Nc_prefactor_cm3=(4.7e+17 / 300.0 ** 1.5), Nv_prefactor_cm3=(9e+18 / 300.0 ** 1.5))}
module-attribute
¶
Material(name, symbol, Eg0_eV, varshni_alpha_eV_per_K, varshni_beta_K, Nc_prefactor_cm3, Nv_prefactor_cm3)
dataclass
¶
get_material(key)
¶
Source code in semiconductor_sim/materials/registry.py
107 108 109 110 111 |
|
list_materials()
¶
Source code in semiconductor_sim/materials/registry.py
114 115 |
|
Utils¶
safe_expm1(x, max_arg=700.0)
¶
Compute exp(x) - 1 safely for arrays or scalars by clipping the argument to avoid overflow and using numpy.expm1 for better precision near zero.
Parameters: - x: input value(s) - max_arg: maximum absolute argument allowed before clipping (float64 ~709)
Returns: - np.ndarray: exp(x) - 1 computed safely
Source code in semiconductor_sim/utils/numerics.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|