engineering computation and simulation
DESCRIPTION
EE317. Engineering Computation and Simulation. Conor Brennan Dublin City University [email protected]. Numerical Methods. GROUP 4 :- Manpreet Singh Nanda Varun Raina Kanika Poply. What are Numerical Solvers?. Used to compute the solution of a complex model of a physical system - PowerPoint PPT PresentationTRANSCRIPT
Engineering Engineering Computation and Computation and
SimulationSimulationConor BrennanConor Brennan
Dublin City University Dublin City University [email protected] [email protected]
EE317
GROUP 4 :-
Manpreet Singh Nanda
Varun Raina
Kanika Poply
Numerical Methods
What are Numerical Solvers?What are Numerical Solvers? Used to compute the solution of a complex model of a Used to compute the solution of a complex model of a
physical systemphysical system Available in Simulation Software or algorithms available Available in Simulation Software or algorithms available
in Mathematical software packages like Matlab.in Mathematical software packages like Matlab.
Riemann SolverRiemann Solver: Used heavily in Computational Fluid : Used heavily in Computational Fluid Dynamics and Magnetohydrodynamics.Dynamics and Magnetohydrodynamics.
Roe SolverRoe Solver:: Linearization of the Jacobian Linearization of the Jacobian HLLC SolverHLLC Solver: : Used to restore missing rarefaction wavesUsed to restore missing rarefaction waves
Some Examples of Numerical Some Examples of Numerical Solvers:Solvers:
Some Numerical Solvers in Some Numerical Solvers in Matlab:Matlab:
Two Basic Categories of Solvers in Matlab:Two Basic Categories of Solvers in Matlab:
Fixed Step Solver:Fixed Step Solver: Solves the model at regular time Solves the model at regular time intervals from beginning to the end of interval.intervals from beginning to the end of interval.
Variable Step Solver:Variable Step Solver: Vary the step size during Vary the step size during simulation changing the step size to increase accuracy simulation changing the step size to increase accuracy according to how model’s states are changingaccording to how model’s states are changing
ODE 45 methodODE 45 method: Inbuilt Function in Matlab for solving : Inbuilt Function in Matlab for solving ODE's. It is based on the Runge-Kutta method.ODE's. It is based on the Runge-Kutta method.
Handles general equations of the form Handles general equations of the form
‘‘t’ is the independent variablet’ is the independent variable ‘‘y’ is the dependent variabley’ is the dependent variable Varies the size of the step of the independent variable in Varies the size of the step of the independent variable in
order to meet the accuracy we specify at any particular order to meet the accuracy we specify at any particular point along the solution.point along the solution.
Numerical Solvers in Numerical Solvers in Engineering Examples:Engineering Examples:
Example Problem of Numerical Example Problem of Numerical SolverSolver
Kinematics ProblemKinematics Problem : :
Consider a Paratrooper of mass 80 kg falling from a Consider a Paratrooper of mass 80 kg falling from a height of 600 meters.height of 600 meters.
He is accelerated by gravity and then decelerated by He is accelerated by gravity and then decelerated by Drag Force.Drag Force.
V is velocity in m/s.V is velocity in m/s. Governing Equation: dV/dt = -mg + 4/15(V^2)/mGoverning Equation: dV/dt = -mg + 4/15(V^2)/m Reference: (Book: Numerical Computing in Matlab)Reference: (Book: Numerical Computing in Matlab)
Example to illustrate Matlab’s Example to illustrate Matlab’s Inbuilt SolverInbuilt Solver
F.MFile
FUNC..MCode that calls the ODE45 Function
Example to illustrate Matlab’s Example to illustrate Matlab’s Inbuilt Solver: ResultInbuilt Solver: Result
Ordinary Differential Equation
An Ordinary differential (or ODE) is a relation that contains function of only one independent variable and one or more of its derivatives with respect to that variable.
Three Methods to Solve ODE's
• Euler Method: It is based on finite difference approximations to the derivative.
f (x+h) = f (x) + h*f ‘(x)
• Predictor Corrector Method : yn+1 = yn +1/2*h (f ( xn , yn) + f(xn+1,y*n+1))
where y*n+1 = yn + f( xn, yn)
• Range - Kutta Method :yn+1 = yn + 1/6 ( A1+ 2A2 + 2A3 + A4)*h
where A1 = f (xn , yn)A2 = f (xn + h/2 , (yn+h/2)A1)A3 = f (xn + h/2 , (yn+h/2)A2)A4 = f (xn +h, yn+hA3)
Solution for Ordinary Differential Equation dy/dx = x +y
Graph Showing the Relative Error
Relative Error and Elapsed Time
Algorithm for Projectile codeAlgorithm for Projectile code
Setting the Position (x , y) and Velocity (Vy, Vx) Vectors Setting the Position (x , y) and Velocity (Vy, Vx) Vectors and parameters( g, time, friction etc).and parameters( g, time, friction etc).
Running for fixed number of Steps (N).Running for fixed number of Steps (N). Without FrictionWithout Friction: Vx is constant and Vy is : Vx is constant and Vy is
Dependent( on g).Dependent( on g). Run the loop to generate projectile parabola. ( Vy, Vx, x Run the loop to generate projectile parabola. ( Vy, Vx, x
and y)and y) Concept of small interval time frame( Realistic Effect).Concept of small interval time frame( Realistic Effect).
Algorithm Cont:Algorithm Cont:
Testing loop condition: Start condition and threshold Testing loop condition: Start condition and threshold conditioncondition
Since, it keeps on moving ( Vx friction independent).Since, it keeps on moving ( Vx friction independent).
Vx Constant
Frictionless ProjectileFrictionless ProjectilePlot(Euler_x) increasing gradually
Plot(Euler_Vy) Decreasing with threshold loop
Plot(Euler_y)
Problems facedProblems facedRe-bouncing even on Friction present.
First Projectile obtained
Projectile Fired From the Origin (0,0)
Projectile with Friction Friction with k = 0.02Friction with k = 0.02 Values for Euler_vy, Values for Euler_vy,
Euler_x and Projectile Euler_x and Projectile generated.generated.
Projectile with Friction with diff “k”
Different values of k = Different values of k = 0.04, 0.08 and 0.1 0.04, 0.08 and 0.1
Effects on Projectile.Effects on Projectile. Due to constant air Due to constant air
friction.friction.
K = 0.2
Realistic ReflectionsRealistic Reflections Written code with smaller time frame to compare to the Written code with smaller time frame to compare to the
thresholdthreshold..Friction with Realistic Reflections
Ireland Lacks Quality Graduates?Ireland Lacks Quality Graduates? I believe that instead of just emphasizing on negatives he should take the I believe that instead of just emphasizing on negatives he should take the
Lead Role in providing a solution to this problem.Lead Role in providing a solution to this problem. Steps that could be taken at two different levels:Steps that could be taken at two different levels:
School LevelSchool Level Organizations should interact more with the student community during Organizations should interact more with the student community during
the development stage by for e.g. organizing more quiz competitions the development stage by for e.g. organizing more quiz competitions etc. etc.
Children between the age-group of 10-13 years should be encouraged Children between the age-group of 10-13 years should be encouraged to take up maths and science subjects and hence should be provided to take up maths and science subjects and hence should be provided with the necessary platform or resourceswith the necessary platform or resources
University LevelUniversity Level More opportunities should be given to aspiring graduates through More opportunities should be given to aspiring graduates through
means of work placements, regular industry visits and Awards to means of work placements, regular industry visits and Awards to recognize and develop next generation of talent.recognize and develop next generation of talent.
Organizations should take an active role and advice the universities Organizations should take an active role and advice the universities regularly about the changing needs of the industry.regularly about the changing needs of the industry.
Thank You !!
QUESTIONS ???