📄 ansyscode.txt
字号:
FINI
/clear
/title,FEA 2
/filname,Thermal,1
/PREP7
!******* mm units *******
!********************* Parameters **************************************
pi=3.141592654
a=pi/180
inch=25.4 ! 25.4 mm
! Motherboard Dimensions
PCBT = 0.04*inch !board thickness
! BGA parameters
JTHT = 0.02*inch !Solder ball height
! Components
PCKGT= 0.04*inch !Total package thickness above solder balls
! SolderBall
CUTHSUB = 0.001*inch ! CU PAD AT SUBSTRATE SIDE
CUPADTHB = 0.001*inch ! Cu PAD ON PWB SIDE
BALLDIA = 0.032*inch ! SOLDER BALL DIA
PITCH=0.04*inch ! PITCH = (1.016 mm)
UNITSZ=0.04*inch
! DIESZ & DASZ
PADSZT = 0.024*inch ! SOLDER BALL PAD (0.4 mm)
PADSZB = 0.024*inch ! Cu PAD ON PWB (SAME)
CUNIPADT = 0.033*inch ! Cu PAD ON TOP OF SOLDER
!******************* Material Propeties ********************************
!*** PCB ***
mp,ex,1,31.75e6
mp,nuxy,1,0.28 Minor Poisson's ratios
mp,dens,1,3.7e-6
mp,alpx,1,17e-6 !Secant coefficients of thermal expansion
!*** SOLDER ***
mp,dens,2,8.42e-6
mptemp,1,273,338,378,398
mpdata,ex,2,1,45e6,43e6,41e6,40e6
mpdata,nuxy,2,1,0.35,0.35,0.35,0.35
mpdata,ctex,2,1,24e-6,24e-6,24e-6,24e-6 !Instantaneous coefficients of thermal expansion
tb,anand,2 ! ANAND'S constants for 62/36/2 solder
tbdata,1,12.41e3,9400,4.0e6,1.5,0.303,1379e3
tbdata,,13.79e3,0.07,1.3
!*** Overmold ***
mp,ex,3,20e6
mp,nuxy,3,0.3
mp,dens,3,2e-6
mp,alpx,3,3e-6
!*** Chip ***
mp,ex,4,131e6
mp,nuxy,4,0.278
mp,dens,4,2.33e-6
mp,alpx,4,4.5e-6
!*** Substrate(BT) ***
MP,DENS,5,2e-6
MP,EX,5,16.8e6
MP,EY,5,16.8e6
MP,EZ,5,7.34e6
MP,GXZ,5,3.48e7 !Shear modulious
MP,GYZ,5,3.48e7
MP,GXY,5,7.94e6
MP,NUXZ,5,0.3
MP,NUYZ,5,0.3
MP,NUXY,5,0.11
MP,ALPX,5,18e-6
MP,ALPY,5,18e-6
MP,ALPZ,5,44e-6
!*** Cu ***
mp,ex,6,129e6
mp,nuxy,6,0.344
mp,dens,6,2e-6
mp,ALPX,6,16.6e-6
!******************* Element Definition *********************************
et,1,45 !solid 45
et,2,visco107
!***** Define coordinate systems *********
local,13,0,PITCH,0
local,14,0,0,0
!**************************** MODELING **********************************
!****** PCB (Model quarter symmetry of single component first)
wpcsys,,14
CSYS,4
!WPROTA,,-90
!****** CREATING KEYPOINTS
CSYS,4
K,1,,JTHT,0
K,2,,JTHT,-(PADSZB/2)
K,3,,(3*JTHT/4),-0.38
K,4,,JTHT/2,-(BALLDIA/2)
K,5,,(1*JTHT/4),-0.38
K,6,,0,-(PADSZT/2)
K,7,,(JTHT+CUTHSUB),0
K,8,,-CUPADTHB,-(PADSZT/2)
K,9,,-CUPADTHB,0
K,10,,(JTHT+CUTHSUB),-(PADSZB/2)
K,11,,0,0
K,12,,JTHT/2,0
K,13,,-CUPADTHB-PCBT,-(PADSZT/2) !PCB side
K,14,,-CUPADTHB-PCBT,0
K,15,,(JTHT+CUTHSUB+pckgt),0 !Package side
K,16,,(JTHT+CUTHSUB+pckgt),-(PADSZB/2)
BSPLIN,2,3,4
BSPLIN,4,5,6
L,11,12
L,12,1
L,12,4
L,6,11
L,1,2
AL,3,5,2,6
AL,4,7,1,5
A,1,2,10,7
A,9,8,6,11
A,15,16,10,7
A,9,8,13,14
lsel,all
lsel,s,line,,5,14 !r direction
lsel,u,line,,12,13
lsel,u,line,,8
lsel,u,line,,10 !r direction
lsel,a,line,,18
lesize,all,,,4,1
lsel,all
lsel,all
lsel,s,line,,1,4
lesize,all,,,10,1 ! solderball layers!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
lsel,all
lsel,s,line,,8,10,2
lsel,a,line,,12,13
lesize,all,,,2,1 !Cu Pad layers
lsel,all
lesize,all,,,3,1 !mesh unselect lines
lsel,all
ASEL,ALL
VROTA,ALL,,,,,,1,9,90,2
!****** The ptxy of chip and extrud chip *******
WPROTA,,-90
CSYS,4
WPOFF,,,-CUTHSUB
PTXY,0,0,0,UNITSZ/2,UNITSZ/2,UNITSZ/2
PRISM,0,-pckgt
PTXY,DELE
PTXY,0,0,UNITSZ/2,0,UNITSZ/2,UNITSZ/2
PRISM,0,-pckgt
PTXY,DELE
CSYS,4
VSEL,ALL
VSEL,S,LOC,Z,-pckgt/2
VSEL,R,LOC,Y,0,PADSZB/2
VSEL,A,VOLU,,13
VSBV,13,ALL,,,KEEP
VSEL,ALL
CSYS,4
VSEL,ALL
VSEL,S,LOC,Z,-pckgt/2
VSEL,R,LOC,Y,0,PADSZB/2
VSEL,A,VOLU,,14
VSBV,14,ALL,,,KEEP
VSEL,ALL
!***** linesizing the Chip layer *****
LSEL,S,LOC,Z,-pckgt/2
LESIZE,ALL,,,3,1
LSEL,ALL
!***** linesizing the perimeter *****
WPROTA,22.5
LSEL,S,LOC,Y,0
LSEL,R,LOC,X,0,CUNIPADT/2
LSEL,U,LOC,X,0
LESIZE,ALL,,,4,1
LSEL,ALL
WPROTA,45
LSEL,S,LOC,Y,0
LSEL,R,LOC,X,0,CUNIPADT/2
LSEL,U,LOC,X,0
LESIZE,ALL,,,4,1
LSEL,ALL
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
WPROTA,-67.5
LSEL,ALL
LSEL,S,LINE,,68,69
LSEL,A,LINE,,60,65,5 ! side of square
LESIZE,ALL,,,4,1
LSEL,ALL
LSEL,ALL
LESIZE,ALL,,,1,1
LSEL,ALL
!*** EXTRUDING THE PCB ***
WPOFF,,,JTHT+CUTHSUB+CUPADTHB
CSYS,4
PTXY,0,0,0,UNITSZ/2,UNITSZ/2,UNITSZ/2
PRISM,0,PCBT
PTXY,DELE
PTXY,0,0,UNITSZ/2,0,UNITSZ/2,UNITSZ/2
PRISM,0,PCBT
PTXY,DELE
CSYS,4
VSEL,ALL
VSEL,S,LOC,Z,PCBT/2
VSEL,R,LOC,Y,0,PADSZB/2
VSEL,A,VOLU,,15
VSBV,15,ALL,,,KEEP
VSEL,ALL
CSYS,4
VSEL,ALL
VSEL,S,LOC,Z,PCBT/2
VSEL,R,LOC,Y,0,PADSZB/2
VSEL,A,VOLU,,16
VSBV,16,ALL,,,KEEP
VSEL,ALL
!****** linesizing the PCB layer *****
LSEL,S,LOC,Z,PCBT/2
LESIZE,ALL,,,3,1
LSEL,ALL
!****** linesizing the perimeter *****
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
WPROTA,-67.5
LSEL,ALL
LSEL,S,LINE,,81,82
LSEL,A,LINE,,73,78,5 ! side of square
LESIZE,ALL,,,4,1
LSEL,ALL
LSEL,ALL
LESIZE,ALL,,,1,1
LSEL,ALL
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
!******* Premeshing ********
!*** assigning attributes ***
! PCB
VSEL,S,LOC,Z,PCBT/2
VATT,1,,1
VSEL,ALL
! Solder Ball
VSEL,S,LOC,Z,-CUPADTHB,-JTHT
VATT,2,,2
VSEL,ALL
! Overmold
VSEL,S,LOC,Z,-(JTHT+CUPADTHB+CUTHSUB+pckgt/2)
VATT,3,,1
VSEL,ALL
! Cu Pad
vsel,all
vsel,s,loc,z,0,-CUPADTHB
vsel,a,loc,z,-(JTHT+CUPADTHB),-(JTHT+CUPADTHB+CUTHSUB)
vatt,6,,1
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
!*** Using symmetry building the whole half piece
CSYS,4
WPROTA,67.5
VSEL,ALL
VSYMM,Y,ALL
ALLSEL,ALL
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
!****** Creating the whole piece ******
allsel,all
wpcsys,,14
CSYS,4
vsel,s,loc,x,0,UNITSZ/2
VSYMM,X,ALL
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
!****** Creating the array ******
allsel,all
wpcsys,,14
CSYS,4
vsel,s,loc,x,-UNITSZ/2,UNITSZ/2
vgen,2,all,,,unitsz
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
/NUM,1
/PNUM,MAT,1
!**** Creating the PCB & Mold ************
allsel,all
wpcsys,,13
CSYS,4
vsel,s,mat,,1
vsel,a,mat,,3
vsel,r,loc,x,-UNITSZ/2,UNITSZ/2
vgen,13,all,,,unitsz ! 12 units (12*2*0.02)
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
!************************** MESH *************************
!*** Meshing The Chip ***
ALLSEL,ALL
VMESH,ALL
/NUM,1
/PNUM,MAT,1
ALLSEL,ALL
NUMMRG,ALL
NUMCMP,ALL
ALLSEL,ALL
!************************** BOUNDARY CONDITIONS***************
csys,0
alls,all
nsel,s,loc,x,13*UNITSZ+UNITSZ/2-0.01,13*UNITSZ+UNITSZ/2
dsym,symm,x ! symmetry boundary conditions
nsel,s,node,,17263
nsel,a,node,,17296
d,all,UY,0,,,,UX,UZ
!************************** SOLVE ****************************
/solu ! enter soln processor
!eqslv,pcg,1.0e-08,3 ! set solver and tollerance
antype,static,new ! set analysis type
nlgeom,on ! set large def and strain
nropt,auto,,off ! set newton-raphson soln
outres,all,last ! write data to .rst file
!***** SET THERMAL CYCLE VARIABLES *****
hitmp=100+273 ! set hi cycle temp (K)
hirmp=10*60 ! set lo-hi ramp time (sec) slop
hidwl=5*60 ! set hi dwell time (sec)
lotmp=273 ! set lo cycle temp (K)
lormp=10*60 ! set hi-lo ramp time (sec)
lodwl=5*60 ! set lo dwell time (sec)
delta=hitmp -lotmp ! calc delta temp
rmpstp=delta/10 ! calc ramp substeps
tref,hitmp ! set zero strain temp
alls,all
!***** THERMAL CYCLE 1 *****
!***** RAMP LOW (LOAD STEP 1)
autots,off ! turn off auto time step
nsubstp,rmpstp ! set substeps
bf,all,temp,lotmp ! apply temp to all nodes
kbc,0 ! linearly ramp loads
time,lormp ! set time
solve ! solve load step
!***** DWELL LOW (LOAD STEP 2)
autots,on ! turn on auto time step
nsubst,10,100,1 ! set substeps
bf,all,temp,lotmp ! apply temp to all nodes
kbc,1 ! maintain loads
time,lormp+lodwl ! set time
solve ! solve load step
!***** RAMP HIGH (LOAD STEP 3)
autots,off ! turn off auto time step
nsubstp,rmpstp ! set substeps
bf,all,temp,hitmp ! apply temp to all nodes
kbc,0 ! linearly ramp loads
time,lormp+lodwl+hirmp ! set time
solve ! solve load step
!***** DWELL HIGH (LOAD STEP 4)
autots,on ! turn on auto time step
nsubstp,10,100,1 ! set substeps
bf,all,temp,hitmp ! apply temp to all nodes
kbc,1 ! maintain loads
time,lormp+lodwl+hirmp+hidwl ! set time
solve ! solve load step
!***** THERMAL CYCLE 2 *****
!***** RAMP LOW (LOAD STEP 1)
autots,off ! turn off auto time step
nsubstp,rmpstp ! set substeps
bf,all,temp,lotmp ! apply temp to all nodes
kbc,0 ! linearly ramp loads
time,2*lormp+lodwl+hirmp+hidwl ! LS5
solve ! solve load step
!***** DWELL LOW (LOAD STEP 2)
autots,on ! turn on auto time step
nsubstp,10,100,1 ! set substeps
bf,all,temp,lotmp ! apply temp to all nodes
kbc,1 ! maintain loads
time,2*lormp+2*lodwl+hirmp+hidwl ! LS6
solve ! solve load step
!***** RAMP HIGH (LOAD STEP 3)
autots,off ! turn off auto time step
nsubstp,rmpstp ! set substeps
bf,all,temp,hitmp ! apply temp to all nodes
kbc,0 ! linearly ramp loads
time,2*lormp+2*lodwl+2*hirmp+hidwl ! LS7
solve ! solve load step
!***** DWELL HIGH (LOAD STEP 4)
autots,on ! turn on auto time step
nsubstp,10,100,1 ! set substeps
bf,all,temp,hitmp ! apply temp to all nodes
kbc,1 ! maintain loads
time,2*lormp+2*lodwl+2*hirmp+2*hidwl ! LS8
solve ! solve load step
!***** THERMAL CYCLE 3 *****
!***** RAMP LOW (LOAD STEP 1)
autots,off ! turn off auto time step
nsubstp,rmpstp ! set substeps
bf,all,temp,lotmp ! apply temp to all nodes
kbc,0 ! linearly ramp loads
time,3*lormp+2*lodwl+2*hirmp+2*hidwl ! LS5
solve ! solve load step
!***** DWELL LOW (LOAD STEP 2)
autots,on ! turn on auto time step
nsubstp,10,100,1 ! set substeps
bf,all,temp,lotmp ! apply temp to all nodes
kbc,1 ! maintain loads
time,3*lormp+3*lodwl+2*hirmp+2*hidwl ! LS6
solve ! solve load step
!***** RAMP HIGH (LOAD STEP 3)
autots,off ! turn off auto time step
nsubstp,rmpstp ! set substeps
bf,all,temp,hitmp ! apply temp to all nodes
kbc,0 ! linearly ramp loads
time,3*lormp+3*lodwl+3*hirmp+2*hidwl ! LS7
solve ! solve load step
!***** DWELL HIGH (LOAD STEP 4)
autots,on ! turn on auto time step
nsubstp,10,100,1 ! set substeps
bf,all,temp,hitmp ! apply temp to all nodes
kbc,1 ! maintain loads
time,3*lormp+3*lodwl+3*hirmp+3*hidwl ! LS8
solve ! solve load step
/post1
!----------------------------------------------------------------------------------------------
alls,all
nsel,s,loc,y,0,0.02*25.4*2/20
nsel,a,loc,y,0.02*inch*18/20,0.02*inch
esln,s
esel,r,mat,,2
!----------------------------------------------------------------------------------------------
!******** CALC AVG PLASTIC WORK FOR CYCLE 1 ********
set,4,last,1
etable,vtable,volu
etable,vsetable,nl,plwk
smult,pwtable,vtable,vsetable
ssum
*get,sumplwk,ssum,,item,pwtable
*get,sumvolu,ssum,,item,vtable
wavg1=sumplwk/sumvolu
!******** CALC AVG PLASTIC WORK FOR CYCLE 2 ********
set,8,last,1
etable,vtable,volu
etable,vsetable,nl,plwk
smult,pwtable,vtable,vsetable
ssum
*get,sumplwk,ssum,,item,pwtable
*get,sumvolu,ssum,,item,vtable
wavg2=sumplwk/sumvolu
!******** CALC AVG PLASTIC WORK FOR CYCLE 3 ********
set,12,last,1
etable,vtable,volu
etable,vsetable,nl,plwk
smult,pwtable,vtable,vsetable
ssum
*get,sumplwk,ssum,,item,pwtable
*get,sumvolu,ssum,,item,vtable
wavg3=sumplwk/sumvolu
!******** CALC DELTA AVG PLASTIC WORK ********
dwavg=0.5*(wavg2-wavg1+wavg3-wavg2)
!******** call the results ********
!*statues,wavg1
!*statues,wavg2
!*statues,wavg3
*statues,dwavg
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -