computational hydraulics

404
Computational Hydraulics Computational Hydraulics Prof. Prof. M.S.Mohan M.S.Mohan Kumar Kumar Department of Civil Engineering Department of Civil Engineering

Upload: ravi-teja

Post on 02-Dec-2014

2.000 views

Category:

Technology


8 download

DESCRIPTION

 

TRANSCRIPT

  • 1. Computational Hydraulics Prof. M.S.Mohan KumarDepartment of Civil Engineering

2. Introduction to Hydraulicsof Open Channels Module 1 3 lectures 3. Topics to be coveredBasic ConceptsConservation LawsCritical FlowsUniform FlowsGradually Varied FlowsRapidly Varied FlowsUnsteady Flows 4. Basic ConceptsOpen Channel flows deal with flow of water in open channelsPressure is atmospheric at the water surface and thepressure is equal to the depth of water at any sectionPressure head is the ratio of pressure and the specific weightof waterElevation head or the datum head is the height of thesection under consideration above a datumVelocity head (=v2/2g) is due to the average velocity of flowin that vertical section 5. Basic Concepts ContTotal head =p/ + v2/2g + z Pressure head = p/Velocity head =v2/2g Datum head = z The flow of water in an open channel is mainly due to headgradient and gravityOpen Channels are mainly used to transport water forirrigation, industry and domestic water supply 6. Conservation LawsThe main conservation laws used in open channels are Conservation Laws Conservation of MassConservation of MomentumConservation of Energy 7. Conservation of MassConservation of MassIn any control volume consisting of the fluid ( water) underconsideration, the net change of mass in the control volumedue to inflow and out flow is equal to the the net rate ofchange of mass in the control volume This leads to the classical continuity equation balancing theinflow, out flow and the storage change in the controlvolume. Since we are considering only water which is treated asincompressible, the density effect can be ignored 8. Conservation of Momentum and energyConservation of MomentumThis law states that the rate of change of momentum in thecontrol volume is equal to the net forces acting on thecontrol volume Since the water under consideration is moving, it is actedupon by external forces Essentially this leads to the Newtons second lawConservation of EnergyThis law states that neither the energy can be created ordestroyed. It only changes its form. 9. Conservation of Energy Mainly in open channels the energy will be in the form of potential energyand kinetic energy Potential energy is due to the elevation of the water parcel while thekinetic energy is due to its movement In the context of open channel flow the total energy due these factorsbetween any two sections is conserved This conservation of energy principle leads to the classical BernoullisequationP/ + v2/2g + z = ConstantWhen used between two sections this equation has to account for theenergy loss between the two sections which is due to the resistance to theflow by the bed shear etc. 10. Types of Open Channel FlowsDepending on the Froude number (Fr) the flow in an openchannel is classified as Sub critical flow, Super Criticalflow, and Critical flow, where Froude number can be definedas F = Vrgy Open channel flow Sub-critical flow Sub-Critical flow Super critical flow Fr1 11. Types of Open Channel Flow Cont...Open Channel Flow Unsteady SteadyVariedUniformVaried GraduallyGraduallyRapidlyRapidly 12. Types of Open Channel Flow Cont Steady FlowFlow is said to be steady when discharge does notchange along the course of the channel flow Unsteady FlowFlow is said to be unsteady when the dischargechanges with time Uniform FlowFlow is said to be uniform when both the depth anddischarge is same at any two sections of the channel 13. Types of Open Channel Cont Gradually Varied FlowFlow is said to be gradually varied when ever thedepth changes gradually along the channel Rapidly varied flowWhenever the flow depth changes rapidly along thechannel the flow is termed rapidly varied flow Spatially varied flowWhenever the depth of flow changes gradually dueto change in discharge the flow is termed spatiallyvaried flow 14. Types of Open Channel Flow cont Unsteady FlowWhenever the discharge and depth of flow changeswith time, the flow is termed unsteady flow Types of possible flow Steady uniform flow Steady non-uniform flow Unsteady non-uniform flowkinematic wave diffusion wave dynamic wave 15. DefinitionsSpecific EnergyIt is defined as the energy acquired by the water at asection due to its depth and the velocity with which itis flowing Specific Energy E is given by, E = y + v2/2gWhere y is the depth of flow at that sectionand v is the average velocity of flow Specific energy is minimum at criticalcondition 16. DefinitionsSpecific ForceIt is defined as the sum of the momentum of the flow passing through the channel section per unit time per unit weight of water and the force per unit weight of waterF = Q2/gA +yAThe specific forces of two sections are equalprovided that the external forces and the weighteffect of water in the reach between the twosections can be ignored.At the critical state of flow the specific force is aminimum for the given discharge. 17. Critical FlowFlow is critical when the specific energy is minimum.Also whenever the flow changes from sub critical tosuper critical or vice versa the flow has to gothrough critical conditionfigure is shown in next slide Sub-critical flow-the depth of flow will be higherwhereas the velocity will be lower. Super-critical flow-the depth of flow will be lowerbut the velocity will be higher Critical flow: Flow over a free over-fall 18. Specific energy diagram E=yDepth of water Surface (y) E-y curve1 Eminy1 C Alternate Depths c2y 45 2Critical DepthSpecific Energy (E)y Specific Energy Curve for a given discharge 19. Characteristics of Critical Flow Specific Energy (E = y+Q2/2gA2) is minimum For Specific energy to be a minimum dE/dy = 0dE Q 2 dA = 1 3 dy gA dy However, dA=Tdy, where T is the width of thechannel at the water surface, then applying dE/dy =0, will result in following Q 2Tc AcQ2 Ac VC2 =1 = 2= gAc 3 Tc gAc Tc g 20. Characteristics of Critical FlowFor a rectangular channel Ac /Tc=ycFollowing the derivation for a rectangular channel,Vc Fr ==1gy cThe same principle is valid for trapezoidal and othercross sectionsCritical flow condition defines an unique relationshipbetween depth and discharge which is very useful in thedesign of flow measurement structures 21. Uniform FlowsThis is one of the most important concept in open channelflows The most important equation for uniform flow is Manningsequation given by 1 2 / 3 1/ 2 V= R S nWhere R = the hydraulic radius = A/P P = wetted perimeter = f(y, S0)Y = depth of the channel bedS0 = bed slope (same as the energy slope, Sf)n = the Mannings dimensional empirical constant 22. Uniform FlowsEnergy Grade Line2V12/2g 11 hfSf v22/2gy1Control Volume y2 So1z1 z2 Datum Steady Uniform Flow in an Open Channel 23. Uniform Flow Example : Flow in an open channel This concept is used in most of the open channel flow designThe uniform flow means that there is no acceleration to theflow leading to the weight component of the flow beingbalanced by the resistance offered by the bed shear In terms of discharge the Mannings equation is given by1 Q = AR 2 / 3 S 1/ 2n 24. Uniform Flow This is a non linear equation in y the depth of flow for whichmost of the computations will be made Derivation of uniform flow equation is given below, whereW sin = weight component of the fluid mass in thedirection of flow0 = bed shear stressPx = surface area of the channel 25. Uniform FlowThe force balance equation can be written as W sin 0 Px = 0Or Ax sin 0 Px = 0AOr 0 = sin PNow A/P is the hydraulic radius, R, and sin isthe slope of the channel S0 26. Uniform FlowThe shear stress can be expressed as 0 = c f (V 2 / 2)Where cf is resistance coefficient, V is the meanvelocity is the mass densityTherefore the previous equation can be written as V2 2gOrcf = RS 0V = RS 0 = C RS 02 cfwhere C is Chezys constantFor Mannings equation1.49 1 / 6 C= Rn 27. Gradually Varied FlowFlow is said to be gradually varied whenever the depth offlow changed gradually The governing equation for gradually varied flow is given bydy S 0 S f=dx 1 Fr 2Where the variation of depth y with the channel distance xis shown to be a function of bed slope S0, Friction Slope Sfand the flow Froude number Fr. This is a non linear equation with the depth varying as anon linear function 28. Gradually Varied Flow Energy-grade line (slope = Sf)v2/2gWater surface (slope = Sw)y Channel bottom (slope = So) zDatumTotal head at a channel section 29. Gradually Varied FlowDerivation of gradually varied flow is as followsThe conservation of energy at two sections of areach of length x, can be written as2 2V1V2 y1 ++ S 0 x = y 2 ++ S f x2g2gNow, let y = y y and V2 2 V1 2 d V 2 2 1= x2g2gdx 2 g Then the above equation becomes d V 2 y = S 0 x S f x 2 g x dx 30. Gradually Varied FlowDividing through x and taking the limit as xapproaches zero gives us dy d V 2 + 2g = S0 S f dx dx After simplification, dy S0 S f=() dx 1 + d V 2 / 2 g / dyFurther simplification can be done in terms ofFroude number d V 2 d Q2 2 g = dy 2 gA 2 dy 31. Gradually Varied FlowAfter differentiating the right side of the previousequation,d V 2Q dA 2 2 2 g = 2 gA 3 dy dy But dA/dy=T, and A/T=D, therefore,d V 2 Q2 = = Fr 2dy 2 g gA 2 D Finally the general differential equation can bewritten as dy S 0 S f = dx 1 Fr 2 32. Gradually Varied Flow Numerical integration of the gradually varied flow equationwill give the water surface profile along the channel Depending on the depth of flow where it lies when comparedwith the normal depth and the critical depth along with thebed slope compared with the friction slope different types ofprofiles are formed such as M (mild), C (critical), S (steep)profiles. All these have real examples. M (mild)-If the slope is so small that the normal depth(Uniform flow depth) is greater than critical depth for thegiven discharge, then the slope of the channel is mild. 33. Gradually Varied FlowC (critical)-if the slopes normal depth equals its criticaldepth, then we call it a critical slope, denoted by CS (steep)-if the channel slope is so steep that a normaldepth less than critical is produced, then the channel issteep, and water surface profile designated as S 34. Rapidly Varied FlowThis flow has very pronounced curvature of the streamlinesIt is such that pressure distribution cannot be assumed tobe hydrostaticThe rapid variation in flow regime often take place in shortspanWhen rapidly varied flow occurs in a sudden-transitionstructure, the physical characteristics of the flow arebasically fixed by the boundary geometry of the structure aswell as by the state of the flowExamples:Channel expansion and cannel contractionSharp crested weirsBroad crested weirs 35. Unsteady flowsWhen the flow conditions vary with respect to time, we callit unsteady flows.Some terminologies used for the analysis of unsteady flowsare defined below:Wave: it is defined as a temporal or spatial variation of flowdepth and rate of discharge.Wave length: it is the distance between two adjacent wavecrests or troughAmplitude: it is the height between the maximum waterlevel and the still water level 36. Unsteady flows definitionsWave celerity (c): relative velocity of a wave with respectto fluid in which it is flowing with VAbsolute wave velocity (Vw): velocity with respect tofixed reference as given belowVw = V cPlus sign if the wave is traveling in the flow direction andminus for if the wave is traveling in the direction opposite toflowFor shallow water waves c = gy0 where y0=undisturbedflow depth. 37. Unsteady flows examplesUnsteady flows occur due to following reasons:1. Surges in power canals or tunnels2. Surges in upstream or downstream channels produced by starting or stopping of pumps and opening and closing of control gates3. Waves in navigation channels produced by the operation of navigation locks4. Flood waves in streams, rivers, and drainage channels due to rainstorms and snowmelt5. Tides in estuaries, bays and inlets 38. Unsteady flowsUnsteady flow commonly encountered in an open channelsand deals with translatory waves. Translatory waves is agravity wave that propagates in an open channel andresults in appreciable displacement of the water particles ina direction parallel to the flowFor purpose of analytical discussion, unsteady flow isclassified into two types, namely, gradually varied andrapidly varied unsteady flowIn gradually varied flow the curvature of the wave profile ismild, and the change in depth is gradualIn the rapidly varied flow the curvature of the wave profileis very large and so the surface of the profile may becomevirtually discontinuous. 39. Unsteady flows contContinuity equation for unsteady flow in an openchannel Vy yD+V+=0xx tFor a rectangular channel of infinite width, may bewritten q y + =0 x tWhen the channel is to feed laterally with asupplementary discharge of q per unit length, forinstance, into an area that is being flooded over adike 40. Unsteady flows contThe equation Q A++ q = 0 x tThe general dynamic equation for graduallyvaried unsteady flow is given by: y V V 1 V + +=0 x g x g t 41. Review of Hydraulics of Pipe Flows Module23 lectures 42. ContentsGeneral introductionEnergy equationHead loss equationsHead discharge relationshipsPipe transients flows throughpipe networksSolving pipe network problems 43. General IntroductionPipe flows are mainly due to pressure difference betweentwo sectionsHere also the total head is made up of pressure head, datumhead and velocity headThe principle of continuity, energy, momentum is also usedin this type of flow.For example, to design a pipe, we use the continuity andenergy equations to obtain the required pipe diameterThen applying the momentum equation, we get the forcesacting on bends for a given discharge 44. General introductionIn the design and operation of a pipeline, the mainconsiderations are head losses, forces and stressesacting on the pipe material, and discharge.Head loss for a given discharge relates to flowefficiency; i.e an optimum size of pipe will yield theleast overall cost of installation and operation forthe desired discharge.Choosing a small pipe results in low initial costs,however, subsequent costs may be excessivelylarge because of high energy cost from large headlosses 45. Energy equation The design of conduit should be such that it needs least cost for a given discharge The hydraulic aspect of the problem require applying the one dimensional steady flow form of the energy equation:p1 V12p2 2V2+ 1 + z1 + h p =+ 2+ z2 + ht + hL2g 2gWhere p/ =pressure headV2/2g =velocity headz =elevation headhp=head supplied by a pumpht =head supplied to a turbinehL =head loss between 1 and 2 46. Energy equationEnergy Grade LineHydraulic Grade Line z2 v2/2g p/y hpz1 z Pump z=0DatumThe Schematic representation of the energy equation 47. Energy equationVelocity head In V2/2g, the velocity V is the mean velocity in the conduit at a given section and is obtained by V=Q/A, where Q is the discharge, and A is the cross-sectional area of the conduit. The kinetic energy correction factor is given by , and it is defines as, where u=velocity at any point in the section 3 u dA = AV 3A has minimum value of unity when the velocity is uniform across the section 48. Energy equation contVelocity head cont has values greater than unity depending on the degree of velocity variation across a section For laminar flow in a pipe, velocity distribution is parabolic across the section of the pipe, and has value of 2.0 However, if the flow is turbulent, as is the usual case for water flow through the large conduits, the velocity is fairly uniform over most of the conduit section, and has value near unity (typically: 1.04< < 1.06). Therefore, in hydraulic engineering for ease of application in pipe flow, the value of is usually assumed to be unity, and the velocity head is then simply V2/2g. 49. Energy equation contPump or turbine head The head supplied by a pump is directly related to the power supplied to the flow as given belowP = Qh p Likewise if head is supplied to turbine, the power supplied to the turbine will beP = Qht These two equations represents the power supplied directly or power taken out directly from the flow 50. Energy equation contHead-loss term The head loss term hL accounts for the conversion of mechanical energy to internal energy (heat), when this conversion occurs, the internal energy is not readily converted back to useful mechanical energy, therefore it is called head loss Head loss results from viscous resistance to flow (friction) at the conduit wall or from the viscous dissipation of turbulence usually occurring with separated flow, such as in bends, fittings or outlet works. 51. Head loss calculationHead loss is due to friction between the fluid andthe pipe wall and turbulence within the fluidThe rate of head loss depend on roughnesselement size apart from velocity and pipe diameterFurther the head loss also depends on whether thepipe is hydraulically smooth, rough or somewherein betweenIn water distribution system , head loss is also dueto bends, valves and changes in pipe diameter 52. Head loss calculationHead loss for steady flow through a straight pipe: 0 A w = pA r p = 4L 0 / D 0 = f V 2 / 8 p L V2 h == f D 2gThis is known as Darcy-Weisbach equationh/L=S, is slope of the hydraulic and energy gradelines for a pipe of constant diameter 53. Head loss calculationHead loss in laminar flow:32VHagen-Poiseuille equation givesS=D 2 gCombining above with Darcy-Weisbach equation, gives f64 f =VDAlso we can write in terms of Reynolds number64f =NrThis relation is valid for Nr= xi yii =1In the previous equation B is a symmetric positivedefinite (spd) inner product matrix. In the case ofsymmetric positive definite matrix A, such as thatarising from the finite difference approximation ofthe ground water flow equation, the usual choicefor the inner product matrix is B=A 273. CGHS methodA symmetric matrix A is said to be positivedefinite if xTAx>0 whenever x0 where x isany column vector. So the resultingconjugate gradient method minimizes the Anorm of the error vector (i.e. ei +1 A ).The convergence of conjugate gradientmethod depend upon the distribution ofeigenvalues of matrix A and to a lesserextend upon the condition number [k(A)] ofthe matrix. The condition number of asymmetric positive definite matrix is definedask ( A ) = max / min 274. CGHS methodWhere max and min are the largest and smallesteigenvalues of A respectively. When k(A) is large,the matrix is said to be ill-conditioned, in this caseconjugate gradient method may converge slowly.The condition number may be reduced bymultiplying the system by a pre-conditioning matrixK-1. Then the system of linear equation given bythe equation can be modified as K 1 A H = K 1Y 275. CGHS methodDifferent conjugate methods are classifieddepending upon the various choices of the pre-conditioning matrix.The choice of K matrix should be such that onlyfew calculations and not much memory storageare required in each iteration to achieve this. Witha proper choice of pre-conditioning matrix, theresulting preconditioned conjugate gradientmethod can be quite efficient.A general algorithm for the conjugate gradientmethod is given as follow: 276. CGHS methodInitializeH 0 = Arbitrary initial guessr0 = Y A H 0 1s0 = K r0p0 = s 0i=0Do while till the stopping criteria is not satisfied 277. CGHS methodai =< si , ri > / < A pi , pi >ContH i +1 = H i + ai piri +1 = ri ai A pisi +1 = K 1ri +1bi =< si +1, ri +1 > / < si , ri >p i +1= si +1 + bi pii = i +1End do 278. CGHS methodWhere r0 is the initial residue vector, s0 is avector, p0 is initial conjugate directionvector, ri+1,si+1 and pi+1 are thecorresponding vectors at (i+1)th iterativestep, k-1 is the preconditioning matrix and Ais the given coefficient matrix. Thisconjugate algorithm has following twotheoretical properties:(a) the value {Hi}i>0 converges to thesolution H within n iterations(b) the CG method minimizes H i H for allthe values of i 279. CGHS methodThere are three types of operations that areperformed by the CG method: innerproducts, linear combination of vectors andmatrix vector multiplications.The computational characteristics of theseoperations have an impact on the differentconjugate gradient methods. 280. Assignments1. The equation 2u 2u u 2 2+ 2 =2x y xis an elliptic equation. Solve it on the unit square, subject to u=0 onthe boundaries. Approximate the first derivative by a central-difference approximation. Investigate the effect of size of x onthe results, to determine at what size reducing it does not havefurther effect.2. Write and run a program for poissons equation. Use it to solve 2 u = xy ( x 2)( y 2)On the region 0 x 2 , 0 y 2 , with u=0 on allboundaries except for y=0, where u=1.0. 281. Assignments3. Repeat the exercise 2, using A.D.I method. Provide thePoisson equation as well as the boundary conditions asgiven in the exercise 2.4. The system of equations given here (as an augmented matrix) can be speeded by applying over-relaxation. Make trials with varying values of the factor to find the optimum value. (In this case you will probably find this to be less than unity, meaning it is under-relaxed.)8 1 1 | 8 1 7 2 | 4 2 19 | 12 282. Computation of GraduallyVaried and Unsteady OpenChannel Flows Module 9 6 lectures 283. ContentsNumerical integrationmethods for solvingGradually varied flowsFinite differencemethods for SaintVenant-equationsExamples 284. IntroductionFor most of the practical implications, the flowconditions in a gradually varied flow are required tocalculate.These calculations are performed to determine thewater surface elevations required for the planning,design, and operation of open channels so that theeffects of the addition of engineering works and thechannel modifications on water levels may beassessedAlso steady state flow conditions are needed tospecify proper initial conditions for the computationof unsteady flows 285. IntroductionImproper initial conditions introduce falsetransients into the simulation, which may lead toincorrect resultsIt is possible to use unsteady flow algorithmsdirectly to determine the initial conditions bycomputing for long simulation timeHowever, such a procedure is computationallyinefficient and may not converge to the propersteady state solution if the finite-difference schemeis not consistent 286. IntroductionVarious methods to compute gradually varied flowsare required to developMethods, which are suitable for a computersolution, are adoptedTraditionally there are two methods-direct andstandard step methodsHigher order accurate methods to numericallyintegrate the governing differential equation arerequired 287. Equation of gradually varied flowConsider the profile of gradually varied flow in the elementary lengthdx of an open channel.The total head above the datum at the upstream section is V2 H = z + d cos + 2gH= total headz = vertical distance of the channel bottom above the datumd= depth of flow section= bottom slope angle= energy coefficientV= mean velocity of flow through the section 288. Equation of gradually varied flowDifferentiatingdH dz ddd V2 = + cos +dx dx dxdx 2 g The energy slope, S f = dH / dxThe slope of the channel bottom, S0 = sin = dz / dxSubstituting these slopes in above equations andsolving for dd/dx ,dd S0 S f =dx cos + d (V 2 / 2 g ) / dd 289. Equation of gradually varied flowThis is the general differential equation forgradually varied flowFor small , cos1, d y, and dd/dx dy/dx, thus theabove equation becomes, dy S0 S f= dx 1 + d (V 2 / 2 g ) / dySince V=Q/A, and dA/dy=T, the velocity head term maybe expressed as d V 2 Q 2 dA2Q 2 dAQ 2T = = = dy 2 g 2 g dygA3 dygA3 290. Equation of gradually varied flowSince, Z = A3 / TThe above may be written asd V2 Q 2 =dy 2 g gZ 2 Suppose that a critical flow of discharge equal toQ occurs at the section;g Q = Zc After substitutingd V2 Zc2 =dy 2 g Z2 291. Equation of gradually varied flowWhen the Mannings formula is used, the energyslope is2 2 n VSf = 2.22 R 4 / 3When the Chezy formula is used,V2Sf = C 2RIn general form, Q2 Sf = K2 292. Computation of gradually varied flowsThe analysis of continuity, momentum, and energyequations describe the relationships among various flowvariables, such as the flow depth, discharge, and flowvelocity throughout a specified channel lengthThe channel cross section, Manning n, bottom slope, andthe rate of discharge are usually known for these steady-state-flow computations.The rate of change of flow depth in gradually varied flows isusually small, such that the assumption of hydrostaticpressure distribution is valid 293. Computation of gradually variedflowsThe graphical-integration method: Used to integrate dynamic equation graphically Two channel sections are chosen at x1 and x2 with corresponding depths of flow y1 and y2, then the distance along the channel floor is x2 y 2 dxx = x2 x1 = dx = dy x1 y1 dy Assuming several values of y, and computing the values of dx/dy A curve of y against dx/dy is constructed 294. Computation of gradually variedflowsThe value of x is equal to the shaded area formed by thecurve, y-axis, and the ordinates of dx/dy corresponding toy1 and y2.This area is measured and the value of x is determined.It applies to flow in prismatic as well as non-prismaticchannels of any shape and slopeThis method is easier and straightforward to follow. 295. Computation of gradually variedflowsMethod of direct integration Gradually varied flow cannot be expressed explicitly in terms of y for all types of channel cross section Few special cases has been solved by mathematical integration 296. Use of numerical integration for solving gradually varied flowsTotal head at a channel section may be written asV 2 H =z+ y+2gWhereH = elevation of energy line above datum;z =elevation of the channel bottom above the datum;y = flow depth; V = mean flow velocity, and =velocity-head coefficientThe rate of variation of flow depth, y, with respect todistance x is obtained by differentiating the above equation. 297. Solution of gradually varied flowsConsider x positive in the downstream flowdirectionBy differentiating the above energy equation, weget the water surface profile as dy So S f= dx 1 (Q 2 B ) /( gA3 )The above equation is of first order ordinarydifferential equation, in which x is independentvariable and y is the dependent variable. 298. Solution of gradually varied flowsIn the above differential equation for gradually variedflows, the parameters are as given below:x = distance along the channel (positive in downward direction)S0 = longitudinal slope of the channel bottomSf = slope of the energy lineB = top water surface widthg = acceleration due to gravityA = flow areaQ = rate of discharge 299. Solution of gradually varied flowsThe right hand of the above equation shows that itis a function of x and y, so assume this functionas f(x,y), then we can write above equation as dy= f ( x, y ) dxIn which,So S ff ( x, y ) = 1 (Q 2 B) /( gA3 )We can integrate above differential equation todetermine the flow depth along a channel length ,where f(x,y) is nonlinear function. So the numericalmethods are useful for its integration. 300. Solution of gradually varied flowsThese methods yields flow depth discretelyTo determine the value y2 at distance x2, weproceed as follows y2x2 dy = f ( x, y )dx y1x1The above integration yields.. x2y2 = y1 + f ( x, y )dx x1 301. Solution of gradually varied flowsWe the y values along the downstream if dx ispositive and upstream values if dx is negativeWe numerically evaluate the integral termSuccessive application provides the water surfaceprofile in the desired channel lengthTo determine x2 where the flow depth will be y2,we proceed as follows:dx= F ( x, y ) dy 302. Solution of gradually varied flowsIn which 1 (Q 2 B) /( gA3 )F ( x, y ) = So S fIntegrating the above differential equation we get,y2x2 = x1 + F ( x, y )dyy1To compute the water surface profile, we begin thecomputations at a location where the flow depth for thespecified discharge is knownWe start the computation at the downstream controlsection if the flow is sub-critical and proceed in theupstream direction. 303. Solution of gradually varied flowsIn supercritical flows, however, we start at an upstreamcontrol section and compute the profile in the downstreamdirectionThis is due to the fact that the flow depth is known at onlycontrol section, we proceed in either the upstream ordownstream direction.In the previous sections we discussed how to compute thelocations where a specified depth will occurA systematic approach is needed to develop for thesecomputationsA procedure called direct step method is discussed below 304. Solution of gradually varied flowsDirect step methodAssume the properties of the channel section are knownthen, z = z S (x x )2 10 2 1In addition, the specific energy1V122 2V2E1 = y1 + E2 = y 2 + 2g 2gThe slope of the energy grade line is gradually varied flowmay be computed with negligible error by using thecorresponding formulas for friction slopes in uniform flow. 305. Solution of gradually varied flowsThe following approximations have been used toselect representative value of Sf for the channellength between section 1 and 2Average friction slope 1S f = ( S f1 + S f 2 ) 2Geometric mean friction slopeSf = S f1 S f 22 S f1 S f 2Harmonic mean friction slope Sf =S f1 + S f 2 306. Solution of gradually varied flowsThe friction loss may be written as1 hf = ( S f1 + S f 2 )( x2 x1)2From the energy equation we can write,1z1 + E1 = z 2 + E 2 + ( S f1 + S f 2 )( x 2 x1 )2Writing in terms of bed slope E2 E1x2 = x1 + 1S o ( S f1 + S f 2 ) 2Now from the above equation, the location of section 2 isknown. 307. Solution of gradually varied flowsThis is now used as the starting value for the nextstepThen by successively increasing or decreasing theflow depth and determining where these depths willoccur, the water surface profile in the desiredchannel length may be computedThe direction of computations is automatically takencare of if proper sign is used for the numerator anddenominator 308. Solution of gradually varied flowsThe disadvantages of this method are1. The flow depth is not computed at predetermined locations. Therefore, interpolations may become necessary, if the flow depths are required at specified locations. Similarly, the cross-sectional information has to be estimated if such information is available only at the given locations. This may not yield accurate results2. Needs additional effort3. It is cumbersome to apply to non-prismatic channels 309. Solution of gradually varied flowsStandard step method When we require to determine the depth at specified locations or when the channel cross sections are available only at some specified locations, the direct step method is not suitable enough to apply and in these cases standard step method is applied In this method the following steps are followed : Total head at section 11V12H 1 = z1 + y1 + 2g 310. Solution of gradually varied flowsTotal head at section 2H 2 = H1 h fIncluding the expression for friction loss hf1H 2 = H1 ( S f1 + S f 2 )( x 2 x1 )2Substituting the total head at 2 in terms ofdifferent heads, we obtain 2Q 2 11y2 ++ S f 2 ( x2 x1 ) + z2 H1 + S f1 ( x2 x1 ) = 0 222 2 gA2 311. Solution of gradually varied flowsIn the above equation. A2 and Sf2 are functions of y2, and allother quantities are either known or already have beencalculated at section 1.The flow depth y2 is then determined by solving thefollowing nonlinear algebraic equation: 2Q 211F ( y2 ) = y2 + + S f 2 ( x 2 x1 ) + z 2 H 1 + S f1 ( x 2 x1 ) = 02222 gA2The above equation is solved for y2 by a trial and errorprocedure or by using the Newton or Bisection methods 312. Solution of gradually varied flowsHere the Newton method is discussed.For this method we need an expression for dF/dy2 dF 2Q 2 dA2 1d Q 2n2=1 + ( x 2 x1 ) dy 2 3 gA2 dy 22 dy 2 C o A2 R 4 / 3 2 2 2 The last term of the above equations can beevaluated as Q 2n 2 2 2 2 2d = 2Q n dA2 4 Q ndR2 dy2 2 2 4/3 Co A2 R Co A2 R 4 / 3 dy2 3 Co A2 R 7 / 3 dy22 22 2 2 2 2 2Q 2 n 2 dA2 4 Q 2 n 2 1 dR2= Co A2 R2 / 3 dy2 3 Co A2 R2 / 3 R2 dy2 2 2 42 2 4S = 2 S f B2 + 2 f 2 dR2 2 A3 R2 dy2 2 313. Solution of gradually varied flowsHere dA2/dy2 is replaced by B2 in the aboveequation and substituting for this expressiondF 2 Q 2 B2 B2 2 S f 2 dR 2 =1 ( x 2 x1 ) S f 2 + dy 2gA2 3 A2 3 R2 dy 2 By using y=y1, dy/dx=f(x1,y1) , then the flow depth y* , can be computed from the equation2 y * = y1 + f ( x1 , y1 )( x 2 x1 ) 2During subsequent step, howevermay be y* 2determined by extrapolating the change in flowdepth computed during the preceding step. 314. Solution of gradually varied flowsA better estimate for y2 can be computed from theequation *F ( y2 )y2 = y* 2[dF / dy2 ]*Ify2 y*2 is less than a specified tolerance, , theny* 2 is the flow depth y2, at section 2; otherwise,set y* = y2 2 and repeat the steps until a solutionis obtained 315. Solution of gradually varied flowsIntegration of differential equation For the computation of the water surface profile by integrating the differential equation, the integration has to be done numerically, since f(x,y) is a nonlinear function Different numerical methods have been developed to solve such nonlinear system efficiently The numerical methods that are in use to evaluate the integral term can be divided into following categories:1. Single-step methods2. Predictor-corrector methods 316. Solution of gradually varied flowsThe single step method is similar to direct step method andstandard step methodThe unknown depths are expressed in terms of a functionf(x,y), at a neighboring point where the flow depth is eitherinitially known or calculated during the previous stepIn the predictor-corrector method the value of the unknownis first predicted from the previous stepThis predicted value is then refined through iterative processduring the corrector part till the solution is reached by theconvergence criteria 317. Solution of gradually varied flowsSingle-step methodsEuler methodModified Euler method Improved Euler methodFourth-order Runge-Kutta method1. Euler method: In this method the rate of variation of ywith respect to x at distance xi can be estimated as dy yi = = f ( xi , yi ) dx i 318. Solution of gradually varied flowsThe rate of change of depth of flow in a gradually variedflow is given as belowS o S fif ( xi , y i ) = 1 ( Q 2 Bi ) /( gAi3 )All the variables are known in the right hand side, soderivative of y with respect to x can be obtainedAssuming that this variation is constant in the interval xi toxi+1, then the flow depth at xi+1 can be computed from theequationyi +1 = yi + f ( xi , yi )( xi +1 xi ) 319. Solution of gradually varied flows cont..2. Modified Euler methodWe may also improve the accuracy of the Euler method by using the slope of the curve y = y (x) at x = x andi +1 / 2 1y = yi +1/ 2 , in which xi+1/ 2 =(xi + xi+1 ) and yi +1/ 2 = yi + 1 yi x . 22Let us call this slope yi +1/ 2 . Then yi +1 = yi + yi +1/ 2 x or yi +1 = yi + f ( xi +1/ 2 , yi +1/ 2 )xThis method, called the modified Euler method, is second-order accurate. 320. Solution of gradually varied flows cont..3. Improved Euler methodLet us call the flow depth atxi +1 obtained by using Eulermethod as y * i.e.,i +1* yi +1 = yi + yi xBy using this value, we can compute the slope of the curve ( y = y (x) at x = xi +1 , i.e., yi +1 = f xi +1 , yi*+1 . Let us )use the average value of the slopes of the curve at xi andxi +1 . Then we can determine the value ofyi +1 from theequation yi +1 = yi +2(1 )yi + yi +1 x . This equation may beyi +1 = yi +1 [ ]f ( xi , yi ) + f ( xi +1 , yi*+1 ) xwritten as2. This methodcalled the improved Euler method, is second order accurate. 321. Solution of gradually varied flows cont..4. Fourth-order Runge Kutta Methodk1 = f ( xi , yi ) 11k 2 = f ( xi + x, yi + k1x) 22 11k3 = f ( xi + x, yi + k 2 x) 22k 4 = f ( xi + x, yi + k3x) 1 yi +1 = yi + (k1 + 2k 2 + 2k3 + k 4 )x 6 322. Solution of gradually varied flows cont..Predictor-corrector methods In this method we predict the unknown flow depth first, correct this predicted value, and then re-correct this corrected value. This iteration is continued till the desired accuracy is met. In the predictor part, let us use the Euler method to predict the value of yi+1, I.e yi(+1 = yi + f ( xi , yi )x0)we may correct using the following equation1yi +1 = yi + [ f ( xi , yi ) + f ( xi +1, yi(+1 )]x (1) 0)2 323. Solution of gradually varied flows cont.. Now we may re-correct y again to obtain a better value:1yi(+1 = yi + 2)[ f ( xi , yi ) + f ( xi +1, yi(1) )]x+12 Thus the j th iteration is 1jyi(+1 = yi +j) [ f ( xi , yi ) + f ( xi +1, yi(+1 1) )]x 2 Iteration untiljyi(+1 yi(+1 1) j) , where = specified tolerance 324. Saint-Venant equations1D gradually varied unsteady flow in an openchannel is given by Saint-Venant equationsvyya+ vw+w=0xxtvy vv+g + = g ( So S f )xx tX - distance along the channel, t - time, v- averagevelocity, y - depth of flow, a- cross sectional area, w- top width, So- bed slope, Sf - friction slope 325. Saint Venant equationsFriction slopen 2v 2 Sf =r4 / 3r - hydraulic radius, n-Mannings roughnesscoefficientTwo nonlinear equations in two unknowns v and yand two dependent variables x and tThese two equations are a set of hyperbolic partialdifferential equations 326. Saint-Venant equationsMultiplying 1st equation by g / aw and adding itto 2nd equation yields 1 t + (v c ) x v c t + (v c ) x y = g (S o S f ) The above equation is a pair of equations alongcharacteristics given bydx= g (S o S f )dv g dy =vc dtdt c dtBased on the equations used, methods areclassified as characteristics methods and directmethods. 327. FD methods for Saint Venant equationsThe governing equation in the conservationform may be written in matrix form as U t + Fx + S = 0In which a va0= U F = 2 S= v a + gay ga ( s0 s f ) va General formulationf ( fin +1 + fin +1) ( f in + fin 1 )+1 + =t t 328. FD methods for Saint Venant equationsContinuedn +1 n +1nnf ( f i +1 + f i ) (1 )( f i +1 + f i ) =+x x x1 1f = ( f in +1 + fin +1 ) + (1 )( f in 1 + f in ) +1 +2 2 U in +1 + U in +1 = 2+1 t x[ ( Fin +1 Fin +1) + (1 )( Fin 1 Fin )+1 + ][+ t ( Sin +1 + Sin +1 ) + (1 )( Sin 1 + Sin )+1 + ]= U in + U in 1+ 329. FD methods for Saint Venant equations Boundary conditions: yin ++1 = yresd 1,j Downstream boundary: Left boundary y=yu= uniform flow depthv=vu= uniform velocity Right boundary y=yc= Critical flow depthv=vc= Critical velocity 330. FD methods for Saint Venant equationsStability: unconditionally stable provided>0.5, i.e., the flow variables are weightedtoward the n+1 time level.Unconditional stability means that there is norestriction on the size of x and t forstability 331. Solution procedureThe expansion of the equation ain +1 + ain +1 + 2 +1 t x{[ ][ (va)i +1 (va)i +1 + (1 ) (va)i +1 (va)in +1 n nn]} = ain + ain 1+(va)i +1 + (va)i +1 + 2nn +1t x{[ (v 2 a + gay )i +1 (v 2 a + gay )i +1n +1 n ]} {[ gat ( s0 s f )i +1 + ( s0 s f )i +1 n +1 n ]}= gat {1 )[( s ( 0nn s f )i +1 + ( s0 s f )i ]}+ (va)i + (va)i +1 (1 ) 2n nt 2 x {(v a + gay )i +1 (v 2 a + gay )inn }The above set of nonlinear algebraic equationscan be solved by Newton-Raphson method 332. Assignments1. Prove the following equation describes thegradually varied flow in a channel having variablecross section along its length: ( ) dy SO S f + V / gA A / x=2 dx( ) 1 BV 2 / ( gA)2. Develop computer programs to compute thewater- surface profile in a trapezoidal channelhaving a free overfall at the downstream end. Tocompute the profile, use the following methods:(i) Euler method(ii) Modified Euler method(iii) Fourth-order Runge-Kutta method 333. Assignments3. Using method of characteristics, write acomputer program to solve 1D graduallyvaried unsteady flow in an open channel asgiven by Saint-Venant equations, assuminginitial and boundary conditions. 334. Solution of Pipe Transientsand Pipe Network ProblemsModule 106 Lectures 335. ContentsBasic equation oftransientsMethod ofcharacteristics for itssolutionComplex boundaryconditionPipe network problemsNode based and Loopbased modelsSolution throughNewton and Picardtechniques 336. Basic equations of transientsThe flow and pressures in a waterdistribution system do not remain constantbut fluctuate throughout the dayTwo time scales on which these fluctuationsoccur1. daily cycles2. transient fluctuations 337. Basic equations of transientsContinuity equation: applying the law ofconservation of mass to the control volume (x1and x2)x2 t ( A)dx +( AV ) x1 2 ( AV )1 = 0By dividing throughout by x as it approach zero,the above equation can be written as ( A) + ( AV ) = 0txExpanding and rearranging various terms, usingexpressions for total derivatives, we obtain1 d 1 dA V++ =0 dt A dt x 338. Basic equations of transientsNow we define the bulk modulus of elasticity, K, ofa fluid asK=dpd This can be written as d = dp dtK dtArea of pipe, A = R , where R is the radius of the2pipe. Hence dA / dt = 2RdR / dt. In terms of strain thismay be written as dA = 2 A ddtdtd D dpNow using hoop stress, we obtain =dt 2eE dt 339. Basic equations of transients Following the above equations one can write, 1 dA D dp = A dt eE dt Substituting these equations into continuity equation and simplifying the equation yields V 1 1 dp +1 + eE / DK dt = 0x K K/ a2 = Let us define, where a is wave speed1 + ( DK ) / eEwith which pressure waves travel back and forth. Substituting this expression we get the following continuity equation ppV +V+ a 2=0txx 340. Method of characteristicsThe dynamic and continuity equations for flow through apipe line is given by QH fL1 =+ gA+QQ =0 tx 2 DA QHL2 = a 2+ gA =0 x tWhere Q=discharge through the pipe H=piezometric head A=area of the pipe g=acceleration due to gravity a=velocity of the wave D=diameter of the pipe x=distance along the pipe t=time 341. Method of characteristicsThese equations can be written in terms of velocity 1 v H fL1 = + +vv = 0 g t x 2 DgH a 2 v L2 = +=0 t g xWhere,k a=e[1 + (kD / E )] 342. Method of characteristics Where k=bulk modulus of elasticity =density of fluid E=Youngs modulus of elasticity ofthe materialTaking a linear combination of L1 and L2, leads to QQ H 1 H f + a 2 + gA + + QQ =0 tx T x 2 DA Assume H=H(x,t);Q=Q(x,t) 343. Method of characteristicsWriting total derivatives ,dQ Q Q dxdH H H dx =+=+dt t x dt dt t x dtDefining the unknown multiplier as 1 dx1 == a 2 = dtaFinally we getdx dQ gA dHf = a +QQ =0dt dt a dt 2 DAThe above two equations are called characteristicequations and 2nd among them is condition along thecharacteristics 344. Method of characteristicsFiguretP Negative characteristicPositive characteristic linelineA CB x Characteristic lines Constant head reservoir at x=0, at x=L, valve is instantaneously closed. Pressure wave travels in the upstream direction. 345. Complex boundary conditionWe may develop the boundary conditions bysolving the positive or negative characteristicequations simultaneous with the condition imposedby the boundary.This condition may be in the form of specifyinghead, discharge or a relationship between thehead and dischargeExample: head is constant in the case of aconstant level reservoir, flow is always zero at thedead end and the flow through an orifice is relatedto the head loss through the orifice. 346. Complex boundary conditionConstant-level upstream reservoir In this case it is assume that the water level in the reservoir or tank remains at the same level independent of the flow conditions in the pipeline This is true for the large reservoir volume If the pipe at the upstream end of the pipeline is 1, then H P1,1 = H ru where H ru is the elevation of the water level in the reservoir above the datum. At the upstream end, we get the negative characteristic equation, QP1,1 = Cn + Ca H ru 347. Complex boundary conditionConstant-level downstream reservoir In this case, the head at the last node of pipe i will always be equal to the height of the water level in the tank above the datum, Hrd: H Pi , n +1 = H rd At the downstream end, we have the positive characteristic equation linking the boundary node to the rest of the pipeline. We can write QPi, n +1 = Cp Ca H rd 348. Complex boundary conditionDead end At a dead end located at the end of pipe i, the discharge is always zero: Q Pi , n +1 = 0 At the last node of pipe i, we have the positive characteristics equation. We getCpH Pi , n +1 =Ca 349. Complex boundary conditionDownstream valve In the previous boundaries, either the head or discharge was specified, However for a valve we specify a relationship between the head losses through the valve and the discharge Denoting the steady-state values by subscript 0, the discharge through a valve is given by the following equation:Q0 = C d Av 0 2gH 0 350. Complex boundary conditionWhereCd=coefficient of dischargeAv0=area of the valve openingH0=the drop in headQ0= a dischargeBy assuming that a similar relationship is valid forthe transient state conditions, we getQ Pi , n +1 = (C d Av ) P 2 gH Pi , n +1Where subscript P denotes values of Q and H atthe end of a computational time interval 351. Complex boundary conditionFrom the above two equations we can write 2 2 H Pi, n +1QPi, n +1 = (Q0 ) H0Where the effective valve opening is = (C d Av ) P /(C d Av ) 0For the last section on pipe i, we have the positivecharacteristic equation 2QPi, n +1 + CvQPi, n +1 C p Cv = 0 352. Complex boundary conditionWhere Cv = (Q0 ) 2 /(Ca H 0 )Solving for QPi,n+1 and neglecting the negativesign with the radical term, we get2Q Pi , n +1 = 0.5( C v + C v + 4C p C v ) 353. Pipe network problemsThe network designing is largely empirical.The main must be laid in every street along whichthere are properties requiring a supply.Mains most frequently used for this are 100 or150mm diameterThe nodes are points of junction of mains or wherea main changes diameter.The demands along each main have to beestimated and are then apportioned to the nodes ateach end in a ratio which approximated 354. Pipe network problemsThere are a number of limitations and difficulties with respect to computer analysis of network flows , which are mentioned below:1. The limitation with respect to the number of mains it is economic to analyze means that mains of 150 mm diameter and less are usually not included in the analysis of large systems, so their flow capacity is ignored2. It is excessively time consuming to work out the nodal demands for a large system 355. Pipe network problems1. The nodal demands are estimates and may not represent actual demands2. Losses, which commonly range from 25% to 35% of the total supply, have to be apportioned to the nodal demands in some arbitrary fashion.3. No diversification factor can be applied to the peak hourly demands representing reduced peaking on the larger mains since the total nodal demands must equal the input to the system4. The friction coefficients have to be estimated.5. No account is taken of the influence of pressure at a node on the demand at that node, I.e under high or low pressure the demand is assumed to be constant. 356. Governing Equation for Network AnalysisEvery network has to satisfy the following equations:1. Node continuity equations the node continuityequations state that the algebraic sum of all theflows entering and leaving a node is zero.j = 1,..., NJ Q( p) + Q( p) + C ( j ) = 0,p { j} p { j}Where NJ is the number of nodes, Q(p) is the flow in element p (m3/s), C(j) is the consumption at node j (m3/s), p { j} refers to the set of elements connected to node j. 357. Network Analysis2. Energy conservation equations the energy conservation equations state that the energy loss along a path equals the difference in head at the starting node and end node of the path. ( )h( p) + ( )h( p) [H (s(l )) H (e(l ))] = 0 l = 1,..., NL + NPATH p {l}p {l}Where h(p) is the head loss in element p(m), s(l) is the starting node of path l, e(l) is the end of path 1, NL is the number of loops, and NPATH is the number of paths other than loops and p {l} refers to the pipes belonging to path l. loop is a special case of path, wherein, the starting node and end node are the same, making the head loss around a loop zero, that is, ( )h( p) + ( )h( p) = 0 358. Network Analysis3. Element characteristics the equations defining the element characteristics relate the flow through the element to the head loss in the element. For a pipe element, h(p) is given by, h( p ) = R( p )Q( p ) eWhere R(p) is the resistance of pipe p and e is the exponent in the head loss equation. If Hazen-Williams equation is used, where e=1.852 10.78 L( p ) R( p) = D( p ) 4.87 CHW ( p )1.852Where L(p) is the length of pipe p(m), D(p) is the diameter of pipe p(m), and CHW (p) is the Hazen-Williams coefficient for pipe p. 359. Network AnalysisFor a pump element, h(p) is negative as head is gained in theelement. The characteristics of the pump element are definedby the head-discharge relation of the pump. This relationshipmay be expressed by a polynomial or in an alternate form. Inthis study, the following equation is used. Q( p) C 3( m ) h( p ) = HR(m) C1(m) C 2(m). QR(m) Where HR(m) is the rated head of the m-th pump (m), QR(m) isthe rated discharge of m-th pump (m3/s), C1(m), C2(m) andC3(m) are empirical constants for the m-th pump obtainedfrom the pump charateristics. Here p refers to the elementcorresponding to the m-th pump. If the actual pumpcharacteristics are available, the constants C1, C2, C3 may beevaluated. C1 is determined from the shutoff head as HO(m) C1(m) = HR(m) 360. Network AnalysisWhere HO(m) is the shutoff head of the m-th pump. As h(p)=-HR(m) for rated flow,C1(m) C 2(m) = 1From which C2(m)is determined. C3 (m) is obtained byfitting the equation to the actual pump characteristics.For a pipe element, (1 / e ) h( p ) H (i ) H ( j )Q( p) = = R( p) R( p ) (1/ e ) H (i ) H ( j ) (11 / e )For Hazen-Williams equation, the above equation becomes H (i ) H ( j ) Q( p) =0.46R ( p ) 0.54 H (i ) H ( j ) 361. Network AnalysisSimilarly for a pump element 1 1 H ( j ) H (i ) C 3( m ) Q( p ) = ( )QR(m) C1(m) HR(m) C 2( m ) Where outside the parenthesis, + sign is used if flow istowards node j and sign is used if flow is away from node jand, inside the parenthesis, the + sign is used, if i is thenode downstream of the pump and the sign is used if j isthe node downstream of the pump. 362. Network AnalysisThe network analysis problem reduces to one of solving a set of non-linear algebraic equations. Three types of formulation are used thenodal, the path and the node and path formulation.Each formulation and method of analysis has its own advantages andlimitations. In general path formulation with Newton-Raphson methodgives the fastest convergence with minimum computer storagerequirements.The node formulation is conceptually simple with a very convenientdata base, but it has not been favoured earlier, because inconjunction with Newton-Raphson method, the convergence to thefinal solution was found to depend critically on the quality of the initialguess solution.The node and path formulation can have a self starting procedurewithout the need for a guess solution, but this formulation needs themaximum computer storage. 363. Node based modelsThe node (H) equationsThe number of equations to be solved can be reduced fromL+J-1 to J by combining the energy equation for each pipewith continuity equation.The head loss equation for a single pipe can be written ash = KQ n nijH i H j = K ij Qij sgn QijWhere Hi=head at i th node, L Kij= head loss coefficient for pipe from node i tonode j Qij= flow in pipe from node i to node j, L3/t nij=exponent in head loss equation for pipe from i-j 364. Node based modelsThe double subscript shows the nodes that are connect bya pipeSince the head loss is positive in the direction of flow, sgnQij=sgn (Hi-Hj), and we solve for Q as 1 / nijQij = sgn( H i H j )( H i H j / K ij )The continuity equation at node I can be written asmi Qki = U i k =1Where Qki=flow into node i from node k, L3/TUi=consumptive use at node i, L3/Tmi=number of pipes connected to node i. 365. Node based modelsCombining energy and continuity equations for each flow inthe continuity equation gives1 / nki mi H k Hi sgn( H k H i ) = Uik =1 K ki The above is a node H equation, there is one such equationfor each node, and one unknown Hi for each equationThese equations are all nonlinearThe node (H) equations are very convenient for systemscontaining pressure controlled devices I.e. check valves,pressure reducing valves, since it is easy to fix the pressureat the downstream end of such a valve and reduce thevalue if the upstream pressure is not sufficient to maintaindownstream pressure 366. Loop based modelsThe Loop (Q) equationsOne approach is to setting up looped system problems is towrite the energy equations in such a way that, for an initialsolution, the continuity will be satisfiedThen correct the flow in each loop in such a way that thecontinuity equations are not violated.This is done by adding a correction to the flow to every pipein the loop .If there is negligibly small head loss, flow is added aroundthe loop, if there is large loss, flow is reducedThus the problem turns into finding the correction factor Qsuch that each loop energy equation is satisfied 367. Loop based modelsThe loop energy equations may be written mlF (Q) = K i [sgn(Qii + Ql )] Qii + Ql n = dhl (l=1,2,,L) i =1WhereQii = initial estimate of the flow in i th pipe, L3/TQl = correction to flow in l th loop, L3/Tml = number of pipes in l th loopL = number of loops 368. Loop based modelsThe Qi terms are fixed for each pipe and do not changefrom one iteration to the next.The Q terms refer to the loop in which the pipe fallsThe flow in a pipe is therefore Qi + Q for a pipe that lies inonly one loop.For a pipe that lies in several loops (say ,a b, and c) theflow might beQi + Qa Qb + Qc 369. Loop based modelsThe negative sign in front of b term is includedmerely to illustrate that a given pipe may besituated in positive direction in one loop and innegative direction in another loop.When the loop approach is used, a total of Lequations are required as there are l unknowns,one for each loop 370. Solution of pipe network problems through Newton-Raphson methodNewton-Raphson method is applicable for the problemsthat can be expressed as F(x)=0, where the solution is thevalue of x that will force F to be zeroThe derivative of F can be a expressed by dF F ( x + x) F ( x)= dxxGiven an initial estimate of x, the solution to the problem isthe value of x+x that forces F to 0. Setting F(x+x) tozero and solving for x gives F ( x)x = F( x) 371. Solution of pipe network problemsthrough Newton-Raphson methodNew value of x+x becomes x for the next iteration. Thisprocess is continued until F is sufficiently close to zeroFor a pipe network problem, this method can be applied tothe N-1=k, H-equationsThe head (H) equations for each node (1 through k), it ispossible to write as: 1 / nij H H [] mi ji F ( H i ) = sgn( H j H i ) Ui = 0 (i = 1,2,..., K ) j =1 K ji Where mi= number of pipes connected to node I Ui= consumptive use at node i, L3/TF(i) and F(i+1) is the value of F at ith and (i+1)th iteration,then dF = F (i + 1) F (i ) 372. Solution of pipe network problemsthrough Newton-Raphson methodThis change can also be approximated by totalderivativeF FF dF = H1 +H 2 + ... +H kH1 H 2H kWhere H= change in H between the ith and(i+1)th iterations, LFinding the values of H which forces F(i+1)=0.Setting above two equations equal, results in asystem of k linear equations with k unknowns (H)which can be solved by the any linear methods 373. Solution of pipe network problemsthrough Newton-Raphson method Initial guess for H Calculate partial derivatives of each F with respect to each H Solving the resulting system of linear equations to find H, and repeating until all of the Fs are sufficiently close to 0 The derivative of the terms in the previous equation is given by1 / nij H H d[ ( )] isgn H i H j j =1(H i H j )(1 / n )1(nij )(Kij )1 / n ij dH j K ij ij1 / nijand H H d[ ()] i sgn H i H j j =1(H i H j )(1 / n )1(nij )(Kij )1 / nijdH i K ij ij 374. Solution of pipe network problemsthrough Hardy-Cross methodThe linear theory method and the Newton-Raphsonmethod can converge to the correct solution rapidlyManual solution or solution on small computers may notbe possible with these methodsHowever, the Hardy-cross method, which dates back to1936, can be used for such calculations, in essence, theHardy-Cross method is similar to applying the Newton-Raphson method to one equation at a timeHardy cross method is applied to Q equations although itcan be applied to the node equations and even the flowequations.The method, when applied to the Q equations, requiresan initial solution which satisfies the continuity equation 375. Solution of pipe network problems through Hardy-Cross methodNevertheless it is still widely used especially for manualsolutions and small computers or hand calculators andproduces adequate results for most problemsFor the l th loop in a pipe network the Q equation can bewritten as followsml F (Q1 ) = K i [sgn (Qii + Ql )] Qii + Ql n dhl = 0 i =1WhereQl=correction to l th loop to achieve convergence, L3/TQii=initial estimates of flow in i th pipe (satisfies continuity),L3/Tml=number of pipes in loop l 376. Solution of pipe network problemsthrough Hardy-Cross methodApplying the Newton-Raphson method for a single equationgivesml n 1 K i (Qii + Ql ) Qii + QlQ(k + 1) = Q i =1 ml n 1 K i ni Qii + Ql i =1Where the k+1 refers to the values of Q in the (k+1) thiteration, and all other values refer to the k th iterations andare omitted from the equation for ease of readingThe above equation is equivalent to Q(k + 1) = Q(k ) F (k ) / F(k )Sign on the Qi terms depend on how that pipe is situated inthe loop under consideration. 377. Assignments1. How many Q equations must be set up for a networkwith L loops (and pseudo-loops), N nodes, and P pipes?How many H-equations must be set up?2. What are the primary differences between the Hardy-Cross and Newton-Raphson method for solving the Qequations?3. For two pipes in parallel, with K1>K2, what is the relationship between K1, K2, and Ke , the K for the equivalent pipe replacing 1 and 2 (h=KQn)? a. K1>K2>Ke b. K1>Ke>K2 c. Ke>K1>K2 378. Assignments4. Derive the following momentum equation by applying conservation of momentum for a control volume for transient flow through a pipe VV 1 p fV V+V + +=0 tx x 2D5. Develop the system of equations for the following network (consists of 8 nodes and 9 elements, out of which 8 are pipe elements and the other is a pump element) to find the values of the specified unknowns. Also write a computer program to solve the system of equations. 379. Assignments continued128 2 1 - Node with H unknown & C known- Node with H known & C known3 4- Node with H known & C unknown- Node with R unknown53 4- Pump element Unknowns6 7 H [2], H [4], H [5] R [4], R [5] C [6], C [7], C [8]7 5 68 9 380. Contaminant Transport inOpen Channels and PipesModule 115 lectures 381. ContentsContaminant transportDefinition of termsIntroduction to ADEequationFew simple solutionsSolution of ADE throughFD methodsProblems associated withsolution methodsDemonstration of methodsfor open channel and pipeflows 382. Contaminant transportContaminant transport modeling studies are usuallyconcerned with the movement within an aquifer system of asolute.These studies have become increasingly important with thecurrent interest on water pollution.Heat transport models are usually focused on developinggeothermal energy resources.Pollutant transport is an obvious concern relative to waterquality management and the development of waterprotection programs 383. Definition of termsTerminologies related to contaminant transport Diffusion: It refers to random scattering of particles in a flow to turbulent motion Dispersion: This is the scattering of particles by combined effect of shear and transverse diffusion Advection: The advective transport system is transport by the imposed velocity system 384. Introduction to ADE equationThe one dimensional formulation of conservative tracermass balance for advective-dispersive transport processisCC 2C +u= DlRtxx 2 C u= advection of tracer with fluid x 2CDl= molecular diffusion +Hydrodynamic x 2dispersion C= time rate of change of concentration tat a pointR = reaction term depends on reaction rate andconcentration (chemical or biological, not considered inthe present study) 385. Few simple solutionsBear discussed several analytical solutions to relativelysimple, one-dimensional solute transport problems.However, even simple solutions tend to get overwhelmedwith advanced mathematics.As an example, consider the one-dimensional flow of asolute through the soil column, the boundary conditionsrepresented by the step function input are describedmathematically as:C (1,0) = 01 0 C (0, t ) = C0t0C ( , t ) = 0 t0 386. Few simple solutionsFor these boundary conditions the solution to ADEequation for a saturated homogeneous porousmedium is: vl 1 + vt C 1(1 v t )=erfc+ experfcCo 2 D 2 Dt2 Dl t ll erfc represents the complimentary error function; lis the distance along the flow path; and v is theaverage water velocity.For conditions in which the dispersivity Dl of theporous medium is large or when 1 or t is large, thesecond term on the right-hand side of equation isnegligible. 387. Few simple solutionsThis equation can be used to compute the shapes of thebreakthrough curves and concentration profilesAnalytical models represent an attractive alternative to bothphysical and numerical models in terms of decreasedcomplexity and input data requirements.Analytical models are often only feasible when based onsignificant simplifying assumptions, and these assumptionsmay not allow the model to accurately reflect the conditionsof interest.Additionally, even the simplest analytical models tend toinvolve complex mathematics 388. Solution of ADE through FD methodsUsing implicit finite central difference method C C Dl Dx i + 1 l x 1i 2 2 u Ci +1 Ci = Ci C0i xxtCi +1 Ci Ci Ci 1Ci +1 Ci Ci C0 ( Dl ) 1 ( Dl ) 1 ui = i+x 2 ix 2 xt2 2( Dl ) 1 ( Dl ) 1 ( Dl ) 1 ( Dl ) 1i i i+ i+ ui 1 ui C 2 Ci 1 2 +2 +Ci + 2 Ci +1 = 0x 2x 2x 2 x t x 2 x t 389. Solution of ADE through FD methodsContinued ( Dl ) 1 ( Dl ) 1 ( Dl ) 1 ( Dl ) 1 i i i+ i+ ui 1 ui C 2 C i 1 + 2 +2 +Ci 2 Ci +1 = 0 x 2x 2x 2 x t x 2 x t The above equation can be written in matrixform as:1. For internal nodesAACi 1 + BBCi + CCCi +1 = DD 390. Solution of ADE through FD methods2. For Right boundary condition:Using forward finite difference formation in the right boundary, flux can be written as follows asCi +1 Ci = fluxxCi +1 = Ci + flux(x) AAC1 + BBC + CC(Ci + flux(x)) = DDi i AAC1 + (BB + CC)Ci = DD CCfluxx)i ( 391. Solution of ADE through FD methods3. For Left boundary condition: At the left boundary, initial condition and Dirichlet condition are used which is given below:C ( x,0) = Cix > 0;C (0, t ) = C0 t > 0; Using backward finite difference formation in the right boundary, flux can be written as followsCi Ci 1 = flux x 392. Solution of ADE through FD methodsContinuedCi 1 = Ci flux(x )( AA + BB )Ci + CCCi +1 = DD + AA( fluxx )The above three equations are solved for Ci at all thenodes for the mesh. Thomas Algorithm can be usedto solve the set of equations. 393. Problems linked with solution methods The contaminant transport in open channels and pipes are solved through various computer models. Because of their increased popularity and wide availability, it is necessary to note the limitations of these models The first limitation is the requirement of significant data Some available data may not be useful The second limitation associated with computer models is their required boundary conditions 394. Problems linked with solution methods Computer models can be very precise in their predictions, but these predictions are not always accurate The accuracy of the model depends on the accuracy of the input data Some models may exhibit difficulty in handling areas of dynamic flow such as they occur very near wells Another problem associated with some computer models is that they can be quite complicated from a mathematical perspective 395. Problems linked with solution methods These computer modeling are also time consuming This is usually found to be true if sufficient data is not available Uncertainty relative to the model assumption and usability must be recognized The computer model has been some time misused, as for example the model has been applied to the cases where it is not even applicable. 396. Demonstration of methods for open channel flowsMass transport in streams or long open channels istypically described by a one-dimensionalAdvection {dispersion equation, in which the longitudinaldispersion co-efficient is the combination of varioussection-averaged hydrodynamic mixing effects.The classical work of Taylor (1953, 1954) established thefact that the primary cause of dispersion in shear flow isthe combined action of lateral diffusion and differentiallongitudinal advection. 397. Demonstration of methods for open channel flowsThe transport of solutes in streams is affected by a suite ofphysical, chemical and biological processes, with therelative importance of each depending on the geo-environmental setting and properties of the solutes.For many species, chemical and biological reactions arejust as influential as the physical processes of advectionand dispersion in controlling their movement in an aquaticsystem like a stream. 398. Demonstration of methods for open channel flows Though chemical reactions and phase exchange mechanisms have now been incorporated into some applied transport models. Theoretical studies into these chemical effects on the physical transport have been very limited. There lacks, for example, a systematic understanding of the effects of sorption kinetics on the longitudinal dispersion: dispersion is conventionally considered to be affected by physical and hydrodynamic processes only. 399. Demonstration of methods for pipe flowsAn important component of a water supply systems is thedistribution system which conveys water to the consumerfrom the sources.Drinking water transported through such distributionsystems can undergo a variety of water quality changes interms of physical, chemical, and biological degradation.Water quality variation during transportation in distributionsystems may be attributed to two main aspects of reasons.One is internal degradation, and the other is externalintrusion. 400. Demonstration of methods for pipe flowsThe internal factors including physical, chemical, andbiological reaction with pipe wall material that degradeswater quality.Furthermore, recent evidence has demonstrated thatexternal contaminant intrusion into water distributionsystems may be more frequent and of a great importancethan previously suspected.In conventional (continuous) water distribution systems,contaminant may enter into water supply pipe throughcracks where low or negative pressure occurs due totransient event. 401. Demonstration of methods for pipe flowsThe sources of contaminant intrusion into waterdistribution systems are many and various. But leaky sewerpipes, faecal water bodies, and polluted canals may be theprimary sources for water distribution systemscontamination.Both continuous and intermittent water distributionsystems might suffer from the contaminant intrusionproblem, and the intermittent systems were found morevulnerable of contaminant intrusion. 402. Demonstration of methods for pipe flowsChlorination in pipe flow is required to control thebiological growth, which on the other hand results in waterquality deterioration.Pipe condition assessment component simulatescontaminant ingress potential of water pipe.Contaminant seepage will be the major component of themodel. Its objective will be to simulate the flow andtransport of contaminant in the soil from leaky sewers andother pollution sources to water distribution pipes. 403. Demonstration of methods for pipe flowsThe equations to be applied to simulate contaminant flowthrough the pipes are similar to open channelcontaminant transport.The process involved during the contaminants transportincludes advection, dispersion and reaction, etc., whichresults in varying concentration of the contaminantsduring its transportation. 404. Assignments1. Considering the one-dimensional flow of a solute through the soil column, write a computer program for solving the given contaminant transport equation by finite difference technique. The boundary conditions represented by the step function input are described mathematically as:C (1,0) = 01 0 C (0, t ) = C0t0C ( , t ) = 0 t0Compare and discuss the results with the analytical method.2. Write the governing equation for transport of contaminant in a pipe, neglecting advection and dispersion terms, and solve to get analytical solution of the same.