ocs-calculators 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,100 @@
1
+ # 更新日志
2
+
3
+ 本文件格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),
4
+ 版本号遵循[语义化版本](https://semver.org/lang/zh-CN/)。
5
+
6
+ ## [0.1.0] - 2026-08-31
7
+
8
+ 首个公开版本。覆盖思维接触网百科全部 12 个在线计算器。
9
+
10
+ 所有公式与默认参数取自站点 `/calculator/assets/calc-core.js` 源码;
11
+ 单元测试的期望值由源码公式独立算出,共 158 个测试。
12
+
13
+ ### 新增
14
+
15
+ - `icing` 覆冰荷载校核模块
16
+ - 冰筒模型 `g_ice = ρ_ice·g₀·π·b·(d+b)`,冰密度默认 900 kg/m³
17
+ - 覆冰总荷载、无冰/覆冰弛度、弛度增幅、重覆冰判定(冰重 > 自重)
18
+ - 10 个测试;⚠️ 未与张力-温度状态方程耦合,大覆冰工况偏乐观
19
+ - `curve-stagger` 曲线拉出值校核模块
20
+ - 矢度 `c = l²/(8R)`、超高横移 `δ = H·h/l₀`、跨中风偏 `p_w = (½ρv²dα)·l²/(8T)`
21
+ - 风偏取风向垂直线路最不利工况(sin²θ = 1)
22
+ - 14 个测试;⚠️ 与站点实现一致:δ 计算但不参与 e 的合成,
23
+ 而站点 JSDoc 描述为 `e = |ā ± c ∓ δ| + p_w`,两者不符(已在测试中锁定当前行为)
24
+ - `voltage-drop` 电压降校核模块
25
+ - `r_T = r₂₀·[1+α(T−20)]/n`(α = 0.00393 /℃,n 为并联数)
26
+ - `ΔU = I·r_T·L`、`U_end = U₀ − ΔU`、压降率;末端电压下限默认 20000 V 可配
27
+ - 10 个测试
28
+ - `wavespeed` 波速利用率模块
29
+ - `c = √(T/ρ)`、`β = v/c`、`f_n = n·c/(2L)`、一阶共振车速 `v_res = c/2·3.6`
30
+ - β ≥ 0.7 告警(阈值可配)
31
+ - 11 个测试
32
+ - `stroke` 补偿行程模块
33
+ - 温度伸缩量 `ΔL = α·L·Δt`,补偿行程 `S = n·ΔL + S₀`
34
+ - 传动比 1:2 / 1:3 / 1:4,安装裕度规程下限 200mm、设计惯例 300mm
35
+ - 14 个测试,含许用行程校核与边界相等判定
36
+ - `copper` 接触线参数速查模块
37
+ - 附结构化数据 `TB2809_WIRE_PARAMS`:6 型号 × 单位重量/r₂₀/150℃ 载流量
38
+ - 电阻温度修正 `r_T = r₂₀·[1 + α·(T−20)]`(α = 0.00393 /℃)
39
+ - 参数表已与站点 `/calculator/assets/calc-core.js` 的 COPPER_TABLE
40
+ 逐项比对,6 型号 × 4 项参数完全一致
41
+ - 数据层与显示层的区别(重要):站点曾把载流量渲染成 43/56(应为 430/560),
42
+ 真因是显示层 `fmt()` 的尾零剥离正则 `/\.?0+$/` 对整数档误伤有效数字
43
+ (430→43、560→56、100→1、20→2)。同页表格不经 fmt 故显示正确。
44
+ 该 bug 自 R38 载流量修正上线起存在,已于 2026-08-31 修复
45
+ (`if (d === 0) return s;` + 正则改 `(\.\d*?)0+$`),
46
+ dropper / wear / wind 同款地雷一并排除
47
+ - `note` 字段标明各行实际取自 TB/T 2809-2017 的哪一行
48
+ (站点型号 CTHM/CTHA/CTHS 对应标准行 CTMH/CTA/CTS,非同名对应)
49
+ - 13 个测试
50
+ - `wear` 接触线磨耗率模块
51
+ - 磨耗率 `η = (A₀−A)/A₀ × 100%`,η > 20% 建议更换
52
+ - 支持按残截面积或残径(圆截面近似 A = πd²/4)输入
53
+ - 11 个测试,覆盖判定边界(η = 20% 判可继续)
54
+ - `ampacity` 载流量修正与短路热稳定模块
55
+ - 环境温度修正 `I(Ta) = I₀·√((Tmax−Ta)/(Tmax−T₀))`
56
+ - 热稳定最小截面 `S_min = I_k·√t_k/C`,支持拟选截面判定
57
+ - 附结构化数据 `src/data/tb2809-ampacity.ts`:TB/T 2809-2017 表5 持续载流量
58
+ (9 种材质 × 120/150 mm² × 室内外 × 95/150℃),可独立引用
59
+ - `force` 弓网接触力统计评价模块
60
+ - EN 50367 统计评价:`Fmax = Fm+3σ`、`Fmin = Fm−3σ`
61
+ - 参考目标力 `Fref = 0.00097·v² + offset`,支持 AC / DC 3kV / DC 1.5kV 三种制式
62
+ - `wind` 风偏限界校验模块
63
+ - 单位风荷载 `p = ½·ρ·v²·d·α·sin²θ`(ρ 默认 1.225 kg/m³,可自定义)
64
+ - 跨中风偏 `b = p·L²/(8·T)`,限界判据 `b + a ≤ 限界允许值`
65
+ - 13 个单元测试,复现站点在线计算器输出;含 θ 对称性、平行风零偏移、超限判定
66
+ - `dropper` 吊弦长度计算模块
67
+ - 接触线弛度 `f_c(x) = q_c·x·(L−x)/(2·T_c)`,承力索弛度同形
68
+ - 简单链形 `l_i = H − f_c(x_i)`,弹性链形 `l_i = H − f_c(x_i) + f_m(x_i)`
69
+ - 15 个单元测试,逐位复现站点在线计算器输出的 11 行结果
70
+
71
+ ### 变更
72
+
73
+ - 抽出公共模块 `src/common/resistance.ts`(电阻温度修正)与 `src/common/ice.ts`
74
+ (冰筒模型),原先分散在 copper / tension 的同名实现改为共用,统一用 SI 单位。
75
+ `iceLoadNPerM` 的参数由 `iceThicknessMM / wireDiameterMM` 改为
76
+ `iceThicknessM / wireDiameterM`(单位:米)。
77
+
78
+ ### 完成度
79
+
80
+ 12 个计算器全部实现完毕。
81
+
82
+ ## [0.1.0] - 2026-08-30
83
+
84
+ ### 新增
85
+
86
+ - 仓库骨架:TypeScript 严格模式、Vitest、tsup 打包(ESM + CJS + 类型声明)
87
+ - `tension` 张力-温度安装曲线模块
88
+ - 状态方程 `T₂ − g²l²EA/(24T₂²) = T₁ − g²l²EA/(24T₁²) − αEA(t₂ − t₁)`,二分法求解
89
+ - 跨中弛度抛物线近似 `f = gl²/(8T)`
90
+ - 当量跨距归算 `l_D = √(Σlᵢ³/Σlᵢ)`
91
+ - 覆冰荷载冰筒模型 `g_ice = ρ_ice·g₀·π·b·(d+b)`
92
+ - 15 个单元测试,逐行回归站点已发布的输出表(张力误差 ≤ 0.02%)
93
+ - `wire-specs.ts` 线材参数预设(CTHM-120 / CTHM-150 / CTHA-120)
94
+ - `CalculatorMeta` 元信息规范:公式、依据标准、适用范围、免责声明
95
+ - `DISCLAIMER.md` 工程免责声明
96
+
97
+ ### 待确认
98
+
99
+ - 线材自重取值口径:标称密度 8.94 g/cm³ 反算得 g ≈ 10.524 N/m,
100
+ 站点输出表反算得 g ≈ 10.62 N/m(+0.9%)。当前采用后者以复现站点输出。
package/DISCLAIMER.md ADDED
@@ -0,0 +1,26 @@
1
+ # 工程免责声明
2
+
3
+ 本库提供的所有计算结果**仅供参考**,不构成工程设计、施工或验收依据。
4
+
5
+ ## 使用前必读
6
+
7
+ 1. **本库是计算工具,不是设计文件。** 任何实际工程应用,必须以正式设计文件、现行有效版本的标准规范、以及产品技术条件为准。
8
+
9
+ 2. **公式形式以设计文件及接触网设计教材/手册为准。** 各模块 `meta.ts` 中标注的公式与依据标准号,仅说明该实现的参考来源,不代表该标准包含或认可此公式。
10
+ 例:TB 10009-2016 规定了接触线最小张力、张力确定原则与张力差限值,但**不包含**张力-温度状态方程本身。
11
+
12
+ 3. **线材参数均为标称参考值。** `src/data/wire-specs.ts` 中的弹性模量 E、线膨胀系数 α、截面积 A、线密度等,均为便于快速试算的标称值。实际取值以产品技术条件与设计文件为准。
13
+
14
+ 4. **适用范围有限。** 各模块 `meta.ts` 中标注了适用范围(如跨距 20~90 m、弹性模量 50~200 GPa)。超出范围的输入不保证结果合理,调用方应自行校验。
15
+
16
+ 5. **使用者承担全部责任。** 依据 MIT 许可证第 11-17 行,作者不对任何因使用本库产生的索赔、损害或其他责任负责。
17
+
18
+ ## 建议的正确用法
19
+
20
+ - 用它做方案比选、快速试算、教学演示、结果复核
21
+ - 不要用它直接出施工放线交底文件而不经设计复核
22
+ - 发现公式或参数问题,请到仓库提 issue —— 这对本库的改进最有价值
23
+
24
+ ## 在线版本
25
+
26
+ 完整在线工具与配套百科见:<https://www.itswe.com>
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 思维接触网百科 (https://www.itswe.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,157 @@
1
+ # 思维接触网百科 · 计算工具集
2
+
3
+ **铁路接触网(OCS)工程计算工具 —— 公式公开、零依赖、可直接在你的项目里引用。**
4
+
5
+ 🔗 在线使用:<https://www.itswe.com/Category:tools>
6
+ 📖 配套百科:<https://www.itswe.com>(504 条接触网专业词条)
7
+
8
+ [English](./README_EN.md) | 简体中文
9
+
10
+ ![npm version](https://img.shields.io/npm/v/ocs-calculators)
11
+ ![CI](https://github.com/showhoo/ocs-calculators/actions/workflows/ci.yml/badge.svg)
12
+ ![license](https://img.shields.io/npm/l/ocs-calculators)
13
+ ![dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)
14
+
15
+ ![首屏截图](docs/screenshot.png)
16
+
17
+ ---
18
+
19
+ ## 为什么用它
20
+
21
+ - **公式公开可查** — 每个模块的 `meta.ts` 里写明公式、参考依据与适用范围,不是黑盒
22
+ - **有单元测试** — 计算结果的期望值直接取自站点已发布的输出表,可复现、可校验
23
+ - **零运行时依赖** — 全部是纯函数,浏览器和 Node 通用,不会给你的项目塞进一堆传递依赖
24
+ - **单位写在变量名里** — `tensionKN`、`spanM`、`crossSectionMM2`,杜绝工程计算里最常见的单位错误
25
+
26
+ ## 安装
27
+
28
+ ```bash
29
+ npm install ocs-calculators
30
+ ```
31
+
32
+ ## 快速开始
33
+
34
+ ```ts
35
+ import { tensionCurve } from 'ocs-calculators';
36
+
37
+ // 张力-温度安装曲线:CTHM-120,当量跨距 55 m,基准 20 kN @ -20 ℃
38
+ const curve = tensionCurve(
39
+ {
40
+ baseTensionKN: 20,
41
+ baseTempDegC: -20,
42
+ weightPerLengthNPerM: 10.6222,
43
+ spanM: 55,
44
+ elasticModulusGPa: 120,
45
+ crossSectionMM2: 120,
46
+ expansionPerDegC: 1.7e-5,
47
+ },
48
+ [-20, -10, 0, 10, 20, 30, 40],
49
+ );
50
+
51
+ for (const p of curve) {
52
+ console.log(`${p.targetTempDegC}℃ T=${p.tensionKN.toFixed(2)} kN f=${p.sagM.toFixed(3)} m`);
53
+ }
54
+ // -20℃ T=20.00 kN f=0.201 m
55
+ // -10℃ T=17.69 kN f=0.227 m
56
+ // 0℃ T=15.45 kN f=0.260 m
57
+ // 10℃ T=13.30 kN f=0.302 m
58
+ // 20℃ T=11.30 kN f=0.355 m
59
+ // 30℃ T= 9.51 kN f=0.422 m
60
+ // 40℃ T= 8.00 kN f=0.502 m
61
+ ```
62
+
63
+ 上面这段输出与 <https://www.itswe.com/calculator/tension/> 在线计算器完全一致,测试用例里做了逐行回归。
64
+
65
+ ## 12 个计算器(全部实现)
66
+
67
+ 对应 <https://www.itswe.com/Category:tools> 的 12 个在线计算器,全部已实现并逐项回归。
68
+
69
+ | 状态 | 计算器 | 模块 | 在线地址 |
70
+ |---|---|---|---|
71
+ | ✅ 已实现 | 张力-温度安装曲线 | `tension` | [/calculator/tension/](https://www.itswe.com/calculator/tension/) |
72
+ | ✅ 已实现 | 弓网接触力评价 | `force` | [/calculator/force/](https://www.itswe.com/calculator/force/) |
73
+ | ✅ 已实现 | 载流量与热稳定 | `ampacity` | [/calculator/ampacity/](https://www.itswe.com/calculator/ampacity/) |
74
+ | ✅ 已实现 | 吊弦长度计算 | `dropper` | [/calculator/dropper/](https://www.itswe.com/calculator/dropper/) |
75
+ | ✅ 已实现 | 风偏限界校验 | `wind` | [/calculator/wind/](https://www.itswe.com/calculator/wind/) |
76
+ | ✅ 已实现 | 接触线磨耗率 | `wear` | [/calculator/wear/](https://www.itswe.com/calculator/wear/) |
77
+ | ✅ 已实现 | 接触线参数速查 | `copper` | [/calculator/copper/](https://www.itswe.com/calculator/copper/) |
78
+ | ✅ 已实现 | 补偿行程 | `stroke` | [/calculator/stroke/](https://www.itswe.com/calculator/stroke/) |
79
+ | ✅ 已实现 | 波速利用率 | `wavespeed` | [/calculator/wavespeed/](https://www.itswe.com/calculator/wavespeed/) |
80
+ | ✅ 已实现 | 电压降校核 | `voltage-drop` | [/calculator/voltage-drop/](https://www.itswe.com/calculator/voltage-drop/) |
81
+ | ✅ 已实现 | 曲线拉出值校核 | `curve-stagger` | [/calculator/curve-stagger/](https://www.itswe.com/calculator/curve-stagger/) |
82
+ | ✅ 已实现 | 覆冰荷载校核 | `icing` | [/calculator/icing/](https://www.itswe.com/calculator/icing/) |
83
+
84
+ 所有公式与默认参数均取自站点 `/calculator/assets/calc-core.js` 源码,
85
+ 单元测试的期望值由源码公式独立算出,未从渲染结果反推。
86
+
87
+ ## 单位约定
88
+
89
+ | 量的后缀 | 单位 | 例 |
90
+ |---|---|---|
91
+ | `...KN` | kN | `baseTensionKN`, `tensionKN` |
92
+ | `...N` | N | `residualN`, `tensionN` |
93
+ | `...NPerM` | N/m | `weightPerLengthNPerM` |
94
+ | `...M` | m | `spanM`, `sagM` |
95
+ | `...MM` / `...MM2` | mm / mm² | `wireDiameterMM`, `crossSectionMM2` |
96
+ | `...GPa` | GPa | `elasticModulusGPa` |
97
+ | `...PerDegC` | 1/℃ | `expansionPerDegC` |
98
+ | `...DegC` | ℃ | `baseTempDegC` |
99
+ | `...KgPerM` / `...KgPerM3` | kg/m / kg/m³ | `linearMassKgPerM` |
100
+
101
+ ## 每个模块都带 meta
102
+
103
+ ```ts
104
+ import { tensionMeta } from 'ocs-calculators';
105
+
106
+ console.log(tensionMeta.formula); // 状态方程、弛度、当量跨距、覆冰公式
107
+ console.log(tensionMeta.references); // 依据标准号,以及"该标准是否真的包含此公式"
108
+ console.log(tensionMeta.scope); // 适用范围:跨距 20~90 m、E 50~200 GPa …
109
+ console.log(tensionMeta.disclaimer); // 免责声明
110
+ ```
111
+
112
+ ## ⚠️ 免责声明
113
+
114
+ **本库所有计算结果仅供参考,不构成工程设计、施工或验收依据。**
115
+
116
+ - 实际工程应用必须以正式设计文件、现行有效版本的标准规范、产品技术条件为准
117
+ - `wire-specs.ts` 里的线材参数均为标称参考值
118
+ - 公式形式以设计文件及接触网设计教材/手册为准
119
+
120
+ 详见 [DISCLAIMER.md](./DISCLAIMER.md)。
121
+
122
+ ## 开放问题
123
+
124
+ **线材自重的取值口径待确认。** 站点页面注明"参考单位质量按密度 8.94 g/cm³ 计",据此 CTHM-120 应为 1.0728 kg/m(g ≈ 10.524 N/m)。但由站点已发布的输出表反算,实际使用的 g ≈ 10.62 N/m(≈ 1.083 kg/m),比标称值高约 0.9%,疑似计入了吊弦、线夹、接头的等效附加荷载。
125
+
126
+ 本库回归测试采用反算值(10.6222 N/m)以复现站点输出。确认口径后我们会统一,欢迎在 issue 里说明。
127
+
128
+ ## 新增一个计算器
129
+
130
+ 以 `src/tension/` 为模板:
131
+
132
+ ```
133
+ src/<模块名>/
134
+ ├── index.ts # 纯函数实现,单位写在变量名里
135
+ ├── meta.ts # 公式 / 依据 / 适用范围 / 免责
136
+ └── <模块名>.test.ts # 期望值取自站点在线计算器的输出
137
+ ```
138
+
139
+ 三条约定:
140
+
141
+ 1. 只导出纯函数,不引第三方运行时依赖
142
+ 2. `meta.ts` 必须写全 `formula` / `references` / `scope` / `disclaimer`
143
+ 3. 测试的期望值取自站点在线计算器,容差 1%(站点输出经过显示取整)
144
+
145
+ ## 相关项目
146
+
147
+ - [ocs-wiki-content](https://github.com/showhoo/ocs-wiki-content) — 504 条词条快照与结构化数据(规划中)
148
+ - [itswe](https://github.com/showhoo/itswe) — 站点介绍与建站文档(规划中)
149
+
150
+ ## 授权
151
+
152
+ - **代码**:[MIT](./LICENSE)
153
+ - **配套百科内容**:CC BY-SA 4.0(见 ocs-wiki-content 仓库)
154
+
155
+ ---
156
+
157
+ 由 [思维接触网百科](https://www.itswe.com) 维护。发现公式或参数问题请提 issue —— 这对本库的改进最有价值。
package/README_EN.md ADDED
@@ -0,0 +1,142 @@
1
+ # OCS Calculators
2
+
3
+ **Engineering calculators for railway overhead contact systems (catenary) — open formulas, zero dependencies, embeddable in your own projects.**
4
+
5
+ 🔗 Try online: <https://www.itswe.com/Category:tools>
6
+ 📖 Companion wiki (Chinese, 504 entries): <https://www.itswe.com>
7
+
8
+ [简体中文](./README.md) | English
9
+
10
+ ![npm version](https://img.shields.io/npm/v/ocs-calculators)
11
+ ![CI](https://github.com/showhoo/ocs-calculators/actions/workflows/ci.yml/badge.svg)
12
+ ![license](https://img.shields.io/npm/l/ocs-calculators)
13
+ ![dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)
14
+
15
+ ## Why
16
+
17
+ Railway electrification engineering has surprisingly little open tooling. Most
18
+ `catenary` / `pantograph` projects on GitHub are computer-vision research or game
19
+ mods — not the day-to-day numbers that design, construction and maintenance
20
+ engineers actually need.
21
+
22
+ This library is that missing piece:
23
+
24
+ - **Formulas are public.** Every module ships a `meta.ts` with the equations,
25
+ the standards they relate to, and their validity range. No black boxes.
26
+ - **Tested against a live reference.** Expected values come from the published
27
+ output of the online calculators, and are regression-tested row by row.
28
+ - **Zero runtime dependencies.** Pure functions, works in the browser and Node.
29
+ - **Units live in the variable names.** `tensionKN`, `spanM`, `crossSectionMM2` —
30
+ unit confusion is the number one bug in engineering code.
31
+
32
+ ## Install
33
+
34
+ ```bash
35
+ npm install ocs-calculators
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```ts
41
+ import { tensionCurve } from 'ocs-calculators';
42
+
43
+ // Tension-temperature installation curve.
44
+ // CTHM-120 contact wire, equivalent span 55 m, reference 20 kN @ -20 °C.
45
+ const curve = tensionCurve(
46
+ {
47
+ baseTensionKN: 20,
48
+ baseTempDegC: -20,
49
+ weightPerLengthNPerM: 10.6222,
50
+ spanM: 55,
51
+ elasticModulusGPa: 120,
52
+ crossSectionMM2: 120,
53
+ expansionPerDegC: 1.7e-5,
54
+ },
55
+ [-20, -10, 0, 10, 20, 30, 40],
56
+ );
57
+
58
+ for (const p of curve) {
59
+ console.log(`${p.targetTempDegC}°C T=${p.tensionKN.toFixed(2)} kN f=${p.sagM.toFixed(3)} m`);
60
+ }
61
+ // -20°C T=20.00 kN f=0.201 m
62
+ // -10°C T=17.69 kN f=0.227 m
63
+ // 0°C T=15.45 kN f=0.260 m
64
+ // 10°C T=13.30 kN f=0.302 m
65
+ // 20°C T=11.30 kN f=0.355 m
66
+ // 30°C T= 9.51 kN f=0.422 m
67
+ // 40°C T= 8.00 kN f=0.502 m
68
+ ```
69
+
70
+ This matches <https://www.itswe.com/calculator/tension/> exactly.
71
+
72
+ ## Modules
73
+
74
+ | Status | Calculator | Module |
75
+ |---|---|---|
76
+ | ✅ Available | Tension-temperature installation curve | `tension` |
77
+ | ✅ Available | Pantograph-catenary contact force | `force` |
78
+ | ✅ Available | Ampacity and thermal stability | `ampacity` |
79
+ | ✅ Available | Dropper length | `dropper` |
80
+ | ✅ Available | Wind deflection clearance | `wind` |
81
+ | 📋 Planned | Contact wire wear | `wear` |
82
+ | 📋 Planned | Copper weight | `copper` |
83
+ | 📋 Planned | Compensation stroke | `stroke` |
84
+ | ✅ Available | Wave propagation speed | `wavespeed` |
85
+ | ✅ Available | Voltage drop | `voltage-drop` |
86
+ | ✅ Available | Curve stagger | `curve-stagger` |
87
+ | ✅ Available | Ice load | `icing` |
88
+
89
+ ## Unit conventions
90
+
91
+ | Suffix | Unit | Example |
92
+ |---|---|---|
93
+ | `...KN` | kN | `baseTensionKN`, `tensionKN` |
94
+ | `...N` | N | `residualN` |
95
+ | `...NPerM` | N/m | `weightPerLengthNPerM` |
96
+ | `...M` | m | `spanM`, `sagM` |
97
+ | `...MM` / `...MM2` | mm / mm² | `wireDiameterMM`, `crossSectionMM2` |
98
+ | `...GPa` | GPa | `elasticModulusGPa` |
99
+ | `...PerDegC` | 1/°C | `expansionPerDegC` |
100
+ | `...DegC` | °C | `baseTempDegC` |
101
+
102
+ ## Per-module metadata
103
+
104
+ ```ts
105
+ import { tensionMeta } from 'ocs-calculators';
106
+
107
+ tensionMeta.formula; // state equation, sag, equivalent span, ice load
108
+ tensionMeta.references; // related standards, and whether they define the formula
109
+ tensionMeta.scope; // validity range: span 20-90 m, E 50-200 GPa …
110
+ tensionMeta.disclaimer;
111
+ ```
112
+
113
+ ## ⚠️ Disclaimer
114
+
115
+ **Results are indicative only and are not a substitute for engineering design,
116
+ construction or acceptance documentation.**
117
+
118
+ Always verify against the applicable design documents, the current edition of
119
+ the relevant standards, and the manufacturer's product specifications. Wire
120
+ parameters in `wire-specs.ts` are nominal reference values.
121
+
122
+ See [DISCLAIMER.md](./DISCLAIMER.md).
123
+
124
+ ## Contributing
125
+
126
+ Bug reports on formulas and parameters are the most valuable contribution —
127
+ please open an issue. To add a module, copy the structure of `src/tension/`:
128
+
129
+ ```
130
+ src/<module>/
131
+ ├── index.ts # pure functions, units in variable names
132
+ ├── meta.ts # formula / references / scope / disclaimer
133
+ └── <module>.test.ts # expected values taken from the online calculator
134
+ ```
135
+
136
+ ## License
137
+
138
+ Code: [MIT](./LICENSE). Companion wiki content: CC BY-SA 4.0.
139
+
140
+ ---
141
+
142
+ Maintained by [思维接触网百科](https://www.itswe.com).