中文 · English
SawSim
声表面波(SAW)谐振器周期单元的压电耦合有限元求解器 Piezoelectric coupled FEM for SAW resonator unit cells · Q9 / Hex27 · PML · Bloch periodicity
项目名 SawSim;Python 包名与命令名 sawsim。
安装与使用
pip install sawsim
pip install "sawsim[fast]" # 可选:MKL PARDISO 直接求解器
from sawsim import Model, sweep
r = sweep(Model("sp_double_layer", pitch_um=1.085, points=101), "out/dbl")
r.frequency_ghz, r.admittance, r.peak_frequency_ghz
sawsim templates
sawsim run config.json -o out/dbl
无图形界面的 Linux 上 Gmsh 需要 libglu1-mesa libopengl0。详见 快速开始。
能力
| 模型 | 9 种周期单元模板:5 种 2D(Q9,含 TC-SAW)与 4 种 2.5D 周期薄片(Hex27),单层至四层叠层 |
| 物理 | 位移–电势全耦合;ME0 平面应变或 ME1 面外位移扩展;各向异性单晶按内禀 ZXZ 欧拉角旋转 |
| 边界 | 左右 Bloch 周期边界,底部复坐标拉伸 PML |
| 网格 | Gmsh Python API 参数化建模,二次等参单元 |
| 求解 | 复数稀疏系统实分块,MKL PARDISO 或 SciPy SuperLU,频点多进程并行 |
| 输出 | Y11 导纳(CSV / NPZ / JSON)、网格、位移场与电势场图、材料快照与源码哈希,任务可完整复现 |
| 材料 | 内置 LiNbO₃(文献)、Si、SiO₂、poly-Si、Si₃N₄、Al、Cu;自定义 JSON 导入 |
验证
每个模板与独立的参考有限元解逐点比对;主谐振与反谐振频率全部一致,主谐振区误差 0.1 – 2 %,2D 多层模板在 2.4 GHz 以上高阶模态区存在偏差。完整误差表、图和说明见 验证。pytest 在 5 – 6 个频点上复现该比对。
2.5D SP 双层(LiNbO₃ 0.6 µm / Si 6.51 µm),251 频点。虚线 sawsim,实线参考解,幅值相对 L2 误差 0.15 %。
文档
- 快速开始 — 安装、第一个算例、输出文件、单位
- 模型库 — 九种模板、参数、位移模型、边界与已知限制
- 材料库与晶体取向 — 内置材料、记录格式、自定义导入、ZXZ 欧拉角
- 验证 — 与参考解的逐点比对及解读
项目结构
src/sawsim/ Python 包(api、cli、config、models、solver、saw2d、sp_meshes、sp_hex_meshes、material_library)
tests/ 回归与 API 测试,tests/data 为参考曲线
docs/ 文档与图
matlab/ v0.x 的 MATLAB + Gmsh 实现(历史版本,MIT)
tools/ 维护脚本
许可
Python 包 sawsim 以 AGPL-3.0-or-later 发布(它通过 Python API 链接 GPL 许可的 Gmsh)。matlab/ 下的历史 MATLAB 实现保持 MIT。其他授权方式请联系作者。
引用
引用具体版本请用版本 DOI(v2.0.0:10.5281/zenodo.22728471);引用项目整体请用概念 DOI 10.5281/zenodo.20362278,它始终指向最新版本。格式见 CITATION.cff。
Metadata
Release files for sawsim 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sawsim-2.0.2.tar.gz | 99.1 kB | Without provenance | Details for sawsim-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sawsim-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for sawsim-2.0.2-py3-none-any.whl |
Total release size: 222.1 kB
Release files / sawsim-2.0.2.tar.gz
| Download URL | sawsim-2.0.2.tar.gz |
|---|---|
| Size | 99.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b544ad25e3f50f52963642c1028d69b1d99ab414aa4e6746b247a28b2812b1be
|
|
BLAKE2b-256 checksum How to use checksums |
3b89a3eaebdf342e52562f68b00332664035232faca90b2e55b58b300704414f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / sawsim-2.0.2-py3-none-any.whl
| Download URL | sawsim-2.0.2-py3-none-any.whl |
|---|---|
| Size | 123.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59e56f401a6a60219ec181edfcaf7ff8c1d8e1099f8d8046287df26c10894b9f
|
|
BLAKE2b-256 checksum How to use checksums |
46e92cdfcb26426dd87c588da6aa806c9dc1c98a86cd8b9b7fbe2aead66ed2d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for sawsim 2.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.