File size: 8,744 Bytes
af9ba4f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | # Usage guide / 使用指南
[English overview](README.md) · [中文介绍](README_zh.md)
## Files and task identity / 文件与任务标识
Files follow `<track>_<content>.json`: `extended_cases.json`, `extended_reference_qois.json`, `extended_measurement_specs.json`, `extended_qoi_design.json`, and `extended_evidence_contract.json`. Basic/Advanced use the same case/reference naming. OpenFOAM Foundation 13 compatibility is recorded in release metadata; schema versions stay inside their documents. / 文件统一采用“任务组 + 内容”命名,OpenFOAM 版本写入发布元数据,格式版本保留在文件内容中。
`data/extended.jsonl` is the 100-task ExtFoamBench catalog. Each row has `task_id`, `track`, `case_id`, `family`, `task_origin`, `usr_requirement`, and `external_asset_ids`. Use `(track, case_id)` to join task records to the `cases` mappings in reference-QoI and numerical-statistics JSON files. Basic/Advanced catalogs follow the same format and retain upstream attribution.
`data/extended.jsonl` 是 100 条 Ext 原创任务的索引,包含上述字段。使用 `(track, case_id)` 与参考 QoI、数值统计中的 `cases` 条目对应;Basic/Advanced 采用相同格式,并注明上游来源。
Reference input JSONs contain OpenFOAM file text, such as `0/U`, `system/controlDict` and `Allrun`; some Extended tasks have `reference_subcases`. Geometry declarations resolve through `benchmarks/assets/manifest.json`. Keep reference inputs and answers outside the solving agent's accessible workspace.
参考输入 JSON 保存 OpenFOAM 文件内容,部分 Ext 任务还包含多个参考分支。几何声明通过资产清单关联文件。参考输入与答案应置于求解智能体无法读取的位置。
Reference data use `reference/<track>/...` as portable provenance labels, not bundled raw-run directories. The original labels are traceable through the source manifest. / 参考数据中的 `reference/<track>/...` 是可移植的来源标识,不代表包内包含原始运行目录;原始记录可通过来源清单追溯。
## Optional evaluator / 可选评估器
The scorer, schemas and scripts are bundled in `tools/evaluation-tools.zip`. Extract it **into the downloaded repository root**, preserving its paths. Use Python 3.11/3.12 and a dedicated evaluator environment; current HF `datasets` dependencies may require a different NumPy version.
评估器、格式定义和脚本集中在工具包中。请将其**解压到下载的仓库根目录**,保留相对路径。使用 Python 3.11/3.12 和独立评估环境,避免与最新 HF 数据加载依赖的 NumPy 版本冲突。
```bash
python -m zipfile -e tools/evaluation-tools.zip .
python -m pip install -r requirements.txt
python -m benchmarks.evaluation validate-profile --profile benchmarks/evaluation/profiles/extended.json
python examples/inspect_task.py --track extended --case-id nozzleCDV/1
```
These commands inspect data without running a model or CFD solver. The inspection output includes evaluator-side information; it is not an agent prompt.
上述命令只检查数据,不调用模型或 CFD 求解器。任务查看命令包含评价侧信息,不应直接作为智能体提示词。
To export one reference input without solving it / 导出一个参考算例输入:
```bash
python benchmarks/scripts/materialize_benchmark.py --benchmark benchmarks/extended_cases.json --case-id nozzleCDV/1 --output-root outputs/reference-input
```
To evaluate an existing compatible run, replace `/path/to/run` with your retained artifacts / 评价已有运行结果时,将路径换成实际结果目录:
```bash
python -m benchmarks.evaluation evaluate --profile benchmarks/evaluation/profiles/extended.json --adapter easyfoam --run-root /path/to/run --output outputs/evaluation
```
Other adapters: `foamagent`, `chatcfd`, `coding-agent`. Their required layouts are defined in the extracted `benchmarks/evaluation/adapters/`. Full-profile evaluation counts missing tasks as failures; a single-task run does not reproduce a full-benchmark score.
其他适配器支持上述三种布局,具体输入结构见解压后的目录。完整配置会将未运行任务计为失败,单任务运行不代表完整基准成绩。
## Metric fields and protocol / 指标字段与协议
| Metric / 指标 | Field under `overall` / 汇总字段 |
| --- | --- |
| ECR | `execution_pass_rate` |
| Numerical acceptance / 数值接受率 | `numerical_pass_rate_all_tasks` |
| QoI acceptance / 物理接受率 | `physics_grounded_qoi_pass_rate_all_tasks` |
| TAR | `end_to_end_pass_rate` |
Rates use all assigned tasks and range from 0 to 1. Execution gates Numerical/QoI acceptance; all mandatory criteria must pass. Conditional rates and partial-quality scores are supplementary. The Extended rules retain their declared `provisional` tolerance status. For Basic/Advanced, the mandatory set combines physical scalar criteria with a family-specific spatial response profile. The exact required metrics are listed in each reference record's `principal_metrics`; other histories, profiles and feature locations remain diagnostic. Spatial coverage counts profile-field combinations; early-convergence markers can satisfy the stop condition.
上述比例均以全部指定任务为分母,范围为 0–1。数值和物理接受以执行通过为前提,所有必需准则均需通过;条件通过率和部分质量分数属于辅助信息。Ext 保留原有 `provisional` 容差状态。Basic/Advanced 的必需指标同时包含物理标量准则与家族对应的空间响应曲线,具体以每个参考条目的 `principal_metrics` 为准;其他历史、曲线与特征位置属于诊断信息。空间覆盖按曲线与场的组合统计,执行终止条件允许提前收敛标记。
Actual simulations require OpenFOAM **Foundation 13**. Offline extraction uses retained data, but some missing measurement fields or topology-changing geometries require native `foamPostProcess`. `--prepare` writes derived fields; `--check-mesh` enables a fresh mesh audit. Use copies of valuable run artifacts when preparing measurements.
真实仿真需要 OpenFOAM **Foundation 13**。离线提取通常读取留存数据,但部分测量场或拓扑变化几何需要原生后处理工具。`--prepare` 会写入派生场,`--check-mesh` 可启动网格检查;处理重要运行结果时建议使用副本。
## Coverage, provenance and versions / 覆盖、来源与版本
- All 226 tasks have reference-QoI entries; 215 have nonempty numerical statistics. Missing: `nozzleCDV/4` and all ten `riemann2D` tasks. See [coverage](metadata/coverage.json). / 226 个任务均有参考 QoI 条目;215 个有非空数值统计,11 个缺失条目已明确记录。
- References are simulation-derived. Raw solution fields/logs, historical agent trajectories/checkpoints, and raw repeatability/negative-control/sensitivity experiment archives are not included. / 参考数据由仿真生成;本包未包含完整原始场、日志、历史智能体轨迹/检查点和重复验证、负对照、敏感性实验原始归档。
- Ext task design, evaluation resources and offline reference data are EasyFoam contributions. Basic/Advanced task definitions come from [FoamBench](https://github.com/NLR-Theseus/cfdllmbench). CFD source attribution is detailed in the paper's Appendix A; the asset manifest records OpenFOAM tutorial sources and checksums. / Ext 任务设计、评价资源和离线参考数据属于 EasyFoam 贡献;Basic/Advanced 任务来自 FoamBench,CFD 来源见论文附录 A,几何来源见资产清单。
- [Source manifest](metadata/source_manifest.json) records original source paths/hashes and current release paths/hashes, including files inside the optional ZIP. Historical names appear only there for provenance. [Validation](metadata/validation.json) records packaging checks. Run `python scripts/verify_release.py` to verify this release without extracting the tools. / 来源清单区分原始来源与当前发布文件的路径、哈希,也覆盖工具包内部文件;历史命名仅保留作溯源;验证报告记录检查结果,无需解压工具即可运行完整性检查。
- **1.2.0** standardizes publication filenames and dependent references; **1.1.0** introduced bilingual pages and the optional tool archive. Earlier versions remain available. Freeze dataset and evaluator versions together. / 1.2.0 统一正式发布命名及依赖引用;1.1.0 引入双语页面与可选工具包。旧版仍可下载,报告实验时应同时固定数据和评估器版本。
|