Skip to main content

PyPhot FDTD package

Project description

PhotFDTD

Phot FDTD 目前包含了基础器件和光器件的实现和测试用例,使用了fdtd库已经实现了的 Finite-difference time-domain method (时域有限差分)算法。

基础器件

  1. waveguide - 直波导
  2. arc - 圆弧
  3. sbend - s波导
  4. ysplitter - y分支

光器件

光器件由基础器件组成,光器件与光器件之间也可以连接。

  1. directional coupler - 方向耦合器
  2. mmi - 多模耦合干涉仪
  3. ring - 微环

安装

在命令行界面输入以下命令即可

pip install photfdtd

Demo

from photfdtd import Sbend


if __name__ == "__main__":

    # 设置器件参数
    sbend = Sbend(
        xlength=40, ylength=60, zlength=1, x=10, y=10, z=1, direction=-1, width=10, refractive_index=1.7, name="sbend"
    )

    # 设置 grid 参数
    sbend.set_grid(grid_xlength=80, grid_ylength=80, grid_zlength=1, grid_spacing=155e-9, total_time=200, pml_width=10)

    # 设置光源
    sbend.set_source()

    # 保存画好的图,设置保存位置,以及从哪一个轴俯视画图
    sbend.savefig(filepath="SbendZ.png", axis="z")

运行结果

SbendZ

各种光器件使用示例

tests 目录下,可以看到各种光器件的使用示例,例如 waveguide_test.py 代表着波导的使用示例。

开发者文档

开发者文档 提供了对于开发者的指导。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

photfdtd-0.0.4.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

photfdtd-0.0.4-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file photfdtd-0.0.4.tar.gz.

File metadata

  • Download URL: photfdtd-0.0.4.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.7 Darwin/22.3.0

File hashes

Hashes for photfdtd-0.0.4.tar.gz
Algorithm Hash digest
SHA256 30003d96f9b213323a2036d584ea45c6ff2178dae6343baf64c207d5b61cd79d
MD5 72120b57ea9da036ea10c9ba0bb646db
BLAKE2b-256 55281439dbff4b46f4335b9c30be3491652848fbdd8673e91d48ae446a6a7241

See more details on using hashes here.

File details

Details for the file photfdtd-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: photfdtd-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.7 Darwin/22.3.0

File hashes

Hashes for photfdtd-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 501159bfcce6625e035d04214116f8b858967cf33b569cb8430354eaebcf9fcc
MD5 7439e1049b5920c674edaa4940923c13
BLAKE2b-256 50a2a2d18a717432c7c1bace42555a584e6dc6115233e3fc2ddbdb22cb01dd8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page