blob: 885166ba8c1689f43f3f92c88eaa79a613868200 (
plain)
1
2
3
4
5
6
7
8
9
10
|
clear
clc
//Example 5.3 DISCHARGE IN CHANNEL WITH NON-UNIFORM VELOCITY DISTRIBUTION
d=2; //depth[m]
w=5; //width[m]
umax=3; //max velocity[m/s]
//Discharge equation Q=integrate('u','A',0,d)
//dA=w*dy
Q=integrate('w*umax*sqrt(y/d)','y',0,2) //[m^3/s]
printf("\nThe discharge in the channel = %.f m^3/s.\n",Q)
|