nmos2d 0.2.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nmos2d/__init__.py +11 -0
- nmos2d/api.py +228 -0
- nmos2d/bin/mesh_demo.exe +0 -0
- nmos2d-0.2.0.data/data/share/nmos2d/examples/planar_nmos.py +65 -0
- nmos2d-0.2.0.dist-info/METADATA +72 -0
- nmos2d-0.2.0.dist-info/RECORD +8 -0
- nmos2d-0.2.0.dist-info/WHEEL +5 -0
- nmos2d-0.2.0.dist-info/entry_points.txt +3 -0
nmos2d/__init__.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Two-dimensional planar NMOS simulation."""
|
|
2
|
+
|
|
3
|
+
from .api import (
|
|
4
|
+
Bias, ScanBias, Current, Device, Mesh, OperatingPoint, ScanResult, SimulationError,
|
|
5
|
+
characterize, output, scan, solve, transfer,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"Bias", "ScanBias", "Current", "Device", "Mesh", "OperatingPoint", "ScanResult",
|
|
10
|
+
"SimulationError", "characterize", "output", "scan", "solve", "transfer",
|
|
11
|
+
]
|
nmos2d/api.py
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"""Python interface to the bundled finite-volume solver."""
|
|
2
|
+
|
|
3
|
+
import csv
|
|
4
|
+
from dataclasses import asdict, dataclass
|
|
5
|
+
import math
|
|
6
|
+
from numbers import Integral, Real
|
|
7
|
+
import os
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
import subprocess
|
|
10
|
+
import sys
|
|
11
|
+
import tempfile
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True, kw_only=True)
|
|
15
|
+
class Device:
|
|
16
|
+
"""Planar silicon NMOS. Permittivities are relative; specify either flat_band_v or gate_work_function_ev, setting the other to None."""
|
|
17
|
+
|
|
18
|
+
gate_length_um: float
|
|
19
|
+
width_um: float
|
|
20
|
+
oxide_thickness_nm: float
|
|
21
|
+
silicon_depth_um: float
|
|
22
|
+
source_length_um: float
|
|
23
|
+
drain_length_um: float
|
|
24
|
+
source_junction_depth_um: float
|
|
25
|
+
drain_junction_depth_um: float
|
|
26
|
+
substrate_doping_cm3: float
|
|
27
|
+
source_doping_cm3: float
|
|
28
|
+
drain_doping_cm3: float
|
|
29
|
+
silicon_permittivity: float
|
|
30
|
+
oxide_permittivity: float
|
|
31
|
+
intrinsic_density_cm3: float
|
|
32
|
+
electron_mobility_cm2_vs: float
|
|
33
|
+
hole_mobility_cm2_vs: float
|
|
34
|
+
temperature_k: float
|
|
35
|
+
flat_band_v: float | None
|
|
36
|
+
gate_work_function_ev: float | None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@dataclass(frozen=True, kw_only=True)
|
|
40
|
+
class Mesh:
|
|
41
|
+
"""Horizontal, silicon and oxide cell counts, followed by the surface refinement depth."""
|
|
42
|
+
|
|
43
|
+
nx: int
|
|
44
|
+
ny_si: int
|
|
45
|
+
ny_ox: int
|
|
46
|
+
surface_refinement_um: float
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@dataclass(frozen=True, kw_only=True)
|
|
50
|
+
class ScanBias:
|
|
51
|
+
"""DC grid, sampling biases and metric extraction settings for scan()."""
|
|
52
|
+
|
|
53
|
+
off_vgs_v: float
|
|
54
|
+
off_vds_v: float
|
|
55
|
+
on_vgs_v: float
|
|
56
|
+
on_vds_v: float
|
|
57
|
+
vds_start_v: float
|
|
58
|
+
vds_stop_v: float
|
|
59
|
+
vds_step_v: float
|
|
60
|
+
vgs_start_v: float
|
|
61
|
+
vgs_stop_v: float
|
|
62
|
+
vgs_step_v: float
|
|
63
|
+
transfer_vds_v: float
|
|
64
|
+
high_vds_v: float
|
|
65
|
+
difference_step_v: float
|
|
66
|
+
threshold_current_a: float
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@dataclass(frozen=True, kw_only=True)
|
|
70
|
+
class Bias(ScanBias):
|
|
71
|
+
"""Bias settings for characterize(), including the gate-only Poisson calculation."""
|
|
72
|
+
|
|
73
|
+
electrostatic_gate_v: float
|
|
74
|
+
gate_voltages_v: tuple[float, ...]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@dataclass(frozen=True)
|
|
78
|
+
class Current:
|
|
79
|
+
vgs_v: float
|
|
80
|
+
vds_v: float
|
|
81
|
+
drain_current_a: float
|
|
82
|
+
source_current_a: float
|
|
83
|
+
body_current_a: float
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@dataclass(frozen=True)
|
|
87
|
+
class OperatingPoint(Current):
|
|
88
|
+
gate_charge_c: float
|
|
89
|
+
fields: list[dict[str, float]] | None
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
@dataclass(frozen=True)
|
|
93
|
+
class ScanResult:
|
|
94
|
+
points_csv: Path
|
|
95
|
+
converged_points: int
|
|
96
|
+
total_points: int
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class SimulationError(RuntimeError):
|
|
100
|
+
"""The native solver could not finish the requested calculation."""
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def _binary():
|
|
104
|
+
name = "mesh_demo.exe" if os.name == "nt" else "mesh_demo"
|
|
105
|
+
return Path(__file__).resolve().parent / "bin" / name
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def _integer(value, name):
|
|
109
|
+
if isinstance(value, bool) or not isinstance(value, Integral) or not 1 <= value <= 2147483647:
|
|
110
|
+
raise ValueError(f"{name} must be a positive 32-bit integer")
|
|
111
|
+
return int(value)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def _number(value, name):
|
|
115
|
+
if isinstance(value, bool) or not isinstance(value, Real) or not math.isfinite(value):
|
|
116
|
+
raise ValueError(f"{name} must be a finite number")
|
|
117
|
+
return repr(float(value))
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def _config(device, mesh, settings):
|
|
121
|
+
if not isinstance(device, Device) or not isinstance(mesh, Mesh):
|
|
122
|
+
raise TypeError("Supply Device and Mesh instances.")
|
|
123
|
+
if (device.flat_band_v is None) == (device.gate_work_function_ev is None):
|
|
124
|
+
raise ValueError("Specify exactly one of flat_band_v and gate_work_function_ev.")
|
|
125
|
+
options = {**asdict(device), **asdict(mesh), **settings}
|
|
126
|
+
lines = []
|
|
127
|
+
for name, value in options.items():
|
|
128
|
+
if name in ("gate_work_function_ev", "flat_band_v") and value is None:
|
|
129
|
+
continue
|
|
130
|
+
if name in ("nx", "ny_si", "ny_ox"):
|
|
131
|
+
text = str(_integer(value, name))
|
|
132
|
+
elif name == "gate_voltages_v":
|
|
133
|
+
text = " ".join(_number(v, name) for v in value)
|
|
134
|
+
if not text:
|
|
135
|
+
raise ValueError("gate_voltages_v must contain at least one voltage")
|
|
136
|
+
else:
|
|
137
|
+
text = _number(value, name)
|
|
138
|
+
lines.append(f"{name} {text}\n")
|
|
139
|
+
return "".join(lines)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def _run(folder, mode, device, mesh, settings, workers=1, fields=False, *, persistent=False):
|
|
143
|
+
args = [_binary(), "--stdin-config", "--workers", str(_integer(workers, "workers"))]
|
|
144
|
+
if mode:
|
|
145
|
+
args.append(mode)
|
|
146
|
+
if fields:
|
|
147
|
+
args.append("--fields")
|
|
148
|
+
config = _config(device, mesh, settings)
|
|
149
|
+
if persistent:
|
|
150
|
+
folder = _run_directory(folder)
|
|
151
|
+
completed = subprocess.run(args, cwd=folder, input=config, capture_output=True,
|
|
152
|
+
encoding="utf-8", errors="replace")
|
|
153
|
+
if completed.returncode and not (mode == "--pilot" and completed.returncode == 2):
|
|
154
|
+
message = completed.stderr.strip() or f"Solver exited with code {completed.returncode}"
|
|
155
|
+
if persistent:
|
|
156
|
+
message += f" (run directory: {folder})"
|
|
157
|
+
raise SimulationError(message)
|
|
158
|
+
return Path(folder) / "output"
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def _currents(row):
|
|
162
|
+
return [float(row[key]) for key in ("Vgs_V", "Vds_V", "Id_A", "Is_A", "Ib_A")]
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def solve(device, *, vgs_v, vds_v, mesh, save_fields=False) -> OperatingPoint:
|
|
166
|
+
"""Solve one DC bias. Optional field rows include cell coordinates and physical units in their keys."""
|
|
167
|
+
with tempfile.TemporaryDirectory() as folder:
|
|
168
|
+
out = _run(folder, "--point", device, mesh, {"on_vgs_v": vgs_v, "on_vds_v": vds_v},
|
|
169
|
+
fields=save_fields)
|
|
170
|
+
with (out / "point.csv").open(newline="") as f:
|
|
171
|
+
row = next(csv.DictReader(f))
|
|
172
|
+
fields = None
|
|
173
|
+
if save_fields:
|
|
174
|
+
with (out / "fields.csv").open(newline="") as f:
|
|
175
|
+
fields = [{k: float(v) for k, v in cell.items()} for cell in csv.DictReader(f)]
|
|
176
|
+
return OperatingPoint(*_currents(row), float(row["Qg_C"]), fields)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def _curve(mode, filename, device, mesh, settings, workers):
|
|
180
|
+
with tempfile.TemporaryDirectory() as folder:
|
|
181
|
+
out = _run(folder, mode, device, mesh, settings, workers)
|
|
182
|
+
with (out / filename).open(newline="") as f:
|
|
183
|
+
return [Current(*_currents(row)) for row in csv.DictReader(f)]
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def transfer(device, *, mesh, vds_v, vgs_start_v,
|
|
187
|
+
vgs_stop_v, vgs_step_v) -> list[Current]:
|
|
188
|
+
"""Sweep gate voltage at fixed drain bias, continuing from each preceding bias."""
|
|
189
|
+
settings = dict(transfer_vds_v=vds_v, vgs_start_v=vgs_start_v,
|
|
190
|
+
vgs_stop_v=vgs_stop_v, vgs_step_v=vgs_step_v)
|
|
191
|
+
return _curve("--transfer", "transfer_iv.csv", device, mesh, settings, 1)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def output(device, *, mesh, gate_voltages_v,
|
|
195
|
+
vds_start_v, vds_stop_v, vds_step_v, workers=1) -> list[Current]:
|
|
196
|
+
"""Sweep drain voltage at each gate bias. Results follow the input gate order."""
|
|
197
|
+
settings = dict(gate_voltages_v=gate_voltages_v, vds_start_v=vds_start_v,
|
|
198
|
+
vds_stop_v=vds_stop_v, vds_step_v=vds_step_v)
|
|
199
|
+
return _curve("--output-curve", "output_iv.csv", device, mesh, settings, workers)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def _run_directory(output_dir):
|
|
203
|
+
if output_dir is None:
|
|
204
|
+
return Path(tempfile.mkdtemp(prefix="nmos2d-"))
|
|
205
|
+
folder = Path(output_dir).resolve()
|
|
206
|
+
folder.mkdir(parents=True, exist_ok=True)
|
|
207
|
+
# Reserve this run's files before starting the solver, including for concurrent callers.
|
|
208
|
+
(folder / "output").mkdir()
|
|
209
|
+
return folder
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def scan(device, *, mesh, bias: ScanBias, workers=1, save_fields=False, output_dir=None) -> ScanResult:
|
|
213
|
+
"""Run the specified IV grid and four centered difference points; preserve convergence per row."""
|
|
214
|
+
out = _run(output_dir, "--pilot", device, mesh, asdict(bias), workers, save_fields, persistent=True)
|
|
215
|
+
path = out / "pilot_points.csv"
|
|
216
|
+
with path.open(newline="") as f:
|
|
217
|
+
states = [int(row["converged"]) for row in csv.DictReader(f)]
|
|
218
|
+
return ScanResult(path, sum(states), len(states))
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def characterize(device, *, mesh, bias, workers=1, output_dir=None) -> Path:
|
|
222
|
+
"""Write the original C++ characterization report and return the directory containing its CSVs."""
|
|
223
|
+
return _run(output_dir, "", device, mesh, asdict(bias), workers, persistent=True)
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
def main():
|
|
227
|
+
"""Run the solver command line in the current directory."""
|
|
228
|
+
return subprocess.call([_binary(), *sys.argv[1:]])
|
nmos2d/bin/mesh_demo.exe
ADDED
|
Binary file
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import csv
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
import nmos2d
|
|
6
|
+
|
|
7
|
+
WORKERS = 1
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def paper_inputs():
|
|
11
|
+
device = nmos2d.Device(
|
|
12
|
+
gate_length_um=1.5, width_um=1.0, oxide_thickness_nm=10.0, silicon_depth_um=1.0,
|
|
13
|
+
source_length_um=1.0, drain_length_um=1.0,
|
|
14
|
+
source_junction_depth_um=0.2, drain_junction_depth_um=0.2,
|
|
15
|
+
substrate_doping_cm3=1e16, source_doping_cm3=1e18, drain_doping_cm3=1e18,
|
|
16
|
+
silicon_permittivity=11.7, oxide_permittivity=3.9, intrinsic_density_cm3=1e10,
|
|
17
|
+
electron_mobility_cm2_vs=1000, hole_mobility_cm2_vs=450, temperature_k=300,
|
|
18
|
+
flat_band_v=-0.25, gate_work_function_ev=None,
|
|
19
|
+
)
|
|
20
|
+
mesh = nmos2d.Mesh(nx=48, ny_si=48, ny_ox=6, surface_refinement_um=0.010)
|
|
21
|
+
bias = nmos2d.ScanBias(
|
|
22
|
+
vgs_start_v=0.30, vgs_stop_v=1.40, vgs_step_v=0.05,
|
|
23
|
+
vds_start_v=0.00, vds_stop_v=1.00, vds_step_v=0.10,
|
|
24
|
+
off_vgs_v=0.30, off_vds_v=0.10, on_vgs_v=1.40, on_vds_v=0.10,
|
|
25
|
+
transfer_vds_v=0.10, high_vds_v=1.00, difference_step_v=0.005,
|
|
26
|
+
threshold_current_a=1e-7 * device.width_um / device.gate_length_um,
|
|
27
|
+
)
|
|
28
|
+
return device, mesh, bias
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def main():
|
|
32
|
+
root = Path(__file__).resolve().parent / "NMOS论文复现结果"
|
|
33
|
+
folder = root / datetime.now().strftime("%Y%m%d_%H%M%S_%f")
|
|
34
|
+
device, mesh, bias = paper_inputs()
|
|
35
|
+
print(f"正在计算 {mesh.nx}×{mesh.ny_si + mesh.ny_ox} 主网格……", flush=True)
|
|
36
|
+
scan = nmos2d.scan(device, mesh=mesh, bias=bias, workers=WORKERS, save_fields=True, output_dir=folder)
|
|
37
|
+
|
|
38
|
+
with scan.points_csv.open(newline="") as file:
|
|
39
|
+
points = [row for row in csv.DictReader(file) if row["kind"] == "iv"]
|
|
40
|
+
currents = {(round(float(r["Vgs_V"]), 12), round(float(r["Vds_V"]), 12)): float(r["Id_A"])
|
|
41
|
+
for r in points if r["converged"] == "1"}
|
|
42
|
+
lines = [f"主网格收敛 {len(currents)}/{len(points)} 个偏压点"]
|
|
43
|
+
if scan.converged_points != scan.total_points:
|
|
44
|
+
raise RuntimeError(f"部分工作点未收敛,详见 {scan.points_csv}")
|
|
45
|
+
with (scan.points_csv.parent / "metrics.csv").open(newline="") as file:
|
|
46
|
+
for row in csv.DictReader(file):
|
|
47
|
+
if row["metric"] in ("Vth", "Ion", "Ioff", "Ion_over_Ioff"):
|
|
48
|
+
unit = "" if row["unit"] == "1" else " " + row["unit"]
|
|
49
|
+
value = f"{float(row['value']):.7g}{unit}" if row["status"] == "ok" else row["status"]
|
|
50
|
+
lines.append(f"{row['metric']} = {value}")
|
|
51
|
+
|
|
52
|
+
coarse = nmos2d.Mesh(nx=40, ny_si=40, ny_ox=5, surface_refinement_um=0.012)
|
|
53
|
+
print(f"正在计算 {coarse.nx}×{coarse.ny_si + coarse.ny_ox} 粗网格……", flush=True)
|
|
54
|
+
for vg, vd in [(0.30, 0.10), (0.65, 0.10), (1.40, 0.10), (1.40, 1.00)]:
|
|
55
|
+
point = nmos2d.solve(device, mesh=coarse, vgs_v=vg, vds_v=vd)
|
|
56
|
+
fine_id = currents.get((vg, vd), float("nan"))
|
|
57
|
+
lines.append(f"Vgs={vg:.2f} V,Vds={vd:.2f} V:粗网格 {point.drain_current_a:.7g} A,主网格 {fine_id:.7g} A")
|
|
58
|
+
|
|
59
|
+
summary = "\n".join(lines)
|
|
60
|
+
(folder / "结果.txt").write_text(summary + "\n", encoding="utf-8-sig")
|
|
61
|
+
print(summary, folder, sep="\n")
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
if __name__ == "__main__":
|
|
65
|
+
main()
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: nmos2d
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Two-dimensional drift-diffusion simulation of planar silicon NMOS devices
|
|
5
|
+
Keywords: NMOS,semiconductor,drift-diffusion,finite-volume
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
# nmos2d · 二维平面 NMOS 器件仿真
|
|
10
|
+
|
|
11
|
+
[Documentation](https://qianyuyingluo.github.io/nmos2d/) · [中文文档](https://qianyuyingluo.github.io/nmos2d/zh.html)
|
|
12
|
+
|
|
13
|
+
nmos2d 在硅和栅氧层的二维网格上联立求解泊松方程与载流子漂移扩散方程,计算端口电流、栅电荷及器件内部的物理场。Python 接口调用随 wheel 安装的 C++ 求解器,运行时只依赖 Python 标准库。
|
|
14
|
+
|
|
15
|
+
## 安装与发行示例
|
|
16
|
+
|
|
17
|
+
Windows x64,Python 3.10 及以上:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
python -m pip install .\nmos2d-0.2.0-py3-none-win_amd64.whl
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
发行示例 `examples/planar_nmos.py` 显式填写论文的器件、网格、偏压和阈值提取电流。将示例复制到工作目录,在 IDLE 中打开后按 F5 运行。安装 wheel 后可在 PowerShell 中复制示例:
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
python -c "from importlib.metadata import distribution; from shutil import copyfile; f = next(p for p in distribution('nmos2d').files if p.name == 'planar_nmos.py'); copyfile(f.locate(), 'planar_nmos.py')"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
各计算入口都要求传入 `device` 和 `mesh`。例如,使用自己填写的器件和网格求单个工作点:
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
point = nmos2d.solve(device, mesh=mesh, vgs_v=vg, vds_v=vd)
|
|
33
|
+
print(point.drain_current_a)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 器件与网格
|
|
37
|
+
|
|
38
|
+
创建 `Device` 时按下表填写。平带电压和栅功函数均须显式传入,其中一项填数值,另一项填 `None`。衬底接源极。
|
|
39
|
+
|
|
40
|
+
| Device 参数 | 含义 |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `gate_length_um`, `width_um` | 栅长、垂直于二维剖面的沟道宽度,µm |
|
|
43
|
+
| `oxide_thickness_nm`, `silicon_depth_um` | 栅氧厚度(nm)、硅区深度(µm) |
|
|
44
|
+
| `source_length_um`, `drain_length_um` | 源区、漏区横向长度,µm。总长由源长、栅长和漏长相加得到,栅极居中 |
|
|
45
|
+
| `source_junction_depth_um`, `drain_junction_depth_um` | 源结、漏结深度,µm |
|
|
46
|
+
| `substrate_doping_cm3`, `source_doping_cm3`, `drain_doping_cm3` | 衬底受主、源区施主、漏区施主浓度,cm⁻³ |
|
|
47
|
+
| `intrinsic_density_cm3`, `temperature_k` | 本征载流子浓度(cm⁻³)、温度(K) |
|
|
48
|
+
| `silicon_permittivity`, `oxide_permittivity` | 硅和栅氧的相对介电常数 |
|
|
49
|
+
| `electron_mobility_cm2_vs`, `hole_mobility_cm2_vs` | 电子和空穴迁移率,cm²/(V·s) |
|
|
50
|
+
| `flat_band_v`, `gate_work_function_ev` | 平带电压(V)或栅功函数(eV),二选一 |
|
|
51
|
+
|
|
52
|
+
创建 `Mesh` 时填写 `nx`、`ny_si`、`ny_ox` 和 `surface_refinement_um`,分别是横向列数、硅层数、栅氧层数和表面加密深度(µm)。深度填 0 可关闭表面加密。
|
|
53
|
+
|
|
54
|
+
## 计算接口
|
|
55
|
+
|
|
56
|
+
| 接口 | 除器件和网格外的仿真输入 |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| `solve` | 单个工作点的 `vgs_v` 和 `vds_v` |
|
|
59
|
+
| `transfer` | 固定 `vds_v` 及栅压起点、终点、步长 |
|
|
60
|
+
| `output` | `gate_voltages_v` 以及漏压起点、终点、步长 |
|
|
61
|
+
| `scan` | `bias=ScanBias(...)`,包含栅漏扫描起止值与步长、开关态栅漏电压、低/高漏压、差分半步长和阈值参考电流(A) |
|
|
62
|
+
| `characterize` | `bias=Bias(...)`,在上述参数基础上填写输出曲线的栅压列表和静电计算的栅压 `electrostatic_gate_v` |
|
|
63
|
+
|
|
64
|
+
`scan` 用栅压和漏压的笛卡尔积生成直流点,并在导通栅压、高漏压处取四个差分点。开关态和两条转移曲线的取样电压须落在扫描网格上。扫描结果包含端口电流、栅电荷、收敛状态和残差。设置 `save_fields=True` 可导出开关态及高漏压分布。`characterize` 输出伏安曲线、场分布和电学指标。
|
|
65
|
+
|
|
66
|
+
支持并行的接口默认使用一个线程,传入 `workers=N` 可指定线程数。`scan` 和 `characterize` 的 `output_dir` 用于保存 CSV,省略时创建临时目录。
|
|
67
|
+
|
|
68
|
+
## 命令行与源码安装
|
|
69
|
+
|
|
70
|
+
`nmos2d --help` 显示命令格式。命令行计算需使用 `--stdin-config`,从标准输入按行读取参数名和值。名称与 Python 接口的字段一致,栅功函数和平带电压只写选用的一项。
|
|
71
|
+
|
|
72
|
+
从源码构建需要 C++17 编译器。在项目根目录运行 `python -m pip install .`。
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
nmos2d/__init__.py,sha256=SXpnWXx7nve2GOLho3DVXRyFUTT4lkvk_dIRnhjKM3Q,394
|
|
2
|
+
nmos2d/api.py,sha256=LI1vLOnwH3AIXaOwBtcJP15_PM9KoWB9BrixeuFxSC0,8315
|
|
3
|
+
nmos2d/bin/mesh_demo.exe,sha256=kmlNQ2QUcshFAZ1x2w8E0XjmK75Qzxj3bWrt4JOWLbk,591360
|
|
4
|
+
nmos2d-0.2.0.data/data/share/nmos2d/examples/planar_nmos.py,sha256=ymXk_wHFbW_hO0RnCWDI6eiOljdv_-t-uMdNfPF0-Cc,3205
|
|
5
|
+
nmos2d-0.2.0.dist-info/METADATA,sha256=tuGL9tDx5tbkNTprTaU57s2_5bbpkdmW85-D8eMQLTA,4317
|
|
6
|
+
nmos2d-0.2.0.dist-info/WHEEL,sha256=MavvTN48CE-QbhQ_kyQzVg79Yjk576_oKsIlJsE4vMI,102
|
|
7
|
+
nmos2d-0.2.0.dist-info/entry_points.txt,sha256=hkTjhWQmUcGJstBGSdYKsnmaf36kFWNgBekBTNvCAaU,44
|
|
8
|
+
nmos2d-0.2.0.dist-info/RECORD,,
|