FEA ST1: STABILITY OF A STATICALLY UNDETERMINED BEAM

! created by Tamas Poloskei, 2017. March 01.

[N],[Nmm],[N/mm^2=MPa],[N/mm]

/RGB/RGB, Kywrd, PRED, PGRN, PBLU, N1, N2, NINC, NCNTR Specifies the RGB color values for indices and contours.,INDEX,100,100,100,0
/RGB/RGB, Kywrd, PRED, PGRN, PBLU, N1, N2, NINC, NCNTR Specifies the RGB color values for indices and contours.,INDEX,0,0,0,15
/VIEW/VIEW, WN, XV, YV, ZV Defines the viewing direction for the display.,1,1,1,1
/ANG/ANGLE, WN, THETA, Axis, KINCR Rotates the display about an axis.,1
/REP/REPLOT, Label Automatically reissues the last display command for convenience.,FAST

Define constant parameters

ELAST=2E5
NU=0.3
F=1E3
A=20
L=500

SETUP: element types, materials, sections

KEYWKEYW, Keyword, KEY Sets a keyword used by the GUI for context filtering (GUI).,PR_STRUC,1! Preferences / Structural
/PREP7/PREP7 Enters the model creation preprocessor.
ETET, ITYPE, Ename, KOP1, KOP2, KOP3, KOP4, KOP5, KOP6, INOPR Defines a local element type from the element library.,1,BEAM188

! Define the rectangular crossection
SECTYPESECTYPE, SECID, Type, Subtype, Name, REFINEKEY Associates section type information with a section ID number.,1,BEAM,RECT
SECOFFSETSECOFFSET, Location, OFFSET1, OFFSET2, CG-Y, CG-Z, SH-Y, SH-Z Defines the section offset for cross sections.,CENT
SECDATASECDATA, VAL1, VAL2, VAL3, VAL4, VAL5, VAL6, VAL7, VAL8, VAL9, VAL10, VAL11, VAL12 Describes the geometry of a section.,2*A,AA = 20
MPTEMPMPTEMP, SLOC, T1, T2, T3, T4, T5, T6 Defines a temperature table for material properties.,1,0
MPDATAMPDATA, Lab, MAT, SLOC, C1, C2, C3, C4, C5, C6 Defines property data to be associated with the temperature table.,EX,1,,ELASTELAST = 2E5
MPDATAMPDATA, Lab, MAT, SLOC, C1, C2, C3, C4, C5, C6 Defines property data to be associated with the temperature table.,PRXY,1,,NUNU = 0.3
! Create the keypoints
KK, NPT, X, Y, Z Defines a keypoint.,1,0,0,0
KK, NPT, X, Y, Z Defines a keypoint.,2,LL = 500,0,0
KK, NPT, X, Y, Z Defines a keypoint.,3,3*L,0,0
! Creating the lines
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,1,2
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,2,3
! Meshing the lines
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,1,,,5
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,2,,,10
LMESHLMESH, NL1, NL2, NINC Generates nodes and line elements along lines.,ALL
! Applying the geometric constraints
DKDK, KPOI, Lab, VALUE, VALUE2, KEXPND, Lab2, Lab3, Lab4, Lab5, Lab6 Defines DOF constraints at keypoints.,1,ALL,0
DKDK, KPOI, Lab, VALUE, VALUE2, KEXPND, Lab2, Lab3, Lab4, Lab5, Lab6 Defines DOF constraints at keypoints.,2,UY,0
DKDK, KPOI, Lab, VALUE, VALUE2, KEXPND, Lab2, Lab3, Lab4, Lab5, Lab6 Defines DOF constraints at keypoints.,2,UZ,0
DKDK, KPOI, Lab, VALUE, VALUE2, KEXPND, Lab2, Lab3, Lab4, Lab5, Lab6 Defines DOF constraints at keypoints.,3,UY,0
DKDK, KPOI, Lab, VALUE, VALUE2, KEXPND, Lab2, Lab3, Lab4, Lab5, Lab6 Defines DOF constraints at keypoints.,3,UZ,0
FKFK, KPOI, Lab, VALUE, VALUE2 Defines force loads at keypoints.,3,FX,-FF = 1E3
FINISHFINISH Exits normally from a processor.
! Calculate prestress effect
/SOL/SOLU Enters the solution processor.
PSTRESPSTRES, Key Specifies whether prestress effects are calculated or included.,1
/STATUS/STATUS, Lab Lists the status of items for the run.,SOLU
SOLVESOLVE, Action Starts a solution.
FINISHFINISH Exits normally from a processor.
! Eigen buckling analysis
/SOL/SOLU Enters the solution processor.
ANTYPEANTYPE, Antype, Status, LDSTEP, SUBSTEP, Action Specifies the analysis type and restart status.,1
! Extract eight modes
BUCOPTBUCOPT, Method, NMODE, SHIFT, LDMULTE, RangeKey Specifies buckling analysis options.,LANB,8,0,0,CENTER
MXPANDMXPAND, NMODE, FREQB, FREQE, Elcalc, SIGNIF, MSUPkey, ModeSelMethod Specifies the number of modes to expand and write for a modal or buckling analysis.,8,0,0,0,0.001,
/STATUS/STATUS, Lab Lists the status of items for the run.,SOLU
SOLVESOLVE, Action Starts a solution.
! Post processing
/POST1/POST1 Enters the database results postprocessor.
SETSET, Lstep, Sbstep, Fact, KIMG, TIME, ANGLE, NSET, ORDER Defines the data set to be read from the results file.,FIRST
! printing the eigenshapes
*DO*DO, Par, IVAL, FVAL, INC Defines the beginning of a do-loop.,III,1,8,1
  PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,U,SUM,1,1.0
  /IMAGE/IMAGE, Label, Fname, Ext, -- Allows graphics data to be captured and saved.,SAVE,strcat(chrval(III),'_eigen_shape'),bmp
  SETSET, Lstep, Sbstep, Fact, KIMG, TIME, ANGLE, NSET, ORDER Defines the data set to be read from the results file.,NEXT
*ENDDO*ENDDO Ends a do-loop and starts the looping action.