Agent skill

Openfoam

by ZimoLiao in ZimoLiao/scholaraio

A skill your agent uses when working on CFD cases with OpenFOAM, including solver selection, dictionary setup, mesh workflows, turbulence models, or flow and heat-transfer verification.

MITAuto-check: notesResearch & Science

Install Openfoam

skills CLI
$ npx skills add ZimoLiao/scholaraio --skill openfoam -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ZimoLiao/scholaraio openfoam --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ZimoLiao/scholaraio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/openfoam .claude/skills/openfoam && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
openfoam
GitHub stars
577
Token cost
~1.3k tokens
SKILL.md length
345 words
Files
1
Skills in repo
43
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when working on CFD cases with OpenFOAM, including solver selection, dictionary setup, mesh workflows, turbulence models, or flow and heat-transfer verification.

  • Works in 6 steps: 先判断用户问题属于哪一层 → 先用 toolref 查主求解器、主字典和高价值模型页 → 对 simpleFoam / pimpleFoam / fvSchemes /… → …
  • Working on CFD cases with OpenFOAM
  • SKILL.md covers Agent 默认协议(toolref-first,…, 前置条件, 何时使用 and Toolref 优先, plus 4 more sections
  • Calls apt and docker

What it does

Openfoam is an agent skill from ZimoLiao/scholaraio. Use when working on CFD cases with OpenFOAM, including solver selection, dictionary setup, mesh workflows, turbulence models, or flow and heat-transfer verification.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Research & Science, covering Physical and earth sciences. The repository describes itself as: Scholar All-In-One: A research infrastructure for AI agents. The licence is MIT.

When your agent uses it

  • Working on CFD cases with OpenFOAM
  • Including solver selection
  • Dictionary setup
  • Turbulence models

Example prompts

  • “/openfoam”

Requirements

  • Python 3
  • Docker

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. 先判断用户问题属于哪一层
  2. 先用 toolref 查主求解器、主字典和高价值模型页
  3. 对 simpleFoam / pimpleFoam / fvSchemes / fvSolution / controlDict / kOmegaSST / blockMesh / snappyHexMesh / forceCoeffs / Q 这类主入口,优先信任…
  4. 如果 show 没有直接命中 solver / function object 主页,或结果明显退化成模糊页,立即回退到官方文档
  5. 回退时要明确说明这是当前 OpenFOAM toolref 覆盖较浅,而不是用户用法有问题
  6. 不要要求普通用户为了当前任务先自己维护 OpenFOAM 文档层

What it can do on your machine

Read from SKILL.md and the folder at commit 777628b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • apt
    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Openfoam loads about 1.3k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 345 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:51
    sudo apt install openfoam
  • NoteRuns commands with sudoSKILL.md:56
    sudo apt install paraview

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ZimoLiao/scholaraio at commit 777628b, republished under its MIT licence (© ZimoLiao). 345 words, ~1,333 tokens.

Download SKILL.mdSave it as .claude/skills/openfoam/SKILL.md (or your agent's skills folder).
name
openfoam
description
Use when working on CFD cases with OpenFOAM, including solver selection, dictionary setup, mesh workflows, turbulence models, or flow and heat-transfer verification.

OpenFOAM 计算流体力学

用 OpenFOAM 做 CFD:从 case 结构、网格、求解器、湍流模型到后处理和验证。

本 skill 故意保持轻量:

  • 它负责告诉 agent 什么时候该用 OpenFOAM、标准工作流是什么、哪些 CFD 规范不能忽略
  • 它不充当完整字典/求解器手册
  • 具体求解器页面、字典字段、模型说明统一去查 scholaraio toolref

本 skill 应与 scientific-runtime 一起理解:

  • openfoam skill 负责 CFD 路由、工作流和科学规范
  • scientific-runtime 负责运行时的 toolref-first 行为和覆盖缺口退化策略
  • toolref 负责官方入口页、求解器页、字典页和模型页

当前成熟度:toolref-first, partial coverage

Agent 默认协议(toolref-first, partial coverage)

OpenFOAM 当前的 toolref 适合做主入口查询,但还不是完整手册替代。

对 OpenFOAM 问题,agent 默认按这个顺序工作:

  1. 先判断用户问题属于哪一层:
    • 求解器选择
    • case 骨架与目录结构
    • fvSchemes / fvSolution / controlDict
    • 湍流模型
    • 网格与前处理
    • 后处理与验证
  2. 先用 toolref 查主求解器、主字典和高价值模型页
  3. 对 simpleFoam / pimpleFoam / fvSchemes / fvSolution / controlDict / kOmegaSST / blockMesh / snappyHexMesh / forceCoeffs / Q 这类主入口,优先信任 toolref
  4. 如果 show 没有直接命中 solver / function object 主页,或结果明显退化成模糊页,立即回退到官方文档
  5. 回退时要明确说明这是当前 OpenFOAM toolref 覆盖较浅,而不是用户用法有问题
  6. 不要要求普通用户为了当前任务先自己维护 OpenFOAM 文档层

这意味着:

  • toolref 先解决“找对入口”的问题
  • 细粒度深挖可以暂时回退官方文档
  • agent 应主动吸收这种复杂度,不要转嫁给用户
  • 在真实任务里,优先保证 case 正确性、物理合理性和验证闭环,而不是追求文档层完美无缺

前置条件

bash
# 安装(Ubuntu/WSL2)
sudo apt install openfoam
# 或 Docker
docker pull openfoam/openfoam-dev

# 可视化
sudo apt install paraview

验证:simpleFoam -help 应正常输出。确认 $WM_PROJECT_DIR 环境变量已设置。

何时使用

适合:

  • 外流、内流、传热、稳态/瞬态 RANS 或更复杂的 CFD 工作流
  • 需要几何建模、网格控制、边界条件和场量后处理的工程问题

不适合:

  • 只需要快速低保真估算、且不打算做网格无关性和验证时
  • 物理模型选择没有依据、只想“先跑起来再说”的情况

Toolref 优先

当 agent 不确定求解器、字典、function object、湍流模型时,先查 toolref。

常用查法:

bash
scholaraio toolref show openfoam simpleFoam
scholaraio toolref show openfoam pimpleFoam
scholaraio toolref show openfoam controlDict
scholaraio toolref show openfoam fvSchemes
scholaraio toolref show openfoam fvSolution
scholaraio toolref show openfoam kOmegaSST
scholaraio toolref show openfoam blockMesh
scholaraio toolref show openfoam snappyHexMesh
scholaraio toolref show openfoam forceCoeffs
scholaraio toolref search openfoam numerical schemes
scholaraio toolref search openfoam linear solver settings
scholaraio toolref search openfoam turbulence model
scholaraio toolref search openfoam drag coefficient
scholaraio toolref search openfoam q criterion

推荐习惯:

  • 写 case 前先查 solver、字典和模型主入口
  • 改 fvSchemes / fvSolution 前先看官方字典说明
  • 讨论湍流模型时优先查官方模型页,而不是凭论坛记忆
  • 做后处理前先查 forces / forceCoeffs / yPlus / Q 这类入口页
  • 如果 solver / function object 页没有直接命中,不要硬猜,直接回退官方文档

最低运行规则:

  1. 先用 toolref show 命中主入口
  2. 不确定自然语言映射时,再用 toolref search
  3. 命中主入口后,先做最小 smoke case,再扩到正式算例
  4. 如果 toolref show 没法直接落到目标页,或 search 结果明显不对题,再回退官方文档

如果遇到覆盖缺口:

  • 先继续用 OpenFOAM 官方文档完成当前任务
  • 回答时点明这是 toolref 深度覆盖不足
  • 只有当同类缺口反复出现,才进入正式 onboarding/补页流程
  • 不要把“请用户一起补文档”当成默认下一步

核心工作流

知识库协作模式
  1. 用 scholaraio usearch "<流动问题>" 检索相关论文
  2. 从论文提取:几何参数、流动条件(Re, Ma)、湍流模型选择依据、验证数据
  3. Case 设置中标注参数来源
  4. 计算完成后与实验/DNS 数据定量对比(速度剖面、阻力系数、压力分布)

建议工作流:

  1. 读论文/实验资料,确定几何、Re、边界条件、验证指标
  2. 选求解器和湍流模型,并说明为什么不是别的候选
  3. 建网格并做质量检查
  4. 配置 controlDict / fvSchemes / fvSolution
  5. 跑小规模 smoke case 看是否发散
  6. 做正式计算
  7. 检查残差、力系数、剖面和 y+
  8. 与实验 / DNS / 文献做定量对比

对 agent 的最小交付要求:

  • 不只给一个能跑的 case
  • 要说清楚求解器、湍流模型、边界条件、网格策略为什么这样选
  • 要明确最后拿什么指标验证,不允许只说“残差下来了”
求解器选择
求解器适用场景
simpleFoam稳态不可压 RANS
pimpleFoam瞬态不可压(LES/URANS)
rhoSimpleFoam稳态可压
sonicFoam瞬态可压/超声速
buoyantSimpleFoam自然对流/传热
interFoam两相流(VOF)
reactingFoam燃烧/反应流
湍流模型
模型适用场景何时选用
kOmegaSST默认首选,外流/分离流大多数工程问题
kEpsilon内流/充分发展流管道、通道
SpalartAllmaras航空外流翼型、薄边界层
kOmegaSSTLM转捩流动低 Re 翼型
Smagorinsky / WALELES 亚格子模型需要瞬态细节时

科学规范:湍流模型选择必须有文献依据或物理论证。不能"试了几个选最好看的"。

重点查询点
  • simpleFoam / pimpleFoam / rhoSimpleFoam 的适用边界
  • fvSchemes 和 fvSolution 的关键项
  • kOmegaSST 等湍流模型的物理假设
  • function objects、forces、yPlus 的用法
  • blockMesh / snappyHexMesh 的职责边界
  • forceCoeffs 和 Q 这类后处理入口对象

这些细节优先查 toolref,不要在 skill 里硬背。

ParaView 可视化

python
# pvpython 自动化脚本
from paraview.simple import *

# 加载 OpenFOAM case
reader = OpenFOAMReader(FileName="<case>/case.foam")
reader.UpdatePipeline()

# 表面压力云图
display = Show(reader)
display.SetRepresentationType("Surface")
ColorBy(display, ("CELLS", "p"))
pLUT = GetColorTransferFunction("p")
pLUT.ApplyPreset("Cool to Warm", True)

# 切面
slice = Slice(reader)
slice.SliceType.Normal = [0, 1, 0]  # y=0 对称面
Show(slice)
ColorBy(GetDisplayProperties(slice), ("CELLS", "U", "Magnitude"))

# 渲染
view = GetActiveView()
view.ViewSize = [3840, 2160]
SaveScreenshot("pressure_surface.png", view)

科学规范

检查项正确做法常见错误
网格无关性至少跑粗/中/细三套网格只用一套网格
y+检查并确认在壁面函数范围内不检查 y+
收敛残差降 3-4 个量级 + 力系数稳定只看残差不看积分量
域大小出口距物体 >5-8L域太小影响尾流
迎风格式linearUpwind(二阶)全用一阶迎风(数值耗散过大)
验证与实验/DNS 数据逐点对比"看起来对"就算验证

Agent 行为准则

  • 不要凭感觉选求解器或湍流模型,先查 toolref 并说明依据
  • 不要只盯残差,必须同时看积分量、剖面和 y+
  • 不要把“收敛了”当“正确了”,验证必须回到实验或基准算例
  • 不要把 OpenFOAM 当配置文件游戏,结果解释必须回到流体力学
  • 不要把 toolref 的覆盖缺口转嫁给用户;能回退官方文档就先完成用户任务

© ZimoLiao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/openfoam of ZimoLiao/scholaraio.

Open the folder on GitHubat commit 777628b

Compare with similar skills

Openfoam next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Openfoam compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Openfoam this skillZimoLiao/scholaraio577—~1.3kAutomated safety check: NotesMIT
AstropyzLanqing/codex-claude-academic-skills4.7k13 repos~2.9kAutomated safety check: PassBSD-3-Clause
PymatgenzLanqing/codex-claude-academic-skills4.7k11 repos~5kAutomated safety check: PassMIT
Cantera Ignition DelayK-Dense-AI/scientific-agent-skills48k1 repos~2.2kAutomated safety check: PassMIT
Weathertrpc-group/trpc-agent-go1.9k8 repos~591Automated safety check: PassApache-2.0
Pymol VisualizationChatMol/ChatMol373—~1.2kAutomated safety check: PassMIT

Similar skills

  • Astropy

    zLanqing/codex-claude-academic-skills

    Comprehensive Python library for astronomy and astrophysics.

    4.7k GitHub starsUsed in 13 repos~2.9k tokens
    Research & ScienceAuto-check passed
  • Pymatgen

    zLanqing/codex-claude-academic-skills

    Materials science toolkit. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 11 repos~5k tokens
    Research & ScienceAuto-check passed
  • Cantera Ignition Delay

    K-Dense-AI/scientific-agent-skills

    Runs Cantera constant-volume or constant-pressure ignition simulations and reports temperature-based ignition delay with mechanism provenance and checks.

    48k GitHub starsUsed in 1 repo~2.2k tokens
    Research & ScienceAuto-check passed
  • Weather

    trpc-group/trpc-agent-go

    Get current weather and forecasts via wttr.in or Open-Meteo.

    1.9k GitHub starsUsed in 8 repos~591 tokens
    Research & ScienceAuto-check passed
  • Pymol Visualization

    ChatMol/ChatMol

    Generate publication-quality molecular visualization images using PyMOL.

    373 GitHub stars~1.2k tokensUpdated 6 mo ago
    Research & ScienceAuto-check passed
  • Review

    Muuuun/luxas

    Write domain-authentic review articles that synthesize rather than stack.

    1.2k GitHub stars~2.1k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed

More from ZimoLiao/scholaraio

All 43 skills in this repo
  • Document

    ZimoLiao/scholaraio

    A skill your agent uses when the user wants to create or inspect DOCX, PPTX, or XLSX files, generate a downloadable Office deliverable, or verify its structure and layout warnings with scholaraio…

    577 GitHub stars~674 tokensUpdated 14 days ago
    Auto-check passed
  • Academic Writing

    ZimoLiao/scholaraio

    A skill your agent uses when the user needs help choosing or organizing an academic-writing workflow by deliverable, stage, or format, including review articles, guided reading, paper sections, PPT…

    577 GitHub stars~827 tokensUpdated 14 days ago
    Auto-check passed
  • Arxiv

    ZimoLiao/scholaraio

    A skill your agent uses when the user wants to browse arXiv preprints, search arXiv directly, fetch a PDF by arXiv ID or URL, or send a preprint into the ScholarAIO ingest pipeline.

    577 GitHub stars~799 tokensUpdated 14 days ago
    Auto-check passed
  • Bioinformatics

    ZimoLiao/scholaraio

    A skill your agent uses when working on bioinformatics workflows such as alignment, variant calling, phylogenetics, or protein-structure analysis, especially across BLAST, minimap2, samtools…

    577 GitHub stars~1.4k tokensUpdated 14 days ago
    Auto-check passed
  • Citation Check

    ZimoLiao/scholaraio

    A skill your agent uses when the user wants to verify citations in AI-generated or human-written text against the local knowledge base and catch hallucinated, wrong, or missing references.

    577 GitHub stars~454 tokensUpdated 14 days ago
    Auto-check passed
  • Draw

    ZimoLiao/scholaraio

    A skill your agent uses when the user wants diagrams, flowcharts, architecture visuals, data relationships, timelines, concept maps, Mermaid, Graphviz, drawio, or polished paper figures generated…

    577 GitHub stars~1.3k tokensUpdated 14 days ago
    Auto-check: notes

Questions about Openfoam

What does Openfoam do?

A skill your agent uses when working on CFD cases with OpenFOAM, including solver selection, dictionary setup, mesh workflows, turbulence models, or flow and heat-transfer verification. Openfoam is an agent skill from ZimoLiao/scholaraio. Use when working on CFD cases with OpenFOAM, including solver selection, dictionary setup, mesh workflows, turbulence models, or flow and heat-transfer verification.

When should I use Openfoam?

Openfoam fits situations like: working on CFD cases with OpenFOAM; including solver selection; dictionary setup; turbulence models.

How do I install Openfoam in Claude Code?

Run `npx skills add ZimoLiao/scholaraio --skill openfoam -a claude-code`. Or copy the skill folder (.claude/skills/openfoam in ZimoLiao/scholaraio) into .claude/skills/openfoam in your project. Claude Code loads it when a task matches its description.

How do I install Openfoam in Codex?

Run `npx skills add ZimoLiao/scholaraio --skill openfoam -a codex`. Or copy the skill folder (.claude/skills/openfoam in ZimoLiao/scholaraio) into .agents/skills/openfoam in your project. Codex loads it when a task matches its description.

Can I use Openfoam in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ZimoLiao/scholaraio --skill openfoam -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/openfoam, .gemini/skills/openfoam, .github/skills/openfoam and .opencode/skills/openfoam in your project.

What does Openfoam need to run?

Going by SKILL.md and its folder, Openfoam needs the command-line tools its instructions call (apt and docker). Our summary lists: Python 3; Docker.

Does Openfoam access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Openfoam safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Openfoam use?

Openfoam is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Openfoam use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Openfoam?

Skills that share tags, products or a category with Openfoam: Astropy (zLanqing/codex-claude-academic-skills, 4.7k stars), Pymatgen (zLanqing/codex-claude-academic-skills, 4.7k stars), Cantera Ignition Delay (K-Dense-AI/scientific-agent-skills, 48k stars) and Weather (trpc-group/trpc-agent-go, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Openfoam?

ZimoLiao (a GitHub user) maintains it in ZimoLiao/scholaraio, which has 577 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on September 25, 2026.

Source: ZimoLiao/scholaraio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.