2DBeam Model

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

!

##############################################################
!# Filename : Ansys Damaged Beam #
!##############################################################

FINI
/CLEAR,ALL,ALL
/CWD,'D:\Default_Code\Samir_damage'
/TITLE,Damaged Beam

!######################################
!# Various parameters : #
!######################################
*Set,Material,0 ! Material = 1 FGM
! Material = 0 ALluminum

Damage = 0 ! Damaged = 1
! Healthy = 0

*Set,P, 0 ! Power Law Value

*SET,Freqrang,300
*Set,Length,450e-3 ! Length [m]
*Set,Width,6.35e-3 ! Widthh [m]
*Set,Thickness,25.4e-3 ! Thickness [m]

*Set,Xposition,Length/4 ! Crack X position [m]


*Set,Yposition,Width/2 ! Crack Y position [m]
*Set,Wcrk,Width*0.2 ! Crack width [m]

*Set,ele_numb_x,10
*Set,ele_numb_y,5
Ele_num = 2*ele_numb_y

length_e_z = Width/Ele_num
*set, a_z, 1./Width

!*Set,beta,NLOG(0.2)/Width
*Set,law,1

! MATERIAL Ceramic
*set, E_t, 151e10 ! [Pa]
*set, nu_t, 0.3
*set,dens_t,3000
!
! MATERIAL BOT
*set, E_b,70e10 ! [Pa]
*set, nu_b, 0.3
*set,dens_b,2780
!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*create, mat_fgm_pol
/nopr

z_coord = arg1
*IF, law, EQ, 1,THEN

grad_common = (a_z*z_coord)**P
E_fgm = (E_t-E_b)*grad_common + E_b
den_fgm = (dens_t-dens_b)*grad_common + dens_b
*else
E_fgm = E_b*EXP(beta*z_coord)
den_fgm = dens_b*EXP(beta*z_coord)

/gopr
*end !mat_fgm_pol
!
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!########################################################

/PREP7

!===== Defining element types =====

ET,1,PLANE182 !element ELEMENTS


R,1,Thickness
!KEYOPT,1,3,3
MP, Ex, 1, 70e9
MP, dens, 1, 2850
MP, NUXY, 1, 0.3

!#######################################################
!# Define KP,lines Area ! #
!#######################################################
*IF, Damage, EQ, 1,THEN
K,1,0,0,0
K,2,0,Yposition,0
K,3,0,Width,0
K,4,Xposition,Width,0
K,5,Xposition,Yposition,0
K,6,Xposition,0,0
K,7,Xposition+Wcrk,Width,0
K,8,Xposition+Wcrk,Yposition,0
K,9,Xposition+Wcrk,0,0
K,10,Xposition+Wcrk,0,0
K,11,Length,Width,0
K,12,Length,Yposition,0
K,13,Length,0,0

A,1,6,5,2
A,2,5,4,3
A,7,11,12,8
A,10,13,12,8
A,6,10,8,5
!!!!! X Direction
LSEL,S,LOC,X,0,Xposition
LESIZE,all,,,ele_numb_x ! SPECIFY # OF LINE DIVISIONS

LSEL,S,LOC,X,Xposition+Wcrk,Length
LESIZE,all,,,ele_numb_x ! SPECIFY # OF LINE DIVISIONS

LSEL,S,LOC,X,Xposition,Xposition+Wcrk
LESIZE,all,,,3 ! SPECIFY # OF LINE DIVISIONS
!!!!! Y Direction
LSEL,S,LOC,Y,0,Yposition
LESIZE,all,,,ele_numb_y ! SPECIFY # OF LINE DIVISIONS

LSEL,S,LOC,Y,Yposition,Width
LESIZE,all,,,ele_numb_y ! SPECIFY # OF LINE DIVISIONS

Lsel,all
MSHKEY,1 ! ENFORCE MAPPED MESHING
MSHAPE,0,2D ! ENFORCE QUADRILATERAL ELEMEN
Numstr,node,6
Amesh,all

*ELSE

K,1,0,0,0
K,2,Length,0,0
K,3,Length,Width,0
K,4,0,Width,0
A,1,2,3,4
LSEL,S,LOC,X,0,Length
LESIZE,all,,,2*ele_numb_x ! SPECIFY # OF LINE DIVISIONS
LSEL,S,LOC,Y,0,Width
LESIZE,all,,,2*ele_numb_y ! SPECIFY # OF LINE DIVISIONS
Lsel,all
Asel,all
AATT,1,,1
!Real,1
MSHKEY,1 ! ENFORCE MAPPED MESHING
MSHAPE,0,2D ! ENFORCE QUADRILATERAL ELEMEN
Numstr,node,6
Amesh,all
/eshape,1

*ENDIF

*IF, Material, EQ, 1,THEN


counter = 0
*do, j, 1, Ele_num, 1
z_coord = length_e_z*(j-0.5)
counter = counter + 1
*use, mat_fgm_pol,z_coord
mp, ex, counter, E_fgm
mp, dens, counter, den_fgm
mp, prxy, counter, 0.3

esel, s, Cent,Y , length_e_z*(counter-1), length_e_z*counter, 1


emodif, all, mat, counter
esel, all

*enddo

*ELSE

*ENDIF
nsel,all

!----- Boundary Condition ------


nsel,s,loc,X,0 ! Clamp Left end
!nsel,R,loc,Y,0 ! Clamp Left end
d,all,ux,0,,,,uy

!nsel,a,loc,X,length ! Clamp Left end


!nsel,R,loc,Y,0 ! Clamp Left end
!d,all,uy,0 ! Defines DOF constraints, clamp the end
allsel,all

allsel,all
Node_Fr=Node(length,0,0)

finish
/SOLU

ANTYPE,MODAL ! Modal analysis


nmodes = 10
modopt,LANB,nmodes ! Block Lanczos solver
mxpand,nmodes,,,yes ! Calculate element results and

SOLVE

FINISH

You might also like