LumericalFDTD Modeling logo

LumericalFDTD Modeling

Community
Lex669
LumericalFDTD-modeling

为 Ansys Lumerical FDTD 构建光学仿真模型(几何结构、材料、光源、监视器)。当你需要创建FDTD几何模型、设置材料属性、配置光源和监视器、定义网格覆盖时使用此skill。 Build optical simulation models for Ansys Lumerical FDTD (geometry, materials, sources, monitors). Use when creating FDTD geometry, setting material properties, configuring sources and monitors, defining mesh overrides.

Overview

PublisherLex669
RepositoryLumericalFDTD-skill
Skill nameLumericalFDTD-modeling
Stars
45
Forks
5
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Lex669 on GitHub. Read the source before you install it.

Installation

Install the LumericalFDTD Modeling AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Lex669/LumericalFDTD-skill/tree/main/skills/LumericalFDTD-modeling
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Lex669/LumericalFDTD-skill.git /tmp/LumericalFDTD-skill
mkdir -p .claude/skills
cp -r /tmp/LumericalFDTD-skill/skills/LumericalFDTD-modeling .claude/skills/LumericalFDTD-modeling
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable LumericalFDTD Modeling in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads LumericalFDTD Modeling on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so LumericalFDTD Modeling is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

FDTD 结构建模器

职责范围

本 skill 仅负责结构建模阶段:构建几何、设置材料、配置光源和监视器、定义网格覆盖。输出纯建模脚本(不含 fdtd.run()),供后续仿真 skill 使用。

不负责:运行仿真(→ LumericalFDTD-simulation)、数据分析(→ LumericalFDTD-analysis)、端到端全流程(→ LumericalFDTD)。

工作流

1. 理解需求

确认以下信息后开始编写脚本。若用户未明确提供,主动询问:

类别需确认的参数
器件结构几何形状、尺寸、(x/y/z span / radius / thickness)、排列方式(单孔/阵列/周期)
材料衬底材料、金属层材料、蚀刻区域
光源波长范围(start/stop)、偏振方向、入射方向、光束类型(平面波/高斯/偶极子)
监视器类型(功率/场分布/折射率)、位置、覆盖范围
仿真域x/y/z span、边界条件、网格精度

2. 构建脚本

按以下结构生成 *_model.py:

python
# 1. 导入
import sys; sys.path.append("{API_PATH}")
import lumapi; import numpy as np
import matplotlib; matplotlib.use('Agg'); import matplotlib.pyplot as plt

# 2. 参数定义(集中管理)
wavelength = 100e-6
x_span = 200e-6; y_span = 200e-6; z_span = 100e-6
# ... 结构参数 ...

# 3. 仿真会话 — 仅构建,不运行
with lumapi.FDTD(hide=True) as fdtd:
    # 3a. 仿真区域
    fdtd.addfdtd()
    # ...

    # 3b. 材料 / 衬底
    # ...

    # 3c. 几何结构(从底到顶)
    # ...

    # 3d. 网格覆盖(可选,精细结构才加)
    # ...

    # 3e. 光源
    # ...

    # 3f. 监视器
    # ...

    # 3g. 保存模型(不运行)
    fdtd.save(os.path.join(fsp_dir, "model.fsp"))

3. 输出

  • *_model.py — 建模脚本(纯结构构建)
  • 可选:.fsp 模型文件(供手动打开检查)

参考文档

根据构建需要读取:

参考文件何时读取
../LumericalFDTD/references/building-blocks.md需要几何结构、光源、监视器、网格覆盖的详细 API 用法
../LumericalFDTD/references/diffraction.md涉及孔衍射结构时

关键约束(与主 skill 一致)

约束说明
2025 R2 必须显式 addfdtd()lumapi.FDTD() 后立即调用 fdtd.addfdtd(),否则所有 set 报错
严禁 fdtd.newproject()重置项目会销毁 'FDTD' 求解器
set() vs setnamed() 区别set() 对当前选中对象操作;add*() 会改变当前选中。不确定时用 setnamed()
不用 addmaterial 创建已有材料addmaterial() 参数是基类型('Dielectric'),不是材料实例名。内置材料直接用 set('material', '全名')
材料全名不可简写"PEC (Perfect Electrical Conductor)" 不是 "PEC"
addmaterial('(n=1.47)') 不支持这是 .lsf 语法,Python API 不接受。用内置材料或 addmaterial('Dielectric') + set('index', 1.47)
多边形函数名是 addpoly不是 addpolygon
addcone 不存在用多层 addcircle 堆叠替代
多边形不支持 mesh order省略该 set 语句
多边形顶点用 N×2 NumPy 数组set("vertices", np.array(...)),Python list of tuples 报 Unsupported data type
严禁 fdtd.set("dimension", "2D")用 quasi-2D 方案:3D + y_span=0.2um + Periodic BC
2D 监视器无 far field filter仅用 frequency points 做频域采样
2D 监视器无 record field in timeaddprofile 改用 frequency points
raw string 不能以反斜杠结尾用 "C:\\path\\" 双反斜杠

2D / Quasi-2D 建模

参见 ../LumericalFDTD/references/building-blocks.md 完整 quasi-2D 模板。

Frequently asked questions

What does the LumericalFDTD Modeling AI skill do?

为 Ansys Lumerical FDTD 构建光学仿真模型(几何结构、材料、光源、监视器)。当你需要创建FDTD几何模型、设置材料属性、配置光源和监视器、定义网格覆盖时使用此skill。 Build optical simulation models for Ansys Lumerical FDTD (geometry, materials, sources, monitors). Use when creating FDTD geometry, setting material properties, configuring sources and monitors, defining mesh overrides.

Why use LumericalFDTD Modeling on TypingMind?

Because you install it once and use it with any model. LumericalFDTD Modeling is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install LumericalFDTD Modeling in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Lex669/LumericalFDTD-skill/tree/main/skills/LumericalFDTD-modeling. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use LumericalFDTD Modeling?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with LumericalFDTD Modeling?

As many as you like. As long as a model supports skills, you can use LumericalFDTD Modeling with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the LumericalFDTD Modeling AI skill free?

Yes. It is published on GitHub by Lex669 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇