Developing Simulations and Demonstrations Using Microsoft Visual C++ Mike O’Leary Shiva Azadegan Towson University Supported by the National Science Foundation.

Slides:



Advertisements
Similar presentations
Introduction to Projectile Motion
Advertisements

Developing Computer Simulations Using Object Oriented Programming. The Three Body Problem: A Case Study Mike O’Leary & Shiva Azadegan Towson University.
MAT 594CM S10Fundamentals of Spatial ComputingAngus Forbes Week 2 : Dynamics & Numerical Methods Goal : To write a simple physics simulation Topics: Intro.
Course Outline 1.MATLAB tutorial 2.Motion of systems that can be idealized as particles Description of motion; Newton’s laws; Calculating forces required.
Computational Methods for Management and Economics Carla Gomes Module 3 OR Modeling Approach.
Mechanical Vibrations
Physics 102 Introduction Instructor Dr. Moza Al-Rabban Office Phone: Spring 2007.
Chapter 13 VibrationsandWaves. Hooke’s Law F s = - k x F s = - k x F s is the spring force F s is the spring force k is the spring constant k is the spring.
1 The Mathematics of Signal Processing - an Innovative Approach Peter Driessen Faculty of Engineering University of Victoria.
7/5/20141FCI. Prof. Nabila M. Hassan Faculty of Computer and Information Fayoum University 2013/2014 7/5/20142FCI.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Mathematical Modeling and Engineering Problem solving.
Chapter 15 Fourier Series and Fourier Transform
The Finite Element Method
Lecture 35 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Tutorial 5: Numerical methods - buildings Q1. Identify three principal differences between a response function method and a numerical method when both.
Chapter 8: Problem Solving
An innovative learning model for computation in first year mathematics Birgit Loch Department of Mathematics and Computing, USQ Elliot Tonkes CS Energy,
Parallelism and Robotics: The Perfect Marriage By R.Theron,F.J.Blanco,B.Curto,V.Moreno and F.J.Garcia University of Salamanca,Spain Rejitha Anand CMPS.
BsysE595 Lecture Basic modeling approaches for engineering systems – Summary and Review Shulin Chen January 10, 2013.
INTEGRATED SYSTEMS 1205 Technology Education A Curriculum Review Sabine Schnepf-Comeau July 19, 2011 ED 4752.
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 19 MECHANICAL VIBRATIONS
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
An Introduction to Programming and Algorithms. Course Objectives A basic understanding of engineering problem solving process. A basic understanding of.
Teaching Partial Differential Equations Using Mathematica Katarina Jegdic Assistant Professor Computer and Mathematical Sciences Department University.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Matlab for Engineers About Matlab Chapter 1. Matlab for Engineers What’s in this Chapter? What is Matlab? Student Edition of Matlab How is Matlab used.
Applied Numerical Method for Engineers and Scientists
CSE 3802 / ECE 3431 Numerical Methods in Scientific Computation
Progress in identification of damping: Energy-based method with incomplete and noisy data Marco Prandina University of Liverpool.
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.
Computational fluid dynamics Authors: A. Ghavrish, Ass. Prof. of NMU, M. Packer, President of LDI inc.
Wednesday, Apr. 28, 2004PHYS , Spring 2004 Dr. Jaehoon Yu 1 PHYS 1441 – Section 004 Lecture #23 Wednesday, Apr. 28, 2004 Dr. Jaehoon Yu Period.
Numerical Analysis Intro to Scientific Computing.
1 Honors Physics 1 Summary and Review - Fall 2013 Quantitative and experimental tools Mathematical tools Newton’s Laws and Applications –Linear motion.
Part 1 Chapter 1 Mathematical Modeling, Numerical Methods, and Problem Solving PowerPoints organized by Dr. Michael R. Gustafson II, Duke University and.
Phy 303: Classical Mechanics (2) Chapter 3 Lagrangian and Hamiltonian Mechanics.
INTRODUCTION TO SIMULINK by Yasmin Hanum Md Thayoob & Aidil Azwin Zainul Abidin.
LATHE VIBRATIONS ANALYSIS ON SURFACE ROUHHNESS OF MACHINED DETAILS LATHE VIBRATIONS ANALYSIS ON SURFACE ROUHHNESS OF MACHINED DETAILS * Gennady Aryassov,
Application of Perturbation Theory in Classical Mechanics
Understanding the difference between an engineer and a scientist There are many similarities and differences.
4-2 CHAPTER 4 Engineering Communication © 2011 Cengage Learning Engineering. All Rights Reserved.
ME – VII SEM Course Name- Mechanical Vibrations Manav Rachna College of Engg.
Ch 1.1: Basic Mathematical Models; Direction Fields Differential equations are equations containing derivatives. The following are examples of physical.
INFOMGP Student names and numbers Papers’ references Title.
Inductive and Deductive Reasoning  The pre-requisites for this chapter have not been seen since grade 7 (factoring, line constructions,..);
Lecture Objectives: Define 1) Reynolds stresses and
Modeling & Simulation of Dynamic Systems (MSDS)
Part 1 Chapter 1 Mathematical Modeling, Numerical Methods, and Problem Solving PowerPoints organized by Dr. Michael R. Gustafson II, Duke University and.
ME 440 Intermediate Vibrations Tu, Feb. 3, 2009 Sections , © Dan Negrut, 2009 ME440, UW-Madison.
The Mechanical Simulation Engine library An Introduction and a Tutorial G. Cella.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Certificate IV in Project Management Assessment Outline Course Number Qualification Code BSB41507.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
Lesson Plan Michele Cook. Unit Title Surface Area and the Solar Cell.
FCI. Faculty of Computer and Information Fayoum University FCI.
Computational Physics (Lecture 11) PHY4061. Variation quantum Monte Carlo the approximate solution of the Hamiltonian Time Independent many-body Schrodinger’s.
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.
Integrated Hands-On Mechanical System Laboratories Arif Sirinterlikci, Ph.D., Professor of Engineering Tony Kerzmann, Ph.D., Assistant Professor of Mechanical.
Announcements Topics: -sections 6.4 (l’Hopital’s rule), 7.1 (differential equations), and 7.2 (antiderivatives) * Read these sections and study solved.
Modelling & Simulation of Semiconductor Devices Lecture 1 & 2 Introduction to Modelling & Simulation.
Computational Fluid Dynamics Lecture II Numerical Methods and Criteria for CFD Dr. Ugur GUVEN Professor of Aerospace Engineering.
Mechanical Vibrations
Autonomous Cyber-Physical Systems: Dynamical Systems
Mathematical Modeling, Numerical Methods, and Problem Solving
Analytical Tools in ME Course Objectives
PHYS 211 Exam 1 HKN Review Session
Devil physics The baddest class on campus IB Physics
Work, Energy, Power.
Presentation transcript:

Developing Simulations and Demonstrations Using Microsoft Visual C++ Mike O’Leary Shiva Azadegan Towson University Supported by the National Science Foundation under grant DUE

Introduction We have developed a course in Scientific Modeling and Simulation We have developed a course in Scientific Modeling and Simulation

What is the Course? This is a one-semester interdisciplinary course straddling the boundaries between mathematical modeling, numerical methods, and modern object-oriented computer programming. This is a one-semester interdisciplinary course straddling the boundaries between mathematical modeling, numerical methods, and modern object-oriented computer programming. Our course is project-driven. Our course is project-driven. Given a realistic problem, we Given a realistic problem, we Create a model, Create a model, discuss appropriate numerical methods, and then discuss appropriate numerical methods, and then create a simulation of the problem using Microsoft Visual C++ that takes full advantage of our computer's graphical capabilities. create a simulation of the problem using Microsoft Visual C++ that takes full advantage of our computer's graphical capabilities.

Course Objectives The students upon completing these courses will have: The students upon completing these courses will have: the knowledge to choose proper numerical methods to solve a scientific problem; the knowledge to choose proper numerical methods to solve a scientific problem; the knowledge of modeling techniques to develop a model for the problem; the knowledge of modeling techniques to develop a model for the problem; the programming skills to implement the model using an object- oriented programming language; the programming skills to implement the model using an object- oriented programming language; the critical thinking skill to form conclusion based upon the results; the critical thinking skill to form conclusion based upon the results; the communication and writing skills to prepare and present technical reports; the communication and writing skills to prepare and present technical reports; the experience of working in teams with their peers from different disciplines on multidisciplinary problems. the experience of working in teams with their peers from different disciplines on multidisciplinary problems.

What are the Prerequisites? Calculus 1, Calculus 2 Calculus 1, Calculus 2 Introduction to Programming 1 Introduction to Programming 1

How does the Course Proceed? The course is driven by the projects. The course is driven by the projects. The modeling, numerical methods, and computer programming are introduced as needed for the solution of a particular problem. The modeling, numerical methods, and computer programming are introduced as needed for the solution of a particular problem. Course can be split into four large portions Course can be split into four large portions Introduction Introduction First project First project Second project Second project Third project Third project

Introduction Introduction to programming with MFC & dialog based programming. Introduction to programming with MFC & dialog based programming. Review of numerical methods for integration. Review of numerical methods for integration. Write some programs that evaluate integrals. Write some programs that evaluate integrals. Review of classes. Review of classes. Introduction to numerical methods for differential equations. Introduction to numerical methods for differential equations.

First Project Involves solving a system of differential equations. Involves solving a system of differential equations. May or may not require the use of graphics. May or may not require the use of graphics. Introduction to graphics. Introduction to graphics. Dynamic memory allocation Dynamic memory allocation Allows more sophisticated graphics- e.g. graphs of functions. Allows more sophisticated graphics- e.g. graphs of functions. This is more sophisticated programming concept. This is more sophisticated programming concept.

Second Project Also a system of differential equations. Also a system of differential equations. More sophisticated mathematics More sophisticated mathematics Either a more sophisticated model: e.g. calculus of variations Either a more sophisticated model: e.g. calculus of variations or better numerical methods: e.g. adaptive methods or better numerical methods: e.g. adaptive methods More sophisticated programming More sophisticated programming Function graphs Function graphs Multiple graphs Multiple graphs Scrolling & sliders Scrolling & sliders

Third Project Partial differential equations Partial differential equations Modeling Modeling Analysis of numerical methods Analysis of numerical methods More sophisticated programming More sophisticated programming The mouse The mouse Timers Timers

What are the Assignments? Each project takes students 2-4 weeks to complete. Each project takes students 2-4 weeks to complete. Students complete a written project report Students complete a written project report pages pages Describes in detail the model, the numerical methods, and the program used to solve the problem. Describes in detail the model, the numerical methods, and the program used to solve the problem. Gives a complete answer to the assigned project questions. Gives a complete answer to the assigned project questions. Students programs are also graded. Students programs are also graded. It is important that the paper and the program have different due dates! It is important that the paper and the program have different due dates!

What have we developed? Lecture notes for the entire courses Lecture notes for the entire courses Not all of the material was used each semester, so there is more than can be covered in one semester. Not all of the material was used each semester, so there is more than can be covered in one semester. Projects that were assigned. Projects that were assigned. 8 Projects are given; we only would use 3 in a single semester. 8 Projects are given; we only would use 3 in a single semester. Sample code Sample code CD contains source code for the examples described in the notes. CD contains source code for the examples described in the notes.

Chapter 12: Adaptive Methods for Differential Equations Chapter 1: Dialog Based Programming Chapter 2: Introduction to Numerical Methods Chapter 3: Classes and Software Design Chapter 4: Differential Equations Chapter 5: Project- The Baseball Problem Chapter 6: Graphics Chapter 7: Project- The Three Body Problem Chapter 8: Project- The Double Spring Chapter 9: Sliders & Scrolling Chapter 10: Dynamic Memory Allocation Chapter 13: Project- Dynamics of HIV Chapter 14: Project- The Double Pendulum Chapter 11: Project- The Resonant Filter Chapter 15: The Mouse Chapter 16: Project- Diffusion Chapter 18: Project- Waves Chapter 17: Timers

What are the Projects?

Motion of a baseball under air resistance. What is the optimal angle to hit a baseball so that it travels the farthest? Does this angle change with the velocity of the ball? What is the optimal angle to hit a baseball so that it travels the farthest? Does this angle change with the velocity of the ball? Students write a program that gives the total distance the ball will travel. Students write a program that gives the total distance the ball will travel. This project does not require a graphical component, but one can be incorporated. This project does not require a graphical component, but one can be incorporated.

The three body problem Determine the motion of three (or more) bodies in the plane under the influence of gravity. Determine the motion of three (or more) bodies in the plane under the influence of gravity. Students are asked to find roughly periodic orbits. Students are asked to find roughly periodic orbits.

The double spring Describe the motion of a mass attached to two springs in the plane. Describe the motion of a mass attached to two springs in the plane. Project questions include: Project questions include: Given initial conditions, determine the location of the mass after a period of time, and estimate the accuracy of the answer. Given initial conditions, determine the location of the mass after a period of time, and estimate the accuracy of the answer. Are there solutions that remain above the line connecting the two fixed points for all time? Are there solutions that remain above the line connecting the two fixed points for all time? Analyze the stability properties of the system. Does it display sensitive dependence on initial conditions? Analyze the stability properties of the system. Does it display sensitive dependence on initial conditions? Prove that the sum of the kinetic energy and the energy stored in the springs is conserved. Prove that the sum of the kinetic energy and the energy stored in the springs is conserved.

The resonant filter Create a model of an LRC resonant filter. Create a model of an LRC resonant filter. Project questions: Project questions: Given a class that contains an unknown input signal known to be the sum of sinusoids, find the frequency of the unknown signal. Given a class that contains an unknown input signal known to be the sum of sinusoids, find the frequency of the unknown signal. This requires an analysis of the preferred frequency of the solutions to a constant coefficient second order differential equation. This requires an analysis of the preferred frequency of the solutions to a constant coefficient second order differential equation. Programming notes Programming notes The interface is best built with slider controls. The interface is best built with slider controls. Because this requires displaying a graph of a function, some more complex graphical programming is needed. Because this requires displaying a graph of a function, some more complex graphical programming is needed. Almost requires the use of dynamically created arrays. Almost requires the use of dynamically created arrays.

Dynamics of HIV Create a simple one-compartment model for HIV infection of CD4+ T-cells. Create a simple one-compartment model for HIV infection of CD4+ T-cells. Obtain three equations in three variables. Obtain three equations in three variables. Investigate the effect of an RT-inhibitor. Though they do not kill HIV, they prevent HIV cells from infecting healthy cells. Investigate the effect of an RT-inhibitor. Though they do not kill HIV, they prevent HIV cells from infecting healthy cells. Project questions Project questions Show that that the system tends to a steady state. Show that that the system tends to a steady state. Show that, if the RT inhibitor is sufficiently effective, then HIV will be entirely removed from the body. Show that, if the RT inhibitor is sufficiently effective, then HIV will be entirely removed from the body. Show that, there is a lower threshold for effectiveness of the RT inhibitor which, though it would not eliminate the virus, it would prevent the onset of AIDS. Show that, there is a lower threshold for effectiveness of the RT inhibitor which, though it would not eliminate the virus, it would prevent the onset of AIDS. Compare the numerical results with their analytic counterparts. Compare the numerical results with their analytic counterparts.

The double pendulum Create a model for a jointed pendulum. Create a model for a jointed pendulum. Best technique requires variational methods. Best technique requires variational methods. Project questions Project questions Does the double pendulum display sensitive dependence on initial conditions? Does the double pendulum display sensitive dependence on initial conditions?

Diffusion Create a model for diffusion processes. Create a model for diffusion processes. Three different methods to create the model- Three different methods to create the model- System of ordinary differential equations System of ordinary differential equations Directly, as a partial differential equation Directly, as a partial differential equation Probabilistic methods. Probabilistic methods. Introduce finite difference methods for solving partial differential equations Introduce finite difference methods for solving partial differential equations Discuss consistency, stability and convergence. Discuss consistency, stability and convergence. Project question to simulate the temperature of a solid bar. Project question to simulate the temperature of a solid bar. Because the exact value can be found using Fourier series techniques, one can compare the students solution to the actual result for grading. Because the exact value can be found using Fourier series techniques, one can compare the students solution to the actual result for grading. Programming note: the best way to enter the initial data is to use the mouse. Programming note: the best way to enter the initial data is to use the mouse.

Wave Motion Create a model of wave motion. Create a model of wave motion. Can be done as a system of ordinary differential equations, or directly as a partial differential equation. Can be done as a system of ordinary differential equations, or directly as a partial differential equation. Introduce finite difference methods for the solution. Introduce finite difference methods for the solution. Project question is to simulate the motion of a vibrating string. Project question is to simulate the motion of a vibrating string. Students verify that the wave speed is correctly calculated. Students verify that the wave speed is correctly calculated.