Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Discharge flow calculation 1

Status
Not open for further replies.

BlueR

Civil/Environmental
Aug 23, 2007
2
I am looking to calculate the discharge flow from a 6" outlet pipe (pvc). I am using manning's, but am not sure I have taken into account the wetted perimeter correctly (depth of flow). Does anyone have an excel program that may work? Thank you.
 
Replies continue below

Recommended for you

If it is gravity flow you, want to determine, there are charts that are more readily available. Typically they denote the flows for different grades and how full the pipe is. They are based upon Manning. Check one of those out.
 
Yes, gravity flow. Thanks, I will look for a published chart. If you have a suggestion on where to find one that shows varying depths of flow, that would be appreciated.
 
If you cannot find the diagram previously mentioned, the fifth Edition of the "Handbook of Hydraulics" by King & Brater (1963), on page 7-3 has diagrams for specific channel shapes, and the wetted perimeter formulas for each.

Been using it for years. No worries.

Mike McCann
McCann Engineering
 
Forgot to mention that the tables you need to go alongwith the formulas are on pages 7-25 through 7-60. Hope you can find the book. It's very helpful.

Mike McCann
McCann Engineering
 
I use Frankel's Facility Piping Systems Handbook.

I tried to google to find a simple pdf and could not find the tables. I found equations and nomographs which could also be used.
 
I do find it a little disconcerting that as qulaifiied engineers/technicians we cannot calculate the area and perimiter of a segment of a cricle and have to resort to tables and graphs published in handbooks.

 
I agree with that somewhat. But why reinvent the wheel.

I could calculate the wetted perimeter and the density of the water to get the actual volume of the water I want to calculate the flow for. I could solve Bernoulli's equation and calculate the appropriate friction factor for the type of pipe and get the flow to 3 significant figures. And that might take me up to an hour to do it.

Or I can pull out my book where other engineers have done these calculations and have published the table for other engineers to use and it takes me about 5 minutes to come up with the answer.

What I find disconcerting is that sometimes engineers do not know the calculations behind the tables they are using and get a very wrong answer and do not have the common sense to know that their answer is wrong.
 
BlueR,

I have written VBA functions for MS Excel
to calculate partial flow in circular pipes to find depth vs. flow/froude number/velocity etc.; or to calculate hydraulic radius etc.

let me know if you want to use it.


 
I made my own spreadsheet. It tells me the velocity and q for any depth,any slope any pipe, as long as I have a decent 'n' value. It also gives me a vol. of dirt in a partially filled pipe. So I know what volume has to be removed. All you need is a few simple area formulae and a little imagination. Of course 2nd year high school algebra helps. Pedarrin2's comment is also very true.

Richard A. Cornelius, P.E.
 
elev8848, I just came across this thread, and am trying to do what it sounds like you have already done in excel. Mind sharing?
 
JFergus,

Sorry for late reply. Didn't follow the thread for a while. I will respond from home in the evening.
 
.

BlueR wrote: "I am looking to calculate the discharge flow from a 6" outlet pipe (pvc). I am using manning's, but am not sure I have taken into account the wetted perimeter correctly (depth of flow). Does anyone have an excel program that may work? Thank you."

Available free software applications for this include CDSS, HEC-RAS, HLW, HY8, HydroCulv, SWMM, and WSPro. I suggest HLW for quick calculations and SWMM for partially filled conduits. Download links for these are at " There are several hydraulic spreadsheets at the HHWQ site as well. The "Bruce Hunt PhD: Software and PDF Texts" has links to a fluid mechanics text which will provide information on wetted perimeter.

As a side note, you might be interested in using OpenOffice (from Sun Microsystems) as an alternative to Microsoft Office applications (such as Excel). I highly recommend OpenOffice. It is completely free and open source. You might also be interested in Gnumeric, another spreadsheet software application that is also free and open source. I don't use it, but it appears highly recommended. Microsoft Office files (such as Excel) are supported by both OpenOffice and Gnumeric.

.


tsgrue: site engineering, stormwater
management, landscape design, ecosystem
rehabilitation, mathematical simulation
 
'JFergus: here it is! Not the best algorithm but works!
'It was a learning process
'VBA FUNCTIONS FOR PARTIAL FLOW IN CIRCULAR PIPE
Option Explicit
Global Const Pi = 3.141592654

Function radFt(diaFt As Double)
'radius in Feet
radFt = diaFt / 2
End Function
Function circm(diaFt As Double)
'circumference
circm = Pi * diaFt
End Function
Function area(diaFt As Double)
'Cross sectional area
area = Pi * diaFt * diaFt / 4
End Function
Function theta(diaFt As Double, Y As Double)
'theta radians = half of angle at the center
'y = partial fill depth

Dim R As Double
R = radFt(diaFt)
'Four possibilities
'case 1: y<R
If Y < R Then
theta = Atn((diaFt * Y - Y * Y) ^ (0.5) / (R - Y))
Else
'case 2: y=R
If Y = R Then
theta = Pi / 2
Else
'case 3: 2R>y>R
If Y > R And Y < diaFt Then
theta = Pi + Atn((diaFt * Y - Y * Y) ^ (0.5) / (R - Y))
Else
'case 4: y>=2R
theta = Pi
End If
End If
End If
End Function
Function wetP(diaFt As Double, Y As Double)
'Wetted Perimeter
wetP = theta(diaFt, Y) * diaFt
End Function
Private Function tArea(diaFt As Double)
'cross sectional area
'also defined earlier as area()
tArea = Pi * diaFt * diaFt / 4
End Function
Function flowArea(diaFt As Double, Y As Double)

'Partial Flow Area
Dim R As Double
R = radFt(diaFt)
Dim sect As Double 'sectoral area
Dim tri As Double 'triangular area
sect = theta(diaFt, Y) * tArea(diaFt) / (Pi)
tri = Abs(R - Y) * (Abs(Y * diaFt - Y * Y)) ^ 0.5

'Four conditions
If Y < R Then
flowArea = sect - tri
Else
If Y = R Then
flowArea = sect
Else
If Y > R And Y < diaFt Then
flowArea = sect + tri
Else
'If y >= diaFt Then flowArea = sect
flowArea = sect
End If
End If
End If
End Function
Function hydR(diaFt As Double, Y As Double)
'Hydraulic Radius
If Y = 0 Then
hydR = 0
Else
hydR = flowArea(diaFt, Y) / wetP(diaFt, Y)
End If
End Function
Function fullQ(diaFt As Double, n As Double, s As Double)
'Full bore flow using Manning's Eqn
'Unit cfs
fullQ = 1.486 / n * tArea(diaFt) * (diaFt / 4) ^ (2 / 3) * s ^ 0.5
End Function
Function partialQ(diaFt As Double, Y As Double, n As Double, s As Double)
'Partially filled flows as open channel
'Manning's Eqn
'Unit cfs
partialQ = 1.486 / n * flowArea(diaFt, Y) * hydR(diaFt, Y) ^ (2 / 3) * s ^ 0.5
End Function

Function topWid(diaFt As Double, Y As Double)
'Top free surface width
Dim R As Double
R = radFt(diaFt)
'Four cases
If Y <= R Then
topWid = 2 * (R ^ 2 - (R - Y) ^ 2) ^ 0.5
Else
If Y > R And Y < diaFt Then
topWid = 2 * (Y * diaFt - Y * Y) ^ 0.5
Else
'If y > diaFt Then topWid = 0
topWid = 0
End If
End If
End Function
Function vel(diaFt As Double, Y As Double, n As Double, s As Double)
'Velocity for a particular depth for partial Flow
If Y = 0 Then
vel = 0
Else
vel = partialQ(diaFt, Y, n, s) / flowArea(diaFt, Y)
End If
End Function
Function Froude(diaFt As Double, Y As Double, n As Double, s As Double)
'Froude's Number for a given depth of flow
'Froude=partialQ^2*topWid/32.2/flowArea^3
Dim Q As Double
Dim T As Double
Dim a As Double
Q = partialQ(diaFt, Y, n, s) 'Partial Flow
T = topWid(diaFt, Y)
a = area(diaFt)

Froude = Q ^ 2 * T / a ^ 3 / 32.2

End Function




Function yNormal(diaFt As Double, n As Double, s As Double, givenQ As Double)
'How to converge on the answer fast?
'Normal Depth for a given flow Q
'Unit is Feet




Dim Y As Double 'Trial y
Dim calcQ As Double 'calculated Q
Dim loopCount As Double 'erase later
Dim errorQ As Double
errorQ = 0.001

Dim yMax As Double
Dim yMin As Double

yMax = diaFt 'initial assumption
yMin = 0 'initial assumption
Y = (yMax + yMin) / 2




'Normal depth has no meaning for pressurzied pipe
'Pressurized if givenQ > capacity
If givenQ > fullQ(diaFt, n, s) Then
Y = diaFt
'MsgBox "Pressurized Flow, exceeded open channel flow capacity" _

Else

Do While (Abs(partialQ(diaFt, Y, n, s) - givenQ) > errorQ)
loopCount = loopCount + 1
calcQ = partialQ(diaFt, Y, n, s)
'Three Conditions
'(calcQ>givenQ) or (calcQ<givenQ) or both equal
If calcQ = givenQ Then
'go out of loop
Else
If (calcQ > givenQ) Then
'y solution is smaller than y assumed
yMax = Y
yMin = yMin
Else
'y solution is greater than y assumed
yMax = yMax
yMin = Y
End If
Y = (yMax + yMin) / 2
End If

Loop
End If
'MsgBox "loopCount for yNormal = " & loopCount
yNormal = Y 'Return result
End Function


Function poly(diaFt As Double, anyQ As Double, assumedY As Double)
poly = flowArea(diaFt, assumedY) ^ 3 / topWid(diaFt, assumedY) - anyQ ^ 2 / 32.2
End Function
Function polySolve(P As Double, diaFt As Double, givenQ As Double)
'solve equation poly for P
' poly(y)=P: find y
Dim loopCount As Double
Dim Y As Double
Dim yMax As Double
Dim yMin As Double
Dim error As Double
'Initialize
error = 0.00001
yMax = diaFt
yMin = 0
Y = (yMax + yMin) / 2

If loopCount > 5000 Then
polySolve = 999 'flagging error
Else
Do While (Abs(poly(diaFt, givenQ, Y)) > error)
loopCount = loopCount + 1

If poly(diaFt, givenQ, Y) > 0 Then
yMax = Y
Else
yMin = Y
End If
Y = (yMax + yMin) / 2
Loop
End If
' MsgBox "loop count = " & loopCount
polySolve = Y
End Function
Function Froude1(diaFt As Double, yTest As Double, knownQ As Double)
'Used for yc calculation
'Froude1: Froude Number for given dia, known Q but test depth
'only to be called by function to calculate the critical depth
Froude1 = (knownQ ^ 2 * topWid(diaFt, yTest) / flowArea(diaFt, yTest) ^ 3 / 32.2) ^ (0.5)
End Function

Public Function yc(diaFt As Double, knownQ As Double)
'better use this to calc critical depth
Dim max As Double
Dim min As Double
Dim yTry As Double
Dim loopCount As Integer
max = diaFt
min = 0
yTry = (max + min) / 2

If knownQ <= 0 Then
yc = 0
Else

Do While (Abs(Froude1(diaFt, yTry, knownQ) - 1) > 0.000001) And loopCount < 100
loopCount = loopCount + 1
If Froude1(diaFt, yTry, knownQ) < 1 Then
max = yTry
Else
min = yTry
End If
yTry = (max + min) / 2
Loop
'MsgBox "loop count = " & loopCount
yc = yTry
End If

End Function

Sub examples()
Dim msg As String
'example 1
msg = "Full Flow example 1 = " & fullQ(1.5, 0.013, 0.027) & " cfs"
MsgBox msg
msg = "Partial Flow example 2 = " & partialQ(1.5, 0.5, 0.013, 0.027) & " cfs"
MsgBox msg
msg = "Froude# example 3 = " & Froude(1.5, 0.6, 0.013, 0.035)
MsgBox msg
msg = "Velocity example 4 = " & vel(1.5, 0.5, 0.013, 0.027) & " ft/sec"
MsgBox msg

End Sub
 
For interested ones:

To use the VBA, copy the entire code into a module. The last subroutine is an example. The functions are more useful when used in a spreadsheet.

Verify few results with tables or calculations.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor