SlideShare une entreprise Scribd logo
1  sur  21
Vijay Choudhary
vijaycttf@gmail.com

Department of Civil Engineering
Poornima University, Jaipur









Introduction
Formulation of the problem
Solution of the problem
Approximations, errors
Graphical representation
Conclusion
References
Further Scope
A physical problem of finding how much concentration of
the pollutant would be there in a lake after certain time.
To find the concentration of the bacteria (pollutant), the
problem is modeled as an ordinary differential equation.
Runge Kutta 4th order method is used. Solutions obtained are
compared with exact solutions and are graphically
discussed and analyzed.
A polluted lake has an initial concentration of a bacteria
of 107 parts/m3 , while the acceptable level is only 5*106
parts/m3 . The concentration of the bacteria will reduce as
fresh water enters the lake. Find the concentration of the
pollutant after 7 weeks.

dC
+ 0.06C = 0
dt
The differential equation that governs the concentration C
of the pollutant as a function of time (in weeks) is given by

dC
+ 0.06 C = 0 ,C ( 0 ) =10 6
dt
We Use the Runge-Kutta 4th order method and take a
step size of 3.5 weeks.
#include<conio.h>
#include<iostream.h>
void main()
{
float c[10],f,t[10],h,n;
cout<<"enter the initial values of concentration of bacteria ";
int i;
cin>>c[0];
cout<<"enter the initial value of time ";cin>>t[0];
cout<<"enter the value of time in weeks at which we want to see the
concentration ";cin>>f;
cout<<"enter the difference ";cin>>h;
n= (f-c[0])/h;
for(i=1;i<=n;i++)
{
a=0
k1=-(.06*c[a]);
k2=-h*(.06*(c[a]+k1/2));
k3=-h*(.06*(c[a]+k2/2));
k4=-h*(.06*(c[a]+k3));
k=(k1+2*k2+2*k3+k4)/6;
y[i]=y[a]+1;
a++;
}
Cout<<“n Table";
for(i=0;i<n;i++)
{
cout<<"t x=%fty=%f",val[i][0],val[i][1]);
cout<<"n");
getch();
}
1
2
Figure 1 compare the exact solution with the numerical
solution using Runge kutte 4th order method using different
step size. It is observed that there is significant error when
the calculation is done using Runge Kutte 4th order method
with step size 7. This error can be minimized if we reduce
the step size from 7 to 3.5. Now the numerical solution is
close to the exact solution. Further reduction of step size
from 3.5 to 1.75 does not bring any major error reduction.
In Figure 2, we are comparing the exact results with Runge
Kutte 1st order method (Euler), Runge Kutte 2nd order
method( Heun) and the Runge Kutte 4th order method. It is
observed that 4th order method give close approximation
to exact solution than Heun’s method and Euler’s method
Book

Numerical Solutions using Programming in C++, Volume I, Mittal Publication

Chapter/Papers

AP Azai , ., Graph Behaviour, Sindh College Of Engineering, Sindh (*paper)
64 Pages

Internet

James Amtoel , Contouring and Its Applications[online] http://www.civilogyusa.gov

document

[21/02/2014].
http://civilsimplified.com
http://www.bournemouth.ac.uk/library/using/numerical-equations.html
[Accessed 4 Feb 2014].






By the help of C++ program, it would be easy to analysis
results on different cases like step size, initial conditions,
boundary values, type of method etc.
Like application of 1st order differential equations in
Radioactive science, we can use 2nd order differential
equation in practical applications.
We can mould problems of Density, Population, Traffics
etc into 2nd order differential equations and can study the
behavior of result via graph on different inputs.



Program 1
Program 2
Numerical solution using runge kutta with programming in c++

Contenu connexe

Tendances

Lesson 7 antidifferentiation generalized power formula-simple substitution
Lesson 7 antidifferentiation generalized power formula-simple substitutionLesson 7 antidifferentiation generalized power formula-simple substitution
Lesson 7 antidifferentiation generalized power formula-simple substitutionLawrence De Vera
 
Discrete Math Ch5 counting + proofs
Discrete Math Ch5 counting + proofsDiscrete Math Ch5 counting + proofs
Discrete Math Ch5 counting + proofsAmr Rashed
 
Lesson 15: Exponential Growth and Decay (Section 021 slides)
Lesson 15: Exponential Growth and Decay (Section 021 slides)Lesson 15: Exponential Growth and Decay (Section 021 slides)
Lesson 15: Exponential Growth and Decay (Section 021 slides)Matthew Leingang
 
Introductory maths analysis chapter 12 official
Introductory maths analysis   chapter 12 officialIntroductory maths analysis   chapter 12 official
Introductory maths analysis chapter 12 officialEvert Sandye Taasiringan
 
Applied numerical methods lec5
Applied numerical methods lec5Applied numerical methods lec5
Applied numerical methods lec5Yasser Ahmed
 
Penyelesaian sistem persamaan linear dengan
Penyelesaian  sistem persamaan  linear  denganPenyelesaian  sistem persamaan  linear  dengan
Penyelesaian sistem persamaan linear denganBAIDILAH Baidilah
 
MATLAB ODE
MATLAB ODEMATLAB ODE
MATLAB ODEKris014
 
INTEGRAL TENTU DAN PENERAPANNYA
INTEGRAL TENTU DAN PENERAPANNYAINTEGRAL TENTU DAN PENERAPANNYA
INTEGRAL TENTU DAN PENERAPANNYAOng Lukman
 
Integral fungsi rasional1
Integral fungsi rasional1Integral fungsi rasional1
Integral fungsi rasional1Zhand Radja
 
Persamaan Diferensial
Persamaan DiferensialPersamaan Diferensial
Persamaan DiferensialDian Arisona
 
Integration By Parts Tutorial & Example- Calculus 2
Integration By Parts Tutorial & Example- Calculus 2Integration By Parts Tutorial & Example- Calculus 2
Integration By Parts Tutorial & Example- Calculus 2empoweringminds
 
Finite Difference method in Strucutral Dynamics
Finite Difference method in Strucutral DynamicsFinite Difference method in Strucutral Dynamics
Finite Difference method in Strucutral DynamicsSarvesh Sureshrao Chikte
 
applications of first order non linear partial differential equation
applications of first order non linear partial differential equationapplications of first order non linear partial differential equation
applications of first order non linear partial differential equationDhananjaysinh Jhala
 
algebric solutions by newton raphson method and secant method
algebric solutions by newton raphson method and secant methodalgebric solutions by newton raphson method and secant method
algebric solutions by newton raphson method and secant methodNagma Modi
 
Vector calculus
Vector calculusVector calculus
Vector calculusKumar
 
Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Syed Ahmed Zaki
 

Tendances (20)

Lesson 7 antidifferentiation generalized power formula-simple substitution
Lesson 7 antidifferentiation generalized power formula-simple substitutionLesson 7 antidifferentiation generalized power formula-simple substitution
Lesson 7 antidifferentiation generalized power formula-simple substitution
 
Discrete Math Ch5 counting + proofs
Discrete Math Ch5 counting + proofsDiscrete Math Ch5 counting + proofs
Discrete Math Ch5 counting + proofs
 
Lesson 15: Exponential Growth and Decay (Section 021 slides)
Lesson 15: Exponential Growth and Decay (Section 021 slides)Lesson 15: Exponential Growth and Decay (Section 021 slides)
Lesson 15: Exponential Growth and Decay (Section 021 slides)
 
Introductory maths analysis chapter 12 official
Introductory maths analysis   chapter 12 officialIntroductory maths analysis   chapter 12 official
Introductory maths analysis chapter 12 official
 
Sequences And Series
Sequences And SeriesSequences And Series
Sequences And Series
 
Bode plot & System type
Bode plot & System typeBode plot & System type
Bode plot & System type
 
Applied numerical methods lec5
Applied numerical methods lec5Applied numerical methods lec5
Applied numerical methods lec5
 
Penyelesaian sistem persamaan linear dengan
Penyelesaian  sistem persamaan  linear  denganPenyelesaian  sistem persamaan  linear  dengan
Penyelesaian sistem persamaan linear dengan
 
MATLAB ODE
MATLAB ODEMATLAB ODE
MATLAB ODE
 
INTEGRAL TENTU DAN PENERAPANNYA
INTEGRAL TENTU DAN PENERAPANNYAINTEGRAL TENTU DAN PENERAPANNYA
INTEGRAL TENTU DAN PENERAPANNYA
 
Integral fungsi rasional1
Integral fungsi rasional1Integral fungsi rasional1
Integral fungsi rasional1
 
Persamaan Diferensial
Persamaan DiferensialPersamaan Diferensial
Persamaan Diferensial
 
Integration By Parts Tutorial & Example- Calculus 2
Integration By Parts Tutorial & Example- Calculus 2Integration By Parts Tutorial & Example- Calculus 2
Integration By Parts Tutorial & Example- Calculus 2
 
Real analysis
Real analysisReal analysis
Real analysis
 
Finite Difference method in Strucutral Dynamics
Finite Difference method in Strucutral DynamicsFinite Difference method in Strucutral Dynamics
Finite Difference method in Strucutral Dynamics
 
applications of first order non linear partial differential equation
applications of first order non linear partial differential equationapplications of first order non linear partial differential equation
applications of first order non linear partial differential equation
 
algebric solutions by newton raphson method and secant method
algebric solutions by newton raphson method and secant methodalgebric solutions by newton raphson method and secant method
algebric solutions by newton raphson method and secant method
 
Vector calculus
Vector calculusVector calculus
Vector calculus
 
Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)
 
Unit4
Unit4Unit4
Unit4
 

Similaire à Numerical solution using runge kutta with programming in c++

Comparative Analysis of Different Numerical Methods for the Solution of Initi...
Comparative Analysis of Different Numerical Methods for the Solution of Initi...Comparative Analysis of Different Numerical Methods for the Solution of Initi...
Comparative Analysis of Different Numerical Methods for the Solution of Initi...YogeshIJTSRD
 
Comparisons of linear goal programming algorithms
Comparisons of linear goal programming algorithmsComparisons of linear goal programming algorithms
Comparisons of linear goal programming algorithmsAlexander Decker
 
A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS ijcsa
 
04 5sept 8554 latex optimisation rev
04 5sept 8554 latex optimisation rev04 5sept 8554 latex optimisation rev
04 5sept 8554 latex optimisation revIAESIJEECS
 
A modified ode solver for autonomous initial value problems
A modified ode solver for autonomous initial value problemsA modified ode solver for autonomous initial value problems
A modified ode solver for autonomous initial value problemsAlexander Decker
 
A modified ode solver for autonomous initial value problems
A modified ode solver for autonomous initial value problemsA modified ode solver for autonomous initial value problems
A modified ode solver for autonomous initial value problemsAlexander Decker
 
A General Purpose Exact Solution Method For Mixed Integer Concave Minimizatio...
A General Purpose Exact Solution Method For Mixed Integer Concave Minimizatio...A General Purpose Exact Solution Method For Mixed Integer Concave Minimizatio...
A General Purpose Exact Solution Method For Mixed Integer Concave Minimizatio...Martha Brown
 
Demosaicing of images for bayer cfa using projection algorithm
Demosaicing of images for bayer cfa using projection algorithmDemosaicing of images for bayer cfa using projection algorithm
Demosaicing of images for bayer cfa using projection algorithmeSAT Publishing House
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)inventionjournals
 
A Class of Continuous Implicit Seventh-eight method for solving y’ = f(x, y) ...
A Class of Continuous Implicit Seventh-eight method for solving y’ = f(x, y) ...A Class of Continuous Implicit Seventh-eight method for solving y’ = f(x, y) ...
A Class of Continuous Implicit Seventh-eight method for solving y’ = f(x, y) ...AI Publications
 
THE NEW HYBRID COAW METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
THE NEW HYBRID COAW METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMSTHE NEW HYBRID COAW METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
THE NEW HYBRID COAW METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMSijfcstjournal
 
A Hybrid Differential Evolution Method for the Design of IIR Digital Filter
A Hybrid Differential Evolution Method for the Design of IIR Digital FilterA Hybrid Differential Evolution Method for the Design of IIR Digital Filter
A Hybrid Differential Evolution Method for the Design of IIR Digital FilterIDES Editor
 
Impact of the Time Step in DEM Simulations on Granular Mixing Properties
Impact of the Time Step in DEM Simulations on Granular Mixing PropertiesImpact of the Time Step in DEM Simulations on Granular Mixing Properties
Impact of the Time Step in DEM Simulations on Granular Mixing Propertiesjodoua
 

Similaire à Numerical solution using runge kutta with programming in c++ (20)

Comparative Analysis of Different Numerical Methods for the Solution of Initi...
Comparative Analysis of Different Numerical Methods for the Solution of Initi...Comparative Analysis of Different Numerical Methods for the Solution of Initi...
Comparative Analysis of Different Numerical Methods for the Solution of Initi...
 
Comparisons of linear goal programming algorithms
Comparisons of linear goal programming algorithmsComparisons of linear goal programming algorithms
Comparisons of linear goal programming algorithms
 
coa dea(3)
coa dea(3)coa dea(3)
coa dea(3)
 
A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
 
04 5sept 8554 latex optimisation rev
04 5sept 8554 latex optimisation rev04 5sept 8554 latex optimisation rev
04 5sept 8554 latex optimisation rev
 
A modified ode solver for autonomous initial value problems
A modified ode solver for autonomous initial value problemsA modified ode solver for autonomous initial value problems
A modified ode solver for autonomous initial value problems
 
A modified ode solver for autonomous initial value problems
A modified ode solver for autonomous initial value problemsA modified ode solver for autonomous initial value problems
A modified ode solver for autonomous initial value problems
 
Informe #1 de metodos
Informe #1 de metodosInforme #1 de metodos
Informe #1 de metodos
 
Euler Method Details
Euler Method Details Euler Method Details
Euler Method Details
 
A General Purpose Exact Solution Method For Mixed Integer Concave Minimizatio...
A General Purpose Exact Solution Method For Mixed Integer Concave Minimizatio...A General Purpose Exact Solution Method For Mixed Integer Concave Minimizatio...
A General Purpose Exact Solution Method For Mixed Integer Concave Minimizatio...
 
Demosaicing of images for bayer cfa using projection algorithm
Demosaicing of images for bayer cfa using projection algorithmDemosaicing of images for bayer cfa using projection algorithm
Demosaicing of images for bayer cfa using projection algorithm
 
A02610106
A02610106A02610106
A02610106
 
A02610106
A02610106A02610106
A02610106
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)
 
A Class of Continuous Implicit Seventh-eight method for solving y’ = f(x, y) ...
A Class of Continuous Implicit Seventh-eight method for solving y’ = f(x, y) ...A Class of Continuous Implicit Seventh-eight method for solving y’ = f(x, y) ...
A Class of Continuous Implicit Seventh-eight method for solving y’ = f(x, y) ...
 
THE NEW HYBRID COAW METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
THE NEW HYBRID COAW METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMSTHE NEW HYBRID COAW METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
THE NEW HYBRID COAW METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS
 
C41016023
C41016023C41016023
C41016023
 
A Hybrid Differential Evolution Method for the Design of IIR Digital Filter
A Hybrid Differential Evolution Method for the Design of IIR Digital FilterA Hybrid Differential Evolution Method for the Design of IIR Digital Filter
A Hybrid Differential Evolution Method for the Design of IIR Digital Filter
 
Impact of the Time Step in DEM Simulations on Granular Mixing Properties
Impact of the Time Step in DEM Simulations on Granular Mixing PropertiesImpact of the Time Step in DEM Simulations on Granular Mixing Properties
Impact of the Time Step in DEM Simulations on Granular Mixing Properties
 
Informe taller # 3
Informe taller # 3 Informe taller # 3
Informe taller # 3
 

Dernier

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 

Dernier (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 

Numerical solution using runge kutta with programming in c++

  • 1. Vijay Choudhary vijaycttf@gmail.com Department of Civil Engineering Poornima University, Jaipur
  • 2.         Introduction Formulation of the problem Solution of the problem Approximations, errors Graphical representation Conclusion References Further Scope
  • 3. A physical problem of finding how much concentration of the pollutant would be there in a lake after certain time. To find the concentration of the bacteria (pollutant), the problem is modeled as an ordinary differential equation. Runge Kutta 4th order method is used. Solutions obtained are compared with exact solutions and are graphically discussed and analyzed.
  • 4. A polluted lake has an initial concentration of a bacteria of 107 parts/m3 , while the acceptable level is only 5*106 parts/m3 . The concentration of the bacteria will reduce as fresh water enters the lake. Find the concentration of the pollutant after 7 weeks. dC + 0.06C = 0 dt
  • 5. The differential equation that governs the concentration C of the pollutant as a function of time (in weeks) is given by dC + 0.06 C = 0 ,C ( 0 ) =10 6 dt We Use the Runge-Kutta 4th order method and take a step size of 3.5 weeks.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. #include<conio.h> #include<iostream.h> void main() { float c[10],f,t[10],h,n; cout<<"enter the initial values of concentration of bacteria "; int i; cin>>c[0]; cout<<"enter the initial value of time ";cin>>t[0]; cout<<"enter the value of time in weeks at which we want to see the concentration ";cin>>f; cout<<"enter the difference ";cin>>h; n= (f-c[0])/h;
  • 14.
  • 15. 1
  • 16. 2
  • 17. Figure 1 compare the exact solution with the numerical solution using Runge kutte 4th order method using different step size. It is observed that there is significant error when the calculation is done using Runge Kutte 4th order method with step size 7. This error can be minimized if we reduce the step size from 7 to 3.5. Now the numerical solution is close to the exact solution. Further reduction of step size from 3.5 to 1.75 does not bring any major error reduction. In Figure 2, we are comparing the exact results with Runge Kutte 1st order method (Euler), Runge Kutte 2nd order method( Heun) and the Runge Kutte 4th order method. It is observed that 4th order method give close approximation to exact solution than Heun’s method and Euler’s method
  • 18. Book Numerical Solutions using Programming in C++, Volume I, Mittal Publication Chapter/Papers AP Azai , ., Graph Behaviour, Sindh College Of Engineering, Sindh (*paper) 64 Pages Internet James Amtoel , Contouring and Its Applications[online] http://www.civilogyusa.gov document [21/02/2014]. http://civilsimplified.com http://www.bournemouth.ac.uk/library/using/numerical-equations.html [Accessed 4 Feb 2014].
  • 19.    By the help of C++ program, it would be easy to analysis results on different cases like step size, initial conditions, boundary values, type of method etc. Like application of 1st order differential equations in Radioactive science, we can use 2nd order differential equation in practical applications. We can mould problems of Density, Population, Traffics etc into 2nd order differential equations and can study the behavior of result via graph on different inputs.