Hydraulic Pipe
Hydraulics
运行在线示例
免费 · 无需注册 · 直接在浏览器中运行
液压管道是端口 A 与 B 之间的直圆管或软管。其压降随流量变化:低雷诺数(层流)时成正比,高雷诺数(湍流)时近似平方关系。
流动可双向;正流量为从 A 到 B。
实际工程类比: 代表刚性高压钢管或钢丝编织高压胶管,连接液压泵、阀门与油缸,具备沿程阻力损失。
数学模型
其中:
Re = ρ|v|D/μ,v = q/A,A = πD²/4f为 Haaland 摩擦系数:1/√f = −1.8·log10((ε/D/3.7)^1.11 + 6.9/Re)- 在 Re 2000 到 4000 之间两者平滑过渡(数值与斜率连续)
输入与输出
| Direction | ID | Label | 类型 | Status |
|---|---|---|---|---|
| → In | p |
A | number | Required |
| → In | n |
B | number | Required |
| → In | H |
H | number | Optional |
| ← Out | q_diss |
Q_diss | number | Output |
参数
| 参数 | Label | 类型 | 默认值 | 描述 |
|---|---|---|---|---|
length |
Length | number | 1 |
Pipe length |
diameter |
Inner diameter | number | 0.01 |
Hydraulic (inner) diameter |
roughness |
Roughness | number | 0.0000015 |
Absolute wall roughness; 1.5 µm is drawn tube |
fluid_inertia |
Fluid inertia | boolean | true |
Mass of the fluid column (ρ·L/A): pressure surges such as water hammer |
segments |
Wave sections | number | 1 |
Pieces of a travelling-wave (Bergeron) line, so pressure waves arrive after L/a (needs Fluid inertia) |
wall_thickness |
Wall thickness | number | 0.002 |
With the wall modulus, sets the wave speed (Korteweg); used with wave sections |
wall_modulus |
Wall elastic modulus | number | 210000000000 |
Young's modulus of the wall: steel 2.1e11 Pa, PVC about 3e9 Pa |
使用示例
阀门在溢流阀前关闭
示例 examples/basic-hydraulicpipe.json 由 20 bar 油源经管道向阀门供油。管路压力稳定在约 15.8 bar;t = 0.5 s 时阀门关至 10%,18 bar 溢流阀接管流量。请用 TR-BDF2 运行。
阀门关闭时的水锤
示例 examples/water-hammer.json 让 5 bar 的水流过一根 100 m、带流体惯性的刚性管道,t = 0 时已在流动(供液端开启 steady_start)。在 t = 1 s 时阀门瞬间关闭;阀门处压力从 4.7 bar 跃升到约 33 bar(与茹科夫斯基 ρ·a·v₀ 相差 0.5%),随后围绕供水压力振荡。
钢管中的压力波
示例 examples/water-hammer-wave.json 让 20 bar 的水流过 500 m 钢管(D = 0.1 m,壁厚 5 mm,a ≈ 1350 m/s),由 8 段 Bergeron 管线组成,t = 0 时已在流动。阀门在 t = 1 s 关闭时,阀门处压力上升约 13 bar,在波传到供液端并返回的恰好 2L/a ≈ 0.74 s 内保持,然后降到供液压力以下。
说明与最佳实践
- 水锤默认开启(
fluid_inertia,segments= 1),网络从稳态开始(FluidReservoir 上的steady_start)。 - 表压:所有液压压力均相对于环境;开口油箱为 0 Pa。
- 单位:压力用 Pa(1 bar = 100 000 Pa),流量用 m³/s(1 L/min ≈ 1.667e-5 m³/s)。
- 不含气蚀:压力波在此可能使表压低于 −1 bar;真实液体会汽化(液柱分离)。