0% found this document useful (0 votes)
60 views7 pages

dy dt f t, y for a≤t≤b: w α w w hf t h, w h f t, w for each i=0,1, …, N−1

The document describes the midpoint method for solving initial value problems for ordinary differential equations numerically. It gives the formula used to calculate successive values of the dependent variable y at discrete time steps moving forward from the initial value. It then applies the midpoint method to solve the initial value problem dy/dx = -1/x with initial condition y(1)=0 on the interval [1,2]. The document also uses the midpoint method to model the draining of water from a rectangular tank, giving the relevant equations and parameters and showing the computed solution values at each time step.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views7 pages

dy dt f t, y for a≤t≤b: w α w w hf t h, w h f t, w for each i=0,1, …, N−1

The document describes the midpoint method for solving initial value problems for ordinary differential equations numerically. It gives the formula used to calculate successive values of the dependent variable y at discrete time steps moving forward from the initial value. It then applies the midpoint method to solve the initial value problem dy/dx = -1/x with initial condition y(1)=0 on the interval [1,2]. The document also uses the midpoint method to model the draining of water from a rectangular tank, giving the relevant equations and parameters and showing the computed solution values at each time step.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 7

Initial Value Problem dy

=f ( t , y ) for a≤t≤b y ( a )=α


dt
wi = y ( t i )

Runge-Kutta

Midpoint method w 0=α


h h
( )
wi+1 =wi + h f t i + , wi + f ( t i , wi ) for each i=0,1 , …, N−1
2 2
1
y '= ; [ 1,2 ] ; y ( 1 )=0
x
1
wi+1 =wi + h
( )
x 1
i+ 2

h= 0.2

i x wi x + h/2 f(x+h/2) wi+1


0 1 0 1.1 0.909091 0.181818 0.182322 0.28%
1 1.20 0.181818 1.3 0.769231 0.335664 0.336472 0.24%
2 1.40 0.335664 1.5 0.666667 0.468998 0.470004 0.21%
3 1.60 0.468998 1.7 0.588235 0.586645 0.587787 0.19%
4 1.80 0.586645 1.9 0.526316 0.691908 0.693147 0.18%
5 2.00 0.691908 2.1 0.47619 0.787146
1
f ( t i ,w i )=− ca gh ( t i ) √
A
A= 0.025 m2
g= 9.81 m/s
a= 0.0001 m2 i t wi f(ti,wi) h/2f(ti,wi) fi++ wi+1
c= 0.66 0 0 1.200 -0.00906 -0.05888 -0.00883 1.085
a= 1.2 m 1 13 1.085 -0.00861 -0.05599 -0.00839 0.976
b= 0.1 m 2 26 0.976 -0.00817 -0.05310 -0.00794 0.873
t0 = 0 s 3 39 0.873 -0.00773 -0.05021 -0.00750 0.775
tN = 130 s 4 52 0.775 -0.00728 -0.04733 -0.00706 0.684
h= 13 s 5 65 0.684 -0.00684 -0.04444 -0.00661 0.598
N= 10 6 78 0.598 -0.00639 -0.04155 -0.00617 0.518
7 91 0.518 -0.00595 -0.03867 -0.00572 0.443
8 104 0.443 -0.00550 -0.03578 -0.00528 0.375
9 117 0.375 -0.00506 -0.03289 -0.00483 0.312
10 130 0.312

1.4

1.2

0.8

0.6

0.4

0.2

0
0 20 40 60 80 100 120 140
0.4

0.2

0
0 20 40 60 80 100 120 140
q (t )t   Ah t 
dh  t  1
  q (t )
wi

dt A
1.400

1.200

1.000 h(t)
dh  t  1
0.800
w   ca gh
h(t0) dt A
0.600 i

0.400

0.200

0.000
0 20 40 60 80 100 120 140

Orifice with area = a h t0   h0

0 140
0 140
 Ah t 
1
q(t )
A
1
ca gh  t 
A

You might also like