aero-coefficient-interpolation
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "aero-coefficient-interpolation" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-8601b4fa1b17c6c474713a5a992098195153a3241b2aa72191ee79c1a31702e6. Verify the upstream source and version against https://skillhub.cn/skills/user_9196e151/2023111387 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Perform interpolation-based expansion of aerodynamic coefficient tables: take a coefficient matrix with Mach numbers as rows and angles of attack as columns, perform piecewise linear interpolation at the specified angle step for each Mach number, increase angle resolution, and output the expanded Excel table.
Introduction source: third_party · user_9196e151 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Software, accounts and paid services
- C:/Users/Lenovo/.workbuddy/binaries/python/versions/3.13.12/python.exe -m pip install openpyxl numpy
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: aero-coefficient-interpolation
description: 辅助飞行器设计与工程科研的气动力系数表插值扩充工具。当用户提供气动力系数表(马赫数为行、攻角为列的矩阵格式)并指定插值角度精度时,对每个马赫数下的气动系数进行分段线性插值,扩充攻角分辨率,输出扩充后的 Excel 表格。触发场景:用户提到"气动力系数插值"、"气动系数扩充"、"攻角插值"、"aerodynamic coefficient interpolation"、"气动力表细化"等,或提供了一个包含马赫数与攻角的系数表并希望按指定角度步长加密数据时使用此 skill。This skill should be used when the user provides an aerodynamic coefficient table (Mach number vs angle-of-attack matrix) and requests angle-axis interpolation to expand the coefficient data at a finer angle resolution.
agent_created: true气动力系数表插值扩充
概述
对气动力系数表(马赫数 × 攻角矩阵)沿攻角轴进行分段线性插值, 按用户指定的角度步长扩充每个马赫数下的系数数据,输出高分辨率的 Excel 表格。
适用于飞行器气动特性分析、飞行仿真建模、气动数据库生成等工程科研场景。
何时使用
- 用户提供气动力系数表(Excel 格式),希望按指定角度精度插值扩充
- 用户提到"气动系数插值"、"攻角细化"、"气动力表扩充"等关键词
- 用户提供的数据表攻角间距较大(如 5°、10°),需要更密集的数据点(如 1°、0.5°)
工作流程
步骤 0:展示样例表格并讲解使用方法(首次使用时必须执行)
当用户首次使用此 skill 时,先向用户展示以下样例表格和使用说明,帮助用户理解输入格式要求和脚本能力。
样例输入表格
以下是一个标准的气动力系数表(以 Cx 为例),用户需按此格式准备 Excel 文件:
Ma\α(°) 0 5 15 25 30 35 40
0.01 0.1708415 0.1738513 0.1940109 0.2278459 0.2815072 0.3525405 0.420867
0.6 0.1510152 0.1536513 0.1720838 0.2028383 0.2511870 0.3144029 0.3739929
0.8 0.1303607 0.1327847 0.1500557 0.1787498 0.2235635 0.2816688 0.3357442
1 0.3692863 0.3715588 0.3877491 0.4145242 0.4560756 0.5095450 0.5588027
1.5 0.2932030 0.2953644 0.3101003 0.3342797 0.3714780 0.4188571 0.4621356
3 0.1970106 0.1992528 0.2106456 0.2288458 0.2561158 0.2902235 0.3217658
4 0.1533180 0.1556511 0.1652966 0.1804163 0.2027373 0.2304416 0.2566309
5 0.1195941 0.1219171 0.1300779 0.1426423 0.1609334 0.1834968 0.2053532
6 0.1012828 0.1035149 0.1104233 0.1209071 0.1359460 0.1544492 0.1727605
格式要点讲解
向用户说明以下要点:
- 首列为马赫数(Ma),必须是数值(如 0.01, 0.6, 1, 1.5 等)
- 首行为表头:第一个单元格是标签(如
Ma\α(°)),后续单元格为攻角数值(如 0, 5, 15, 25, 30, 35, 40) - 数据区:每个单元格为对应 (Ma, α) 的气动系数值
- 攻角无需等间距:上例中 0→5→15→25→30→35→40 的间距分别是 5°、10°、10°、5°、5°、5°
- 多系数处理:不同系数(Cx, Cy, Cz)可放在不同 Sheet 中,也可在同一 Sheet 内分块(用空行分隔,上方加系数名标签行)
- 精度自动匹配:脚本会自动检测输入数据的小数位数,输出保留相同精度。无法检测时默认保留 6 位小数。也可用
--precision N手动指定
插值效果演示
以 step=1° 对上例插值后,攻角从 7 列扩充为 41 列:
原始: α = [0, 5, 15, 25, 30, 35, 40] → 7 个数据点
扩充: α = [0, 1, 2, 3, ..., 38, 39, 40] → 41 个数据点
每个新攻角处的系数值通过分段线性插值计算。例如 α=1° 处:
Cx(Ma=0.01, α=1°) = 0.1708415 + (0.1738513 - 0.1708415) × (1-0)/(5-0) = 0.1714435
使用方法说明
告知用户只需提供三样东西:
- Excel 文件:包含气动力系数表
- 插值步长:如 1°、0.5°、2° 等
- (可选)输出文件名:不指定则自动命名
然后告知用户脚本会自动完成:格式检测 → 精度识别 → 分段线性插值 → 输出 Excel
步骤 1:确认输入信息
收到用户请求后,确认以下三项关键信息:
| 参数 | 说明 | 示例 |
|---|---|---|
| 输入文件 | 包含气动力系数表的 Excel 文件路径 | Cx_data.xlsx |
| 插值步长 | 攻角插值步长(度),必须为正数 | 1.0、0.5、2 |
| 输出文件 | 输出 Excel 文件路径(可选,默认在输入同目录) | Cx_expanded.xlsx |
如果用户未明确步长,询问用户期望的角度精度。常见选择:1°(标准)、0.5°(高精度)、2°(粗略)。
步骤 2:检查表格格式
读取输入文件前,确认表格符合支持的格式。核心格式要求:
- 首列:马赫数值(如 0.01, 0.6, 0.8, 1, 1.5, ...)
- 首行:表头标签(如
Ma\α(°))+ 攻角数值(如 0, 5, 15, 25, 30, 35, 40) - 数据区:每个单元格为对应 (Ma, α) 的气动系数值
- 攻角无需等间距
- 多个系数可在不同 Sheet 或同 Sheet 内分块(空行分隔 + 系数名标签行)
详细格式说明见 references/table_format_guide.md。
如果用户的数据格式不符(如转置表格、合并单元格、多级表头等),先将数据整理为标准格式再运行脚本。
步骤 3:运行插值脚本
使用 managed Python 环境运行脚本。依赖 openpyxl 和 numpy,需确保已安装:
# 安装依赖(仅需一次)
C:/Users/Lenovo/.workbuddy/binaries/python/versions/3.13.12/python.exe -m pip install openpyxl numpy
# 运行插值(基本用法)
C:/Users/Lenovo/.workbuddy/binaries/python/versions/3.13.12/python.exe "<skill_dir>/scripts/interpolate_aero_coefficients.py" <input.xlsx> <output.xlsx> <step>
# 启用线性外推(超出原始攻角范围时使用端点斜率延伸)
C:/Users/Lenovo/.workbuddy/binaries/python/versions/3.13.12/python.exe "<skill_dir>/scripts/interpolate_aero_coefficients.py" <input.xlsx> <output.xlsx> <step> --extrapolate
# 仅处理指定 Sheet
C:/Users/Lenovo/.workbuddy/binaries/python/versions/3.13.12/python.exe "<skill_dir>/scripts/interpolate_aero_coefficients.py" <input.xlsx> <output.xlsx> <step> --sheet Cx
# 同时导出 CSV
C:/Users/Lenovo/.workbuddy/binaries/python/versions/3.13.12/python.exe "<skill_dir>/scripts/interpolate_aero_coefficients.py" <input.xlsx> <output.xlsx> <step> --csv
# 手动指定输出精度(覆盖自动检测)
C:/Users/Lenovo/.workbuddy/binaries/python/versions/3.13.12/python.exe "<skill_dir>/scripts/interpolate_aero_coefficients.py" <input.xlsx> <output.xlsx> <step> --precision 6
其中 <skill_dir> 为本 skill 的安装路径,通常为:
- 用户级:
C:/Users/Lenovo/.workbuddy/skills/aero-coefficient-interpolation
步骤 4:验证并交付结果
脚本运行后检查控制台输出,确认:
- 每个 Sheet 检测到几个数据块
- 原始攻角列表和扩充后攻角数量是否正确
- 马赫数行数是否完整
- 检测到的精度(控制台会输出
Precision: N decimals) - 输出文件已成功生成
将输出 Excel 文件交付给用户,并简要说明扩充前后的数据规模变化和使用的精度。
精度规则
输出小数位数按以下优先级确定:
--precision N参数(最高优先级):用户手动指定时,所有数据块统一使用该精度- 自动检测输入精度(默认):脚本扫描每个数据块的系数值单元格,通过以下方式检测小数位数:
- 优先读取 Excel 单元格的
number_format(如0.0000000表示 7 位小数) - 若
number_format为General,则从数值的字符串表示中计算小数位数(如0.1708415→ 7 位) - 取该数据块内所有单元格的最大小数位数作为该块的输出精度
- 优先读取 Excel 单元格的
- 默认 6 位小数(兜底):若无法从输入中检测到有效小数位数,使用 6 位
不同数据块(如 Cx 和 Cy 在不同 Sheet 中)可以有不同的精度,各自独立检测。
脚本参数
| 参数 | 必填 | 说明 |
|---|---|---|
input |
是 | 输入 Excel 文件路径 |
output |
是 | 输出 Excel 文件路径 |
step |
是 | 插值角度步长(度),正数 |
--extrapolate |
否 | 启用线性外推(默认不外推,仅在原始攻角范围内插值) |
--sheet |
否 | 仅处理指定 Sheet |
--csv |
否 | 同时导出 CSV 文件 |
--precision |
否 | 手动指定输出小数位数(覆盖自动检测,默认自动检测输入精度,兜底 6) |
输出说明
- 输出文件为
.xlsx格式,保持与输入相同的 Sheet 结构 - 每个数据块扩充为更密集的攻角列
- 表头行和马赫数列有蓝色底色加粗样式
- 首行首列冻结,便于滚动查看
- 系数值小数位数与输入表格一致(自动检测),无法检测时默认 6 位
- 攻角值保留 6 位小数
- 可选
--csv参数同时导出 CSV 文件
注意事项
- 脚本仅沿攻角轴插值,不改变马赫数行数
- 若原始攻角范围外需要数据,使用
--extrapolate参数(基于端点斜率线性外推一个步长) - 多个气动力系数(Cx, Cy, Cz)建议分别放在不同 Sheet 中,Sheet 名使用系数名称
- 插值精度取决于原始数据质量和步长选择;步长过小不会增加真实信息量,仅增加数据密度
- 精度自动检测基于输入数据的实际小数位数,若输入数据精度不统一(如混合 6 位和 7 位),取最大值
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 面向飞行器工程科研的专业工具,解决气动力系数表插值扩充的实际需求
- 适用于气动特性分析、飞行仿真建模等高频工程场景
Highlights
- 触发词覆盖中英文关键词,边界清晰
- 支持多种变体表达(如"攻角插值"、"气动力表细化"等)
Areas to improve
-
Missing referenced files Reported severity: Minor
SKILL.md 中引用了 references/table_format_guide.md,但该文件未在传入内容中提供
Recommendation: 请补充该引用文件,或移除引用并确保所有格式说明已在主文档中完整覆盖
Highlights
- 文档结构完整,包含详细的工作流程、示例和参数说明
- 提供了标准输入格式示例和插值效果演示
Highlights
- 脚本依赖明确,参数设计合理
- 支持精度自动检测和手动指定,具备良好的容错机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 111
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
C:/Users/Lenovo/.workbuddy/binaries/python/versions/3.13.12/python.exe -m pip install openpyxl numpy
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.