FEA R2: 3D beam structure

! Created by: Gergely Gyebroszki, 2018.02.13.

Initial setup

! White canvas
/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,2,3
/ANG/ANGLE, WN, THETA, Axis, KINCR Rotates the display about an axis.,1

SETUP: element types, materials, sections

KEYWKEYW, Keyword, KEY Sets a keyword used by the GUI for context filtering (GUI).,PR_STRUC,1
/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,BEAM189
SECTYPESECTYPE, SECID, Type, Subtype, Name, REFINEKEY Associates section type information with a section ID number.,1,BEAM,I,I100,0
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.,50,50,100,6.8,6.8,4.5
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,,2E5
MPDATAMPDATA, Lab, MAT, SLOC, C1, C2, C3, C4, C5, C6 Defines property data to be associated with the temperature table.,PRXY,1,,0.3

Modelling

/PNUM/PNUM, Label, KEY Controls entity numbering/coloring on plots.,KP,1
/PNUM/PNUM, Label, KEY Controls entity numbering/coloring on plots.,LINE,1
KK, NPT, X, Y, Z Defines a keypoint.,1,0,0,-577.3
KK, NPT, X, Y, Z Defines a keypoint.,2,-500,0,288.7
KK, NPT, X, Y, Z Defines a keypoint.,3,500,00,288.7
KK, NPT, X, Y, Z Defines a keypoint.,,0,4000,0 ! Omitting the KP number means automatic numbering
KK, NPT, X, Y, Z Defines a keypoint., ! 5-th keypoint at origin, auto-numbered
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,1,4
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,2,4
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,3,4

! Element size on lines: NDIV = 20
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,ALL,,,20,,1,,,1
! Meshing attributes on line, '5' is the orientation KP here
LATTLATT, MAT, REAL, TYPE, --, KB, KE, SECNUM Associates element attributes with the selected, unmeshed lines.,1,,1,,5,,1
LMESHLMESH, NL1, NL2, NINC Generates nodes and line elements along lines.,ALL
! Display element shape to verify good element orientation
/ESHAPE/ESHAPE, SCALE, KEY Displays elements with shapes determined from the real constants or section definition.,1.0
! Select nodes at Y=0, constrain all DoF
NSELNSEL, Type, Item, Comp, VMIN, VMAX, VINC, KABS Selects a subset of nodes.,S,LOC,Y,0
DD, Node, Lab, VALUE, VALUE2, NEND, NINC, Lab2, Lab3, Lab4, Lab5, Lab6 Defines degree-of-freedom constraints at nodes.,ALL,,,,,,ALL,,,,
! Select nodes at Y=4000, add FZ=10000
NSELNSEL, Type, Item, Comp, VMIN, VMAX, VINC, KABS Selects a subset of nodes.,S,LOC,Y,4000
FF, NODE, Lab, VALUE, VALUE2, NEND, NINC Specifies force loads at nodes.,ALL,FZ,10000
! Select everything before proceeding to solution
ALLSELALLSEL, LabT, Entity Selects all entities with a single command.,ALL

Solution

/SOL/SOLU Enters the solution processor.
SOLVESOLVE, Action Starts a solution.

Postprocessing

/POST1/POST1 Enters the database results postprocessor.
PLDISPPLDISP, KUND Displays the displaced structure.,2 ! Click here to view image
PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,U,X,0,1.0 ! Click here to view image
PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,U,Y,0,1.0 ! Click here to view image
PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,U,Z,0,1.0 ! Click here to view image