计算colebrook-white近似的一个小模块

colebrook的Python项目详细描述


科尔布鲁克.py

当前状态:开发

版本:20190213

目录

待办事项

  • 增加了进一步的逼近函数。
  • 为超出给定公式范围的参数添加警告。

免责声明

不保证准确性,请与其他来源确认结果。

背景

colebrook-white方程用于求解Darcy Friction Factor(f),用于确定管流和明渠流中的摩擦损失。

方程式用以下公式表示:

ParametersDescription
Reynolds NumberA dimensionless value that describes the type of flow - As per
Pipe Relative RoughnessA value which describes the roughness of the pipe material compared to its inner diameter.

此模块实现了用于管道流量计算的函数的各种近似。

如何使用

用作模块

每一个近似都将雷诺兹数和相对粗糙度作为所需参数,以有效的数字作为可选参数,格式为

例如:

importcolebrookfactor=colebrook.sjFriction(60000,0.0023)print(factor)

哪个输出

0.027

用作独立应用程序

从命令行运行脚本的能力也有限。脚本将针对所有可用函数运行。

python colebrook.py <reynolds number> <roughness> [Optional Significant figures]$ python colebrook.py 600000.0023
Ensure values are within range of applicability for equations (specifically around transition and laminar region)!|METHOD          | VALUE  |---------------------------|sjFriction      | 0.027  ||bntFriction     | 0.0203 ||fngFriction     | 0.0267 ||akFriction      | 0.0262 ||bkcFriction     | 0.0271 ||eptFriction     | 0.0269 |DISCLAIMER: Use secondary verification. No guarantee of accuracy

colebrook-white近似值

本模块提供以下功能。它们改编自维基百科页面。

FUNCTIONAMEAUTHORYEARVALIDITY RANGEREF
sjFriction()Swamee and Jain1976Re= 5000 to 10^8 and e/D = 0.00001 - 0.05Paper
btnFriction()Bellos, Nalbantis, Tsarkris2018All Flow RegimesPaper
fngFriction()Fang et al.2011R>=2300Paper
eptFriction()Evangelides, Papaevangelou, Tzimopoulos2010R>=2300Paper
akFriction()Avci, Kargoz2009R>=2300Paper
bkcFriction()Brkic2011R>=2300Paper

修订历史

REVISIONDESCRIPTION
20190213Initial Development Version

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带有本地和在线数据库的java桌面应用程序   corePoolSize=0的java ScheduledThreadPoolExecutor会在一个CPU内核上产生100%的负载   Java打印2D数组,就像带边框的表格一样   优化有没有办法通过方法回调在代码中捕获Java中的对象分配?   java为什么我的变量不能工作?   jface树项上的java刷新存在绘制问题   内存管理在Java中如何在一行中返回数组?   java向云端点添加参数会导致404 GoogleJsonResponseException   java如何定义webservice端点url   来自play store的安卓 AdneEngine错误:java。lang.NoSuchMethodError   java是否可以在Gluon移动应用程序中加载网页?   java Maven OSGi项目已编译,但不会运行   java如何修复布局抖动?   xml Java SoapMessage添加空命名空间   在Java中从派生类调用基类构造函数   java使用netbeans从jtable中的mysql检索数据   使用FIPS 1402库在Java中创建OpenPGP消息的加密   java编程语言的第二个实现可以用这种语言编写吗?   java如何使用带多个参数的分隔符