Professional Documents
Culture Documents
Modeling and Stimulation PRSENTATION On
Modeling and Stimulation PRSENTATION On
stimulation
COURSE INSTRUCTOR: DR.TARIQ ISMAEEL
Presentation topic
➢ Draining a tank
➢ Predator prey Model
➢ Competition Model
Group members
Now the volume of water in the tank at any time t can be written 𝑉 𝑡 = 𝐴𝑤 ℎ,
Integrating
1
−2 𝐴
2𝑔ℎ 𝑑𝑡 = − 𝐴 ℎ 𝑡𝑑
𝑤
2𝑔ℎ 1 𝐴
1 = − 𝐴 ℎ 𝑡 + 𝑐1
2𝑔 𝑤
2
𝐴
2𝑔ℎ = − 𝐴 ℎ 𝑡𝑔 + 𝑐1 𝑔
𝑤
𝐴
2𝑔ℎ = − 𝐴 ℎ 𝑡𝑔 + 𝑐 … … … … … … . . 𝐴
𝑤
𝑐= 2𝑔𝐻
Put in equation no A
𝐴ℎ
2𝑔ℎ = − 𝑡𝑔 + 2𝑔𝐻
𝐴𝑤
2
1 𝐴
ℎ 𝑡 = − 𝐴 ℎ 𝑡𝑔 + 2𝑔𝐻
2𝑔 𝑤
Solution
Suppose 𝑉 𝑡 = 𝐴𝑤 ℎ denotes the volume of water in the tank at time t.
them
𝑑𝑣
= −𝑐𝐴ℎ 2𝑔ℎ … … … … … . . 1
𝑑𝑡
where the minus sign indicates that V is decreasing.
Now the volume of water in the tank at any time t can be written 𝑉 𝑡 = 𝐴𝑤 ℎ,
where 𝐴𝑤 is the constant
Area of the upper surface of the water, then
𝑑𝑣 𝑑ℎ
= 𝐴𝑤 𝑑𝑡 … … … … … . . 2
𝑑𝑡
From eq no 1 and 2
By using Torricelli’s law
𝑑ℎ
𝐴𝑤 𝑑𝑡 = −𝑐𝐴ℎ 2𝑔ℎ
The differential equation is then
𝒅𝒉 𝒄𝑨𝒉
=− 𝟐𝒈𝒉
𝒅𝒕 𝑨𝒘
2
As given the radius of the hole= 𝑟 = 2 𝑖𝑛𝑐ℎ𝑒𝑠 = 12 𝑓𝑡
2 2 𝜋
So the area of circular hole is 𝐴ℎ = 𝜋𝑟 2 =𝜋 = 36
12
𝑑ℎ 𝑐𝜋Τ36
=− 2(32)ℎ
𝑑𝑡 100
𝑑ℎ 𝑐𝜋
=− 8 ℎ
𝑑𝑡 3600
𝒅𝒉 𝒄𝝅
=− 𝒉
𝒅𝒕 𝟒𝟓𝟎
A predator prey model
Suppose that two different species of animals interact within the same environment or ecosystem. Suppose that
the first species (prey) eats only vegetation and the second eats only the first species (prey). In other words, one
species is a predator, and the other is a prey.
let suppose that the predators are foxes and the prey are rabbits. Let x(t) and y(t) denote the fox and rabbit
populations, respectively, at any time t.
1) If there were no rabbits, then the fox population decline at a rate proportional to itself (due to lacking an
adequate food supply).
𝑑𝑥
= −𝑎𝑥, 𝑎 > 0……………..1
𝑑𝑡
𝑑𝑥
= 𝑏𝑥𝑦 , 𝑏 > 0 … … … … 2
𝑑𝑡
Adding this last rate to (1) gives a model for the fox population
𝑑𝑥
= −𝑎𝑥 + 𝑏𝑥𝑦 , 𝑎 > 0, 𝑏 > 0 … . . … … . 𝐴
𝑑𝑡
3) In the absence of foxes, then the growth rate of rabbits is proportional to the number of rabbits
present at time t (due to unlimited food supply).
𝑑𝑦
= 𝑑𝑦 , 𝑑 > 0 … … … … 3
𝑑𝑡
𝑤ℎ𝑒𝑟𝑒 "𝑑" 𝑖𝑠 𝑔𝑟𝑜𝑤𝑡ℎ 𝑟𝑎𝑡𝑒 𝑐𝑜𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡
4) The foxes eat rabbits and the rate at which rabbits eaten is proportion to rate at which the foxes and
rabbit interact.
𝑑𝑦
= −𝑐𝑥𝑦 , 𝑐 > 0 … … … … . . 4
𝑑𝑡
negative sign (-) because the rabbits population decrease because the rabbits are eaten during their
interaction with the foxes.
𝑑𝑦
= 𝑑𝑦 − 𝑐𝑥𝑦 , 𝑐 > 0, 𝑑 > 0 … … … … . . 𝐵
𝑑𝑡
𝒅𝒙
= −𝒂 + 𝒃𝒚 𝒙
𝒅𝒕
𝒅𝒚
ቑ……………..𝐶
= 𝒅 − 𝒄𝒙 𝒚
𝒅𝒕
where a, b, c, and d are positive constants. This famous system of non- linear differential equations is
known as the Lotka-Volterra predator-prey model.
Example
Solve the following Lotka-Volterra predator prey model define as
𝒅𝒙
= −𝟎. 𝟏𝒙 + 𝟎. 𝟎𝟐𝒙𝒚
𝒅𝒕
𝒅𝒚
= 𝟎. 𝟐𝒚 − 𝟎. 𝟎𝟐𝟓𝒙𝒚
𝒅𝒕
Where 𝐱(𝟎) = 𝟔 , 𝐲(𝟎) = 𝟔
Solution
By using fourth-order Runge-Kutta method where h=0.1
Let
𝑑𝑥
𝑔 𝑡, 𝑥, 𝑦 = = −0.1𝑥 + 0.02𝑥𝑦
𝑑𝑡
𝑑𝑦
𝑓 𝑡, 𝑥, 𝑦 = = 0.2𝑦 − 0.025𝑥𝑦
𝑑𝑡
For n=0 we have
𝑘1 = 𝑔 𝑡0 , 𝑥0 , 𝑦0 = 𝑔 0,6,6 = −0.1 6 + 0.02 6 6 = 0.12
𝑚1 = 𝑓 𝑡0 , 𝑥0 , 𝑦0 = 𝑓 0,6,6 = 0.2 6 − 0.025 6 6 = 0.3
ℎ ℎ𝑘1 ℎ𝑚1
𝑘2 = 𝑔 𝑡0 + 2 , 𝑥0 + , 𝑦0 + = 𝑔 0.05 , 6.006 , 6.015 = −0.1 6.006 + 0.02 6.006 6.015
2 2
𝑘2 = 0.1219218
ℎ ℎ𝑘1 ℎ𝑚1
𝑚2 = 𝑓 𝑡0 + 2 , 𝑥0 + , 𝑦0 + = 𝑓 0.05 , 6.006 , 6.015 = 0.2 6.006 − 0.025 6.006 6.015
2 2
𝑚2 = 0.29984775
ℎ ℎ𝑘2 ℎ𝑚2
𝑘3 = 𝑔 𝑡0 + , 𝑥0 + , 𝑦0 + = 𝑔 0.05 , 6.006096 , 6.01499
2 2 2
ℎ
𝑦1 = 𝑦0 + 6 𝑚1 + 2𝑚2 + 2𝑚3 + 𝑚4
0.1
𝑦1 = 6 + 6
0.3 + 2 0.29984775 + 2 0.2998328 + 0.2996615 =6.0299837
𝒕𝒏 𝒙𝒏 𝒚𝒏
0 6 6
𝑑𝑥
= 𝑎𝑥, 𝑎>0
𝑑𝑡 … … … … .1
𝑑𝑦
= 𝑐𝑦, 𝑐>0
𝑑𝑡
Model 1 is not realistic as it indicates that the population of each species in isolation grows exponentially, (it
means in the absence of one other increase).
So, it is reasonable to exponential model 1 by logistic population model.
𝑑𝑥
= 𝑎1 𝑥 − 𝑏1 𝑥, 𝑎1 , 𝑏1 > 0
𝑑𝑡 … … … … .2
𝑑𝑦
= 𝑎2 𝑦 − 𝑏2 𝑦, 𝑎2 , 𝑏2 > 0
𝑑𝑡
In the case of co-existence
Growth rate of each A and B is reduced by a rate proportional to no. of interactions between them. So, in this case
system 2 written in the form
𝑑𝑥
= 𝑎1 𝑥 − 𝑏1 𝑥 2 − 𝑐1 𝑥𝑦 = 𝑥 𝑎1 − 𝑏1 𝑥 − 𝑐1 𝑦 , 𝑎1 , 𝑏1 , 𝑐1 > 0
𝑑𝑡 … … … … .3
𝑑𝑦
= 𝑎2 𝑦 − 𝑏2 𝑦 2 − 𝑐2 𝑥𝑦 = 𝑦(𝑎2 − 𝑏2 𝑦 − 𝑐2 𝑥) , 𝑎2 , 𝑏2 , 𝑐2 > 0
𝑑𝑡
Model 3 is the competition model for species that compete for same resources.
Example
Solve the following competition model define as
𝒅𝒙
= 𝒙(𝟐 − 𝟎. 𝟒𝒙 − 𝟎. 𝟑𝒚)
𝒅𝒕
𝒅𝒚
= 𝒚(𝟏 − 𝟎. 𝟏𝒚 − 𝟎. 𝟑𝒙)
𝒅𝒕
Where 𝐱 𝟎 = 𝟏, 𝐲(𝟎) = 𝟏
Solution
By using fourth-order Runge-Kutta method where h=0.2
𝑑𝑥
𝑔 𝑡, 𝑥, 𝑦 = = 𝑥(2 − 0.4𝑥 − 0.3𝑦)
𝑑𝑡
𝑑𝑦
𝑓 𝑡, 𝑥, 𝑦 = = 𝑦(1 − 0.1𝑦 − 0.3𝑥)
𝑑𝑡
For n=0 we have
𝑘1 = 𝑔 𝑡0 , 𝑥0 , 𝑦0 = 𝑔 0,1,1 = 1.3
𝑚1 = 𝑓 𝑡0 , 𝑥0 , 𝑦0 = 𝑓 0,6,6 = 0.6
ℎ ℎ𝑘1 ℎ𝑚1
𝑘2 = 𝑔 𝑡0 + 2 , 𝑥0 + 2
, 𝑦0 + 2
= 𝑔 0.1, 1.13, 1.06 = 1.3899
ℎ ℎ𝑘1 ℎ𝑚1
𝑚2 = 𝑓 𝑡0 + 2 , 𝑥0 + , 𝑦0 + = 𝑓 0.1, 1.13, 1.06 = 0.5883
2 2
ℎ ℎ𝑘2 ℎ𝑚2
𝑘3 = 𝑔 𝑡0 + 2 , 𝑥0 + , 𝑦0 + = 𝑔 0.1, 1.13899, 1.05883 = 1.3972617
2 2
ℎ ℎ𝑘2 ℎ𝑚2
𝑚3 = 𝑓 𝑡0 + 2 , 𝑥0 + , 𝑦0 + = 𝑓 0.1, 1.13899, 1.05883 = 0.5849188
2 2
0.1
𝑥1 = 1 + 1.3 + 2 1.3899 + 2 1.3972617 + 1.4753656 = 1.2783229
6
ℎ
𝑦1 = 𝑦0 + 6 𝑚1 + 2𝑚2 + 2𝑚3 + 𝑚4
0.1
𝑦1 = 1 + 0.6 + 2 0.5883 + 2 0.5849188 + 0.56381 = 1.116997
6
𝒕𝒏 𝒙𝒏 𝒚𝒏
0 1 1