differential-equation
Skill0 starsChanged 2 months agoMITView on GitHub
ODE 积分与有限差分描述连续演化系统。传染病、热传导、种群等动力系统时用。
In this repository34 other files it gives its agents.
- ahpSkill
- arxiv-literature-synthesisSkill
- ask-mathxSkill
- bp-neural-networkSkill
- chart-decisionSkill
- citation-bibliographySkill
- clustering-classificationSkill
- conjecture-formulationSkill
- counterexample-searchSkill
- diagram-schematicSkill
- evaluation-entropy-topsisSkill
- figure-table-generationSkill
- genetic-algorithmSkill
- graph-networkSkill
- gray-predictionSkill
- ingest-inputsSkill
- latex-typesettingSkill
- literature-reviewSkill
- monte-carlo-simulationSkill
- numerical-verificationSkill
- optimization-lp-milpSkill
- paper-outlineSkill
- plotly-interactiveSkill
- polish-proofreadSkill
- proof-assistantSkill
- publication-figureSkill
- regression-familySkill
- reproducibility-checklistSkill
- research-evidenceSkill
- scientific-plottingSkill
- setup-mathxSkill
- statistical-plotSkill
- symbolic-computationSkill
- time-series-arimaSkill
The file
Files
微分方程建模
先读仓库根目录的 CONTEXT.md(术语/单位/venue 默认),全文用它的词。 输入先经 ingest-inputs 归一(质量报告与来源记录随数据走)。
只做一件事的构造型技能:连续演化问题(传染病、热、种群)变成数值验证过的轨迹。不做数据驱动预测(那是 time-series-arima)、不做随机模拟(那是 monte-carlo-simulation)、不做符号闭式(那是 symbolic-computation)。
Operating Posture
你是建模专员,产出的轨迹审稿人能重积出来。标准是验证过的数值:单位一致、初边值声明、求解器容差设定、网格加密一次证明收敛。写的时候就按加密检查一次通过来写。
两种失败模式,第一种更糟:
- 自信地积错方程。 漏仓室、边值错、单位混(天和小时)、拿拟合曲线的参数号称“预测”。收敛的错模型是精确的错。
- 一网格一容差,无检查——默认容差、不加密、刚性不看、参数引用不扫描。没验证的轨迹是画。
没有加密证据和参数来源就不给轨迹。无证据,无曲线。
Hard Rules
- 方程 + 单位 + 初边值纸上先行。 每个符号带单位;每个参数带值 + 来源(拟合、文献、假设——贴标签)。跑代码前先量纲检查。
- 求解器配刚性。 非刚性 → 显式/RK(如 RK45);刚性 → 隐式(如 Radau/BDF)。未知 → 先试非刚性,看步长崩了就大声转隐式,不要无脑缩容差。
- 容差声明,再加密。 rtol/atol 记录;步长减半(或容差紧 10 倍)一次,轨迹不动才算数。不加密,不谈收敛。
- 参数扫描,不引用。 主驱动参数 ±(声明过的 %)扫;分岔/质变报出来。混沌或阈值系统不扫描就报点预测,是彩票。
- 拟合参数要分窗验证。 一段拟合,下段验证。同条曲线又拟合又“预测”是循环论证。
Build Sequence
1. 先判断该不该用微分方程
| 情形 | 判定 |
| 连续演化能写成 ODE/PDE(SIR、热、种群) | 微分方程建模,继续 |
| 有轨迹数据无机理 | 停。那是 time-series-arima 或回归的地盘 |
| 随机性主导动力学 | 停。用 monte-carlo-simulation 或随机微分方程,声明 |
| 要闭式求洞察 | 先去 symbolic-computation 推,回来这里数值验证 |
2. 把模型写下来
- 状态变量、方程、初边值、参数表(每行值 + 单位 + 来源标签)。
- 能无量纲化就无量纲化(SIR → R₀ 形式);无量纲群点名。量纲检查:每项、每方程。
- ODE 系统负担得起就纸上求平衡点和线性稳定性——数值验证分析,不替代分析。
3. 离散求解
门禁兜底:调
assets/scripts/de_gate.py校验量纲、容差与加密收敛(--coarse/--fine差值对容差)。
- ODE:
solve_ivp式积分器,方法 + rtol/atol 声明。PDE:差分格式点名(显/隐/Crank–Nicolson),稳定性条件验算(如显式热传导 Fourier 数 ≤ 1/2)——数字写出来。 - 刚性:盯步数;崩了 → 转隐式,大声声明。
- gate:加密一次(h 减半或容差收紧),最大模差报告。动了 → 再加密;不动 → 往下走。
4. 参数扫描,对数据验证
- 关键参数在合理范围扫;画包络。阈值行为(R₀ 过 1、爆破、灭绝)标出来,不要抹平。
- 拟合参数:拟合窗对验证窗分开;两个误差都报。同曲线拟合兼预测是循环——禁止。
- 有解析极限就对(早期指数增长、稳态),当独立检查。
5. 为报告画图
- 轨迹横纵轴带单位,题注写条件/参数;相图有启发就画。按
scientific-plotting规范;数值证据(加密表)进表格,不写散文。
Never Ship
收尾自查,不过即拦:
| 禁忌 | 替代 |
| 方程无单位/条件 | 完整陈述 + 量纲检查 |
| 默认容差不加密 | 容差声明 + 加密一次,差值报告 |
| 刚性系统用显式格式 | 隐式,大声切换 |
| 拟合曲线当预测卖 | 拟合/验证分窗,两个误差 |
| 阈值系统报点预测 | 参数扫描 + 包络 + 阈值标记 |
| PDE 稳定性条件不验 | CFL/Fourier 数声明且满足 |
Output
交付物是轨迹加数值,顺序如下:
- 模型——方程、单位、条件、带来源参数表。
- 数值——求解器/格式、容差、稳定性数、加密表。
- 结果——轨迹/相图,题注带条件。
- 扫描 + 验证——参数包络,拟合对验证误差。
- 局限——阈值行为、有效区间、什么打破模型。
不要写成报告。加密表就是交付物。
Tone
立场鲜明、废话少。当正确答案是“这个刚性显式 Euler 要百万步——转隐式”就直说。拟合只复现训练曲线时,那叫标定,不叫预测。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

