## General Mechanical

#### How to create a shock response spectrum from time history data with APDL commands

• Dave Looman
Ansys Employee
In the input below the POST26 RESP command is used to compute the shock response spectrum for a 20g triangular acceleration of 10 milli-sec duration. The time-history includes time after the shock load for the lower frequencies to reach their peak displacement value. The input assumes that a modal analysis has been done and expanded.n! After a modal analysis...npi=acos(-1)namplitude=20 ! pulse amplitude (20 g)nwidth=0.01 ! pulse width (10 milli-secs)n n*dim,acel,table,4,1nacel(1,0)=0.0, 0.5*width, width, 5.0*widthnacel(1,1)=0.0, amplitude, 0.0, 0.0n n/axlab,x,TIME n/axlab,y,ACEL (g)n*vplot,acel(1,0),acel(1,1) ! verify acceleration inputnThe table array, acel, can now be used as input to the RESP command in the time-history post-processor.n/post26nstore,alloc,10 ! allocate the number of frequencies to be solved fornvput,acel(1,0),1,0 ! variable 1 is time valuesnvput,acel(1,1),2,0 ! variable 2 is acceleration valuesndata,5,1,10,1,Frequncy ! variable 5 is frequency list (I love this old command!) n(10F5.1)n10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0n n! Use parameters for RESP command input to make more readablenSpec=6 ! variable to contain spectrum outputnFreq=5 ! variable with frequencies to be solved fornInp_Acel=2 ! variable with acceleration inputnOut_Type=3 ! create acceleration spectrumnDamp=0.05 ! damping (ratio to critical) to be usednTinc=0.0005 ! integration time step, 20 pts per cycle at 100 hznInp_Type=1 ! acceleration input, new at 14.0n nresp,Spec,Freq,Inp_Acel,Out_Type,Damp,Tinc,,,Inp_Type n n/title,Response Spectrum for %amplitude%g, %width*1000% m-sec shock load (5% Damping)n/axlab,x,Frequency (Hz)n/axlab,y,Peak Acceleration (g)nxvar,Freq ! x axis is frequencynplvar,Spec ! plot acceleration spectrumn n
• Karthik R