Modeling and Simulations 1

Slides:



Advertisements
Similar presentations
State Variables.
Advertisements

MATHEMATICAL MODELING Principles. Why Modeling? Fundamental and quantitative way to understand and analyze complex systems and phenomena Complement to.
Experiments and Variables
CS 282.  Any question about… ◦ SVN  Permissions?  General Usage? ◦ Doxygen  Remember that Project 1 will require it  However, Assignment 2 is good.
Testing Variables Students will manipulate variables of a pendulum; draw conclusions from experimentation with pendulums Why should you test only one variable.
Modelling - Module 1 Lecture 1 Modelling - Module 1 Lecture 1 David Godfrey.
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Lumped Parameter Systems.
A Model for Computational Science Investigations AiS Challenge STI 2004 Richard Allen.
Fundamental concepts and terminology of Verification and Validation Verification is the process that checks whether mathematical model was implemented.
MAT 594CM S10Fundamentals of Spatial ComputingAngus Forbes Week 2 : Dynamics & Numerical Methods Goal : To write a simple physics simulation Topics: Intro.
Welcome To Math 463: Introduction to Mathematical Biology
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 4 Programming and Software EXCEL and MathCAD.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 2 Mathematical Modeling and Engineering Problem Solving.
Physics 151 Week 4 Day 2 Topics –Motion Graphs –Area under a curve (velocity to position) –Constant acceleration equations.
Testing Bridge Lengths The Gadsden Group. Goals and Objectives Collect and express data in the form of tables and graphs Look for patterns to make predictions.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Mathematical Modeling and Engineering Problem solving.
Feedback Control Systems (FCS)
MATH 250 Linear Algebra and Differential Equations for Engineers
Applications of Calculus. The logarithmic spiral of the Nautilus shell is a classical image used to depict the growth and change related to calculus.
A Model for Computational Science Investigations NCSLP Summer Workshop 2002 Richard Allen.
Engineering Computation and Simulation Conor Brennan Dublin City University EE317.
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Mathematical Modeling / Computational Science AiS Challenge Summer Teacher Institute 2002 Richard Allen.
An Introduction to Programming and Algorithms. Course Objectives A basic understanding of engineering problem solving process. A basic understanding of.
What is a model Some notations –Independent variables: Time variable: t, n Space variable: x in one dimension (1D), (x,y) in 2D or (x,y,z) in 3D –State.
ENM 503 Lesson 1 – Methods and Models The why’s, how’s, and what’s of mathematical modeling A model is a representation in mathematical terms of some real.
CSE 3802 / ECE 3431 Numerical Methods in Scientific Computation
SUPERCOMPUTING CHALLENGE KICKOFF 2015 A Model for Computational Science Investigations Oct 2015 © challenge.org Supercomputing Around.
A Course in Scientific Simulation Mike O’Leary Shiva Azadegan Towson University Supported by the National Science Foundation under grant DUE
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Mathematical Modeling: Intro Patrice Koehl Department of Biological Sciences National University of Singapore
Oct 2015 © challenge.org Supercomputing Around Us: Sensors and Data1 Computational Science and Mathematical Modeling.
MECE 102 Engineering Mechanics Lab A First Year Course in Newtonian Mechanics, Experimentation, and Computer Tools Created by the Faculty of the Mechanical.
Modeling & Simulation of Dynamic Systems (MSDS)
PHY 151: Lecture Motion of an Object attached to a Spring 12.2 Particle in Simple Harmonic Motion 12.3 Energy of the Simple Harmonic Oscillator.
Introduction to Modeling Technology Enhanced Inquiry Based Science Education.
Modeling First Order Systems in Simulink And Analyzing Step, Pulse and Ramp Responses SOEN385 Control Systems and Applications.
Modelling & Simulation of Semiconductor Devices Lecture 1 & 2 Introduction to Modelling & Simulation.
Chapter 2 Motion in One Dimension. Kinematics Describes motion while ignoring the external agents that might have caused or modified the motion (Dynamics.
Solving Engineering Problems
MATHEMATICAL MODELING
Introduction.
Chapter 12: Simulation and Modeling
Mathematical Modelling of Mechanical and Electrical Systems
Chapter 1 Lesson 1.
Introduction to Physical Science
CE 102 Statics Chapter 1 Introduction.
Introduction.
Chapter 1 What is Biology?.
Mechanical Engineering at Virginia Tech
IE-432 Design Of Industrial Experiments
Autonomous Cyber-Physical Systems: Dynamical Systems
Motion in One Dimension
Chapter 1 Sections 2,3 Pages
Solving Engineering Problems
Introduction.
Copyright © Cengage Learning. All rights reserved.
MATH 1910 Chapter P Section 4 Fitting Models to Data.
Introduction.
Copyright © Cengage Learning. All rights reserved.
MATHEMATICAL MODELING
MATHEMATICAL MODELING
Practical Application of Integral Calculus
Graphing data.
Key Ideas How do scientists explore the world?
DESIGN OF EXPERIMENTS by R. C. Baker
Introduction.
Presentation transcript:

Modeling and Simulations 1

Why Modeling? Fundamental and quantitative way to understand and analyze complex systems and phenomena. Complement to Theory and Experiments, and often integrate them. Becoming widespread in: Computational Physics, Chemistry, Mechanics, Materials, Biology,etc.

Mathematical Modeling? Mathematical modeling seeks to gain an understanding of science through the use of mathematical models on computers. Experiment Computation Theory

Mathematical Modeling Is often used in place of experiments when experiments are too large, too expensive, too dangerous, or too time consuming. Can be useful to investigate the use of pathogens (viruses, bacteria) to control an insect population, tumor growth, etc. Is a modern tool for scientific investigation.

Mathematical Modeling Has emerged as a powerful, indispensable tool for studying a variety of problems in scientific research, product and process development, and manufacturing. Seismology Climate modeling Economics Environment Material research Drug design Manufacturing Medicine Biology Seismology: oil exploration, earthquake prediction (Parallel computation reduced compute time from weeks to hours) Global ocean/ climate modeling: global warming, weather prediction Economics: growth of a local or national economy (Agent-based modeling), management of resources, analysis of tax strategies Environmental: utilization of resources, population modeling, insect control Materials research: design of new materials, smart materials; shape driven by temperature materials; materials aging issues (Stockpile stewardship) Drug design: design of anti-cancer drugs, etc. Manufacturing: optimization of manufacturing processes, automation Medicine: Medical imaging, MRIs Human genome: applications to understanding and treating disease

Mathematical Modeling Process

Real World Problem Identify Real-World Problem: Perform background research, focus on a workable problem. Conduct investigations (Labs), if appropriate. Learn the use of a computational tool: MATLAB, Maple, Mathematica, Excel, etc.. Understand current activity and predict future behavior.

Example 1: Falling Rock Determine the motion of a rock dropped from height, H, above the ground with initial velocity, V. A discrete model: Find the position and velocity of the rock above the ground at the equally spaced times, t0, t1, t2, …; e.g. t0 = 0 sec., t1 = 1 sec., t2 = 2 sec., etc. |______|______|____________|______ t0 t1 t2 … tn Models of time-dependent processes may be split into two categories, discrete and continuous, depending on how the time variable is treated. Key point: x and v remain constant between time points. How accurate is this? When implemented on a computer, many continuous models become discrete; also rounding error issues.

Working Model State simplifying assumptions. Simplify Working Model: Identify and select factors to describe important aspects of Real World Problem; determine those factors that can be neglected. State simplifying assumptions. Determine governing principles, physical laws. Identify model variables and inter-relationships. Simplify: Purpose is to eliminate unnecessary information and to simplify that which is retained as much as possible. Simplifying assumptions: no friction in the system (physics), no immigration or emigration (population), constant growth rate (biology), etc. Governing principles: laws/relationships from physics, biology, engineering economics, etc.; balance equations. Key variables and relationships Variables types include input variables, output variables, and parameters.

Governing principles: d = v*t and v = a*t. Simplifying assumptions: Gravity is the only force acting on the body. Earth is flat. No drag (air resistance). Model variables are H,V, g, t, x, and v Rock’s position and velocity above the ground will be modeled at discrete times (t0, t1, t2, …) until rock hits the ground. Constant acceleration model.

Mathematical Model Represent  Mathematical Model: Express the Working Model in mathematical terms; write down mathematical equations whose solution describes the Working Model. In general, the success of a mathematical model depends on how easy it is to use and how accurately it predicts. A mathematical model is an important step in formalizing a problem for solution on a computer.

|______|______|____________|_____ t0 t1 t2 … tn t0 = 0; x0 = H; v0 = V v0 v1 v2 … vn x0 x1 x2 … xn |______|______|____________|_____ t0 t1 t2 … tn t0 = 0; x0 = H; v0 = V Input variables are t0=0, x0=H, and v0=V; output variables are the ti, xi and vi; g is a parameter. t2= t1 + Δt x2= x1 - (v1*Δt) v2= v1 + (g*Δt) … t1= t0 + Δt x1= x0 - (v0*Δt) v1= v0 + (g*Δt)

Computational Model Translate  Computational Model: Change Mathematical Model into a form suitable for computational solution. Existence of unique solution Choice of the numerical method Choice of the algorithm Software

Computational Model Translate  Computational Model: Change Mathematical Model into a form suitable for computational solution. Computational models include software such as MATLAB,Maple, Excel, or Mathematica, or languages such as C, C++, or Java.

Pseudo Code Input V- initial velocity H-initial height g -acceleration due to gravity Δt -time step imax- maximum number of steps Output ti - t value at time step i xi - height at time ti vi - velocity at time ti

Initialize Set ti = t0 = 0; vi = v0 = V; xi = x0 = H print ti, xi, vi Time stepping: i = 1, imax Set ti = t(i-1) + Δt Set xi = x(i-1) -vi*Δt Set vi = v(i-1) + g*Δt if (xi < 0), Set xi = 0; quit

Results/Conclusions Simulate  Results/Conclusions: Run “Computational Model” to obtain Results; draw Conclusions. Verify your computer program; use check cases; explore ranges of validity. Graphs, charts, and other visualization tools are useful in summarizing results and drawing conclusions. Evaluate results; Draw conclusions; Make recommendations. Falling Rock: Explore approximations. What is the difference between xcontinuous (exact solution to simplified problem) and xdiscrete (approximate solution to simplified problem)? Neither xcontinuous nor xdiscrete are necessarily solutions to the real-world problem.

Falling Rock: Model Erin Furtak

Interpret Conclusions If model results do not “agree” with physical reality or experimental data, reexamine the Working Model (assumptions) and repeat modeling steps. Often, the modeling process proceeds through several iterations until model is “acceptable”. If model solution is acceptable, communicate results: technical paper, oral presentation, etc. If not, repeat the modeling steps.

Interpret Conclusions(ctd.) To create a more realistic model of a falling rock, some of the simplifying assumptions could be dropped; e.g., incorporate drag - depends on shape of the rock is proportional to velocity. Improve discrete model: Approximate velocities in the midpoint of time intervals instead of the beginning. Reduce the size of Δt. Drag: proportional to v for low velocities, proportional to v^2 for large velocities.

Example 2: Simple Pendulum Models of time-dependent processes may be split into two categories, discrete and continuous, depending on how the time variable is treated. Key point: x and v remain constant between time points. How accurate is this? When implemented on a computer, many continuous models become discrete; also rounding error issues.

Example 2 Compute and plot the linear response of a simple pendulum having a mass of 10 grams and a length of 5 cm. The initial conditions are Also compare the generated plot with the nonlinear plot. Models of time-dependent processes may be split into two categories, discrete and continuous, depending on how the time variable is treated. Key point: x and v remain constant between time points. How accurate is this? When implemented on a computer, many continuous models become discrete; also rounding error issues.

Solution The differential equation of motion for the simple pendulum without any damping is given by If we consider the system to be linear, i.e., for small angles, Models of time-dependent processes may be split into two categories, discrete and continuous, depending on how the time variable is treated. Key point: x and v remain constant between time points. How accurate is this? When implemented on a computer, many continuous models become discrete; also rounding error issues.

So the linearized version of the above non-linear differential equation reduces to In order to use MATLAB to solve it, we have to reduce it to two first order differential equations as MATLAB uses a Runge-kutta method to solve differential equations.

Let When the values of ‘theta’ and the first derivative of ‘theta’ are substituted in the second order linearized differential equation, we get the following two first order differential equation:

For a nonlinear system, The second order non-linear differential equation reduces to the following, two first order differential equation:

Computational Model For the linear case the function file is saved as ‘linear.m’. function yp = linear(t,y) yp = [y(2);((-g/l) *(y(1)))]; For the non linear case the function file is saved as ‘nonlinear.m’. function yp = nonlinear(t,y) yp = [y(2);((-g/l) *sin(y(1)))];

Computational Model  

Computational Model tspan = [0 5]; y0 = [1.57;0]; [t,y] = ode45('linear',tspan,y0) plot(t,y(:,1)) grid on; xlabel(‘Time’) ylabel(‘Theta’) title(‘Theta Vs Time’) hold on;

Computational Model After running the program for the linear version, change the name of the function in the third line of the main code from ‘linear’ to ‘nonlinear’. By doing this, the Ode45 command will now solve the nonlinear differential equations and plot the result in the same graph. To differentiate between the linear and the non-linear curve, use a different line style.

Oscillating Model

Conclusions From the plots we can see that the time period for the non linear equation is greater than that of the linear equation.

Thank You!