Applied Mathematical Sciences, Vol. 7, 2013, no. 6, 287 - 305 Numerical Solution of the System of Six Coupled Nonlinear ODEs by Runge-Kutta Fourth Order Method B. S. Desale Department of Mathematics School of Mathematical Sciences North Maharashtra University Jalgaon-425001, India Corresponding author e-mail: bsdesale@rediffmail.com N. R. Dasre Department of Engineering Sciences Ramrao Adik Institute of Technology Nerul, Navi Mumbai-400706, India narendasre@rediffmail.com Abstract In this paper, we have proposed the numerical solutions of the system of six coupled nonlinear Ordinary Differential Equations(ODEs), which are aroused in the reduction of stratified Boussinesq Equation. We have obtained the numerical solutions on unstable and stable manifolds by Runge-Kutta fourth order method. The minimum error in the solution is of the order 10 −20 and it increases up to 10 −6 for φ, while the minimum error in θ is of the order 10 −14 and it increases up to 10 −3 . These errors can be reduced by reducing step size. We have coded this programme in C-language. Mathematics Subject Classification: 34A09, 65L05, 65L99. Keywords: Stratified Boussinesq equation, Runge-Kutta Method, Cou- pled Differential Equations, Integrable systems 1 Introduction The stratified Boussinesq equations form a system of Partial Differential Equa- tions (PDEs) modelling the movements of planetary atmospheres. The liter-
19
Embed
Numerical Solution of the System of Six Coupled Nonlinear ... · PDF fileNumerical Solution of the System of Six Coupled ... 1 Introduction ... The system of six coupled nonlinear
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
AbstractIn this paper, we have proposed the numerical solutions of the system
of six coupled nonlinear Ordinary Differential Equations(ODEs), whichare aroused in the reduction of stratified Boussinesq Equation. We haveobtained the numerical solutions on unstable and stable manifolds byRunge-Kutta fourth order method. The minimum error in the solutionis of the order 10−20 and it increases up to 10−6 for φ, while the minimumerror in θ is of the order 10−14 and it increases up to 10−3. These errorscan be reduced by reducing step size. We have coded this programmein C-language.
The stratified Boussinesq equations form a system of Partial Differential Equa-tions (PDEs) modelling the movements of planetary atmospheres. The liter-
288 B. S. Desale and N. R. Dasre
ature also refers Boussinesq approximation as Oberbeck-Boussinesq approxi-mation [1]. In this connection of Desale [2] has given the complete analysisof an ideal rotating uniformly stratified system of ODEs. Desale and Sharma[3] have given special solutions for rotating stratified Boussinesq equations.Desale and Dasre [4] have also given solutions to the system.
In this paper, we have implemented Runge-Kutta fourth order method tofind the numerical solution of system (1) passing through the initial values onthe stable and unstable manifolds. We have discussed the implementation ofthis method in the section 3. We have given codes for the solution on stableand unstable manifolds of invariant surface which is obtained by four firstintegrals.
2 Preliminary Notes
Shrinivasan et al [5] have tested the system (1) as given below for completeintegrability. Also Desale and Shrinivasan [6] have obtained singular solutionsof the same system. The system of six coupled nonlinear ODEs, which isaroused in the reduction of stratified Boussinesq equations is as below.
w = gρb
e3 × b,
b = 12w × b,
⎫⎬⎭ (1)
where w = (w1, w2, w3)T , b = (b1, b2, b3)
T and gρb
is a non-dimensional
constant as mentioned by Desale [7] in his thesis. The above system can bewritten as componentwise as below
w1 = − gρb
b2,
w2 = gρb
b1,
w1 = 0,
b1 = 12(w2b3 − w3b2),
b2 = 12(w3b1 − w1b3),
b3 = 12(w1b2 − w2b1).
⎫⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎭
(2)
More detail mathematical analysis of system (2) can be obtained fromDesale[7].
A critical point (e3, e3) lies on invariant surface and (b1, b2, b3) are on the
Numerical solutions by Runge-Kutta fourth order method 289
surface |b|2 = 1. Hence, we have
w1 =−b2k
1 − b3
+b1
1 + b3
,
w2 =b1k
1 − b3+
b2
1 + b3,
w3 = 1.
⎫⎪⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎪⎭
(3)
In above equations k is a function of b3, and it can be expressed as;
k2 =(1 − b3)
2
(1 + b3)2[4g(1 + b3) − ρb
ρb]. (4)
One may concern Shrinivasan et al [5] for more details of this analysis. Since|b|2 = 1, we consider spherical co-ordinate system
b1 = cos θ sinφ, b2 = sin θ sin φ, b3 = cosφ. (5)
Hence,
k2 = tan4(φ
2)[
8g
ρbcos2(
φ
2) − 1]. (6)
For k to be real, Shrinivasan et al [5] have put up the restriction to φas 0 ≤ φ ≤ 2cos−1(
√ρb
8g). With this limitation k takes the values negative,
positive and zero. With these possible choices of k, the invariant surface willbe the union of disjoint manifolds corresponding to k > 0, is unstable manifold,k < 0, is stable manifold and k = 0, is a center manifold. Regarding thesemanifolds, readers are advised to refer to Shrinivasan et al [5].
Now for k > 0 the unstable manifold is given by
w1 = tan(φ2)[cos θ − sin θ
√8gρb
cos2(φ2) − 1],
w2 = tan(φ2)[cos θ + sin θ
√8gρb
cos2(φ2) − 1],
w3 = 1,
b1 = cos θ sinφ,
b2 = sin θ sinφ,
b3 = cosφ,
k = tan2(φ
2)[
8g
ρbcos2(
φ
2) − 1].
⎫⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎭
(7)
On this surface system (1) reduces to
290 B. S. Desale and N. R. Dasre
dφ
dt= 1
2tan(φ
2)√
8gρb
cos2(φ2) − 1,
dθ
dt= 1
4sec2(φ
2).
⎫⎪⎪⎪⎬⎪⎪⎪⎭
(8)
Whereas for k < 0, the stable manifold is given by
w1 = tan(φ2)[cos θ + sin θ
√8gρb
cos2(φ2) − 1],
w2 = tan(φ2)[cos θ − sin θ
√8gρb
cos2(φ2) − 1],
w3 = 1,
b1 = cos θ sinφ,
b2 = sin θ sinφ,
b3 = cosφ,
k = − tan2(φ2)[8g
ρbcos2(φ
2) − 1].
⎫⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎭
(9)
On this surface system (1) reduces to
dφ
dt= −1
2tan(φ
2)√
8gρb
cos2(φ2) − 1,
dθ
dt= 1
4sec2(φ
2).
⎫⎪⎪⎪⎬⎪⎪⎪⎭
(10)
3 Numerical Solution
In this paper, we have obtained the numerical solutions of a system (2) withthe initial values on stable and unstable manifolds by Runge-Kutta fourthorder method. The details of this method can be obtained from [8, 9, 10].
3.1 Implementation of Runge-Kutta Fourth Order Method
For Numerical Solution
We start with the initial condition t = 0 and the initial value b0 = (b10, b20, b30).We calculate the initial values of (φ0, θ0) as
θ0 = tan−1(b20
b10),
φ0 = tan−1(
√b210 + b2
20
b30
).
⎫⎪⎪⎪⎪⎬⎪⎪⎪⎪⎭
(11)
Numerical solutions by Runge-Kutta fourth order method 291
Now we calculate φ1 and θ1 by Runge-Kutta fourth order method as,
φ1 = φ0 + k10, θ1 = θ0 + k20.
The values of k10 and k20 in above equation are given by
k10 =1
6[k11 + 2(k12 + k13) + k14], k20 =
1
6[k21 + 2(k22 + k23) + k24].
Withk11 = hf1(t0, φ0, θ0),
k12 = hf1(t0 +h
2, φ0 +
k11
2, θ0 +
k11
2),
k13 = hf1(t0 +h
2, φ0 +
k12
2, θ0 +
k12
2),
k14 = hf1(t0 + h, φ0 + k13, θ0 + k13),
k21 = hf2(t0, θ0, φ0),
k22 = hf2(t0 +h
2, θ0 +
k21
2, φ0 +
k21
2),
k23 = hf2(t0 +h
2, θ0 +
k22
2, φ0 +
k22
2),
k24 = hf2(t0 + h, θ0 + k23, φ0 + k23).
This gives us the next approximate values of θ and φ. Then t is set to t0 + hand the values of θ and φ are iterated with the above formulae. The exactsolution on unstable manifold is given by
φ(t) = 2 sin−1[2k1
√G−1
Ge−
t4
√G−1
1 + k21e
− t2
√G−1
],
θ(t) =t
4+ tan−1[
√G
k1
et4
√G−1 −√
G − 1]
− tan−1[
√G
k1e
t4
√G−1 +
√G − 1] + k2.
⎫⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎭
(12)
Whereas on stable manifold the exact solution is given by
φ(t) = 2 sin−1[2k1
√G−1
Ge
t4
√G−1
1 + k21e
t2
√G−1
],
θ(t) =t
4− tan−1[
√G
k1e−
t4
√G−1 −√
G − 1]
+ tan−1[
√G
k1
e−t4
√G−1 +
√G − 1] + k2,
⎫⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎭
(13)
292 B. S. Desale and N. R. Dasre
where k1, k2 are constants and G = 8gρb
. Now for our calculations, we tookG = 39.2 with g = 9.8 and ρb = 2. We have compared the calculated solutionsand exact solutions. We have found that the minimum error in φ 10−15 andminimum error in θ is 10−5. While in iteration process these errors increaseup to 10−6 and 10−3 for φ and θ respectively with the consideration of thestep size h = 0.001. Please note that these errors will be minimized with thestep size. After calculating φ and θ, we use the method of back-substitutionto obtain the values of b(b1, b2, b3) and w(w1, w2, w3).
3.2 Algorithm For Numerical solution
The following algorithm is used to find the solution by Runge-Kutta fourthorder method. The details of algorithm are given as below.
Step 1: Enter the initial values of t0, φ0, θ0, t, g, ρb and h (step size).
Step 2: Calculate the values of b10, b20, b30, w10, w20, w30, k1, k2 and k. Here wehave obtained the initial values.
Step 3: Calculate the values of φ1 and θ1 by using Runge-Kutta fourth ordermethod.
Step 4: Calculate the values of b1, b2, b3, w1, w2 and w3 by using equation(7) (or(9)).
Step 5: Calculate the exact values of φ and θ by using equation(12) (or (13))then calculate the exact values of b1, b2, b3, w1, w2 and w3 by usingequation(7) (or (9)).
Step 6: Print the required exact and calculated numerical values.
Step 7: Replace φ1 by φ0, θ1 by θ0 and t0 by t+h and go to Step 3, until the valueof φ is reached to its maximum ( or minimum ) for the given unstable(or stable ) fold.
Step 10: Plot the graphs to see the difference.
Step 11: End
3.3 Numerical Solution For Unstable Manifold
On this manifold, we have k > 0 and the system (1) reduces to (8). Now weuse the following programme to find the solution on unstable manifold.
Numerical solutions by Runge-Kutta fourth order method 293
We have coded the above algorithm with the help of C-programming. All thegraphs are plotted using MATLAB software. We have considered the initialvalue as φ0 = 0.001 and θ0 = 0.000 on the unstable manifold with respectto k > 0. From the limitations on φ, given by Desale [7], at φ = 2.820649the value of k becomes negative. Hence we have considered φ = 2.820649and θ0 = 0.000 on stable manifold. In each figure, the first graph shows thenumerical value calculated by us; the second graph shows the exact solutionand the third graph shows the comparison of the first and the second graphsas shown in Figure(1) to Figure(16).
298 B. S. Desale and N. R. Dasre
4.1 Figures for Numerical Solution on Unstable Mani-fold
On unstable manifold, we consider k > 0, φ0 = 0.001 and θ0 = 0.000. Thecomparison of calculated values and exact values is as shown below in Fig.(1)to Fig.(8)
0 2 4 6−0.4
−0.2
0
0.2
0.4
t
b1
Calculated b1
0 2 4 6−0.4
−0.2
0
0.2
0.4
t
b1
Exact b1
0 1 2 3 4 5 6−0.4
−0.2
0
0.2
0.4
t
b1
Comparision of Exact and Calculated
Figure 1: Graphs for b1 on unstable manifold
0 2 4 60
0.2
0.4
0.6
0.8
1
t
b2
Calculated b2
0 2 4 60
0.2
0.4
0.6
0.8
1
t
b2
Exact b2
0 1 2 3 4 5 60
0.2
0.4
0.6
0.8
1
t
b2
Comparision of Exact and Calculated
Figure 2: Graphs for b2 on unstable manifold
Numerical solutions by Runge-Kutta fourth order method 299
0 2 4 6−1
−0.5
0
0.5
1
t
b3
Calculated b3
0 2 4 6−1
−0.5
0
0.5
1
t
b3
Exact b3
0 1 2 3 4 5 6−1
−0.5
0
0.5
1
t
b3
Comparision of Exact and Calculated
Figure 3: Graphs for b3 on unstable manifold
0 2 4 60
1
2
3
t
thet
a
Calculated theta
0 2 4 60
1
2
3
t
thet
a
Exact theta
0 1 2 3 4 5 60
1
2
3
t
thet
a
Comparision of Exact and Calculated
Figure 4: Graphs for θ on unstable manifold
0 2 4 60
1
2
3
t
phi
Calculated phi
0 2 4 60
1
2
3
t
phi
Exact phi
0 1 2 3 4 5 60
1
2
3
t
phi
Comparision of Exact and Calculated
Figure 5: Graphs for φ on unstable manifold
300 B. S. Desale and N. R. Dasre
0 2 4 6−6
−4
−2
0
2
t
w1
Calculated w1
0 2 4 6−6
−4
−2
0
2
t
w1
Exact w1
0 1 2 3 4 5 6−6
−4
−2
0
2
t
w1
Comparision of Exact and Calculated
Figure 6: Graphs for w1 on unstable manifold
0 2 4 60
1
2
3
t
w2
Calculated w2
0 2 4 60
1
2
3
t
w2
Exact w2
0 1 2 3 4 5 60
1
2
3
t
w2
Comparision of Exact and Calculated
Figure 7: Graphs for w2 on unstable manifold
0 2 4 60
0.5
1
1.5
2
t
w3
Calculated w1
0 2 4 60
0.5
1
1.5
2
t
w3
Exact w3
0 1 2 3 4 5 60
0.5
1
1.5
2
t
w3
Comparision of Exact and Calculated
Figure 8: Graphs for w3 on unstable manifold
Numerical solutions by Runge-Kutta fourth order method 301
4.2 Figures for Numerical Solution on Stable Manifold
On stable manifold, we consider k < 0, φ0 = 2.820649 and θ0 = 0.000. Com-parison of calculated values and exact values is as shown in the following figuresFig.(9) to Fig.(16)
0 5 10 15−0.5
0
0.5
1
t
b1
Calculated b1
0 5 10 15−0.5
0
0.5
1
t
b1
Exact b1
0 2 4 6 8 10 12−0.5
0
0.5
1
t
b1
Comparision of Exact and Calculated
Figure 9: Graphs for b1 on stable manifold
0 5 10 150
0.1
0.2
0.3
0.4
t
b2
Calculated b2
0 5 10 150
0.1
0.2
0.3
0.4
t
b2
Exact b2
0 2 4 6 8 10 120
0.1
0.2
0.3
0.4
t
b2
Comparision of Exact and Calculated
Figure 10: Graphs for b2 on stable manifold
302 B. S. Desale and N. R. Dasre
0 5 10 15−1
−0.5
0
0.5
1
t
b3
Calculated b3
0 5 10 15−1
−0.5
0
0.5
1
t
b3
Exact b3
0 2 4 6 8 10 12−1
−0.5
0
0.5
1
t
b3
Comparision of Exact and Calculated
Figure 11: Graphs for b3 on stable manifold
0 5 10 150
1
2
3
t
thet
a
Calculated theta
0 5 10 150
1
2
3
t
thet
a
Exact theta
0 2 4 6 8 10 120
1
2
3
t
thet
a
Comparision of Exact and Calculated
Figure 12: Graphs for θ on stable manifold
0 5 10 150
1
2
3
t
phi
Calculated phi
0 5 10 150
1
2
3
t
phi
Exact phi
0 2 4 6 8 10 120
0.5
1
1.5
2
2.5
t
phi
Comparision of Exact and Calculated
Figure 13: Graphs for φ on stable manifold
Numerical solutions by Runge-Kutta fourth order method 303
0 5 10 150
1
2
3
t
w1
Calculated w1
0 5 10 150
1
2
3
t
w1
Exact w1
0 2 4 6 8 10 120
0.5
1
1.5
2
2.5
t
w1
Comparision of Exact and Calculated
Figure 14: Graphs for w1 on stable manifold
0 5 10 15−6
−4
−2
0
2
t
w2
Calculated w2
0 5 10 15−6
−4
−2
0
2
t
w2
Exact w2
0 2 4 6 8 10 12−6
−4
−2
0
2
t
w2
Comparision of Exact and Calculated
Figure 15: Graphs for w2 on stable manifold
0 5 10 150
0.5
1
1.5
2
t
w3
Calculated w1
0 5 10 150
0.5
1
1.5
2
t
w3
Exact w3
0 2 4 6 8 10 120
0.5
1
1.5
2
t
w3
Comparision of Exact and Calculated
Figure 16: Graphs for w3 on stable manifold
304 B. S. Desale and N. R. Dasre
5 Conclusion
Here we have presented the scheme of Runge-Kutta fourth order Method forthe numerical solution of the system of six coupled nonlinear ODEs (1). Inour calculation initially we have the error of 10−20, while in iteration processit increases up to 10−3 in the solution. It can be reduced as we reduce the stepsize. In future we will attempt to minimize the error and sharpen the accuracyof the solution.
References
[1] K. R. Rajagopal, M. Ruzicka and A. R. Srinivasa, On the Oberbeck-Boussinesq Approximation, Mathematical Models and Methods in AppliedSciences, 6 (1996), 1157-1167.
[2] B. S. Desale, Complete Analysis of an Ideal Rotating Uniformly StratifiedSystem of ODEs, Nonlinear Dyanamics and Systems Theory 9(3) (2009),263-275.
[3] B. S. Desale and V. Sharma, Special Solutions to Rotating StratifiedBoussinesq Equations, Nonlinear Dyanamics and Systems Theory 10(1)(2010), 29-38.
[4] B. S. Desale and N. R. Dasre, Numerical Solutions of System of Non-linear ODEs by Euler Modified Method, Nonlinear Dyanamics and Sys-tems Theory 12(3) (2012), 215-236.
[5] G. K. Srinivasan, V. D. Sharma and B. S. Desale, An integrable systemof ODE reductions of the stratified Boussinesq equations, Computers andMathematics with Applications, 53 (2007), 296-304.
[6] B. S. Desale and G. K. Srinivasan, Singular Analysis of the System of ODEreductions of the Stratified Boussinesq Equations, IAENG InternationalJournal of Applied Mathematics, 38:4, IJAM 38 4 04 (2008), 184-191.
[7] B. S. Desale, An integrable system of reduced ODEs of Stratified Boussi-nesq Equations, Ph. D. Thesis, subitted to IITB, Powai, Mumbai (2007).
[8] J. H. Mathews, Numerical Methods for Mathematics, Science and Engi-neering Prentice Hall of India, New Delhi, INDIA, 1994.
[9] E. Kreyszig, Advanced Engineering Mathematics Wiley India (P) Ltd.,New Delhi, INDIA, 2010.
Numerical solutions by Runge-Kutta fourth order method 305
[10] M. K. Jain and S. R. K. Iyengar, Numerical Methods for scientific andengineering computation New Age International (P) Ltd., Mumbai, India,2001.