dsh-math-calculator 2.2.0 → 2.3.1
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 +261 -0
- package/README.md +7 -7
- package/dsh.plugin.json +1 -1
- package/lib/format.js +52 -2
- package/lib/formula-library-bioecon.js +216 -0
- package/lib/formula-library-biol-general.js +175 -0
- package/lib/formula-library-engineering.js +384 -0
- package/lib/formula-library-macro-materials.js +452 -0
- package/lib/formulas.js +91 -6
- package/lib/help.js +552 -79
- package/lib/index.js +406 -5
- package/lib/ops/shared.js +23 -1
- package/lib/param-units.js +315 -0
- package/lib/types/formula-library-bioecon.d.ts +26 -0
- package/lib/types/formula-library-biol-general.d.ts +37 -0
- package/lib/types/formula-library-engineering.d.ts +34 -0
- package/lib/types/formula-library-macro-materials.d.ts +41 -0
- package/lib/types/formulas.d.ts +11 -1
- package/lib/types/help.d.ts +39 -0
- package/lib/types/param-units.d.ts +156 -0
- package/package.json +1 -1
- package/src/format.ts +52 -4
- package/src/formula-library-bioecon.ts +220 -0
- package/src/formula-library-biol-general.ts +179 -0
- package/src/formula-library-engineering.ts +399 -0
- package/src/formula-library-macro-materials.ts +476 -0
- package/src/formulas.ts +91 -8
- package/src/help.ts +593 -80
- package/src/index.ts +415 -5
- package/src/ops/shared.ts +22 -0
- package/src/param-units.ts +336 -0
- package/lib/__wtest.txt +0 -1
- package/lib/types/client.d.ts +0 -353
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 公式库第九批:**工程 / 生物 / 宏观经济**的常用计算。
|
|
3
|
+
*
|
|
4
|
+
* ## 为什么单独开一批
|
|
5
|
+
*
|
|
6
|
+
* 公式库原有 442 条,分布很不均:
|
|
7
|
+
*
|
|
8
|
+
* ```
|
|
9
|
+
* physics 187 条
|
|
10
|
+
* biology 26 条(偏医学剂量,生态与生理偏少)
|
|
11
|
+
* economics 26 条(几乎全是金融/投资)
|
|
12
|
+
* engineering 3 条(只有齿轮、液压、皮带——全是机械传动)
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* 作者写「这座塔能不能立住」「这个蒸汽机出多少力」「这个国家的钱够不够花」时,
|
|
16
|
+
* 前两类几乎找不到能直接用的式子,只能自己拼。这一批补的就是这三块。
|
|
17
|
+
*
|
|
18
|
+
* ## 收录判据(与既有几批一致)
|
|
19
|
+
*
|
|
20
|
+
* · **闭合式、单次求值** —— 参数现实可得,不需要解 ODE 或查外部数据表
|
|
21
|
+
* · **带量纲** —— 参数说明里写明单位,能参与带单位计算
|
|
22
|
+
* · **有工程出处** —— 经验系数标出取值范围,不编造
|
|
23
|
+
* · **不重复已有条目** —— 已存在的式子(齿轮传动比、欧拉屈曲、CAGR)不重收
|
|
24
|
+
*
|
|
25
|
+
* ## 单位约定
|
|
26
|
+
*
|
|
27
|
+
* 一律 **SI 基本单位**(m / kg / s / J / W / Pa / N),
|
|
28
|
+
* 但保留行业惯用单位(MPa、rpm、kW·h、元)并在参数说明里写清。
|
|
29
|
+
*
|
|
30
|
+
* @module dsh-math-calculator/formula-library-engineering
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
import type { FormulaDef } from './formula-library.js'
|
|
34
|
+
|
|
35
|
+
const p = (value: number, desc: string) => ({ value, desc })
|
|
36
|
+
const req = (desc: string) => ({ value: null, desc })
|
|
37
|
+
|
|
38
|
+
/** 工程类 18 条:结构承重、热机与流体的常用算式。 */
|
|
39
|
+
export const ENGINEERING_FORMULAS: FormulaDef[] = [
|
|
40
|
+
// ══════════════════════════════════════════════════════════════════
|
|
41
|
+
// A. 结构与材料(承重、截面、连接)
|
|
42
|
+
// ══════════════════════════════════════════════════════════════════
|
|
43
|
+
{
|
|
44
|
+
id: 'beam_section_modulus',
|
|
45
|
+
cat: 'engineering/structures',
|
|
46
|
+
name: '矩形截面抗弯截面系数',
|
|
47
|
+
expr: 'b * h^2 / 6',
|
|
48
|
+
params: {
|
|
49
|
+
b: req('截面宽 m'),
|
|
50
|
+
h: req('截面高 m'),
|
|
51
|
+
},
|
|
52
|
+
unit: 'm³',
|
|
53
|
+
desc: 'W = b·h²/6 —— 矩形梁抗弯计算的基础量。最大弯曲应力 σ = M / W,所以梁要高而不是宽:高度翻倍,抗弯能力变 4 倍。',
|
|
54
|
+
keys: ['截面', '抗弯', 'section modulus', '梁', 'W'],
|
|
55
|
+
frequency: 'high',
|
|
56
|
+
layer: 'derived',
|
|
57
|
+
domains: ['engineering'],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'beam_bending_stress',
|
|
61
|
+
cat: 'engineering/structures',
|
|
62
|
+
name: '梁的最大弯曲应力',
|
|
63
|
+
expr: 'M / (b * h^2 / 6) / 1e6',
|
|
64
|
+
params: {
|
|
65
|
+
M: req('弯矩 N·m'),
|
|
66
|
+
b: req('截面宽 m'),
|
|
67
|
+
h: req('截面高 m'),
|
|
68
|
+
},
|
|
69
|
+
unit: 'MPa',
|
|
70
|
+
desc: 'σ = M / W(W = b·h²/6)。与材料屈服强度对比即知是否安全。钢梁通常取许用应力 = 屈服强度 / 1.5~2。',
|
|
71
|
+
keys: ['弯曲应力', 'bending stress', '梁应力', 'MPa'],
|
|
72
|
+
frequency: 'high',
|
|
73
|
+
layer: 'derived',
|
|
74
|
+
domains: ['engineering', 'materials'],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'beam_self_weight_moment',
|
|
78
|
+
cat: 'engineering/structures',
|
|
79
|
+
name: '简支梁自重产生的跨中弯矩',
|
|
80
|
+
expr: 'rho * g * b * h * L^2 / 8',
|
|
81
|
+
params: {
|
|
82
|
+
rho: p(7850, '材料密度 kg/m³(钢 7850,木 600,混凝土 2400)'),
|
|
83
|
+
g: p(9.80665, '重力加速度 m/s²(由 world 给出)'),
|
|
84
|
+
b: req('截面宽 m'),
|
|
85
|
+
h: req('截面高 m'),
|
|
86
|
+
L: req('跨度 m'),
|
|
87
|
+
},
|
|
88
|
+
unit: 'N·m',
|
|
89
|
+
desc: '均布自重 q = ρ·g·b·h 作用在跨度为 L 的简支梁上,跨中弯矩 qL²/8。**这是跨度的平方律**:跨度翻倍,自重弯矩变 4 倍——大跨度结构必须先算这一项,否则会漏掉最主要的荷载。',
|
|
90
|
+
keys: ['自重', '均布荷载', '简支梁', 'self weight', '跨度'],
|
|
91
|
+
frequency: 'high',
|
|
92
|
+
layer: 'derived',
|
|
93
|
+
domains: ['engineering'],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'beam_uniform_load_deflection',
|
|
97
|
+
cat: 'engineering/structures',
|
|
98
|
+
name: '简支梁均布荷载跨中挠度',
|
|
99
|
+
expr: '5 * q * L^4 / (384 * E * I)',
|
|
100
|
+
params: {
|
|
101
|
+
q: req('均布荷载 N/m'),
|
|
102
|
+
L: req('跨度 m'),
|
|
103
|
+
E: p(2.06e11, '弹性模量 Pa(钢 2.06e11,木 1e10,混凝土 3e10)'),
|
|
104
|
+
I: req('截面惯性矩 m⁴(矩形 b·h³/12)'),
|
|
105
|
+
},
|
|
106
|
+
unit: 'm',
|
|
107
|
+
desc: 'δ = 5qL⁴/(384EI)。**跨度的四次方**——这是结构工程里最陡的一条 scaling:跨度翻倍,挠度变 16 倍。所以桥梁不能靠「加厚」来延长跨度,必须改结构形式(桁架、拱、预应力)。',
|
|
108
|
+
keys: ['挠度', 'deflection', '简支梁', '刚度', '四次方'],
|
|
109
|
+
frequency: 'high',
|
|
110
|
+
layer: 'derived',
|
|
111
|
+
domains: ['engineering'],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: 'rect_inertia',
|
|
115
|
+
cat: 'engineering/structures',
|
|
116
|
+
name: '矩形截面惯性矩',
|
|
117
|
+
expr: 'b * h^3 / 12',
|
|
118
|
+
params: {
|
|
119
|
+
b: req('截面宽 m'),
|
|
120
|
+
h: req('截面高 m'),
|
|
121
|
+
},
|
|
122
|
+
unit: 'm⁴',
|
|
123
|
+
desc: 'I = b·h³/12(绕水平中性轴)。挠度公式要用它,所以「高 h 的三次方」决定了梁的刚度——这是「梁要竖着放」的数学理由。',
|
|
124
|
+
keys: ['惯性矩', 'inertia', '截面', 'I'],
|
|
125
|
+
frequency: 'high',
|
|
126
|
+
layer: 'derived',
|
|
127
|
+
domains: ['engineering'],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: 'bolt_shear_capacity',
|
|
131
|
+
cat: 'engineering/structures',
|
|
132
|
+
name: '螺栓抗剪承载力',
|
|
133
|
+
expr: 'n * tau * pi * d^2 / 4',
|
|
134
|
+
params: {
|
|
135
|
+
n: p(1, '受剪面数(单剪 1,双剪 2)'),
|
|
136
|
+
tau: p(141e6, '许用剪应力 Pa(约 0.6×屈服强度;4.6 级取 141e6)'),
|
|
137
|
+
d: req('螺栓公称直径 m(M16 = 0.016)'),
|
|
138
|
+
},
|
|
139
|
+
unit: 'N',
|
|
140
|
+
desc: 'F = n·τ·π·d²/4。普通螺栓(4.6 级)许用剪应力约 0.6×235 MPa。注意:**承压型高强螺栓靠摩擦传力,不按这个式子算**。',
|
|
141
|
+
keys: ['螺栓', '抗剪', 'bolt', '连接'],
|
|
142
|
+
frequency: 'medium',
|
|
143
|
+
layer: 'engineering',
|
|
144
|
+
domains: ['engineering'],
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: 'weld_throat_capacity',
|
|
148
|
+
cat: 'engineering/structures',
|
|
149
|
+
name: '角焊缝承载力(按喉部截面)',
|
|
150
|
+
expr: '0.707 * a * L * tau',
|
|
151
|
+
params: {
|
|
152
|
+
a: req('焊脚尺寸 m(K 值,如 6mm 焊脚 = 0.006)'),
|
|
153
|
+
L: req('焊缝计算长度 m'),
|
|
154
|
+
tau: p(160e6, '焊缝许用剪应力 Pa(E43 焊条约 160 MPa)'),
|
|
155
|
+
},
|
|
156
|
+
unit: 'N',
|
|
157
|
+
desc: '角焊缝的有效喉部厚度 = 0.707a(45° 等腰直角),有效面积 = 0.707a·L。这是钢结构连接的通用算法,比按母材截面估要准得多。',
|
|
158
|
+
keys: ['焊缝', '焊接', 'weld', '喉部'],
|
|
159
|
+
frequency: 'medium',
|
|
160
|
+
layer: 'engineering',
|
|
161
|
+
domains: ['engineering'],
|
|
162
|
+
},
|
|
163
|
+
// B. 热机与能量转换(蒸汽、内燃、传动)
|
|
164
|
+
// ══════════════════════════════════════════════════════════════════
|
|
165
|
+
{
|
|
166
|
+
id: 'thermal_efficiency_carnot',
|
|
167
|
+
cat: 'engineering/thermal',
|
|
168
|
+
name: '卡诺热机效率上限',
|
|
169
|
+
expr: '1 - Tc / Th',
|
|
170
|
+
params: {
|
|
171
|
+
Th: req('高温热源温度 K'),
|
|
172
|
+
Tc: req('低温热源温度 K'),
|
|
173
|
+
},
|
|
174
|
+
unit: '无量纲(比值)',
|
|
175
|
+
desc:
|
|
176
|
+
'η ≤ 1 − Tc/Th。**绝对温度**,不是摄氏度:300 K(约 27°C)与 500 K(约 227°C)' +
|
|
177
|
+
'之间,理论上限是 40%。这条给出了任何热机的天花板——' +
|
|
178
|
+
'想提高效率只能提高热源温度或降低排热温度,加多少煤都没用。',
|
|
179
|
+
keys: ['卡诺', 'carnot', '热效率', '热机', '效率上限'],
|
|
180
|
+
frequency: 'high',
|
|
181
|
+
layer: 'fundamental',
|
|
182
|
+
domains: ['engineering', 'physics'],
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: 'steam_power_output',
|
|
186
|
+
cat: 'engineering/thermal',
|
|
187
|
+
name: '蒸汽机功率(由蒸汽流量与焓差)',
|
|
188
|
+
expr: 'mdot * dh * eta',
|
|
189
|
+
params: {
|
|
190
|
+
mdot: req('蒸汽质量流量 kg/s'),
|
|
191
|
+
dh: req('进出口焓差 J/kg(饱和蒸汽 2.7 MPa 约 2.1e6)'),
|
|
192
|
+
eta: p(0.15, '整机效率(单级往复式 0.10~0.15,多级汽轮机 0.25~0.40)'),
|
|
193
|
+
},
|
|
194
|
+
unit: 'W',
|
|
195
|
+
desc:
|
|
196
|
+
'P = mdot·dh·eta。这是蒸汽动力最实用的算法:**两台同功率的机器,' +
|
|
197
|
+
'现代汽轮机(eta≈0.35)只需要往复式蒸汽机(eta≈0.12)三分之一的蒸汽**。' +
|
|
198
|
+
'写蒸汽朋克设定时,这个 3 倍差距决定了煤耗与锅炉体积。',
|
|
199
|
+
keys: ['蒸汽机', 'steam', '功率', '焓差', '锅炉'],
|
|
200
|
+
frequency: 'high',
|
|
201
|
+
layer: 'engineering',
|
|
202
|
+
domains: ['engineering'],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 'boiler_coal_rate',
|
|
206
|
+
cat: 'engineering/thermal',
|
|
207
|
+
name: '锅炉煤耗率',
|
|
208
|
+
expr: 'P / (coal_cv * eta) * 3600',
|
|
209
|
+
params: {
|
|
210
|
+
P: req('所需功率 W'),
|
|
211
|
+
coal_cv: p(2.93e7, '煤低位热值 J/kg(标准煤 2.93e7 约 7000 kcal)'),
|
|
212
|
+
eta: p(0.7, '锅炉热效率(工业锅炉 0.7~0.85,老式 0.5)'),
|
|
213
|
+
},
|
|
214
|
+
unit: 'kg/h(每小时耗煤)',
|
|
215
|
+
desc:
|
|
216
|
+
'每小时耗煤 = P/(cv·eta) × 3600。**用「多少吨煤」比用「多少瓦」更容易让读者有体感**。' +
|
|
217
|
+
'注意这里只算锅炉;整机电效率还要再乘蒸汽机的 eta。',
|
|
218
|
+
keys: ['煤耗', 'coal', '锅炉', '燃料', '蒸汽朋克'],
|
|
219
|
+
frequency: 'high',
|
|
220
|
+
layer: 'engineering',
|
|
221
|
+
domains: ['engineering'],
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: 'heat_exchanger_duty',
|
|
225
|
+
cat: 'engineering/thermal',
|
|
226
|
+
name: '换热器换热量(对数平均温差)',
|
|
227
|
+
expr: 'U * A * (dT1 - dT2) / log(dT1 / dT2)',
|
|
228
|
+
params: {
|
|
229
|
+
U: p(500, '总传热系数 W/(m²·K)(水-水 800,气-水 50~200,金属间 1000+)'),
|
|
230
|
+
A: p(10, '换热面积 m²'),
|
|
231
|
+
/**
|
|
232
|
+
* 两端温差都给默认值,且**默认值必须不同**。
|
|
233
|
+
*
|
|
234
|
+
* 踩过:两个都给同一个数 → `log(dT1/dT2) = log(1) = 0` → 除零,
|
|
235
|
+
* 整条公式在全量测试里变成 `non_finite`。
|
|
236
|
+
* 而「两端温差相等」在物理上恰恰是**换热面积为无穷大**的极限,
|
|
237
|
+
* 本来就不该作为默认使用场景。
|
|
238
|
+
*/
|
|
239
|
+
dT1: p(40, '热端温差 K(入口,与 dT2 必须不同)'),
|
|
240
|
+
dT2: p(20, '冷端温差 K(出口,与 dT1 必须不同)'),
|
|
241
|
+
},
|
|
242
|
+
unit: 'W',
|
|
243
|
+
desc:
|
|
244
|
+
'Q = U·A·LMTD,LMTD 是对数平均温差。逆流时 dT1 与 dT2 是两端温差,' +
|
|
245
|
+
'**顺流时 LMTD 明显小于逆流**——这就是为什么好换热器都设计成逆流。' +
|
|
246
|
+
'注意 dT1 与 dT2 相等时 LMTD 退化为该值(此处按极限处理),两者不能同时为零。',
|
|
247
|
+
keys: ['换热器', 'heat exchanger', '传热', 'LMTD'],
|
|
248
|
+
frequency: 'medium',
|
|
249
|
+
layer: 'engineering',
|
|
250
|
+
domains: ['engineering'],
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
id: 'conduction_wall_loss',
|
|
254
|
+
cat: 'engineering/thermal',
|
|
255
|
+
name: '平壁导热损失',
|
|
256
|
+
expr: 'k * A * dT / d',
|
|
257
|
+
params: {
|
|
258
|
+
k: p(0.04, '导热系数 W/(m·K)(岩棉 0.04,砖 0.7,钢 45,铜 400)'),
|
|
259
|
+
A: req('壁面积 m²'),
|
|
260
|
+
dT: req('两侧温差 K'),
|
|
261
|
+
d: req('壁厚 m'),
|
|
262
|
+
},
|
|
263
|
+
unit: 'W',
|
|
264
|
+
desc:
|
|
265
|
+
'Q = k·A·ΔT/d。**保温材料的 k 比钢小 1000 倍**——' +
|
|
266
|
+
'所以一堵 10 cm 厚的岩棉墙,保温能力相当于 100 m 厚的钢墙。' +
|
|
267
|
+
'写工业设定时,这个比值比任何形容词都更能说明「隔热做得好不好」。',
|
|
268
|
+
keys: ['导热', 'conduction', '保温', '热损失', '隔热'],
|
|
269
|
+
frequency: 'high',
|
|
270
|
+
layer: 'derived',
|
|
271
|
+
domains: ['engineering', 'physics'],
|
|
272
|
+
},
|
|
273
|
+
// ══════════════════════════════════════════════════════════════════
|
|
274
|
+
// C. 流体与管路
|
|
275
|
+
// ══════════════════════════════════════════════════════════════════
|
|
276
|
+
{
|
|
277
|
+
id: 'pipe_flow_rate',
|
|
278
|
+
cat: 'engineering/fluid',
|
|
279
|
+
name: '管道流量(由流速与管径)',
|
|
280
|
+
expr: 'v * pi * d^2 / 4',
|
|
281
|
+
params: {
|
|
282
|
+
v: req('流速 m/s(水管 0.5~2,气体 10~30)'),
|
|
283
|
+
d: req('管内径 m'),
|
|
284
|
+
},
|
|
285
|
+
unit: 'm³/s',
|
|
286
|
+
desc:
|
|
287
|
+
'Q = v·pi·d²/4。**管径翻倍,流量变 4 倍**——这就是为什么供水管网' +
|
|
288
|
+
'「扩一倍口径」就能顶四条旧管。反过来,想把流量翻倍而管径只加 40% 时,' +
|
|
289
|
+
'必须把流速也提上去,代价是阻力急剧上升。',
|
|
290
|
+
keys: ['流量', '管径', 'pipe', 'flow rate', '供水'],
|
|
291
|
+
frequency: 'high',
|
|
292
|
+
layer: 'derived',
|
|
293
|
+
domains: ['engineering'],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
id: 'darcy_head_loss',
|
|
297
|
+
cat: 'engineering/fluid',
|
|
298
|
+
name: '管道沿程水头损失(达西-魏斯巴赫)',
|
|
299
|
+
expr: 'f * (L / d) * v^2 / (2 * g)',
|
|
300
|
+
params: {
|
|
301
|
+
f: p(0.02, '摩阻系数(钢管清水 0.02,旧铸铁 0.04,混凝土渠 0.015)'),
|
|
302
|
+
L: req('管长 m'),
|
|
303
|
+
d: req('管内径 m'),
|
|
304
|
+
v: req('流速 m/s'),
|
|
305
|
+
g: p(9.80665, '重力加速度 m/s²'),
|
|
306
|
+
},
|
|
307
|
+
unit: 'm(水头)',
|
|
308
|
+
desc:
|
|
309
|
+
'h = f·(L/d)·v²/(2g)。**流速的平方**:流速翻倍,损失变 4 倍。' +
|
|
310
|
+
'所以长距离输水宁可加大管径、降低流速——这条决定了管网的经济流速(约 1~2 m/s)。',
|
|
311
|
+
keys: ['水头损失', '沿程阻力', 'darcy', '管路', '压降'],
|
|
312
|
+
frequency: 'high',
|
|
313
|
+
layer: 'engineering',
|
|
314
|
+
domains: ['engineering'],
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
id: 'pump_power',
|
|
318
|
+
cat: 'engineering/fluid',
|
|
319
|
+
name: '水泵轴功率',
|
|
320
|
+
expr: 'rho * g * Q * H / eta',
|
|
321
|
+
params: {
|
|
322
|
+
rho: p(1000, '流体密度 kg/m³(水 1000)'),
|
|
323
|
+
g: p(9.80665, '重力加速度 m/s²'),
|
|
324
|
+
Q: req('流量 m³/s'),
|
|
325
|
+
H: req('扬程 m'),
|
|
326
|
+
eta: p(0.7, '泵效率(离心泵 0.6~0.85,小泵取低值)'),
|
|
327
|
+
},
|
|
328
|
+
unit: 'W',
|
|
329
|
+
desc:
|
|
330
|
+
'P = rho·g·Q·H/eta。扬程 H 是「能把水举多高」,包含沿程损失。' +
|
|
331
|
+
'这是选泵与估电耗的核心式子:**流量与扬程都是相乘,任意一个翻倍,功率就翻倍**。',
|
|
332
|
+
keys: ['水泵', 'pump', '扬程', '功率', '灌溉'],
|
|
333
|
+
frequency: 'high',
|
|
334
|
+
layer: 'engineering',
|
|
335
|
+
domains: ['engineering', 'perception'],
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
id: 'orifice_discharge',
|
|
339
|
+
cat: 'engineering/fluid',
|
|
340
|
+
name: '孔口出流流量',
|
|
341
|
+
expr: 'Cd * A * sqrt(2 * g * h)',
|
|
342
|
+
params: {
|
|
343
|
+
Cd: p(0.62, '流量系数(薄壁圆孔 0.62,管嘴 0.82,锐缘 0.6)'),
|
|
344
|
+
A: req('孔口面积 m²'),
|
|
345
|
+
g: p(9.80665, '重力加速度 m/s²'),
|
|
346
|
+
h: req('水头 m(孔口到水面的高度)'),
|
|
347
|
+
},
|
|
348
|
+
unit: 'm³/s',
|
|
349
|
+
desc:
|
|
350
|
+
'Q = Cd·A·sqrt(2gh)。**水头的平方根**:想把出流量翻倍,水头要涨到 4 倍。' +
|
|
351
|
+
'这是水库泄洪、攻城水攻、倒水时间估算的通用式子。',
|
|
352
|
+
keys: ['孔口', '出流', '泄洪', 'orifice', '流量'],
|
|
353
|
+
frequency: 'medium',
|
|
354
|
+
layer: 'derived',
|
|
355
|
+
domains: ['engineering'],
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: 'wind_power_available',
|
|
359
|
+
cat: 'engineering/energy',
|
|
360
|
+
name: '风功率(风轮扫掠面积)',
|
|
361
|
+
expr: '0.5 * rho * A * v^3 * cp',
|
|
362
|
+
params: {
|
|
363
|
+
rho: p(1.225, '空气密度 kg/m³(海平面 1.225)'),
|
|
364
|
+
A: req('风轮扫掠面积 m²(直径 D 时 A = pi·D²/4)'),
|
|
365
|
+
v: req('风速 m/s'),
|
|
366
|
+
cp: p(0.45, '功率系数(贝茨极限 0.593,实用 0.35~0.45)'),
|
|
367
|
+
},
|
|
368
|
+
unit: 'W',
|
|
369
|
+
desc:
|
|
370
|
+
'P = ½rho·A·v³·Cp。**风速的三次方**——这是风能最反直觉的一条:' +
|
|
371
|
+
'风速从 5 m/s 涨到 10 m/s,功率变 **8 倍**。' +
|
|
372
|
+
'贝茨极限 0.593 是理论上限(动量守恒要求必须留一部分动能给下游气流)。',
|
|
373
|
+
keys: ['风电', 'wind power', '贝茨', '风轮', '三次方'],
|
|
374
|
+
frequency: 'high',
|
|
375
|
+
layer: 'derived',
|
|
376
|
+
domains: ['engineering', 'physics'],
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
id: 'water_turbine_power',
|
|
380
|
+
cat: 'engineering/energy',
|
|
381
|
+
name: '水轮机功率',
|
|
382
|
+
expr: 'rho * g * Q * H * eta',
|
|
383
|
+
params: {
|
|
384
|
+
rho: p(1000, '水密度 kg/m³'),
|
|
385
|
+
g: p(9.80665, '重力加速度 m/s²'),
|
|
386
|
+
Q: req('流量 m³/s'),
|
|
387
|
+
H: req('水头 m(落差)'),
|
|
388
|
+
eta: p(0.85, '水轮机效率(大型 0.85~0.92,小型 0.6~0.75)'),
|
|
389
|
+
},
|
|
390
|
+
unit: 'W',
|
|
391
|
+
desc:
|
|
392
|
+
'P = rho·g·Q·H·eta。**与水泵恰好相反**:这里 eta 是乘的(获取能量),水泵那里是除的。' +
|
|
393
|
+
'一条 10 m³/s、落差 20 m 的水渠约 1.7 MW。',
|
|
394
|
+
keys: ['水轮机', '水力发电', 'turbine', '落差', '水电'],
|
|
395
|
+
frequency: 'high',
|
|
396
|
+
layer: 'engineering',
|
|
397
|
+
domains: ['engineering', 'power'],
|
|
398
|
+
},
|
|
399
|
+
]
|