Presentation is loading. Please wait.

Presentation is loading. Please wait.

Engineering Computation and Simulation Conor Brennan Dublin City University EE317.

Similar presentations


Presentation on theme: "Engineering Computation and Simulation Conor Brennan Dublin City University EE317."— Presentation transcript:

1 Engineering Computation and Simulation Conor Brennan Dublin City University brennanc@eeng.dcu.ie EE317

2 GROUP 4 :- Manpreet Singh Nanda Varun Raina Kanika Poply Numerical Methods

3 What are Numerical Solvers? Used to compute the solution of a complex model of a physical system Used to compute the solution of a complex model of a physical system Available in Simulation Software or algorithms available in Mathematical software packages like Matlab. Available in Simulation Software or algorithms available in Mathematical software packages like Matlab. Riemann Solver: Used heavily in Computational Fluid Dynamics and Magnetohydrodynamics. Riemann Solver: Used heavily in Computational Fluid Dynamics and Magnetohydrodynamics. Roe Solver: Linearization of the Jacobian Roe Solver: Linearization of the Jacobian HLLC Solver: Used to restore missing rarefaction waves HLLC Solver: Used to restore missing rarefaction waves Some Examples of Numerical Solvers:

4 Some Numerical Solvers in Matlab: Two Basic Categories of Solvers in Matlab: Fixed Step Solver: Solves the model at regular time intervals from beginning to the end of interval. Fixed Step Solver: Solves the model at regular time intervals from beginning to the end of interval. Variable Step Solver: Vary the step size during simulation changing the step size to increase accuracy according to how model’s states are changing Variable Step Solver: Vary the step size during simulation changing the step size to increase accuracy according to how model’s states are changing

5 ODE 45 method: Inbuilt Function in Matlab for solving ODE's. It is based on the Runge-Kutta method. ODE 45 method: Inbuilt Function in Matlab for solving 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 variable ‘t’ is the independent variable ‘y’ is the dependent variable ‘y’ is the dependent variable Varies the size of the step of the independent variable in order to meet the accuracy we specify at any particular point along the solution. Varies the size of the step of the independent variable in order to meet the accuracy we specify at any particular point along the solution. Numerical Solvers in Engineering Examples:

6 Example Problem of Numerical Solver Kinematics Problem : Kinematics Problem : Consider a Paratrooper of mass 80 kg falling from a height of 600 meters. Consider a Paratrooper of mass 80 kg falling from a height of 600 meters. He is accelerated by gravity and then decelerated by Drag Force. He is accelerated by gravity and then decelerated by Drag Force. V is velocity in m/s. V is velocity in m/s. Governing Equation: dV/dt = -mg + 4/15(V^2)/m Governing Equation: dV/dt = -mg + 4/15(V^2)/m Reference: (Book: Numerical Computing in Matlab) Reference: (Book: Numerical Computing in Matlab)

7 Example to illustrate Matlab’s Inbuilt Solver F.M File FUNC..M Code that calls the ODE45 Function

8 Example to illustrate Matlab’s Inbuilt Solver: Result

9 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.

10 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 : y n +1 = y n +1/2*h (f ( x n, y n ) + f(x n +1,y* n +1)) where y* n +1 = y n + f( x n, y n ) Range - Kutta Method : y n +1 = y n + 1/6 ( A 1 + 2A 2 + 2A 3 + A 4 )*h where A 1 = f (x n, y n ) A 2 = f (x n + h/2, (y n +h/2)A 1 ) A 3 = f (x n + h/2, (y n +h/2)A 2 ) A 4 = f (x n +h, y n +hA 3 )

11 Solution for Ordinary Differential Equation dy/dx = x +y

12 Graph Showing the Relative Error

13 Relative Error and Elapsed Time

14 Algorithm for Projectile code Algorithm for Projectile code Setting the Position (x, y) and Velocity (Vy, Vx) Vectors and parameters( g, time, friction etc). Setting the Position (x, y) and Velocity (Vy, Vx) Vectors and parameters( g, time, friction etc). Running for fixed number of Steps (N). Running for fixed number of Steps (N). Without Friction: Vx is constant and Vy is Dependent( on g). Without Friction: Vx is constant and Vy is Dependent( on g). Run the loop to generate projectile parabola. ( Vy, Vx, x and y) Run the loop to generate projectile parabola. ( Vy, Vx, x and y) Concept of small interval time frame( Realistic Effect). Concept of small interval time frame( Realistic Effect).

15 Algorithm Cont: Testing loop condition: Start condition and threshold condition Testing loop condition: Start condition and threshold condition Since, it keeps on moving ( Vx friction independent). Since, it keeps on moving ( Vx friction independent). Vx Constant

16 Frictionless Projectile Plot(Euler_x) increasing gradually Plot(Euler_Vy) Decreasing with threshold loop Plot(Euler_y)

17 Problems faced Re-bouncing even on Friction present. First Projectile obtained

18 Projectile Fired From the Origin (0,0)

19 Projectile with Friction Friction with k = 0.02 Friction with k = 0.02 Values for Euler_vy, Euler_x and Projectile generated. Values for Euler_vy, Euler_x and Projectile generated.

20 Projectile with Friction with diff “k” Different values of k = 0.04, 0.08 and 0.1 Different values of k = 0.04, 0.08 and 0.1 Effects on Projectile. Effects on Projectile. Due to constant air friction. Due to constant air friction.

21 K = 0.2

22 Realistic Reflections Written code with smaller time frame to compare to the threshold. Written code with smaller time frame to compare to the threshold. Friction with Realistic Reflections

23 Ireland Lacks Quality Graduates? I believe that instead of just emphasizing on negatives he should take the Lead Role in providing a solution to this problem. I believe that instead of just emphasizing on negatives he should take the 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 Level Organizations should interact more with the student community during the development stage by for e.g. organizing more quiz competitions etc. Organizations should interact more with the student community during the development stage by for e.g. organizing more quiz competitions etc. Children between the age-group of 10-13 years should be encouraged to take up maths and science subjects and hence should be provided with the necessary platform or resources Children between the age-group of 10-13 years should be encouraged to take up maths and science subjects and hence should be provided with the necessary platform or resources University Level More opportunities should be given to aspiring graduates through means of work placements, regular industry visits and Awards to recognize and develop next generation of talent. More opportunities should be given to aspiring graduates through means of work placements, regular industry visits and Awards to recognize and develop next generation of talent. Organizations should take an active role and advice the universities regularly about the changing needs of the industry. Organizations should take an active role and advice the universities regularly about the changing needs of the industry.

24 Thank You !! QUESTIONS ???


Download ppt "Engineering Computation and Simulation Conor Brennan Dublin City University EE317."

Similar presentations


Ads by Google