ME451 Kinematics and Dynamics of Machine Systems Numerical Integration October 28, 2013 Radu Serban University of Wisconsin-Madison

Embed Size (px)

DESCRIPTION

3 Final Project I encourage you to come up with a problem on your own Something related to your research Something related to a personal interest of yours Something that you are curious about Some suggestions The Reuleaux collection of kinematic mechanisms at Cornell University Mechanical computers Extend simEngine2D to include contact dynamics (DEM – penalty method) Default project simEngine2D kinematic and dynamic analysis of the web cutting mechanism Problems 5.2 and 8.2 in the textbook You decide what the interesting/relevant questions are Rules of Engagement The final project can use either simEngine2D or ADAMS (or both) You can work individually or in groups of two For the proposal, send ( ) a PDF (at most one page, typeset) with a description of the problem, how you propose to tackle it, and what you expect to be able to answer about it Draft proposal due on Friday, November 1; Final proposal (if needed) due on Friday, November 8 If you decide to work on the default problem, simply send an indicating that Final report Due on Wednesday, December 11 Use Word or LaTeX and generate a PDF Describe the problem, the analysis procedure, and the results Include all necessary figures, derivations, equations Include your simEngine2D (if applicable) and/or ADAMS models

Citation preview

ME451 Kinematics and Dynamics of Machine Systems Numerical Integration October 28, 2013 Radu Serban University of Wisconsin-Madison 2 Before we get started Last Time: Specifying position and velocity initial conditions for dynamics Recovering constraint reaction forces Today Wrap-up discussion on recovering constraint reaction forces Begin section on numerical integration Assignments: Matlab 7 due Wednesday, October 30, (11:59pm) Your simEngine2D can now perform complete Kinematic analysis! Test the provided visualization function (available on the SBEL course webpage) Miscellaneous Draft proposals for the Final Project due on Friday, November 1 Midterm 2 Wednesday, November 6, 12:00pm in ME 1143 Review session Monday, November 4, 6:30pm in ME 1143 3 Final Project I encourage you to come up with a problem on your own Something related to your research Something related to a personal interest of yours Something that you are curious about Some suggestions The Reuleaux collection of kinematic mechanisms at Cornell UniversityMechanical computersExtend simEngine2D to include contact dynamics (DEM penalty method) Default project simEngine2D kinematic and dynamic analysis of the web cutting mechanism Problems 5.2 and 8.2 in the textbook You decide what the interesting/relevant questions are Rules of Engagement The final project can use either simEngine2D or ADAMS (or both) You can work individually or in groups of two For the proposal, send ( ) a PDF (at most one page, typeset) with a description of the problem, how you propose to tackle it, and what you expect to be able to answer about it Draft proposal due on Friday, November 1; Final proposal (if needed) due on Friday, November 8 If you decide to work on the default problem, simply send anindicating that Final report Due on Wednesday, December 11 Use Word or LaTeX and generate a PDF Describe the problem, the analysis procedure, and the results Include all necessary figures, derivations, equations Include your simEngine2D (if applicable) and/or ADAMS models Constraint Reaction Forces 6.6 5 Reaction Forces Remember that we jumped through some hoops to get rid of the reaction forces that develop in joints Now, we want to go back and recover them, since they are important: Durability analysis Stress/Strain analysis Selecting bearings in a mechanism Etc. The key ingredient needed to compute the reaction forces in all joints is the set of Lagrange multipliers 6 Reaction Forces: The Basic Idea Recall the partitioning of the total force acting on the mechanical system Applying a variational approach (principle of virtual work) we ended up with this equation of motion After jumping through hoops, we ended up with this: Its easy to see that 7 Reaction Forces: Important Observation 8 Reaction Forces: Framework 9 Reaction Forces: Main Result 10 Reaction Forces: Comments 11 Reaction Forces: Summary A joint (constraint) in the system requires a (set of) Lagrange multiplier(s) The Lagrange multiplier(s) result in the following reaction force and torque An alternative expression for the reaction torque is 12 Reaction force in a Revolute Joint [Example 6.6.1] Numerical Integration 14 Numerical Methods Numerical Analysis is the study of quantitative approximations to the solution of problems of mathematical analysis (i.e., calculus) Study of algorithms Study of approximation errors Truncation (discretization) Round-off Study of numerical stability Examples: interpolation and extrapolation, solving linear system of equations, eigenanalysis, solving nonlinear systems of equations, optimization (linear and nonlinear), numerical quadrature, numerical differential equations, etc.,etc. Algorithm (arithmetic model) Program (set of procedures) Code (computer implementations) 15 Numerical Integration The particular numerical methods used to solve differential equations are typically called numerical integrators, or integration formulas A numerical integrator generates an approximate solution at discrete time points (also called grid points, station points, nodes) This is in fact just like in Kinematics, where the solution is computed on a time grid Different numerical integrators generate different solutions, but these solutions are typically very close together, and (hopefully) close to the actual solution of the problem Putting things in perspective: In 99% of the cases, the use of numerical integrators is the only alternative for solving complicated systems described by non-linear differential equations 16 Basic Concept IVP In general, all we can hope for is approximating the solution at a sequence of discrete points in time Uniform grid (constant step integration) Adaptive grid (variable step integration) Basic idea: somehow turn the differential problem into an algebraic problem (approximate the derivatives) IVP in dynamics: What we calculate are the accelerations Oversimplifying, we get something like This is a second-order DE which needs to be integrated to obtain velocities and positions 17 Simplest method: Forward Euler Starting from the IVP Use the simplest approximation to the derivative Rewrite the above as and use ODE to obtain 18 FE: Geometrical Interpretation IVP Forward Euler integration formula 19 FE: Example 20 Forward Euler: Effect of Step-Size % IVP (RHS + IC) f -0.1*y + sin(t); y0 = 0; tend = 50; % Analytical solution y_an (0.1*sin(t) - cos(t) + exp(-0.1*t)) / (1+0.1^2); % Loop over the various step-size values and plot errors colors = [[0, 0.4, 0]; [1, 0.5, 0]; [0.6, 0, 0]]; Figure, hold on, box on h = [ ]; for ih = 1:length(h) tspan = 0:h(ih):tend; y = zeros(size(tspan)); err = zeros(size(tspan)); y(1) = y0; err(1) = 0; for i = 2:length(tspan) y(i) = y(i-1) + h(ih) * f(tspan(i-1), y(i-1)); err(i) = y(i) - y_an(tspan(i)); end plot(tspan, err, 'color', colors(ih,:)); end legend('h = 0.001', 'h = 0.01', 'h = 0.1'); 21 FE: Effect of Step-Size % IVP (RHS + IC) f -0.1*y + sin(t); y0 = 0; tend = 50; % Loop over the various step-size values and plot errors colors = [[0, 0.4, 0]; [1, 0.5, 0]; [0.6, 0, 0]]; Figure, hold on, box on h = [ ]; for ih = 1:length(h) tspan = 0:h(ih):tend; y = zeros(size(tspan)); y(1) = y0; for i = 2:length(tspan) y(i) = y(i-1) + h(ih) * f(tspan(i-1), y(i-1)); end plot(tspan,y, 'color', colors(ih,:)) end legend('h = 0.1', 'h = 1', 'h = 5');