16 KiB
11 Benchmark 与验收矩阵
文档状态:0.3.1 gate 记录
1. 当前状态
0.3.1 在 0.3.0 Gas 最小闭环基础上新增 Gas 多材料、material/EOS 分派、Gas 源项占位、扩展诊断和 restart 兼容 gate,并继续保留工程 benchmark 矩阵作为长期规划。本版本的 pressure wave smoke、Gas bubble metrics 和 Gas 源项测试只用于小规模数值链路检查,不作为工程精度 benchmark。
2. 0.1.0 Release Gate
| 测试名 | 类型 | 验收点 |
|---|---|---|
smoke |
Fortran smoke | 生命周期、版本号、数据库最小分配、显式步进 |
input |
Fortran input | 最小 .inp、unknown keyword warning、关键数据缺失 error |
c_api |
C ABI | 生命周期、空指针错误、输入、查询、显式步进 |
python_debug |
Python ctypes |
加载 C ABI、读取最小 .inp、查询粒子数、显式运行 |
source_size |
工具门禁 | Fortran/C 文件大小、Fortran 过程大小、stale exception |
0.1.0 不验收 Water、Gas、Explosive、Solid、Shell 的生产级物理结果,也不验收真实 FEM-SPH 联合运行。
本地验收记录:
| 日期 | 构建目录 | 结果 |
|---|---|---|
| 2026-07-02 | build-codex-unix |
smoke、input、c_api、python_debug、source_size 和 git diff --check 均通过 |
2.1 0.1.1 Release Gate
| 测试名 | 类型 | 验收点 |
|---|---|---|
smoke |
Fortran smoke | 版本 0.1.1、生命周期、数据库、常量、显式步进错误路径 |
input |
Fortran input | 元数据占位、set 不作为类型判断、warning/error 路径 |
c_api |
C ABI | 空指针、非正容量、粒子状态、output、restart |
cpp_api |
C++ wrapper | RAII 生命周期、读入、构建、粒子状态 |
python_debug |
Python ctypes |
常量、粒子状态、output、restart、错误路径 |
cli |
CLI | --version、inspect、--check、--run、错误输入 |
restart |
Fortran restart | 写入、读回、继续最小显式步 |
output |
Fortran output | CSV 字段和输出路径控制 |
coupling_interface |
Fortran coupling | 中立导出/导入占位和诊断字段 |
source_size |
工具门禁 | Fortran/C/C++/Python 文件大小和 stale exception |
0.1.1 不验收 Water、Gas、Explosive、Solid、Shell 的生产级物理结果,也不验收真实 FEM-SPH 联合运行。
本地验收记录:
| 日期 | 构建目录 | 结果 |
|---|---|---|
| 2026-07-02 | build-codex-unix |
0.1.1 gate 10/10 通过,git diff --check 通过 |
2.2 0.2.0 Release Gate
| 测试名 | 类型 | 验收点 |
|---|---|---|
smoke |
Fortran smoke | 版本 0.2.0、生命周期、显式步进错误路径 |
input |
Fortran input | Abaqus 子集、Water 关键字、warning/error 路径 |
kernel |
Fortran unit | Wendland/Cubic 核函数、梯度、不同 h(i) 和错误路径 |
neighbor |
Fortran unit | uniform cell/bin 邻域、移动重建、边界和容量错误路径 |
water_eos |
Fortran module | Tait EOS、声速、Water summary 和非 Water 跳过 |
water_density |
Fortran module | 连续性方程、压缩/拉伸、静止和非 Water 跳过 |
water_viscosity |
Fortran module | Monaghan 人工黏性方向、有限性和对称性 |
water_force |
Fortran module | 压力力、body force 和非 Water 跳过 |
solver_water |
Fortran module | Water 显式步、稳定时间步、Fortran API 和错误路径 |
pressure_wave_smoke |
Fortran smoke | 小规模压力扰动传播、质量/动量趋势、输出字段 |
output |
Fortran output | 粒子 CSV 和 Water summary CSV |
restart |
Fortran restart | Water 状态写入、读回、重建邻域和继续显式步 |
coupling_interface |
Fortran coupling | Water 运行后中立导出、外部粒子力导入和诊断占位 |
c_api |
C ABI | Water summary/dt limits、错误码和粒子状态 |
cpp_api |
C++ wrapper | Water summary/dt limits 薄包装 |
python_debug |
Python ctypes |
Water inspect/run、summary/dt limits 和错误路径 |
cli |
CLI | 0.2.0 Water inspect/check/run/output/error 字段 |
source_size |
工具门禁 | Fortran/C/C++/Python 文件大小和 stale exception |
0.2.0 不验收 Gas、Explosive、Solid、Shell 的生产级物理结果,也不验收真实 FEM-SPH 联合运行。
本地验收记录:
| 日期 | 构建目录 | 结果 |
|---|---|---|
| 2026-07-02 | build-codex-unix |
0.2.0 gate 18/18 通过,git diff --check 通过 |
2.3 0.2.1 Release Gate
| 测试名 | 类型 | 验收点 |
|---|---|---|
smoke |
Fortran smoke | 版本 0.2.1、生命周期和显式步进错误路径 |
input |
Fortran input | Water 关键字、coupling region 类型、warning/error 路径 |
kernel |
Fortran unit | 核函数边界、错误路径和有限性 |
neighbor |
Fortran unit | 邻域边界、容量、统计和小规模一致性 |
water_eos |
Fortran module | Tait EOS、负压策略、声速和 summary |
water_density |
Fortran module | 连续性方程、跳过规则和低密度错误路径 |
water_viscosity |
Fortran module | Monaghan 参数、方向、有限性和跳过规则 |
water_force |
Fortran module | 压力力、body force、外部粒子力占位和跳过规则 |
solver_water |
Fortran module | 显式推进、stable dt、API 兼容和错误默认值 |
output |
Fortran output | 自动输出、手动输出不改状态、CSV 字段和目录错误路径 |
restart |
Fortran restart | 0.2.1 state version、Water 状态、诊断、读回和非法文件 |
coupling_interface |
Fortran coupling | Water 状态导出、外力导入、work/momentum/energy 诊断 |
c_api |
C ABI | 空指针、小容量、错误码透传和 Water 诊断 |
cpp_api |
C++ wrapper | RAII 生命周期、薄包装和 Water 诊断 |
python_debug |
Python ctypes |
C ABI 加载、inspect/run、Water 诊断和错误路径 |
cli |
CLI | version、inspect、check、run、output 和错误输入 |
pressure_wave_smoke |
Fortran smoke | 5 粒子线性和 3D 非共线压力扰动、小规模趋势检查 |
source_size |
工具门禁 | Fortran/C/C++/Python 文件和 stale exception |
0.2.1 不验收 Gas、Explosive、Solid、Shell 的生产级物理结果,也不验收真实 FEM-SPH 联合运行。CouplingInterface 不在 0.2.1 暴露 C ABI。
本地验收记录:
| 日期 | 构建目录 | 结果 |
|---|---|---|
| 2026-07-02 | build-codex-unix |
0.2.1 gate 17/17 通过,source_size 1/1 通过,git diff --check 通过 |
2.4 0.2.2 Release Gate
0.2.2 继续使用 0.2.1 已建立的默认 gate,目标是复核 Water 路径、接口兼容性、restart/output 稳定性和文档边界,不新增 Gas、Explosive、Solid、Shell 或真实 FEM-SPH 联合运行验收。
| 测试名 | 类型 | 验收点 |
|---|---|---|
smoke |
Fortran smoke | 版本 0.2.2、生命周期和显式步进错误路径 |
input |
Fortran input | Abaqus 子集、Water 关键词、warning/error 路径 |
kernel |
Fortran unit | 核函数边界、错误路径和有限性 |
neighbor |
Fortran unit | 邻域边界、容量、统计和小规模一致性 |
water_eos |
Fortran module | Tait EOS、负压策略、声速和 summary |
water_density |
Fortran module | 连续性方程、跳过规则和低密度错误路径 |
water_viscosity |
Fortran module | Monaghan 参数、方向、有限性和跳过规则 |
water_force |
Fortran module | 压力力、body force、外部粒子力占位和跳过规则 |
solver_water |
Fortran module | 显式推进、stable dt、API 兼容和错误默认值 |
output |
Fortran output | 自动输出、手动输出不改状态、CSV 字段和目录错误路径 |
restart |
Fortran restart | STATE_0_2 状态版本、Water 状态、诊断、读回和非法文件 |
coupling_interface |
Fortran coupling | Water 状态导出、外力导入、work/momentum/energy 诊断 |
c_api |
C ABI | 空指针、小容量、错误码透传和 Water 诊断 |
cpp_api |
C++ wrapper | RAII 生命周期、薄包装和 Water 诊断 |
python_debug |
Python ctypes |
C ABI 加载、inspect/run、Water 诊断和错误路径 |
cli |
CLI | version、inspect、check、run、output 和错误输入 |
pressure_wave_smoke |
Fortran smoke | 5 粒子线性和 3D 非共线压力扰动、小规模趋势检查 |
source_size |
工具门禁 | Fortran/C/C++/Python 文件和 stale exception |
0.2.2 不验收 Gas、Explosive、Solid、Shell 的生产级物理结果,也不验收真实 FEM-SPH 联合运行。CouplingInterface 不在 0.2.2 暴露 C ABI。
本地验收记录:
| 日期 | 构建目录 | 结果 |
|---|---|---|
| 2026-07-03 | build-codex-unix |
0.2.2 gate 17/17 通过,source_size 1/1 通过,git diff --check 通过 |
2.5 0.3.0 Release Gate
0.3.0 默认 gate 在 0.2.2 Water gate 基础上新增 Gas 输入、EOS、状态、summary、solver、output、restart 和接口诊断验收。
| 测试名 | 类型 | 验收点 |
|---|---|---|
smoke |
Fortran smoke | 版本 0.3.0、生命周期和显式步进错误路径 |
input |
Fortran input | 既有 Abaqus 子集、Water 关键词、warning/error 路径 |
input_gas |
Fortran input | Gas material、三类 EOS、缺失字段、warning 和 Water/Gas 混合 |
kernel |
Fortran unit | 核函数边界、错误路径和有限性 |
neighbor |
Fortran unit | 邻域边界、容量、统计和小规模一致性 |
water_eos |
Fortran module | Tait EOS、负压策略、声速和 summary |
water_density |
Fortran module | 连续性方程、跳过规则和低密度错误路径 |
water_viscosity |
Fortran module | Monaghan 参数、方向、有限性和跳过规则 |
water_force |
Fortran module | 压力力、body force、外部粒子力占位和跳过规则 |
solver_water |
Fortran module | Water 显式推进、stable dt、API 兼容和错误默认值 |
gas_eos_ideal |
Fortran module | 理想气体压力、单调性和非法参数 |
gas_eos_jwl |
Fortran module | JWL 压力、相对体积、有限性和非法参数 |
gas_eos_stiffened |
Fortran module | Stiffened gas 压力、PINF 字段、有限性和非法参数 |
gas_state |
Fortran module | Gas phase、rho、pressure、internal energy、temperature、mass、volume、h |
gas_summary |
Fortran module | Gas 质量、体积、中心、压力、密度范围和 bubble metrics |
solver_gas |
Fortran module | Gas 单步显式推进、Gas dt 和 Water 单相回归 |
output |
Fortran output | 粒子 CSV 通用字段和 summary CSV 兼容 |
gas_output |
Fortran output | Gas summary CSV 字段 |
restart |
Fortran restart | STATE_0_3、Water 状态、诊断、读回和非法文件 |
gas_restart |
Fortran restart | Gas EOS、默认控制、体力、summary、bubble 历史、dt 和继续显式步 |
coupling_interface |
Fortran coupling | Water 状态导出、外力导入、work/momentum/energy 诊断 |
c_api |
C ABI | Water/Gas 诊断、空指针、未初始化、未 build 和错误码透传 |
cpp_api |
C++ wrapper | Water/Gas 诊断薄包装 |
python_debug |
Python ctypes |
C ABI 加载、Water/Gas inspect/run 和错误路径 |
cli |
CLI | version、inspect、check、run、output、Water/Gas 字段和错误输入 |
pressure_wave_smoke |
Fortran smoke | 5 粒子线性和 3D 非共线压力扰动、小规模趋势检查 |
source_size |
工具门禁 | Fortran/C/C++/Python 文件和 stale exception |
0.3.0 不验收 Explosive、Solid、Shell 的生产级物理结果,也不验收真实 FEM-SPH 联合运行。CouplingInterface 仍不暴露 C ABI。
本地验收记录:
| 日期 | 构建目录 | 结果 |
|---|---|---|
| 2026-07-03 | build-codex-unix |
0.3.0 gate 27/27 通过,source_size 1/1 通过,git diff --check 通过 |
2.6 0.3.1 Release Gate
0.3.1 默认 gate 在 0.3.0 Gas gate 基础上新增多 Gas material、material/EOS 分派、Gas 源项占位、扩展诊断、restart 0.3.1 和 0.3.0 兼容读入测试。
| 测试名 | 类型 | 验收点 |
|---|---|---|
input_gas_multimaterial |
Fortran input | 多 Gas material、多 section、缺失密度/EOS、重复 EOS、非 Gas material EOS 和无 active 粒子 warning |
gas_eos_dispatch |
Fortran module | 理想气体、JWL、Stiffened gas 按 material 分派,混合材料 dt 和共享 body force |
gas_extended_summary |
Fortran API | Gas 质量、动量、密度范围、dt 分量和源项默认诊断 |
gas_source |
Fortran module | Gas 质量、动量、能量源项清零、累计和显式应用 |
gas_source_errors |
Fortran module | 非法粒子、非 Gas 粒子和非法数值源项错误路径 |
gas_restart_031 |
Fortran restart | STATE_0_3_1、Gas material/EOS 表、源项缓存、bubble/dt 状态和继续显式步 |
gas_restart_030_compat |
Fortran restart | 0.3.0 STATE_0_3 兼容读入、新状态默认值和继续显式步 |
gas_python_extended |
Python ctypes |
Gas extended/source summary 薄包装和 inspect/run 字段 |
gas_cli_extended |
CLI | Gas extended/source summary CLI 字段和输出检查 |
gas_source_size_cleanup |
工具门禁 | Gas source 拆分、source size 和 stale exception 检查 |
0.3.1 不验收 Explosive、Solid、Shell 的生产级物理结果,也不验收真实 FEM-SPH 联合运行。Gas 源项为 0.4.0 Explosive 的前置入口,不代表 0.3.1 已实现爆炸反应。
本地验收记录:
| 日期 | 构建目录 | 结果 |
|---|---|---|
| 2026-07-03 | build-codex-unix |
0.3.1 gate 37/37 通过,source_size 1/1 通过,git diff --check 通过 |
3. 基础数值矩阵
| 领域 | 测试或 benchmark | 验收点 |
|---|---|---|
| 核函数 | kernel 单测 | 归一性、梯度方向、紧支撑 |
| 邻域搜索 | neighbor 单测 | 与朴素搜索一致 |
| 水体 EOS | Tait EOS 单测 | 压力量级和单调性 |
| 气体 EOS | JWL/理想气体单测 | 压力、能量和单位一致 |
| 爆轰传播 | ignition 单测 | 到达时间和反应进度 |
| 气体团簇 | gas summary 单测 | 体积、中心、等效半径 |
4. 水下爆炸矩阵
| 领域 | 代表算例 | 验收点 |
|---|---|---|
| 压力波 | 1D 水中压力传播 | 波速、峰值、数值耗散 |
| 自由场爆炸 | 小装药水域 | 压力峰值和冲量 |
| 气泡脉动 | 单气泡膨胀回缩 | 最大半径、周期、中心迁移 |
| 流固载荷 | 水冲击刚性板 | 法向压力和冲量 |
5. 结构矩阵
| 领域 | 代表算例 | 验收点 |
|---|---|---|
Solid 弹性 |
单轴拉伸 | 应力应变曲线 |
Solid 塑性 |
高速拉伸/压缩 | 屈服和塑性功 |
Solid 断裂 |
缺口拉伸 | 损伤局部化和断裂路径 |
Shell 变形 |
悬臂板/简支板 | 位移方向和量级 |
Shell 破裂 |
薄板冲击 | 穿孔、撕裂和能量 |
6. 耦合矩阵
| 领域 | 代表算例 | 验收点 |
|---|---|---|
| SPH-FEM 接触 | SPH 压力作用 FEM facet | 合力、方向、能量 |
| FEM 驱动边界 | 运动 FEM facet 驱动水体 | 边界速度和压力响应 |
Solid 连续体耦合 |
Solid - FEM 实体拉伸 |
位移连续、力平衡 |
Shell 连续体耦合 |
Shell - FEM 壳弯曲 |
转角/位移连续、力矩平衡 |
| 混合舱段 | 局部 FEM + 局部 SPH 舱段爆炸 | 破坏模式和耦合诊断 |
7. 默认 gate 与非默认长跑
默认 gate 应只包含小型、快速、稳定的测试。
非默认长跑包括:
- 大水域自由场爆炸。
- 长时程气泡脉动。
- 复杂舱段破坏。
- SPH-FEM 混合整船局部模型。
- 高分辨率断裂和碎片云。
8. 待讨论问题
- 第一版 benchmark 是否需要真实工程量纲。
- 气泡脉动验收采用解析近似、实验曲线还是参考软件结果。
- 结构破裂 checker 采用定量阈值还是形态分类。