-
1
- #1
louis2222
Structural
- Apr 1, 2018
- 1
Hi there! I am having a bit of trouble registering acceleration data to apply to the base of my model for transient analysis. I have time history data from an earthquake, but I am struggling to get it to apply to the model. It is registering the first step, then not changing after that. My code is below in case that helps. Any advice would be incredibly appreciated!
/FILENAME,Transient_Test
/SOLU
FILE = 'data4' !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 now)
NSEL,S,LOC,Z,0 !Select all nodes at z = 0 to apply acceleration to
DDELE,ALL,ACCX
DDELE,ALL,ACCY
D,ALL,ACCX,ACCEL(i,1) !Apply x acceleration
D,ALL,ACCY,ACCEL(i,2) !Apply y acceleration
ALLSEL !Select all nodes to complete solution
SOLVE
*enddo
/FILENAME,Transient_Test
/SOLU
FILE = 'data4' !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 now)
NSEL,S,LOC,Z,0 !Select all nodes at z = 0 to apply acceleration to
DDELE,ALL,ACCX
DDELE,ALL,ACCY
D,ALL,ACCX,ACCEL(i,1) !Apply x acceleration
D,ALL,ACCY,ACCEL(i,2) !Apply y acceleration
ALLSEL !Select all nodes to complete solution
SOLVE
*enddo