Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168742
Image: ubuntu2004

Problem 4

Water discharges at the rate of 10,000 cfs over a rectangular spillway 40 feet wide into a stilling basin of the same width. The lake level behind the spillway is at an elevation of 200 feet. The river level downstream is at an elevation of 100 feet. You need to protect the downstream river reach from incision due to the supercritical flow flowing out of the lake. To do this, you plan to design an energy dissipation basin where a hydraulic jump forms and the flow conditions are changed from supercritical to subcritical. Assuming no energy is dissipated in the flow down the spillway, find the basin invert level required for a hydraulic jump to form within the basin.

Variables

First, we define variables of interest-- water surface elevation at y2 and y3 and the unknown elevation of the stilling basin.

y2, y3, z = var('y2 y3 z')

Energy Equation

The energy equation expresses the relationship between the the elevation head in the reservoir and the specific energy in the stilling basin just prior to the hydraulic jump.

energyEquation = y2 + 10000^2/(2*32.2*(40*y2)^2) + z == 200

Momentum Equation

The momentum equation expresses the conservation of momentum through the hydraulic jump and relates y2 to y3.

momentumEquation = 40*y2^2/2 + 10000^2/(32.2*40*y2) == 40*y3^2/2+10000^2/(32.2*40*y3)

Known Information

The water surface elevation at y3 is known to be 100ft above the horizontal datum.  The unknown is the distance, z, between the datum and the bottom of the stilling basin.

knownY3 = y3 == 100 - z

Check Equations

We can check that the equations were entered correctly by printing out the equation objects-- Sage even supports pretty-printing of the equations so we can read them easily.

pretty_print( energyEquation )
\newcommand{\Bold}[1]{\mathbf{#1}}y_{2} + z + \frac{1}{y_{2}^{2}} = 200
pretty_print( momentumEquation )
\newcommand{\Bold}[1]{\mathbf{#1}}20 \, y_{2}^{2} + \frac{1}{y_{2}} = 20 \, y_{3}^{2} + \frac{1}{y_{3}}
pretty_print( knownY3 )
\newcommand{\Bold}[1]{\mathbf{#1}}y_{3} = -z + 100

Solve the System

Using the three equations that have been defined so far, a system of nonlinear equations may be formed and solved for the three unknowns y2, y3 and z.  This is done with the solve() function.

solution = solve( [ energyEquation, momentumEquation, knownY3 ], y2,y3,z )

View the Results

The system of three nonlinear equations has many solutions-- but which one is right?  Wrapping the solution object in pretty_print(Matrix(  )) formats the output nicely for interpretation.  The only set of solutions that make sense for this problem are those in the second row where y2 = 2.69 ft, y3 = 36.65 ft and z = 63.34 feet.

pretty_print(Matrix( solution ))
\newcommand{\Bold}[1]{\mathbf{#1}}\left(y2=49.0151187905y3=(50.5809248555)z=150.580912863y2=2.69155446756y3=36.6554809843z=63.3445121951y2=(2.965562977580.497581433136i)y3=(1.5129718770735.528534053i)z=(101.512971877+35.528534053i)y2=(2.96556297758+0.497581433136i)y3=(1.51297187707+35.528534053i)z=(101.51297187735.528534053i)y2=3.9364461738y3=(33.4331140351)z=133.433121019y2=100.288y3=0.384498149358z=99.615503876y2=253225322y3=2532225723z=25322(427235)2723y2=253225322y3=2532225723z=25322(42723+5)2723\begin{array}{rrr} y_{2} = 49.0151187905 & y_{3} = \left(-50.5809248555\right) & z = 150.580912863 \\ y_{2} = 2.69155446756 & y_{3} = 36.6554809843 & z = 63.3445121951 \\ y_{2} = \left(-2.96556297758 - 0.497581433136i\right) & y_{3} = \left(-1.51297187707 - 35.528534053i\right) & z = \left(101.512971877 + 35.528534053i\right) \\ y_{2} = \left(-2.96556297758 + 0.497581433136i\right) & y_{3} = \left(-1.51297187707 + 35.528534053i\right) & z = \left(101.512971877 - 35.528534053i\right) \\ y_{2} = 3.9364461738 & y_{3} = \left(-33.4331140351\right) & z = 133.433121019 \\ y_{2} = 100.288 & y_{3} = 0.384498149358 & z = 99.615503876 \\ y_{2} = \frac{25}{322} \, \sqrt{5} \sqrt{322} & y_{3} = \frac{25}{322} \, \sqrt{2} \sqrt{5} \sqrt{7} \sqrt{23} & z = \frac{25}{322} \, {\left(4 \, \sqrt{2} \sqrt{7} \sqrt{23} - \sqrt{5}\right)} \sqrt{2} \sqrt{7} \sqrt{23} \\ y_{2} = -\frac{25}{322} \, \sqrt{5} \sqrt{322} & y_{3} = -\frac{25}{322} \, \sqrt{2} \sqrt{5} \sqrt{7} \sqrt{23} & z = \frac{25}{322} \, {\left(4 \, \sqrt{2} \sqrt{7} \sqrt{23} + \sqrt{5}\right)} \sqrt{2} \sqrt{7} \sqrt{23} \end{array}\right)
The html.table() function is also useful for rendering output:
html.table( solution )
y_{2} = 49.0151187905 y_{3} = \left(-50.5809248555\right) z = 150.580912863
y_{2} = 2.69155446756 y_{3} = 36.6554809843 z = 63.3445121951
y_{2} = \left(-2.96556297758 - 0.497581433136i\right) y_{3} = \left(-1.51297187707 - 35.528534053i\right) z = \left(101.512971877 + 35.528534053i\right)
y_{2} = \left(-2.96556297758 + 0.497581433136i\right) y_{3} = \left(-1.51297187707 + 35.528534053i\right) z = \left(101.512971877 - 35.528534053i\right)
y_{2} = 3.9364461738 y_{3} = \left(-33.4331140351\right) z = 133.433121019
y_{2} = 100.288 y_{3} = 0.384498149358 z = 99.615503876
y_{2} = \frac{25}{322} \, \sqrt{5} \sqrt{322} y_{3} = \frac{25}{322} \, \sqrt{2} \sqrt{5} \sqrt{7} \sqrt{23} z = \frac{25}{322} \, {\left(4 \, \sqrt{2} \sqrt{7} \sqrt{23} - \sqrt{5}\right)} \sqrt{2} \sqrt{7} \sqrt{23}
y_{2} = -\frac{25}{322} \, \sqrt{5} \sqrt{322} y_{3} = -\frac{25}{322} \, \sqrt{2} \sqrt{5} \sqrt{7} \sqrt{23} z = \frac{25}{322} \, {\left(4 \, \sqrt{2} \sqrt{7} \sqrt{23} + \sqrt{5}\right)} \sqrt{2} \sqrt{7} \sqrt{23}

Get a Second Opinion

Another good option for on-the-web computation such as the solution of a system of equations like the one presented here is Wolfram|Alpha.  This website functions much like the Google search engine except it returns results from a database of technical information.  The website can also ingest Mathematica commands which can be used to solve systems of equations such as the ones presented in this workbook.  Wolfram even points out one additional feasible, but trivial solution that Sage misses-- the case where both y2 and y3 are equal and no hydraulic jump is occurring.