numerical solution of dynamic systems with impacting ...courses.washington.edu/mengr535/sample...

11
Numerical Solution of Dynamic Systems with Impacting Elements ME 535 Final Project Sam Wallen PhD Student University of Washington — Mechanical Engineering June 2014 1

Upload: others

Post on 01-Aug-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

Numerical Solution of Dynamic Systems with Impacting Elements

ME 535 Final Project

Sam WallenPhD Student

University of Washington — Mechanical Engineering

June 2014

1

Page 2: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

1 Introduction

The numerical integration of ordinary differential equations (ODEs) is a subject that has been studiedextensively, resulting in the development of numerical techniques (e.g. Runge-Kutta methods) that arecommonly used to solve the equations of motion (EOM) of complex dynamic systems in engineering. Inmany cases, the powerful solvers built into mathematical and numerical analysis programs (e.g. MATLAB,Mathematica, Maple, etc.) are sufficient to solve EOM with minimal adjustments made by the programmer.However, some systems (especially so-called stiff systems), contain nonlinearities that make it difficult orimpossible for these solvers to obtain stable, accurate solutions. One special class of EOM that presents suchproblems is models for dynamic systems with impacting elements, or impact systems (ISs). These modelsdescribe the behavior of physical systems with parts undergoing contact and collisions. Even for systemsthat behave linearly between or in the absence of impacts, these EOM are highly nonlinear because theirforms and qualitative behavior change dramatically during periods of contact. This is because the forcesinvolved in the collisions are much larger than those in periods of no contact, shortening the characteristictime scale of the system.

Since these EOM behave so poorly, it is imperative for the programmer to closely examine the systemin question before attempting to simulate it; simply inputting the ODEs into a common integrator couldeasily deliver inaccurate and/or unphysical solutions. In this report, I analyze the difficulties of solving thesesystems and present techniques for improving, checking, and confirming the results. I use a simple impactoscillator to demonstrate these techniques and present numerical examples. While the impact oscillator usedhereafter may be an overly-simplified model, the concepts can easily be extended to more complex systems.

2 Problems with Direct Integration of the Equations of Motion

As with any numerical solution of ODEs, the step size is critical to obtaining accurate solutions of ISs.A time step that is too large results in errors that may appear immediately or accumulate slowly overmany impacts. In choosing a step size, it is important to use physical intuition to decide if the solutionis satisfactory. For example, one might examine the behavior of the energy in the system; the expectedconservation (or dissipation rate) should be reflected in the numerical results. Also, one might examine theoverlap of two colliding objects (indicating deformation). The numerical results should be consistent withthe known material properties. Physical intuition is essential for obtaining an acceptable solution.

For choosing a step size, ISs have multiple time scales that need to be considered: the time scale ofthe (possibly linear) behavior between impacts and that of the impacts themselves. For multiple-degree-of-freedom systems, there may be additional time scales for many contact sites. For direct integration of EOM,it is necessary to choose a time step small enough to accurately capture the behavior of the system at itssmallest time scale. For ISs, this time scale corresponds to the greatest accelerations, which occur duringthe impacts.

The time step need to satisfy this requirement is often orders of magnitude smaller than the one neededbetween impacts, where the system is better-behaved. Therefore, if this small time step is used throughoutthe integration, the computation time will be much greater. A simple, mathematically-valid solution to thisproblem is to force the integrator to take very small time steps during the impacts and larger time stepsbetween them. While this technique may shorten computation time considerably, the solution time can bereduced even more by using physical arguments instead.

3 A Simple Impact System

The system that I will use for demonstration is a single-degree-of-freedom spring-mass oscillator with a rigidwall at the equilibrium position. The equation of motion of this system for a general contact force model is{

mx+ kx = 0 : x ≤ 0mx+ kx = Fc(x, x, t) : x > 0

2

Page 3: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

where Fc(x, dotx, t) is the force exerted during contact. This force is written as a function of position,velocity, and time, but there may be other necessary parameters. A schematic of this system is shown inFigure 1 below.

k

x

x = 0

Figure 1: Spring-Mass Oscillator with Rigid Wall

An important feature of this model is that is has a known solution between impacts: the position

and velocity are given by pure sinusoidal functions with angular frequency ω =√

km . This facilitates the

calculation of error and interpretation of results in the numerical examples.In the following examples, I will consider three contact models: coefficient of restitution, piecewise linear,

and Hertzian.

3.1 Coefficient of Restitution Contact Model

The coefficient of restitution model treats the impact with the rigid wall as an instantaneous change invelocity; that is, the velocities immediately before (-) and immediately after (+) impact are related asfollows:

x+ = ex−

where 0 ≤ e ≤ 1 is the coefficient of restitution, which determines the amount of energy lost during thecollision. The special case e = 1 represents a perfectly elastic (energy conserving) collision. It is possiblefor the coefficient of restitution to be a function of velocity or impact history, but in this report it will betreated as constant for simplicity.

3.2 Piecewise Linear Contact Model

The piecewise linear model uses a contact force that is represented by an extremely stiff linear spring (andpossibly a damper). Its contact force is given by

FPWLc (x, x) = −(kcx+ bcx)

where kc and bc are the contact stiffness and damping coefficients, respectively. This is one of the simplestcontact models that uses a force instead of an instantaneous velocity change and is straightforward toimplement in code.

3

Page 4: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

3.3 Hertzian Contact Model

The Hertzian model is nonlinear and based on the deformation of elastic spheres. Its contact force is givenby

FHc (x) = −Ax3/2

where A is a parameter determined by material properties such as the elastic modulus and Poisson’s Ratio,as well as by geometric properties. The 3/2 power law reflects the increasing surface area of the contactinterface as the objects are pushed together. Note that linear or nonlinear damping may be included in theHertzian model, but will not be considered in this report.

4 Alternative Solution Techniques

In this section, I will explain alternative techniques and the physical arguments leading to them. I willalso present results from numerical examples to illustrate the techniques. All computations were done using

MATLAB. For all examples, the natural frequency of the oscillator is ω =√

km = 2π rad/s = 1 Hz. This

means that the period of the non-impacting oscillator with the same parameters is 1 second. Also, the initialconditions are taken to be x(0) = −1, x(0) = 0.

4.1 Impulse-Momentum Arguments

If we assume that the immovable wall is rigid (undeformable), then the momentum of the mass after thecollision must be less than or equal to the momentum immediately prior. Under these assumptions, we canuse the coefficient of restitution model with e = 1 representing the case of no plastic deformation in themass, and e < 1 the case where plastic deformation does occur, resulting in dissipation.

To implement this model in simulations, the methods considered here will be:

1. Piece together a complete time history using analytical solutions of the EOM, and

2. Integrate between impacts using a 4th-order Runge-Kutta scheme (RK4) and apply the instantaneousvelocity change whenever x ≥ 0 and x > 0 simultaneously.

4.1.1 Numerical Results

Solutions were found for both cases, with RK4 step sizes chosen to have 100, 1000, and 4000 steps per period.Time histories of the position for these three cases are shown below in Figures 2, 3, and 4, respectively.These figures also include plots of the differences between the RK4 and analytical solutions after each impact.The analytical solution is simple to find and is given by

xa(t) = −abs(cos(ωt)).

4

Page 5: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

0 1 2 3 4 5 6 7 8 9 10

1 2

1

0 8

0 6

0 4

0 2

0

0.2

Coefficient of restitution, perfectly elastic, 100 steps per period

Positio

n

RK4

Analytical (Exact)

Figure 2: Coefficient of Restitution with 100 steps per period

0 1 2 3 4 5 6 7 8 9 10−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

Coefficient of restitution, perfectly elastic, 1000 steps per period

Time [s]

Pos

ition

RK4Analytical (Exact)

0 2 4 6 8 10 12 14 16 18 200

0.02

0.04Difference between RK4 and analytical solutions, 1000 steps per period

Time [s]

Err

or

Figure 3: Coefficient of Restitution with 1000 steps per period

5

Page 6: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

0 1 2 3 4 5 6 7 8 9 10−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

Coefficient of restitution, perfectly elastic, 4000 steps per period

Time [s]

Pos

ition

RK4Analytical (Exact)

0 2 4 6 8 10 12 14 16 18 200

1

2x 10

−3 Difference between RK4 and analytical solutions, 4000 steps per period

Time [s]

Err

or

Figure 4: Coefficient of Restitution with 4000 steps per period

From these plots, we can see that the step size of the RK4 method can create large changes in the results.For all three cases, the RK4 solution overshoots the wall (shown as the dashed line). This effect is mostpronounced in the cases with larger time steps. The overshoot exists because the time of exact contactinitiation is not known due to the discrete solution. When the step size is larger, the resolution of thesolution is reduced. Since the instantaneous velocity changes occur after the first solution point found at orabove x = 0, the overshoot increases with the step size. This problem can be reduced by using smaller timesteps or interpolating to find a more accurate crossing time.

The effect of the overshoot is that the impacts are not found to be instantaneous; rather, they occur overthe time between the actual crossing point and the first point calculated at or above x = 0. However, therebound distances are the same for every impact (falling to x = −1 and returning). This generates errorthat accumulates slowly over many impact cycles. From the case with 100 steps per period, it is evidentthat the overshoot causes the RK4 solution to have a slightly longer period, making it oscillate in and outof phase with the analytical solution with a period of approximately 26 impact cycles. Shrinking the timestep causes this effect to occur over longer and longer time scales.

4.2 Approximation of Impacts using Linear Harmonic Oscillator

In some applications, it may be necessary to compare the effects of different contact models on ISs. Forexample, the rate of wear due to contact could be calculated for many contact models, and this informationcould be used to select geometric parameters or material properties in order to optimize the working lifeof the physical system. In this case, the impact durations are important and should no longer be assumedinstantaneous. Of course, direct numerical integration of the EOM results in time histories that contain theimpact durations. However, simplifying assumptions can be made to obtain analytical approximate solutionsduring impact.

The goal of this method is to find a dynamic system with an analytical solution that behaves like thecontact model. To accomplish this, we assume that the contact force is the dominant force throughout thecollision; that is, all other forces acting on the mass are negligible while in contact with the wall. This is

6

Page 7: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

a reasonable assumption so long as the collisions are sufficiently elastic. Physically, this assumption statesthat the contact force exerts a very brief impulse on the mass that reverses the sign of its momentum andthat only a small fraction of the energy in the system is dissipated. Such a force must be very large to causea reversal of momentum in such a short time. Under this assumption, we seek to find an equivalent linearharmonic oscillator model (possibly including damping) that approximates the true behavior during contact.Since we can easily find an analytical solution for this model, we could apply it at every impact and avoiddirect numerical integration.

To find a reasonable equivalent model, we assert that:

1. The work done by the contact stiffness force (the spring in the harmonic oscillator) while the massmoves from x = 0 to x = xmax (the maximum penetration depth into the wall) must be equal to thework done by the stiffness force in the real contact model.

2. The average rate of energy dissipation by the contact damping force (the damper in the harmonicoscillator) in slowing the mass from x = vi (its initial impact velocity) to x = 0 must be equal to thatof the real contact model.

To enforce these conditions, the following integral equations must be satisfied:

−∫ xmax

0

F s(x)dx =1

2mv2i =

1

2keqx

2max∫ 0

vi

F d(x)dx =1

2beqvi

2

where F s and F d are respectively the stiffness and damping forces of the real contact model and keq andbeq are the stiffness and damping coefficients of the equivalent linear harmonic oscillator. These equationscan often be solved analytically, but could also be solved numerically for more complicated contact models.

Once keq and beq are found, the analytical solution to the harmonic oscillator is found using the initialconditions x(0) = 0, x(0) = vi:

x(t) =viωde−ζωnt sinωdt

x(t) =viωde−ζωnt(ωd cosωdt− ζωn sinωdt)

ωn =

√keqm

ζ =beq

2√keqm

ωd = ωn√

1 − ζ2

Here, we have assumed that the damping is sufficiently small (ζ < 1) so that the system is under-damped.This is necessary because in cases where ζ ≥ 1, the system would decay to x = 0 without overshoot and thecontact would never end. Finally, the impact duration (one half-period of the sinusoidal term) is used tofind the exit velocity:

∆t =π

ωd

ve = −vie−π ζ√

1−ζ2

If desired, the maximum penetration depth could be found by evaluating the position at the point wherethe velocity vanishes.

Thus, rather than using costly direct numerical integration through every impact, we evaluate keq, beq,∆t, and ve at each impact and piece together a complete time history.

7

Page 8: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

4.2.1 Numerical Results

For the piecewise linear contact model (with damping), solutions were found in the same manner as with thecoefficient of restitution, i.e. direct numerical integration (using 100 and 1000 steps per period) and forminga piecewise analytical solution with the equations above. The results are shown below in Figures 5 and 6 ,with the red curves showing the theoretical decay envelope; that is, the rebounds are expected to intersectthe red curve at their lowest points. These decay envelopes are only approximate because they do not takeimpact time into account.

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

Piecewise Linear contact, damping included, 100 steps per period

Time [s]

Pos

ition

RK4Analytical w/ Approximated ImpactTheoretical Decay Envelope

Figure 5: Piecewise Linear Model with 100 steps per period

8

Page 9: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

Piecewise Linear contact, damping included, 1000 steps per period

Time [s]

Pos

ition

RK4Analytical w/ Approximated ImpactTheoretical Decay Envelope

Figure 6: Piecewise Linear Model with 1000 steps per period

In the first plot (larger time step), the RK4 solution doesn’t follow the decay profile at all, indicatingthat the solution is not accurate. In the second plot, the RK4 solution follows the decay envelope quite welland matches the analytical solution closely. Note that in the case of the piecewise linear contact model, weexpect the RK4 solution to approach the analytical solution in the limit of very short time steps. This isbecause the contact model is already linear, so keq and beq do not change with vi, and we have thus obtainedan exact solution.

In the final example, the same procedure was used to find solutions for the Hertzian contact model using100 and 1000 steps per period in the RK4 solution. This model is nonlinear, so the analytical approximationin not exact. The results are shown below in Figures 7 and 8

9

Page 10: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

Hertzian contact, no damping, 100 steps per period

Time [s]

Pos

ition

RK4Analytical w/ Approximated Impact

Figure 7: Hertzian Model with 100 steps per period

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

Hertzian contact, no damping, 1000 steps per period

Time [s]

Pos

ition

RK4Analytical w/ Approximated Impact

Figure 8: Hertzian Model with 1000 steps per period

As with the previous two models, the result with the larger time step is unacceptable. When the time

10

Page 11: Numerical Solution of Dynamic Systems with Impacting ...courses.washington.edu/mengr535/Sample Presentations/Impacting… · Numerical Solution of Dynamic Systems with Impacting Elements

step is reduced, the RK4 solution follows the analytical approximation closely. However, the RK4 solutionleads the analytical approximation by a small amount of time that increases slightly with each impact. Thislead becomes less significant as the time step is reduced.

5 Conclusions and Future Work

In conclusion, techniques other than brute-force integration should definitely be considered for finding solu-tions of ISs. These methods not only decrease computational complexity, but also provide physical intuitionthat can be used to interpret results.

The total computational advantage depends on the number and length of integrations needed; therefore,direct integration may be acceptable if only a few impact cycles are needed. However, the methods presentedhere could still be valuable for estimating the rate of error accumulation.

Also important is that the accuracy of the analytical approximation method depends on the behaviorof the contact model; a linear contact model can be represented exactly, while a nonlinear one can only beapproximated.

In the future, it would be worthwhile to conduct a more in-depth study of the computation times neededfor the various methods, as this would quantify the advantages and disadvantages of each one.

11