Calculating hydrant flow formula with field calculator or Python

1467
2
Jump to solution
07-06-2016 11:40 AM
KyleCrawford2
New Contributor III

I am currently managing a hydrant inspection project and was tasked with automating the hydrant flow formula @ 20 psi and 0 psi. I opted to test the formula out in Field Calculator using Python but end up with the wrong values. I know this should have been simple to figure out but any help would be appreciated.

Formula: Flow @ 20 psi = Test flow (gpm) x ((Static – 20) / (Static – residual))^0.54

Field Calculator using Python Parser = !DISCHARGEGPM! * (( !STATICPSI! - 20) / ( !STATICPSI! - !RESIDUALPSI! )) ** 0.54

Example

Discharge GPM: 1190

Static PSI: 66

Residual PSI: 50

1190  x ((66 – 20) / (66 – 50)) ^ 0.54 = 2105 GPM

Field Calculator Result = 1730 GPM

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Esteemed Contributor

assuming the brackets are right, you might be getting integer division soooo,

!DISCHARGEGPM! * (( !STATICPSI! - 20.0) / ( !STATICPSI! - !RESIDUALPSI! )) ** 0.54

View solution in original post

2 Replies
DanPatterson_Retired
MVP Esteemed Contributor

assuming the brackets are right, you might be getting integer division soooo,

!DISCHARGEGPM! * (( !STATICPSI! - 20.0) / ( !STATICPSI! - !RESIDUALPSI! )) ** 0.54

KyleCrawford2
New Contributor III

Thanks Dan that was in fact the issue!

0 Kudos