PADT TheFocus 43-1
PADT TheFocus 43-1
PADT TheFocus 43-1
www.padtinc.com 1 1-800-293-PADT
December 21,2005 The Focus Issue 43
(CMS, cont.) Comparison of Modal Results:
Also, when that NASTRAN guy emerges Full Model vs. CMS Model
from his cubicle, let him know he should be Full Bug CMS Bug Delta Delta
looking for a nice retirement community. In (Hz) (Hz) (Hz) (%)
a couple more releases ANSYS will have 40.52 40.41 -0.11 -0.27%
even stronger and easier to use capabilities in 65.44 65.11 -0.33 -0.50%
this area. 75.94 75.77 -0.17 -0.23%
85.71 85.42 -0.28 -0.33%
86.51 86.35 -0.16 -0.18%
101.5 101.24 -0.25 -0.25%
102.99 102.72 -0.28 -0.27%
111.26 111.04 -0.23 -0.21%
111.4 111.18 -0.22 -0.20%
113.75 113.62 -0.13 -0.11%
120.03 119.85 -0.17 -0.15%
122.57 122.37 -0.21 -0.17%
125.58 125.31 -0.27 -0.21%
- ANSYS Workbench Integrated With CoCreate CAD 129.77 129.52 -0.25 -0.19%
131.71 131.21 -0.5 -0.38%
- ANSYS and VISTAGY Form Strategy for Composites 143.16 142.82 -0.35 -0.24%
150.69 150.45 -0.24 -0.16%
- ANSYS Releases new AWQA and ASAS Versions 171.04 170.51 -0.53 -0.31%
News 175.51 175.25 -0.27 -0.15%
www.padtinc.com 2 1-800-293-PADT
December 21,2005 The Focus Issue 43
APDL Macros for BUG CMS Example Problem
!======================= k,2,x2,y3,z2 lmesh,lg1
!RUNBUG.MAC k,3,x2,y2,z1 secnum,304
!======================= k,4,x2,y1,z2 lmesh,lg2
! Creates BUG full and CMS models kgen,2,1,4,,x3-x2 lgen,3,all,,,x3-x2
! No Args kgen,2,5,8,,x4-x3 cm,eleg,elem !Save as component ELEG
! *do,i,1,12,4 esel,all
finish l,i,i+1 ksel,s,,,1
!------------ FULL BUG MODEL --------------- l,i+1,i+2 nslk,s,1
/clear !start with an empty model l,i+2,i+3 cmsel,a,nmst
/file,fullbug l,i+3,i cm,nmst,node
mkbug !Run macro that builds model *enddo allsel
save *do,i,1,4 /vup,1,z
/solu !Run a standard modal on the l,i,4+i /view,1,1,1,1
full model l,4+i,8+i /eshape,1
antype,modal *enddo Eplot
cpintf,all sectype,1,beam,csolid
modopt,lanb,30,0,20000,,off secdata,dd1/15,5,5 !==========================
mxpand,30,,,1 et,1,188 ! DO_SUB.MAC
solve lmesh,all !==========================
save cm,ebody,elem ! Save as component ebody ! Generic maro to make a substrcture based on
finish esel,u,,,all the name in ARG1
/post1 !----------------- Make Head ! Master DOF's must be defined in component NMST
wrt_frq,'fullbug' !Write frequencies to a file ksel,s,,,1,9,8 ! Elements must be defined in component E%ARG1%
so we can compare ksel,a,,,2,10,4 /filnam,%arg1%
/prep7 !Grab CP'd nodes, they are ksel,a,,,4,12,4 /solu
the interface nodes. nslk,s,1 antype,substr ! Going to do a substructure
nsel,s,cp,,1,9999 cm,nmst,node seopt,%arg1%,2 ! Sepcify the name (arg1) and
cpdel,all,all k,101,x4,y1,z2 that mass matrix should be there
cm,nmst,node ! make a comp called NMST k,102,x4,y2,z1 cmsopt,fix,30 ! Use fixed BC's on
finish k,103,x4,y3,z2 interface, 30 modes
do_sub,'body' ! Build substructure of each k,104,x5,y2,z4 cmsel,s,e%arg1% ! Select the element
part of the model k,105,x5,(y2+y1)/2,z5 componenet
do_sub,'head' k,106,x5,(y3+y2)/2,z5 nsle
do_sub,'tail' k,107,(x4+x5)/2,y2,z2 cmsel,r,nmst
do_sub,'leg' l,101,104 m,all,all
/clear ! Now use the substructures bsplin,102,107,104 nsle
to solve l,103,104 solve
/filnam,bug_use l,104,105 finish
/prep7 l,104,106 Save
et,1,matrix50 ! define substructure ET sectype,101,beam,csolid
se,body ! Include each substructure secdata,dd1/15,5,5 !===================
se,head secnum,101 ! DO_EXP.MAC
se,tail lmesh,all !===================
se,leg cm,ehead,elem !Save as component EHEAD ! Expands the mode shapes (7-30) for the
cpintf,all ! Couple the interface nodes esel,u,,,all substructured parts
finish ! Do a normal modal analysis !------------------Make Tail ! ARG1 is the substructure root name
/solu ksel,s,,,101,103 /filnam,%arg1%
antype,modal nslk,s,1 resume
modopt,lanb,30,0,20000,,off cmsel,a,nmst /solu
mxpand,30,,,1 cm,nmst,node expass,on
solve k,201,x2,y2,z3 seexp,%arg1%,bug_use
finish k,202,x1,y2,.8*z4 *do,i,7,30
/post1 k,203,x1,y2,.75*z5 expsol,1,i
wrt_frq,'cmsbug' ! Write the freq's out to a k,204,x2,y2,1.5*z5 solve
file bspl,201,202,203,204,,,1,0,0,1,0,0 *enddo
save finish
finish !---- Now go to each part and sectype,201,beam,csolid !=======================
expand secdata,dd1/10,5,5 !WRT_FRQ.MAC
/clear ! the mode shapes sectype,202,beam,csolid ! par1 = root name for file
do_exp,'body' secdata,dd1/30,5,5 !=======================
finish $/clear sectype,203,taper ! Simple utility macro to output frequencies
do_exp,'head' secdata,201,kx(201),ky(201),kz(201) *get,mxstp,active,,set,nset
finish $/clear secdata,202,kx(204),ky(204),kz(204) *cfopen,%arg1%.txt
do_exp,'tail' secnum,203 *vwrite,mxstp
finish $/clear lmesh,all %g
do_exp,'leg' cm,etail,elem !Save as component ETAIL *do,i,1,mxstp
!------- Time to plot the whole model esel,u,,,all set,next
/post1 !----------- Make legs *get,frq,active,,set,freq
cmsfile,add,body,rst ! Specify the expanded ksel,s,,,1 *vwrite,frq
mode shapes nslk,s,1 %g
cmsfile,add,head,rst ! for each part in the cmsel,a,nmst *enddo
model cm,nmst,node *cfclose
cmsfile,add,tail,rst k,301,x2,y1,z2
cmsfile,add,leg,rst k,302,x2,y1*2,z1 !===================
plt_mshp ! Make plots k,303,x2,y1*2,z1*4 ! PLT_MSHP.MAC
k,304,x2,y3,z2 !===================
!======================= k,305,x2,y3*2,z1 ! Simple macro to plot out modeshapes
!MKBUG.MAC k,306,x2,y3*2,z1*4 allsel
! Builds bug model. Change values below to lsel,u,,,all /plopt,info,2 $/plopt,leg3,off $/plopt,minm,off
change size bspl,301,302,303 /eshape,1,
! No Args cm,lg1,line /win,1,ltop $/win,2,rtop $/win,3,lbot
!======================= lsel,u,,,all $/win,4,rbot
/prep7 bspl,304,305,306 /view,1,0,0,1 $/vup,1,y
! Define locations cm,lg2,line /view,2,1,0,0 $/vup,2,z
y1 = -2 $y2 = 0 $y3 = 2 sectype,301,beam,csolid /view,3,0,-y,0 $/vup,3,z
x1 = -10 $x2 = -8 $x3 = -4 $x4 = 0 $x5 = 4 secdata,dd1/10,5,5 /view,4,1,1,1 $vup,4,z
z1 = -1 $z2 = 0 $z3 = 1 $z4 = 2 $z5 = 4 sectype,302,beam,csolid *get,mxstp,active,,set,nset
! Mat props secdata,dd1/25,5,5 *do,i,1,mxstp
ex,1,10e6 sectype,303,taper set,i
nuxy,1,.23 secdata,301,kx(301),ky(301),kz(301) plnsol,u,sum,2
dens,1,.001 secdata,302,kx(303),ky(303),kz(303) *enddo
dd1 = (z3-z1)/2 !Set a size variable, DD1 to 1/2 sectype,304,taper
the body height secdata,301,kx(304),ky(304),kz(304)
esize,dd1/2 !Set element size to be 1/2 DD1 secdata,302,kx(306),ky(306),kz(306)
!-------------- Make Body secnum,303
k,1,x2,y2,z3 cmsel,a,lg1
www.padtinc.com 3 1-800-293-PADT
December 21,2005 The Focus Issue 43
sion 9.0 – but works 9-Mar 10-Mar 102 Introduction to ANSYS, Albq., NM
Part II
like a charm in 10.0. If 16-Mar 17-Mar 203 Dynamics Tempe, AZ
you want to revert to 23-Mar 24-Mar 501 ANSYS/LS-DYNA Irvine, CA
9.0 behavior (I’m not 27-Mar 29-Mar 902 Multiphysics Simulation Tempe, AZ
sure for what reason for MEMS
PADT’s “ANSYS Customization with APDL” is a great way to learn all about macro writing for
ANSYS
Need Material Properties? MatWeb is a huge online database of material properties that now
Resources supports ANSYS file formats.
The Focus is a periodic publication of Phoenix Analysis & Design Technologies (PADT).
Its goal is to educate and entertain the worldwide ANSYS user community. More informa-
tion on this publication can be found at: http://www.padtinc.com/epubs/focus/about
www.padtinc.com 4 1-800-293-PADT