ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
3/8th
C PROGRAM TO FIND OUT
DISCHARGE BY USING SIMPON’S RULE
Discharge by Simpson’s 3/8th Rule
Statement :-
It states that, sum of first and last ordinates has to be done. Add
twice the sum of remaining odd ordinates and four times the
sum of remaining even ordinates.Multiply to this total sum by
1/3rd of the common distance between the ordinates which
gives the required area.
Application :-
A greater accuracy in the computation of discharge may be obtained
by using simpson’s rule . In this method the whole river width is
divided into an even number of equal segments so That there are
odd number of depths taken at the end of each segments as shown
in figure. Then area of flow,
C program to find out Discharge by Simpson’s 3/8th Rule
Description - :
To find Discharge by Simpson’s 3/8th Rule contain formula,
1) Area -:
2) Discharge -: Q = AV
Where,
A = Area of whole river
h = length of each segment
fo , fn = depth taken at end of
End section of segment
f1,f2,f3, … = depth at middle section
Q = discharge
V = velocity of flow
PROGRAM -:
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main();
{
int h=6;
float f(x0),f(x1),f(x2),f(x3),f(x4),f(xn),Area;
printf("enter the value of area of respective depth");
h= (b-a)/n;
f(x0)=1.2;
f(x1)=1.47;
f(x2)=1.56;
f(x3)=1.68;
f(x4)=1.72;
f(xn)=1.86;
Area=(3h/8)*(f(x0)+f(xn)+2*(f(x1)+f(x3))+3*(f(x2)+f(x4)));
printf("The capacity of reservoir = %f",Area);
getch();
}
OUTPUT -:
C program for discharge

More Related Content

C program for discharge

  • 1. 3/8th C PROGRAM TO FIND OUT DISCHARGE BY USING SIMPON’S RULE
  • 2. Discharge by Simpson’s 3/8th Rule Statement :- It states that, sum of first and last ordinates has to be done. Add twice the sum of remaining odd ordinates and four times the sum of remaining even ordinates.Multiply to this total sum by 1/3rd of the common distance between the ordinates which gives the required area. Application :- A greater accuracy in the computation of discharge may be obtained by using simpson’s rule . In this method the whole river width is divided into an even number of equal segments so That there are odd number of depths taken at the end of each segments as shown in figure. Then area of flow,
  • 3. C program to find out Discharge by Simpson’s 3/8th Rule Description - : To find Discharge by Simpson’s 3/8th Rule contain formula, 1) Area -: 2) Discharge -: Q = AV Where, A = Area of whole river h = length of each segment fo , fn = depth taken at end of End section of segment f1,f2,f3, … = depth at middle section Q = discharge V = velocity of flow
  • 4. PROGRAM -: #include<stdio.h> #include<conio.h> #include<math.h> int main(); { int h=6; float f(x0),f(x1),f(x2),f(x3),f(x4),f(xn),Area; printf("enter the value of area of respective depth"); h= (b-a)/n; f(x0)=1.2; f(x1)=1.47; f(x2)=1.56; f(x3)=1.68; f(x4)=1.72; f(xn)=1.86; Area=(3h/8)*(f(x0)+f(xn)+2*(f(x1)+f(x3))+3*(f(x2)+f(x4))); printf("The capacity of reservoir = %f",Area); getch(); }