APDL Transient Analysis Only Registering 1st Acceleration Step

  • 403 Views
  • Last Post 29 July 2019
louis2222 posted this 31 March 2018

Hi there, I am having some trouble in ANSYS! 

Short story: I am struggling to get transient analysis load steps (in the form of acceleration) to work. Please could you have a look at my code and let me know if something is obviously wrong? It is only reading the first acceleration step for the x axis, then applying it to both x and y, and then staying at a constant acceleration after that.

Long story: I am trying to carry out transient analysis on a 3 story structure using acceleration data (gathered experimentally) to excite the structure at its base. The structure is mounted on an xy axis shaking table to simulate earthquakes (so I am assuming it is only constrained in the z direction at the base, as well as within the xy limits of the table). I am importing the acceleration data into a table, and then using a do loop to read the accelerations at each point to complete the transient analysis, as you can see in my code below. The problem I have is that ANSYS is only applying the 1st acceleration step. The remaining analysis is just for free oscillation. You can see this in the photo attached in the "Bot_Y_ACCEL" line. It moves to the first load step (in this case 0.5), then stays there. The rest of the lines just oscillate about this straight line. This is just impulse response, however I need to analyse sustained and varying accelerations!

Any help at all would be so appreciated and you might just save my master's project. Many thanks in advance!

 

/FILENAME,Transient_Test

/SOLU

 

FILE = 'data' !Enter data file name 

DT=0.00781 !Time interval (1/128 seconds)

 

SKIP = 0                 !Enter number of lines to skip

/INQUIRE,NUMLINES,LINES,FILE,TXT          !Finds number of lines

READ = NUMLINES - SKIP !Calculates how many lines to read from data file

 

*DEL,ACCEL,,NOPR !Deletes previous instances of ACCEL

*DIM,ACCEL,TABLE,READ - 1,2 !Create a table for xy acceleration data

*TREAD,ACCEL,FILE,TXT,,SKIP !Read data from FILE.txt into ACCEL table

 

ACEL,,,9.81 !Gravity

ANTYPE,TRANS !Transient analysis

TRNOPT,FULL !Full method

TIMINT,ON,STRUC !Transient effects (inertia/mass) ON for structural DOFs

KBC,1 !Stepped loading for transient analysis

OUTRES,ALL,1 !Output everything

OUTPR,BASIC,ALL, !Basic solution print

 

NT=READ !Number of data points

NSUBST,1,,,1

 

*do,i,1,NT !Running from 1 to NT all data points

TIME,i*DT!Calculate time vector by DT

CMSEL,S,COLUMNS!Select column component

CMSEL,A,FLOORS!Select floor component (in other words all components of my model)

NSEL,S,LOC,Z,0!Select all nodes at z = 0 to apply acceleration to

D,ALL,ACCX,ACCEL(1,i)!Apply x acceleration

D,ALL,ACCY,ACCEL(2,i)!Apply y acceleration

ALLSEL!Select all nodes to complete solution

SOLVE

*enddo

 

 

Attached Files

Order By: Standard | Newest | Votes
asder posted this 29 July 2019

I would keep it more simple so no do loops. In this way you just apply the time variation of the load as a table (Workbench uses something like this in Str. Dyn.). You need also to split up the acceleration data file to x-direction filex and y -direction filey.txt. That is very easy though.

DT=1/128
DTM=1/1000

SKIP = 0 !Enter number of lines to skip

/INQUIRE,NUMLINES,LINES,FILEX,TXT !Finds number of lines

READ = NUMLINES - SKIP !Calculates how many lines to read from data file



*DEL,ACCELX,,NOPR !Deletes previous instances of ACCEL

*DIM,ACCELX,TABLE,READ - 1, !Create a table for x acceleration data

*TREAD,ACCELX,FILEX,TXT,,SKIP !Read data from FILE.txt into ACCEL table


/INQUIRE,NUMLINES,LINES,FILEY,TXT !Finds number of lines

READ = NUMLINES - SKIP !Calculates how many lines to read from data file


*DEL,ACCELY,,NOPR !Deletes previous instances of ACCELY

*DIM,ACCELY,TABLE,READ - 1, !Create a table for x acceleration data

*TREAD,ACCELY,FILEY,TXT,,SKIP !Read data from FILEY.txt into ACCEL table


/SOLU
CMSEL,S,COLUMNS!Select column component

CMSEL,A,FLOORS!Select floor component (in other words all components of my model)

NSEL,S,LOC,Z,0!Select all nodes at z = 0 to apply acceleration to

D,ALL,ACCX,%ACCELX%!Apply x acceleration
D,ALL,ACCY,%ACCELY%!Apply y acceleration



ALLSEL!Select all nodes to complete solution
ACEL,,,9.81 !Gravity

ANTYPE,TRANS !Transient analysis

TRNOPT,FULL !Full method

DELTIM, DT, DTM, DT

TIMINT,ON,STRUC !Transient effects (inertia/mass) ON for structural DOFs

KBC,1 !Stepped loading for transient analysis

OUTRES,ALL,1 !Output everything

OUTPR,BASIC,ALL, !Basic solution print

 

asder posted this 25 July 2019

you mat use 

/SOLU

DELTIM,0.02

ANTYPE,TRANS

TRNOPT,full

AUTOTS,ON

NSEL,S,LOC,Z,-38,375

CM,NUPP,NODE

OUTRES,ALL,ALL

TIMINT,ON

TIME,0.02

ACEL,,,9.8

NSEL,S,LOC,Z,-38,375

D,ALL,ACCX,0.035672

ALLSEL

SOLVE

TIME,0.04

ACEL,,,9.8

NSEL,S,LOC,Z,-38,375

D,ALL,ACCX,0.009702

ALLSEL

SOLVE

TIME,0.06

ACEL,,,9.8

NSEL,S,LOC,Z,-38,375

D,ALL,ACCX,0.041944

ALLSEL

SOLVE

TIME,0.08

ACEL,,,9.8

NSEL,S,LOC,Z,-38,375

D,ALL,ACCX,0.04284

ALLSEL

SOLVE

TIME,0.1

ACEL,,,9.8

NSEL,S,LOC,Z,-38,375

D,ALL,ACCX,0.0106526

ALLSEL

SOLVE

asder posted this 19 July 2019

FINISH
/CONFIG,NRES,100000
/PREP7
DAMPRATIO=0.05000
*SET,NT,2400
*SET,DT,0.02
*DIM,AC,,NT
*VREAD,AC(1),seismic_record,TXT
(F8.5)
/SOLU
ANTYPE,TRANS
TRNOPT,FULL
*DO,I,1,2400
ACEL,AC(I),0,0
TIME,(I)*0.02
OUTRES,ALL,ALL
SOLVE
*ENDDO
FINISH

this code will help you 

asder posted this 18 July 2019

@louis2222 , you solve it ??

 

 

Steve1995 posted this 09 June 2019

Hey Louis, did you solve the problem?

I have the same problem now: i have a temperature dependig on the time and also the gravity in y-direction. My model only solves the effect of the gravity before the first temperature step and after that, it doenst change. Do you know, how i can solve this or can you tell me how you did it?

Hope you see this,

Thank you

Close