Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
home_server:mswindows_notes [2024-03-14 Thu wk11 05:31] – [friction factor calculation] baumkp | home_server:mswindows_notes [2024-03-14 Thu wk11 05:39] – [friction factor calculation] baumkp |
---|
====friction factor calculation==== | ====friction factor calculation==== |
Earlier in my engineering career I used Lotus123 and MSExcel with iteration to calculate the friction factor of piping with Newtonian fluid according to the [[https://en.wikipedia.org/wiki/Darcy_friction_factor_formulae#Colebrook%E2%80%93White_equation|Darcy friction factor formulae]]. To remove the iteration from the spreadsheet I wrote a simple VB script that took care of this. When I get the change I will copy the script here. | Earlier in my engineering career I used Lotus123 and MSExcel with iteration to calculate the friction factor of piping with Newtonian fluid according to the [[https://en.wikipedia.org/wiki/Darcy_friction_factor_formulae#Colebrook%E2%80%93White_equation|Darcy friction factor formulae]]. To remove the iteration from the spreadsheet I wrote a simple VB script that took care of this. When I get the change I will copy the script here. |
<code basic> | ++++VSBasic code for Colebrook Equation| |
'Public Re As Double 'Reynold number unitless 0<Re<10E9 | <code basic>'Public Re As Double 'Reynold number unitless 0<Re<10E9 |
'Public Rr As Double 'Relative Roughness unitless | 'Public Rr As Double 'Relative Roughness unitless |
Public Ff As Double 'Friction Factor unitless | Public Ff As Double 'Friction Factor unitless |
'Static Function Log10(X) | 'Static Function Log10(X) |
' Log10 = Log(X) / Log(10#) | ' Log10 = Log(X) / Log(10#) |
'End Function | 'End Function</code>++++ |
</code> | |
As can be seen in the wiki page, [[https://en.wikipedia.org/wiki/Darcy_friction_factor_formulae#Colebrook%E2%80%93White_equation|Darcy friction factor formulae]], there are reasonably accurate equations that approximate the Colebrook equation that are available that do not require iterations to solve. I believe the VBscript is simpler and not an approximation..... | As can be seen in the wiki page, [[https://en.wikipedia.org/wiki/Darcy_friction_factor_formulae#Colebrook%E2%80%93White_equation|Darcy friction factor formulae]], there are reasonably accurate equations that approximate the Colebrook equation that are available that do not require iterations to solve. I believe the VBscript is simpler and not an approximation..... |
| |