An application of interactive computer graphics for simulation of vibratory systems

An application of interactive computer graphics for simulation of vibratory systems

Compur. Educ Vol. 6. 0360. I3 15:82/040373-07#)3.00/0 pp. 373 lo 379. 1982 Printed I” Great Bntaln. All rights reserved AN APPLICATION GRAPHICS F...

598KB Sizes 11 Downloads 58 Views

Compur. Educ

Vol. 6.

0360. I3 15:82/040373-07#)3.00/0

pp. 373 lo 379. 1982

Printed I” Great Bntaln. All rights reserved

AN APPLICATION GRAPHICS FOR

Copyright 0 1982 Pcrgamon Press Ltd

OF INTERACTIVE COMPUTER SIMULATION OF VIBRATORY SYSTEMS

M. P. RANAWEERA*.

M. F. RESMAN

and R. G.

TWICKLER

Department of Mechanical and Industrial Engineering. University of Illinois at Urbana-Champaign.

Urbana. IL 61801. U.S.A. (Rrceioed

25 Augusr 1981)

Abstract-Computer

simulation of two vibratory systems composed of mass, spring. and dashpot elements is described. The first system has one degree of freedom and it undergoes damped-free vibration. The second system undergoes damped-forced vibration with two degrees of freedom. The use of refresh graphics with full interaction in real time facilitates a comprehensive parametric study of the system and the programs can be used as teaching and design aids.

INTRODUCTION

Computer simulation can play an important role in the study of mechanical systems for which adequate mathematical models are available. Since the parameters of the system can be given any value between very wide limits. a more comprehensive study of the system may be done using a digital computer than by a laboratory experiment. With the availability of suitable hardware and software, such simulations will form very valuable tools in teaching. Proper communication between the user and the computer is vital in computer simulation. This is especially so in a teaching environment where the students should be able to study the physical changes and characteristics of the system while parameters are varied. Not only should the computer inputs and outputs be realistic and natural but also the response must be fast so that real time effects are generated. These requirements clearly point out interactive computer graphics as the proper communication medium in many computer simulations. This paper describes an application of interactive computer graphics for the study of two vibratory systems very commonly taught in dynamics courses. These are among many other interactive graphics programs developed in the Department of Mechanical and Industrial Engineering at the University of Illinois at Urbana-Champaign for use by students taking machine analysis and design courses. VIBRATORY

SYSTEMS

The vibratory systems considered are composed of mass. spring and dashpot elements. These have closed form solutions which are found in any standard text on mechanical vibrations. Equations in this paper are taken from Vierck [l J. First

system

The first system is shown in Fig. 1 and it has one degree of freedom. The mass is of magnitude m and the spring has a stiffness k. The dashpot has a damping coefficient of c. The system is set in damped free vibration by deflecting the mass (up or down) by an amount 6 from its static equilibrium position and releasing it with zero initial velocity. The resultant motion of the mass depends on relative magnitudes of m, k and c. The key parameters are : w = (k/&!2 = angular natural frequency and tl = c:‘2(km)‘;’ = damping factor. If x is the displacement of the mass from the static equilibrium position at time t measured from the instant the mass is released. the solution is: x = d cos(wr) * Present address: Department of Civil Engineering. University of Peradeniya. Peradeniya. Sri Lanka. 373

(1)

374

M. P. RANAWERA YI ~1.

Fig. 2. Second system.

Fig. 1. First system.

when z = 0 (i.e.. undamped system). x = (dwe-‘ti!u)sin(ut

+ Cp)

(2)

where u = ~(1 - %1)112and Ct,= tan-‘(u/aw) when 0 < rl < 1 (i.e. underdamped system), .Y= 6(1 + wt)e-‘0’

(3)

when r* = 1 (i.e. critically damped system), and I = [Mu - L.)](uevl - c e”‘) where 11= WC-Z t (cr2 - I)’ ‘1 and L’= w[-r when Y > 1 (i.e. overdamped system).

(4)

- (a’ - I)““]

Second system

This system, shown in Fig. 2. has two degrees of a mass (ml) and a spring (k,) and a secondary dashpot (c). The primary system is subjected system acts as a damped vibration absorber. Considering only the steady state response of

of freedom. It consists of a primary system composed system composed of a mass (Q. a spring (k,), and a to a harmonic force P,, sinlw, c) and the secondary the system, and introducing the following parameters.

w1 = (k,:m,)“*. wz = (k2,mt)‘iZ, j’* = (w,$oz), I* = mzlm,,

xg = P&,.

p1 = (~~a,).

b = o*jw1.

< = c/Z!m, CO,,~ = y: -

y -_ 2; ;,,u

= y($

-

: + p-(+).

c = pbb2;l;

-

-

l),

@,

and p(rf

the primary system displacement amplitude (x,) and the secondary system displacement (x2) are given by

amplitude

375

Application of interactive computer graphics and (x,&J

= [(!I4 + q2p2/(u2 +

COMPUTER

r2)-J. FACILITY

System simulations are done on a ~iinj-computer based interactive graphics facility. It consists of a PDP ll/34 running under RT-11 single user operating system and driving a VT-11 refresh graphics display with light pen. push button. and keyboard control. Programs are written in FORTRAN IV employing the DECGRAPHIC-11 graphics package. SIMULATION

PROGRAMS

In the development of the software. special care was taken on the design of user interface. Sufficient feedback is provided at every stage so that a complete newcomer can execute the program with minimal initial help. Interaction is primarily done through the light pen and light buttons (light pen sensitive menu items). First

system simulatiotl

program

This program enables the user to specify any value for the parameters of the system, displace the mass from its static equilibrium position. release it, and observe the system in motion. At the start of the program. the system is shown at rest with pre-set values for m, k and c (Fig. 3). These initial values correspond to an undamped system (r = 0). At this stage, the user has the option of changing the parameters or setting the system in motion, To set the system in motion, the user selects the light buton “DEFLECT MASS” and a tracking cross appears at the center of the mass. By moving this tracking cross with the light pen. the mass can be displaced up or down (Fig. 4). While this is being done, the numerical value of the displacement is shown in odometer fashion. To release the mass, the user selects the light button “RELEASE MASS” and the system starts oscillating. Resulting displacement time relation (equation (1)) is plotted as a growing graph (Fig. 5) while the numerical vatues of instantaneous displacement and time are also shown. Motion continues until a pre-set time limit is reached or until the user stops the motion by using the light button “STOP” (Fig. 5). A complete time record is shown in Fig. 6. The user may change values of parameters by using “SET” options. Since the essential characteristics of the system can be simulated by changing only k and c, m is kept fixed, while k and c as well as a are allowed to be changed to any desired value. However, since these later three parameters are related, only one out of these three may be held constant while one of the others is given a particular value. The parameter to be held constant is indicated by the option “HLD” which appears in front of the parameter value (Fig. 6) while the other two parameters have “SET” option and they may be

UASS

D = 0.00000

HLD

YASS * 10.00000

SET

w = 1.00000

(ISEC

I( i IQ00000

1(6/S SET

TIYE = IS.00

SEC SET

C=O.OOOOO M/S

c m.00000

K s lo.ooomNT/U c L: 0.00000

KG

t4LD

010.00000

16

WWY

I ISEC

SET

W 8 LDDOOO

SET

TWE = IS.00

SEC SET

\\\\\\\\\ ERASE RECORD RELEASE

ERASE RECORD OISP

MASS WT.

DECLECT

= o.ooooo

u

DISC = 0.00000

M

RELIUSE WSS

MASS

Fig. 3. First system at start--undamped k=10,c=O.cr=O).

DlSP*

LDOODD Y

INT. DISP~LODOOD

U

DEFLECT MISS

(m = 10,

Fig.

4.

First

system with displacement.

upward

initial

MASS

i 10.00000

KG

0

NT/M

SET

W : 1.00000

C : 0.00000

KGIS

SE,

TIME i 30.00

ERASE RELEASE

MASS

DEFLECT

MASS

DISP’ -0.74aSS INT. OISP 2 ~00000

STOP

HLD

: 0.00000

K = ,O.OWJOO

Y Y

I ,SEC SEC SET

RECORO OlSP = O.f,4z2

RELEASS

MASS

DEFLECT

INT. CISP - 1.00000 MASS

?.XlT UHDAYPEO

‘WE 1y

RLC0I0

.7001

. . . . . . . . . . *:

II? Y

EXIT

IYE ‘0. - 29.9991 *‘: ,.‘.. I. . .

. . .

;.. :

RECORD . .. .*.

,

. I .

Fi_e. 5. First system

Fig. 6. First system

in mouon

Hith dqkxement-time

record.

changed. These “HLD” and “SET” options can be moved among these three parameters by using the light pen. To change any of the parameters, the user touches the “SET” light button and the user wili be prompted to type in the desired value for the parameter. The time limit for the displacement plot also may be changed so that different portions of the plot may be studied. A plot for x = 0.1 (underdamped system) is shown in Fig. 7. A critically damped system (Y = 1) is shown in Fig. 8 and an overdamped system (‘Y= 5) is shown in Fig. 9. In each case, a flashing menu item (UNDAMPED, UNDERDAMPED. CRITICALLY DAMPED or OVERDAMPED) indicates to the user the type of system that is being studied. Second system stimularion

program

This program enables the user to observe this two-degree of freedom system in motion as well as change its parameter and study their effects on the steady state displacement magnitudes. Thus the program can also be used as an aid in the design of a damped vibration absorbed for a spring-mass system undergoing forced vibration. At the start of the program. the user types in vaIues for m, and k, of the primary system. Next. the program seiects the values for the secondary system parameters (m,. k2 and c’) as well as the force frequency (uf ) such that the mass ratio (p). the natural frequency ratio (h), the damping factor (5). and the forced frequency ratio for the primary system (;‘,) are all unity. A system corresponding to nti - 1 and I;, = 4 is shown in Fig. IO. Also shown in this figure are the plots of normalized displacement

MAS9 : ~(I00000 *rlR00000 Ci2.00000

= = 0.l0000

KG

NT/U KG/S

NLO

w = 1.00000 TIME

SET

ERASE

= so.*0

SET l,SiIC SEC

SET

RECORD

ER4SE

RELEASE

MASS DlSP:-0.00178 INT. OlSP P 1.00000

DEFLECT

MASS

UNDLRDAMPED TIYE (0 -

29.999,

I Y

RECORO

RELEASE

otw-

M4SS

INT. OISPDEFLECT

H

1.00000

k4

M4SS

CRITICALLY

EXIT

0.00000

DAMPED

REC0R0

Fig. 7. Ftrst system-underd~mped [nr = 10. k = 10. “ = 2. z4 = 0. I b.

Fig.

Y. First

system-

crtttcall>

damped

i, = IO.‘ = 20. x = I I.

tttz = 10.

Application of interactive computer graphics

WASS = 10.00000

KO

10.00000NT/Y

WC0

C~,OQDDOD0 KWt

SET

KI

8.00000

02

W = 100000

TWL

ERASE

rO"cn ‘CHAN8E” roucw “RUN” TO

SET I/SEC

TOCMANCE INITIALIt RUN

MOWN0

RUN

M1 = O.IDOE+Ol

Y”*0.1ODE*01

K1 ~0.4DOE*Ol

6 nD.IOOE+OI

MASS

DEFLECT

YASS

K2=0.400E+Ol C=o&OOE.o, ________ ____

CoARSf

FIWE

RCRKASL

DECREASE

EX. -NE

wF”O~ZOOE+OI DISPr

O.O4S?#

Y

EXIT

OVERDAMPED

RECORD

29.9991

s--..-......_

lRAD,S,

MAONIT RATIOS

Y

1111. PlSP I LDOOOO

TIME IO ‘..... .-._

Y2xD.IOOE+Ol

KTA*0.10OE+OI ,-..Lr--*-*-----_*--

RECORD

RELEASE

VALUES

GRAPwCS

CHANBE EXIT

SET

SEC

i 30.00

377

jJ; p,j--gJ ,“’

-.-.-.-..-.“,,._..._,

s 0.00

ID0

000

Fig 9. First system-overdamped (m = 10. k = 10. c = 100. z = 5)‘

2.u

WFlWl

‘IT)PO,SINlWF4T,

-1

Fig. 10. Second system at start (m, = 1. k, = 4. 01 = 2. p = 1. b = 1. f = I. tn2 = 1. kz = 4. C = 4).

amplitudes of the primary and secondary system (x,/x, and X&Q) against the forced frequency ratio (7,) i.e. plots of equations (5) and (6). These two plots indicate to the user the manner in which the displacement amplitudes will change when the force frequency (~~1 is changed from the currently set value. This value is indicated in the plot by the pointer [).Numerical values of x,/x, corresponding to this wI are also displayed. At this stage, the user has the option of setting the system in motion or changing its parameters. To set the system in motion, the light button “RUN” is selected and the system executes its steady state response (Fig. 11). By choosing the “CHANGE” option, the user can vary wf or the parameters of the secondary system. To change wf, the user pushes the button 1 in the push button box after having chosen the “CHANGE” option. and the tracking cross appears on the horizontal axis of the dispiacement graph below the current vaiue of wI (Fig. 12) Now w, is changed by moving the cross along this axis and the pointer EJ moves along the x,/x, curve while the numerical value of w, is also displayed in odometer fashion. Secondary system parameters are changed by varying the non-dimensional parameters b b and r. Any one of these can be increased or decreased from its current value in large steps. medium steps, or small steps by using the option “INC” or “DEC” and one of the options “COARSE”, “FINE”, or “EX.FINE” (Fig. 12). After having selected the appropriate option, the user points the light pen to label “MU”. “B”. or “ETA” and the parameter is continuously changed as long as the light pen is held over it. While this change is being made, the displacement plot is updated in real time so that the user

OUCH “CWAN~ETo CHANGE ,“S” BUTTON t To tWAffiE

PARUIZTERS Wi

IOVE TRACKIN ;~D$3’ YFfWl

RUN

Mf E PtDOE+OI

YU = O.fODE+Ol

M2 *Q.,QOK.

C”ARSE

K,rO.,OOE+O,

6=O.tOOE~Ot

K2=P4ODE*Or

EXIT

.___

0,

YlrO.lDOE+Ot

ETA=~IOOE*OI C i A400E+ 01 ^________ ____________ ____ EX. FINE FINE INCREASE

DECREASE Wf~QZoOE+Ol

lXll~PO~Klll*O.SS4 lXZ~~PO/Kl~l*O.l00E~

OBJECT ALONB X AXIS TO MOVE OX TO PUS,, !,UTTON I A6AtN TO RUN 0 f CHAWE Y2=CdOOE*Oi Kt=O#OE*Ol

ETAQiOOE+OI

C=D_4DDE+O,

‘~~E_*...‘_~,_N_E______~___-____**~ EX. FINE OEeREA8E

INCREASE WfW.tO0E+OI (RAOIS)

IRADISI E+Oo I-_) 01 r-.-l

YUc0.tOOh+0t 8 = O.tOOE .01

IX~IIPDIKIII~O.~UE+O~ RATIOS r(I IX2/lPO/Klll*Q240E*OI

MAONIT

I--I I4

y 10.00,

I

“.

G :T

r:

: s*oo

“* I YTtPO+StNIYF4T,

a00

LOO WFIWI

Fig. 11.Second system in motion.

2M

0.00 ~ 0.00

Fig. 12. Second system-changing

Lao YFIWI

of (wi = It.

t.oo J

tki. P. RASAWEERA et a/

.:7x

TOVCN “CNANGE” TO CNANOE PI&N OUTl’QN I TO CXINGE Yl~0*1008*0I

,____..__*-..“““*

_________

__

PARAUCTERL

wf

YU=o.25oL*oO

Y2=0.250E*oo

________

EX.FIN6

*X2 /IPO/KOS

Fig.

Fig. 13. Second system with change of p (p = 0.25, h = I. ; = I. ‘“2 = 0.X !i:! = I. (’ = 2)

14. Second

s O.ZOOScOl

b--)

system with change of < (I! = 0.25, 0. rnz = 0.25. k2 = I. c = 0).

h-l.{=

OUCXViJAW6” TO cnAnG6 P4KAJMT6RS “Sn IUTTON i TO CXANBE Wf MU*o.XsOE+5o

YI=O.zfeE+O~

WANGGC: I1:0.4oOLtCI

wI*0.100~*01

0=aloor:ror

Kt=O,iWC*ol

EXIT

tTAr0.32~2~+00 c=a66+6+ 00

RUN

ETA-:O’;O.UtWBY ESO.ST?LIOO .____-___--__________-~.~---~~* COARSS lllf IX. flrn

WF=A20?6rOJ JRADISJ IXtZJPOlKJt8.O.s6o6+01 JIX~IICO#K1f6=UJ?tt~OfL-

Fig. 16. Second system-fully tuned for # = 0.25 fb = 0.8. i’ = 0.21s. rnz = 0.25, k, = 1.56, c = cJ.577).

solution for Fig. 15. Second system-optimum y = 0.25 and h = 1. (C = 0.332. m7 = 0.25. kz = 1, i‘ = 0.664). -

can immediately 0.25). is shown From

study

the characteristics

in Fig.

a design

standpoint,

the vibrations

changing

p_ h and < so that the peaks

in

may

of the primary

for p = 0.25 and b =

Fig.

with

the user

minimize system

of the new system.

13 and the system

want

system in Fig.

system,

but with

to select

range plot

after changing

5 = 0 is shown

secondary

for a wide

in the displacement

1.0 is shown

The

b

same p and

system

of values

are as low

15 and the fully tuned

p (from

in Fig.

parameters

of wI.

This

as possible.

system

1 to

14. so as to

is done An

by

optimum

for p = 0.25 is shown

16.

OBSERVATIONS These

programs

and their effects wide

variety

simulation These courses

were

of practical programs

and similar to give

used

on students

for were

situations

demonstrations very

positive.

within

and that the interest programs

hands-on

a very of even

are also being

experience

in machine It was found short

time

the most

and

with

the

apathetic

used in computer

to students

design

on interactive

systems

that the students help

student

aided computer

design

of

dynamics

courses

can be exposed interactive

to

graphics

can be aroused. and computer

graphics.

graphics

a

Application of interactive computer graphrcs

379

Acknotslfdgemeats-The authors wish to thank Professor C. Cusano of the Department of Mechanical and Industrial Engineering for suggesting this simulation and for his help in understanding the systems considered here. This work was partialiy funded by NSF Grant SER 79-00722.

REFERENCE 1. Vierck R. K..

VihrarinnAnalysis.Harper

& Row, New York (1979).