Professional Documents
Culture Documents
! Nonlinear part------------------------------------------------------
MP,DENS,1,rho ! Density
MP,EX,1,E ! Young's modulus
MP,NUXY,1,nu ! Poisson ratio
TB,BISO,1 ! Bilinear isotropic hardening plasticity
TBDAT,1,fy ! Define the yielding stress
TBDAT,2,Et ! Define the plastic modulus
!
Modeling---------------------------------------------------------------------------
---
L=10*2.54e-2 ! Total length of the Stripe, 10 inch excluding the gripping
area
W=2*2.54e-2 ! Width of the Stripe, 2 inch width
L1=40e-3 ! Smart skin coverd area, in X axis
W1=40e-3 ! width along Y axis
DIA_HOLE=1/4*2.54e-2 ! Diamater of the hole, 1/4 inch
R0=DIA_HOLE/2
R1=10e-3
CSYS,0
K,52,L1/2,0
K,53,0,W1/2
K,54,L1/2,W1/2
L,52,54 ! create vertical line L9
L,53,54 ! create horizontal line L10
ASEL,All ! select all the area Area, otherwise some areas will be
missing
LSEL,S,line,,9,10
ASBL,All,all ! subtract the rectange from big area, the circular Area1,
inner square Area3, the left bigger Area 4
!
Meshing----------------------------------------------------------------------------
-
MSHAPE,0,2D ! mesh with hexahedral-shaped elements
MSHKEY,1 ! MAPPED MESH
LSEL,ALL ! SELECT ALL THE LINES
LESIZE,1,,,30 ! Find the inner small curved line L1, and mesh with 20
segments, h=0.25mm
LESIZE,2,,,30 ! Find the outer larger curved line, and mesh with 20
segments, h=0.75mm
LESIZE,3,,,15,2 ! LESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE. Spacing ratio. If
positive, nominal ratio of last division size to first division size
LESIZE,4,,,15,2 ! increasing size, from smaller node number to bigger node
number, avg h=0.5 mm
AMESH,1
LESIZE,5,,,15,1.5
LESIZE,16,,,15,1.5
LESIZE,14,,,3,1/1.5
LESIZE,17,,,3,1.5
MSHKEY,0 ! Free mesh
AMESH,5
LESIZE,15,,,40,0.5
LESIZE,8,,,40,0.5
LESIZE,6,,,8
MSHKEY,0
AMESH,2
EXTOPT,ON
TYPE,1 ! change element type to 3-D
EXTOPT,ESIZE,4 ! set element size along thickness direction
VEXT, All, , , , , T ! assuming the volume thickness is 'dz' in Z-direction
! BOUNDARY CONDITION------------------------------------------------------------
ASEL,S,loc,x,-L/2 ! Select the LINE ON THE BOUNDARY
NSLA,S,1 ! Select the nodes on the lines
D,ALL,ALL ! constrain selected nodes in x and y
direction (pin), fix end
! Coupling nodes-------------------------------------------------------------
ASEL,S,loc,x,L/2 ! Select the LINE ON THE BOUNDARY, line number 10
NSLA,S,1 ! Select the nodes on the lines
CM,LOAD_NODE,NODE ! Group nodes into a component
CP,1,ALL,ALL ! Reference No=1, couple the x y direction
ASEL,S,loc,x,L/2 ! Select the LINE ON THE BOUNDARY
NSLA,S,1 ! Select the nodes on the area
*get,N_Load,NODE,,count ! Get total number of selected nodes,node is a
set of selected nodes
! Add load-----------------------------------------------------------------
Finish
/SOLUTION
ANTYPE,0 ! Static Analysis
NLGEOM,ON ! Includes large deformation effects in a static or full
transient analysis.
outres,all,all ! Save all the results from the substeps
EQSLV,PCG ! Preconditioned Conjugate Gradient (PCG) solver has been
added as an alternate to the default frontal solver. The PCG solver requires less
file space but more memory than other solvers and is faster for larger
! models(wavefronts > 1000). PCG is well-suited for problems with very large,
sparse, symmetric matrices, such as those encountered in magnetic field analysis.
SOLCONTROL,On ! Specifies whether to use optimized nonlinear solution
defaults and some enhanced internal solution algorithms, on is default
NSUBST,100,4000,50 ! Define the 100 substeps
NEQIT,1000 ! Equilibrim iterations, maximum number of iterations
Force1=16000*4.44822 ! 16,000lbf
Force2=18000*4.44822 ! 18,000lbf
*DIM,LOAD,TABLE,8
LOAD(1)=Force1/N_load,Force1/N_load,0,0,Force2/N_load,Force2/N_load,0,0
LOAD(1,0)=1,2,3,4,5,6,7,8 ! Time step, the index of the
load
!Then use a do-loop to apply the load and solve it:
*DIM,Timev,TABLE,8
Timev(1)=0.2037,0.2344,0.4353,0.4947,0.7263,0.7570,0.9821,1
Timev(1,0)=1,2,3,4,5,6,7,8 ! Time step, the index of the
load
*DO,I,1,8,1
Time,TIMEV(I) ! For static load, time is ignored, step number integer
!NSEL,NONE
ASEL,S,loc,x,L/2 ! Select the area ON THE BOUNDARY
NSlA,S,1 ! Select the nodes on the area
F,ALL,FX,LOAD(I) ! The load can replace previous load
ALLSEL,All ! Select all the elements and all the nodes
SOLVE
*ENDDO
esel,all
NSEL,NONE
NSEL, S, LOC, X, -L1/2, L1/2
NSEL, R, LOC, Y, -W1/2, W1/2
NSEL, R, LOC, Z, T ! correct, select the nodes on smart skin
NSLE,R,CORNER ! avoid midside node elements
!Retrieving DATA
*vmask, mask(1)
*vget, strn_full(1,1),NODE,1,LOC,X
*vmask, mask(1)
*vget, strn_full(1,2),NODE,1,LOC,Y
*vmask, mask(1)
*vget, strn_full(1,3),NODE,1,LOC,Z
*vmask, mask(1)
*vget, strn_full(1,4),NODE,1,EPEL,X ! Fill 4th column with X-strain,
elastic x-strain
*vmask, mask(1)
*vget, strn_full(1,5),NODE,1,EPEL,Y ! Fill 5th column with Y-strain, elastic
y-strain
*vmask, mask(1)
*vget, strn_full(1,6),NODE,1,EPEL,EQV ! Fill 6th column with von Mises
elastic strain
*vmask, mask(1)
*vget, strn_full(1,7),NODE,1,EPPL,X ! Fill 7th column with X-strain,
plastic x-strain
*vmask, mask(1)
*vget, strn_full(1,8),NODE,1,EPPL,Y ! Fill 8th column with Y-strain, plastic
y-strain
*vmask, mask(1)
*vget, strn_full(1,9),NODE,1,EPPL,EQV ! Fill 9th column with von Mises
plastic strain
*vmask, mask(1)
*vget, strn_full(1,10),NODE,1,EPTO,X ! Fill 10th column with X-strain,
total x-strain
*vmask, mask(1)
*vget, strn_full(1,11),NODE,1,EPTO,Y ! Fill 11th column with Y-strain,
total y-strain
*vmask, mask(1)
*vget, strn_full(1,12),NODE,1,EPTO,EQV ! Fill 12th column with von
Mises total strain
*vmask, mask(1)
*vget, strn_full(1,13),NODE,1,EPEL,INT ! 13 Elastic strain
intensity
*vmask, mask(1)
*vget, strn_full(1,14),NODE,1,EPPL,INT ! 14 plastic strain
intensity
*vmask, mask(1)
*vget, strn_full(1,15),NODE,1,EPTO,INT !15 total strain
intensity
*vmask, mask(1)
*vget, strn_full(1,16),NODE,1,S,INT ! 16 Stress intensity
*vmask, mask(1)
*vget, strn_full(1,17),NODE,1,S,EQV ! 17 von Mises stress
*vmask, mask(1)
*vget, strn_full(1,18),NODE,1,NL,SEPL ! 18 plastic
equivalent stress
*vmask, mask(1)
*vget, strn_full(1,19),NODE,1,NL,SRAT ! 19 stress
state ratio
!WRITING TO A FILE:
*cfopen,'Final_strain',txt
*vwrite ! Writes a column header
('Node',4x,'X-LOC',4x,'Y-LOC',4x,'Z-LOC',4x,'X-EStrain',4x,'Y-EStrain',4x,'von-
EStrain',4x,'X-PStrain',4x,'Y-PStrain',4x,'von-PStrain',4x,'X-TStrain',4x,'Y-
TStrain',4x,'von-TStrain')
*vwrite, nodeid_comp(1), strn_comp(1,1), strn_comp(1,2), strn_comp(1,3)
,strn_comp(1,4), strn_comp(1,5), strn_comp(1,6) ,strn_comp(1,7), strn_comp(1,8),
strn_comp(1,9) ,strn_comp(1,10), strn_comp(1,11), strn_comp(1,12)
(F7.0,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E1
2.4,2X,E12.4,2X,E12.4,2X,E12.4)
*cfclos
!*uilist, Final_strain, txt !displays the file on screen
*cfopen,'Final_intensity',txt
*vwrite ! Writes a column header
('Node',4x,'X-LOC',4x,'Y-LOC',4x,'Z-LOC',4x,'E-StrainInt',4x,'P-StrainInt',4x,'T-
StrainInt',4x,'StressInt',4x,'von-Stress',4x,'P-EqStress',4x,'StressStateRatio')
*vwrite, nodeid_comp(1), strn_comp(1,1), strn_comp(1,2), strn_comp(1,3)
,strn_comp(1,13), strn_comp(1,14), strn_comp(1,15) ,strn_comp(1,16),
strn_comp(1,17), strn_comp(1,18) ,strn_comp(1,19)
(F7.0,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E1
2.4,2X,E12.4)
*cfclos
!*uilist, Final_intensity, txt !displays the file on screen
Cmsel, s, tempoelem
Cmsel, a, temponode
vget,strnoutput(1,1),1 ! put time in array, shoud use vget rather than *vget
in /post26
vget,strnoutput(1,2),2 ! put x plastic strain in array at strain gage 1
vget,strnoutput(1,3),3 ! put x elastic strain in array
vget,strnoutput(1,4),4 ! put x plastic strain in array at strain gage 3
vget,strnoutput(1,5),5 ! put x elastic strain in array
vget,strnoutput(1,6),6 ! put x plastic strain in array at strain gage 4
vget,strnoutput(1,7),7 ! put x elastic strain in array
*cfopen,'StrHistory',txt
*vwrite ! Writes a column header
('Time',4x,'G1-xPL',4x,'G1-xEL',4x,'G3-xPL',4x,'G3-xEL'4x,'G4-yPL',4x,'G4-yEL')
*vwrite,strnoutput(1,1),strnoutput(1,2),strnoutput(1,3),strnoutput(1,4),strnoutput(
1,5),strnoutput(1,6),strnoutput(1,7)
(E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4,2X,E12.4)
! Format with decimal and scientific
*cfclos
FINISH