FEA H3: Stiffened shell structure

! Created by Tamas Poloskei, 2017. February 14.
! Units: [N],[Nmm],[N/mm^2=MPa],[N/mm]

Define constant parameters

ELAST=2E5
NU=0.3
PY=-0.001
RHO=8E-9

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,SHELL181
ETET, ITYPE, Ename, KOP1, KOP2, KOP3, KOP4, KOP5, KOP6, INOPR Defines a local element type from the element library.,2,BEAM189
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
MPDATAMPDATA, Lab, MAT, SLOC, C1, C2, C3, C4, C5, C6 Defines property data to be associated with the temperature table.,DENS,1,,RHORHO = 8E-9

! Shell section, lay-up
SECTSECTYPE, SECID, Type, Subtype, Name, REFINEKEY Associates section type information with a section ID number.,1,SHELL,,
SECDATASECDATA, VAL1, VAL2, VAL3, VAL4, VAL5, VAL6, VAL7, VAL8, VAL9, VAL10, VAL11, VAL12 Describes the geometry of a section.,5,1,0.0,3
SECOFFSETSECOFFSET, Location, OFFSET1, OFFSET2, CG-Y, CG-Z, SH-Y, SH-Z Defines the section offset for cross sections.,MID
! Beam section
SECTYPESECTYPE, SECID, Type, Subtype, Name, REFINEKEY Associates section type information with a section ID number.,2,BEAM,RECT,BEAM3D,0
SECOFFSETSECOFFSET, Location, OFFSET1, OFFSET2, CG-Y, CG-Z, SH-Y, SH-Z Defines the section offset for cross sections.,USER,0,12.5
SECDATASECDATA, VAL1, VAL2, VAL3, VAL4, VAL5, VAL6, VAL7, VAL8, VAL9, VAL10, VAL11, VAL12 Describes the geometry of a section.,5,20

Modelling

KK, NPT, X, Y, Z Defines a keypoint.,1,0,0
KK, NPT, X, Y, Z Defines a keypoint.,2,1000,0
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,1,2

! Copy lines
LGENLGEN, ITIME, NL1, NL2, NINC, DX, DY, DZ, KINC, NOELEM, IMOVE Generates additional lines from a pattern of lines.,2,1,,,,,250
LGENLGEN, ITIME, NL1, NL2, NINC, DX, DY, DZ, KINC, NOELEM, IMOVE Generates additional lines from a pattern of lines.,2,2,,,,,500
LGENLGEN, ITIME, NL1, NL2, NINC, DX, DY, DZ, KINC, NOELEM, IMOVE Generates additional lines from a pattern of lines.,2,3,,,,,500
LGENLGEN, ITIME, NL1, NL2, NINC, DX, DY, DZ, KINC, NOELEM, IMOVE Generates additional lines from a pattern of lines.,2,4,,,,,250
TYPETYPE, ITYPE Sets the element type attribute pointer.,2
SECNSECNUM, SECID Sets the element section attribute pointer.,2
! Copy keypoints 3,5,7
KGENKGEN, ITIME, NP1, NP2, NINC, DX, DY, DZ, KINC, NOELEM, IMOVE Generates additional keypoints from a pattern of keypoints.,2,3,7,2,,100
! Element number definition along lines
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,2,,,36
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,3,,,36
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,4,,,36
! Select L2 and set mesh attributes
LSELLSEL, Type, Item, Comp, VMIN, VMAX, VINC, KSWP Selects a subset of lines.,S,LINE,,2
LATTLATT, MAT, REAL, TYPE, --, KB, KE, SECNUM Associates element attributes with the selected, unmeshed lines.,1,,2,,11,,2
! Select L3 and set mesh attributes
LSELLSEL, Type, Item, Comp, VMIN, VMAX, VINC, KSWP Selects a subset of lines.,S,LINE,,3
LATTLATT, MAT, REAL, TYPE, --, KB, KE, SECNUM Associates element attributes with the selected, unmeshed lines.,1,,2,,12,,2
! Select L4 and set mesh attributes
LSELLSEL, Type, Item, Comp, VMIN, VMAX, VINC, KSWP Selects a subset of lines.,S,LINE,,4
LATTLATT, MAT, REAL, TYPE, --, KB, KE, SECNUM Associates element attributes with the selected, unmeshed lines.,1,,2,,13,,2
ALLSELALLSEL, LabT, Entity Selects all entities with a single command.,ALL
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,1,3
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,5
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,4,6
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,5,7
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,6,8
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,7,9
LL, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2 Defines a line between two keypoints.,8,10
ALAL, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10 Generates an area bounded by previously defined lines.,1,6,2,7
ALAL, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10 Generates an area bounded by previously defined lines.,2,8,3,9
ALAL, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10 Generates an area bounded by previously defined lines.,3,10,4,11
ALAL, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10 Generates an area bounded by previously defined lines.,4,12,5,13
! Set the number of finite elements on lines along axis Z
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,6,,,8
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,8,,,16
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,10,,,16
LESIZELESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV Specifies the divisions and spacing ratio on unmeshed lines.,12,,,8
! Mesh the beam
LMESHLMESH, NL1, NL2, NINC Generates nodes and line elements along lines.,2,4,1
! Mesh the areas with shell elements
TYPETYPE, ITYPE Sets the element type attribute pointer.,1
SECNSECNUM, SECID Sets the element section attribute pointer.,1
MSHKEYMSHKEY, KEY Specifies whether free meshing or mapped meshing should be used to mesh a model.,1
AMESHAMESH, NA1, NA2, NINC Generates nodes and area elements within areas.,ALL
! Kinematic constraints
DLDL, LINE, AREA, Lab, Value1, Value2 Defines DOF constraints on lines.,6,,ALL,0
DLDL, LINE, AREA, Lab, Value1, Value2 Defines DOF constraints on lines.,8,,ALL,0
DLDL, LINE, AREA, Lab, Value1, Value2 Defines DOF constraints on lines.,10,,ALL,0
DLDL, LINE, AREA, Lab, Value1, Value2 Defines DOF constraints on lines.,12,,ALL,0
! External load
SFASFA, Area, LKEY, Lab, VALUE, VALUE2 Specifies surface loads on the selected areas.,ALL,2,PRES,PYPY = -0.001
FINISHFINISH Exits normally from a processor.

Solution

/SOL/SOLU Enters the solution processor.
SOLVESOLVE, Action Starts a solution.
FINISHFINISH Exits normally from a processor.

Postprocessing

/POST1/POST1 Enters the database results postprocessor.

! Invert window color
/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
! Top view
/VIEW/VIEW, WN, XV, YV, ZV Defines the viewing direction for the display.,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
! Save images as bitmap
PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,U,Y,0,1.0
/IMAGE/IMAGE, Label, Fname, Ext, -- Allows graphics data to be captured and saved.,SAVE,u_y,bmp
PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,U,X,0,1.0
/IMAGE/IMAGE, Label, Fname, Ext, -- Allows graphics data to be captured and saved.,SAVE,u_x,bmp
PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,U,Z,0,1.0
/IMAGE/IMAGE, Label, Fname, Ext, -- Allows graphics data to be captured and saved.,SAVE,u_z,bmp
PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,S,Z,0,1.0
/IMAGE/IMAGE, Label, Fname, Ext, -- Allows graphics data to be captured and saved.,SAVE,s_z,bmp
PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,S,XZ,0,1.0
/IMAGE/IMAGE, Label, Fname, Ext, -- Allows graphics data to be captured and saved.,SAVE,t_xz,bmp
FINISHFINISH Exits normally from a processor.

Solution, new analysis

/SOL/SOLU Enters the solution processor.

! Modal analysis
ANTYPEANTYPE, Antype, Status, LDSTEP, SUBSTEP, Action Specifies the analysis type and restart status.,2
! First 10 eigenfrequencies
MODOPTMODOPT, Method, NMODE, FREQB, FREQE, Cpxmod, Nrmkey, ModType, BlockSize, --, --, Scalekey Specifies modal analysis options.,LANB,10
EQSLVEQSLV, Lab, TOLER, MULT, --, KeepFile Specifies the type of equation solver.,SPAR
MXPANDMXPAND, NMODE, FREQB, FREQE, Elcalc, SIGNIF, MSUPkey, ModeSelMethod Specifies the number of modes to expand and write for a modal or buckling analysis.,10,,,1
LUMPMLUMPM, Key Specifies a lumped mass matrix formulation.,0
PSTRESPSTRES, Key Specifies whether prestress effects are calculated or included.,0
MODOPTMODOPT, Method, NMODE, FREQB, FREQE, Cpxmod, Nrmkey, ModType, BlockSize, --, --, Scalekey Specifies modal analysis options.,LANB,10,0,0,,OFF
SOLVESOLVE, Action Starts a solution.
FINISHFINISH Exits normally from a processor.

Postprocessing: Modal analysis

/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

! Save the eigenshapes as bitmaps
*DO*DO, Par, IVAL, FVAL, INC Defines the beginning of a do-loop.,III,1,10,1
  PLNSOLPLNSOL, Item, Comp, KUND, Fact, FileID Displays results as continuous contours.,U,Y,0,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.