Building The Finite Element Model
Building The Finite Element Model
Buildingthemodel
Buildingthemodeltakesalargeportionofuser'stime,thoughitmayonlytakeasmallportionofCPUtime.
Beforeyoustartbuildingthemodel,youentertheBeginlevelcommandswhichstartwith"/":
Specifythejobname.
specifythegraphicsdriver,thetitle,theunits,andothers.
Andthenyouenterthemodelbuildingphasewiththe/PREP7command:
DefineElementTypes
DefineElementRealConstants
DefineMaterialProperties
DefineModelGeometry
Specifyingthejobname
Thefilenameprefixthejobnamecanbespecifiedintwoways:
ansysjnameattheexecution,or
/FILENAME,namewithintheprogram.
Ifyoudon'tspecifyajobname,allfilesaregiventhedefaultprefixnameFILE.
Specifyingthegraphicsdriver,thetitle,theunits,andothers
Thesecommandsstartwith"/"asthefollowing:
/SHOW,X11C!UseXwindowsfordisplay
/FILNAM,PLATE!Specifyprefixoffilenames
/TITLE,AnAluminumPlatewithaHole
/STITLE,....!Upto4subtitles
/UNITS,BIN!Britishunits:lbs,in,etc.forref.only
/PREP7!Enterpreprocessingphase
/SOLU!Enterloadingandsolutionphase
/POST1!Reviewtheresults
/EXIT!Exitansysprogram
DefiningElementTypes
Thereareover80differentelementtypesdefinedinANSYSelementlibrary.Elementtypeisidentifiedbythe
elementcategoryandauniquenumber:BEAMn,PLANEn,SOLIDn,SHELLn,LINKn,etc.Thenumbern
remainsthesameasSTIFFn.ET,1,42andET,1,PLANE42arethesame.
ET
ETCHG
ETLIST
ETDELE
TYPE
Manyelementtypesalsohaveadditionaloptions,knownasKEYOPTsandreferredtoasKEYOPT(1),
KEYOPT(2),etc.
KEYOPT
Elementtypescanalsobedefinedbythecontrolpanelsocantheelementoptionsandtherealconstants.
DefiningElementRealConstants
Elementrealconstantsarepropertiesthatarespecifictoagivenelementtype,suchascrosssectionalproperties
ofabeamelement.Notallelementsrequirerealconstants.Aswithelementtype,eachsetofrealconstantsis
givenareferencenumber.Whiledefiningtheelement,youcanpointtotheappropriaterealconstantreference
numberusingREALcommand.
R
RMODIF
RMORE
RLIST
RDELE
REAL
DefiningMaterialProperties
Dependingontheapplication,materialpropertiesmaybelinear,nonlinear,oranisotropic.Aswithelementtype
andrealconstants,eachsetofmaterialpropertiesisgivenamaterialreferencenumber,andyoupointtothe
appropriatematerialreferencenumberusingtheMATcommand.
1.LinearMaterialProperties
Linearmaterialpropertiesmaybeconstantortemperaturedependent,andisotropicororthotropic.
MP
MPLIST
MPDELE
MAT
MP,EX,1,2E11!Young'smodulusformaterial1is2E11
MP,DENS,1,7800!Densityformaterial1is7800
MP,KXX,3,43!Thermalconductivityfor
!material3is43
Temperaturedependentmaterialpropertiesmaybedefinedbyapropertyversustemperaturefunctioninthe
formofapolynomialwithMPcommand,orbyMPTEMPandMPDATAcommands.
MP,xyz,C0,C1,..C4
MPTEMP
MPTGEN
MPDATA
MPTEMP,1,1600,1800,2000,2325,2326,2335!6temperaturesfromloc1
MPTEMP,7,2345,2355,2365,2374,2375,3000!6morefromlocation7
MPDATA,ENTH,4,1,53.81,61.23,68.83,81.51,81.55,82.31!corresponding
MPDATA,ENTH,4,7,84.48,89.53,99.05,112.12,113.0,137.4!Enthvalues
MPDATA,ENTH,4,6,83.09!Changeloc6ENTHvalueto83.09
MPTEMP,7,2340!Modify7thtemperatureto2340,retainothers
MPDRES,ENTH,4!Restorewhatischangedintovirtualspace
Todefineadifferentsetoftemperatureforthenextmaterialproperty,youfirsterasethecurrenttemperature
tablebyMPTEMPwithoutanyargumentsandthendefinethenewtemperatureusingMPTEMPorMPTGEN
command.
MPTRES!Restoretemperaturetablefromvirtualspace
MPWRITE!Writefromdatabasetoacodedfile
MPREAD!Readfromacodedfiletodatabase
MPPLOT
MPLIST
AnMPPLOTDisplay
2.NonlinearMaterialProperties
Therearemanychangesinnonlinearmaterialproperties.NLandKNLcommandsarenolongeruseddata
tablesareusedinstead.TBcommanddefinesthetypeofdatatable:bilinearkinematic(BKIN),anisotropic
elastic(ANEL),BHcurve(BH),etc.TBEDITcommand(withmenuononly)bringsupamatrixofboxesfor
dataentry.Fornonmenumode,useTBPTtoenterx,ydata(stressstraincurves,BHcurves,etc.)and
TBDATAtoentertabulardata(creepconstants,failurecriteria,etc.)
TB,BH,2!activateBHtableformaterialref.2
TBTEMP
TBPT
TBDATA
TBPLOT
TBLIST
TBCOPY
TBDELE
3.AnisotropicElasticMaterialProperties
Someelementtypesacceptanisotropicelasticmaterialproperties,whichareusuallyinmatrixform
SOLID64(3Danisotropicsolid),PLANE13(2Dcouplefieldsolid),SOLID5andSOLID89(3Dcouplefield
solids).PleaserefertoElementReferenceManualfordetails.
TB
TBDATA
TBLIST!Besuretoverifyyourinput
TB,PIEZ,3!piezoelectricconstants(6x3)
TBDATA,3,6.1,,,6.1
TBDATA,9,15.70
TB,ANEL,3![C(6x6)]matrixforNEPEC
TBDATA,1,12.80E10,6.8E10,6.6E10}
TBDATA,7,12.8E10,6.6E10
TBDATA,12,11.0E10
TBDATA,16,2.1E10,0.0,0.0,2.1E10,0.0,2.1E10
DefiningtheModelGeometry
Therearetwodifferentmethodstogenerateamodel:topdownsolidmodelingandbottomupdirectgeneration.
Withtopdownsolidmodeling,youdescribethegeometricshapesofthemodel,establishcontrolsoverthesize
anddesiredshapeofelements,andtheninstructtheANSYSprogramtogenerateallnodesandelements
automatically.
Bycontrast,withbottomupdirectgenerationmethod,youdefinethelocationofeverynode,andthesize,
shape,andconnectivityofeachelement.Althoughsomeautomaticdatagenerationispossible(suchasFILL,
NGEN,EGEN,etc.),thedirectgenerationmethodrequiresyoutokeeptrackofallnodenumbersasyou
developyourfiniteelementmesh.
Youcancombinetopdownandbottomupmodelingtechniquesinbuildingyourmodel.Intopdownsolid
modeling,freeandmappedmeshingareavailablealsoconcatenationoflinesorareasgreatlyimproves
meshing.ElementsarereorderedautomaticallyuseNOORDcommandtopreventreordering.
Topdownsolidmodelisusuallymorepowerfulandversatilethanbottomupdirectgeneration,andis
commonlythepreferredmethod.
TopdownsolidmodelingwithBooleanoperationgreatlyeasesthepreparationofmanymodels.Thefollowing
examplesshowthedifferencebetweenmeshingaplatewithaholeusingBooleanoperationandwithout
Booleanoperation.
Topdownmodeling
Geometricprimitives
Booleanoperations
Concatenation
TopdownsolidmodelingwithBooleanoperation:
/PREP7
/TITLE,PlatewithaHoleusingTopdownSolidModeling
!Thisplateismodeledwithquartersymmetry
ET,1,PLANE42!UsePLANE42aselementtype1
PCIRC,.5!Defineacircleprimitive,centeratorigin,with
!radiusof0.5
RECTNG,0.0,6.0,0.0,4.0
!Definearectangularprimitive
/PNUM,AREA,1
APLOT
ASBA,2,1!Booleansubtractoperation:area2minusarea1
!yieldsanewarea
KLIST
KSEL,S,KP,,1,2!Selectkeypointsoncircle
KESIZE,ALL,.1!Setelementsizeto0.1
KSEL,INVE!Invertselectiontoselectkeypointsatrec.corners
KESIZE,ALL,0.4
AMESH,3!Mesharea3
ACLEAR,3!Clearthemeshedarea
ESHAPE,2!Usequadrilateralelementshapeonly
LCCAT,6,7!Concatenatelines6and7
AMESH,3!Mesharea3again
SAVE!Savethedbfile
FINISH!ExitPREP7
TopdownBooleanMeshingResults1
TopdownBooleanMeshingResults2
EquivalentprogramwithoutBooleanoperation:
/PREP7
/TITLE,PlatewithaHolewithoutusingBooleanoperations
!Thisplateismodeledwithquartersymmetry
ET,1,PLANE42!UsePLANE42aselementtype1
K,1,0.5!Definekeypoints
K,2,6
K,3,6,4
K,4,,4
K,5,,0.5
CSYS,1!CylindricalCSforkeypoint6
K,6,0.5,45
/PNUM,KPOI,1!Showkeypointnumbersondisplay
KPLOT
L,1,6,10!Definecircularlinesegments
L,6,5,15
CSYS!SwitchtoCartesianCSforareadefinition
L,1,2,30,4!Defineradiallinesegments
L,6,3,30,4!with4:1spacingratio
L,5,4,30,4
L,2,3,10!Definelinesegments
L,3,4,15
/PNUM,LINE,1!Showlinenumbersondisplay
LPLOT!Dis[laylinesegments
A,1,2,3,6!Defineareas
A,6,3,4,5
AMESH,ALL!Generatenodesandelements
SAVE!Savethedbfile
FINISH!ExitPREP7
NonBooleanMeshingResults
Abottomupmodelingexamplewithautomaticdatagenerations:
/PREP7
ET,1,PLANE42!UsePLANE42aselementtype1
N,1,0,0!Node1at(0.0,0.0)
N,5,12,o!Node5at(12.0,0.0)
FILL,1,5!Fillinnodes1through5
NGEN,6,10,1,5,1,1,2,0
!Generatenodesfromanexisting,givenpattern
E,1,2,12,11!Definethefirstelementwithfournodes1,2,12,11
EGEN,4,1,1!Generate4add'lelementsbyincrementingthe
!nodesofthefirstelementby1.
EGEN,5,10,1,4,1!Generate5setsofadd'lelementsbyincrementing
!thenodesofthe14elementsby10.
SAVE!Savethedbfile
FINISH!ExitPREP7
Abottomupmodelingresults
MeshGeneration
Regionsofsteepgradientsinsolutionvariablesusuallyrequirefinermesh.Indirectgenerationmethod,users
maydefinedenserpointsintheseregionsandconnectthemtoformfinermeshes.Insolidmodelingmethod,the
meshdensitycanbeexperssedineitheroftwoways:
Elementsize
Numberofelementdivision
Thefollowingcommandsspecifyelementsizeornumberofdivision:
ESIZE,size,ndiv
KESIZE,kpt(s),size
LESIZE,line(s),size,angsize,ndiv,space
LDVA
Freemeshingallowsamixingofdifferentelementshapesandprovidesaneasiertransitionfromafinemeshtoa
coarsemesh,andviceversa.Itisthedefaultmeshing.Tocontrolelementshape,useESHAPEcommand.
Meshinganareaoravolumewithmappedmesh(ESHAPE,2)mustobservethefollowingrestrictions:
Linesmusthaveeaqualnumberofdivisiononoppositesides.
Numberofdivisionmustbeevenifthreesided.
KCLEAR,LCLEAR,ACLEAR,andVCLEARcommandsdeletethenodesandelements.Torefineamesh,the
nodesandelementsshouldbefirstdeletedbyoneofthesecommands.
Generalmeshinggudelines:
Avoidrapidtransitionsinelementsizeswhichcancausemeshingfailureornumericalinstabilities.
Meshareas/volumesbeforegeneratingsymmetryreflectionortransferring.IttakeslessCPUtime.
FivesidedareadcanbesplitintotwoareaoruseLCCATcommandtoconcatenatelinestobecomefour
sided.
ParametricDesignandMacros
Parametricdesignallowsuserstobuildthemodelintermsofparameters(variables).Generallythesevariables
aredefinedatthebeginningoftheprogram,andANSYScommandsusethesevariablesinlieuofactualvalues.
Whenthedesignneedstobemodified,usersjustchangethevaluesofthecorrespondingvariablesandrerunthe
program.
Ansysparametricdesignlanguagenowpermits8characternames.Namesmaycontainletters,numbers,andthe
underscore(_).Don'tusetheunderscoreasthefirstcharacter.
AmacroisasequenceofANSYScommandsstoredinafileoramacrolibrary.Themacrocanbeused
anywhereinanANSYSprogram.
AmacrocanbecreatedinsideANSYSprogramusing*CREATEand*ENDcommands.Itcanalsocreatedina
fileoralibrarywithaneditor.Ifamacrofilehasa.MACsuffix,thefilenamecanbeusedasanANSYS
command.Forexample,ELLIPTQ.MACisstoredin/ansys50a/docuandELLIPTQisavalidANSYS
command.Userscanstoredtheirmacrosinafileorinamacrolibraryadirectoryanduse*ULIBtoreferthe
file/libraryifitnotinuser'shomeorcurrentdirectory.
Upto29parametersandvaluescanbepassedtoamacro.Insideamacro,ARG1,ARG2,...,ARG29arereserved
localvariables,andwhileexecutingthemacro,thefirstfieldvalueisreferredasARG1andthesecondas
ARG2,andsoon.
New*ASKcommand,ifincludedinmacros,canbeusedtopromptforinput:
*ASK,L,LENGTH:,5.0!Promptsforlength,assignsvalue
!toL,defaultvalueis5.0
New*AFUNcommandallowsyoutoswitchfromdefaultradianstodegreesfortrigonometricfunctions:
*AFUN,DEG!Angularfunctionunitsareindegrees
X=SIN(30)
*AFUN,RAD
*IFTHEN*ELSEIF*ELSE*ENDIFandDOloopareavailable.
*IF,A,LT,B,THEN
...
*ELSEIF,B,LT,C,THEN
...
*ELSE
...
*ENDIF
*DO,I,1,3
...
*ENDDO
Usingawiderangeoffeatures,suchasmacros,ifthenelsebranching,doloops,vectorandmatrixoperations,
andFortranfunctions,userscanwriteaversatileANSYSprogram.
AMacroExample
!ELLIPTbyHaiC.Tangintang/ansys
!Createsanellipticarea
!*USE,ELLIPT,A,B,N
!wherex**2/a**2+y**2/b**2=1
!andthewholeellipticarcisdividedintoNparts
!equallybytheangleatorigin
*SET,A,ARG1
*SET,B,ARG2
*SET,N,ARG3
*AFUN,DEG
THETA=360.0/N
K,,A
*GET,KMIN,KP,,NUM,MAX
*DO,I,1,N
ANGX=I*THETA
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
**GET,KMAX,KP,,NUM,MAX
L,KMAX1,KMAX
*ENDDO
*GET,LMAX,LINE,,NUM,MAX
LMIN=LMAXN+1
NUMMRG,ALL
LSEL,S,LINE,,LMIN,LMAX
AL,ALL
LSEL,ALL
AnANSYSprogramUsingMacro
/PREP7
ET,1,42
R,1,.25
MP,EX,1,1e7
$*$USE,ELLIPT,.05,.2,36
/pnum,kp,1
RECTNG,,3,,2
/pnum,area,1
aplot
asba,2,1
kesize,10,.01
ksel,s,kp,,1,5
kesize,all,.04
ksel,s,kp,,38,40
kesize,all,.2
ksel,all
amesh,3
save
FINISH
/SOLU
lsel,s,line,,41,42
dl,all,3,symm
lsel,all
sfl,38,pres,100
solve
FINISH
/POST1
PLNSOL,S,EQV
MeshRefinement
Highgradientareasgenerallyrequirefinermeshes.Meshescanberefinedwith:
Adaptivemeshing
Useradjustment
Adaptivemeshingautomaticallyevaluatesmeshdiscretizationerrorineachelementanddeterminesifa
particularmeshisfineenough.Ifitisnot,theelementisrefinedwithfinermeshesautomatically.
Userscanalsorevisethemeshbymodifyingthemeshcontrolsaftertheyhavereviewedtheresultsofinitial
runs.Onlythemeshesintheregionsofsteepgradientsneedtoberevised.UsuallythisislessCPUintensiveand
ismoreapplicabletothesituationthatrequiresonlyminoradjustments.
Considerthesolutionforthesemiinfiniteplatewithanellipticcrackinlastexample.Clearlythesteepgradient
islocatednearthecracktip,andonlythetipareaneedtoberefined.Solet'sbinarilybisecttipelementmtimes
withthefollowingformula
m=log(b/a+1)
AMeshRefinementExample
!*USE,ELLIPTQ,A,B,N
*SET,A,ARG1
*SET,B,ARG2
*SET,N,ARG3
*AFUN,DEG
THETA=90.0/N
K
*GET,KMIN,KP,,NUM,MAX
K,,A
L,KMIN,KMIN+1
*GET,LMIN,LINE,,NUM,MAX
*IF,A,GT,B,THEN
M=LOG(A/B+1)
ANGX=THETA/2**(M+1)
*DO,I,1,M
ANGX=ANGX*2
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
*GET,KMAX,KP,,NUM,MAX
L,KMAX1,KMAX
*ENDDO
*ENDIF
*DO,I,1,N1
ANGX=I*THETA
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
*GET,KMAX,KP,,NUM,MAX
L,KMAX1,KMAX
*ENDDO
*IF,A,LT,B,THEN
M=LOG(B/A+1)
ANGM=THETA
*DO,I,1,M
ANGM=ANGM/2
ANGX=ANGX+ANGM
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
*GET,KMAX,KP,,NUM,MAX
L,KMAX1,KMAX
*ENDDO
*ENDIF
ANGX=N*THETA
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
*GET,KMAX,KP,,NUM,MAX
L,KMAX1,KMAX
L,KMAX,KMIN
*GET,LMAX,LINE,,NUM,MAX
NUMMRG,ALL
LSEL,S,LINE,,LMIN,LMAX
AL,ALL
LSEL,ALL
AMeshRefinementExample
/PREP7
ET,1,42
R,1,.25
MP,EX,1,1e7
ELLIPTQ,.05,.2,9
/pnum,kp,1
RECTNG,,3,,2
/pnum,area,1
aplot
asba,2,1
ksel,s,kp,,11,13
kesize,all,.005
ksel,s,kp,,9,10
kesize,all,.001
ksel,all
kesize,2,.02
ksel,s,kp,,15,17
kesize,all,.2
ksel,all
amesh,3
save
FINISH
/SOLU
lsel,s,line,,18,19
dl,all,3,symm
lsel,all
sfl,15,pres,100
solve
FINISH
/POST1PLNSOL,S,EQV
GraphicsDisplay
ThefirstcommandinaninteractiveANSYSrun,/SHOWspecifiesthegraphicsdevicedriver.Themost
commondriversatNISTare:
X11,X11C,etcXwindowsbased
3DForlocalrunonly
3DhaslocalgraphicsfunctionsthatworkonlytheworkstationactuallyrunningtheANSYSprogram.X
windowsallowuserstorunANSYSonanetworkconnectedremotemachineandtoinstantaneouslydisplaythe
resultsonalocalworkstationoraXterminal.
ANSYShastwotypesofcommandsthatcontroladisplay:
Graphicsactioncommands:
xPLOTdisplayselements/volumes/areas/lines
x=E,V,A,L,K,N/keypoints/nodes,respectively
PLNSOLplotsnodalsolution
PLESOLplotselementsolution
etc.
Graphicsspecificationcommands:
/PNUM,label,keyspecifiesifnumbersoflabelareshown
/PBC,item,component,keyspecifiesifconstraintsorloadsareshown
/PSYMB,label,keyspecifiesifsymbols(CS/LDIRetc)areshown
/EDGE,wn,key,anglespecifiesifedgesareshown
etc.
SelectivedisplayscanbemadewiththenodesandelementsSELECTutilitiesASEL,NSLA,NSEL,ESEL,
etc.IfaselectivecommandisissuedbeforethePLNSOLcommand,onlytheresultsontheselectedelements
willbedisplayed.Thefollowingcomandsarethefrquentlyusedgraphicscommands:
PLNSOL,item,compDisplaysthesolutionresults
ascontinuouscontours
PLDISP,kund,kscalDisplaysthedisplacedstructure
/WINDOW,wn,xmin,xmax,Defineswindowsizeonscreen
ymin,ymax,ncopy
/TYPE,wn,typeDefinestypeofdisplay
/FOCUS,wn,xf,yf,zf,ktransDefinesthelocationofobject
tobeatthecenterofthewindow
/DIST,wn,dval,kfactDefinestheviewingdistancefor
magnificationandperspective
/VIEW,wn,xv,yv,zvDefinestheviewingdirectionof
theojbect
GrphmenubuttonInteractivegraphicsforZoom,
Rotation,andTranslation
UseofGenericUtilities
InRevision5.0,manyutilitycommandsaregenericandconsistentforalldisciplines,andtheyareavailable
throughouttheprogram.Forexample,selectlogicandcomponentsareavailableanywhereintheprogram,at
anytime,andbuttonmenusarealsoavailable.Thetypeofselection(reselect,unselect,additionalselect,all,etc.)
hasbeenmovedtothefirstfieldonthecommand,andtherearemorefieldsforthebasisofselection.
NSEL
ESEL
KSEL
LSEL
ASEL
VSEL
CMSEL
ExitingthePREP7preprocess
FINISHcommandattheendofPREP7modelingdoesnotsavethedatabaseissueSAVEcommandtosavethe
databasebeforeexitingtheprocess.
ANSYSExample1
ThermalModelingofaCryogenicRadiometer
Given:Aradiometeratcryogenictemperatureisappliedwitha
constatntheatfluxatgivennodesonthesurfaceofa
2layerconewhosebaseisweldedtoacylindricaltube.
Theradiometerismodeledwithaxialsymmetry.
ANSYSProgramforExample1
/FILNAM,AXSYM1!Specifyprefixoffilenames
/TITLE,CryogenicRadiometer
/UNITS,cgs!SIunits:cm,g,s,K,1e7J,etc.
!forreferenceonly
/PREP7!BeginPREP7preprocessingphase
ET,1,55,,,1!2D4nodePLANEelement,axialsym.
!ET,1,PLANE77!2D8nodePLANEelement
!MPTEMP,1,2,5,10,20!Temp.at2,5,10,and20K
MPTEMP,1,0,2.8,7.8,17.8!Temp=ABTemp2.2K
/COM,ThermalConductivity,KXX,ABW/cm.K(1E7W/cm.K)
MPDATA,KXX,1,1,1.69E7,3.10E7,5.74E7,10.75E7!MAT1(Cu)
MPDATA,KXX,2,1,2.2E4,5.0E4,10.0E4,20.0E4!MAT2(Paint)
MPDATA,KXX,3,1,1.57E4,3.69E4,7.96E4,18.3E4!MAT3(SS)
/COM,SpecificHeat,C,ABJ/kg.K
MPDATA,C,1,1,0.355E3,1.8E3,9.0E3,73.0E3!MAT1
MPDATA,C,2,1,0.144E3,9.23E3,23.1E3,51.0E3!MAT2
MPDATA,C,3,1,1.0E4,2.4E4,5.0E4,13.0E4!MAT3
MP,DENS,1,9.08!DensityforMAT1
MP,DENS,2,1.154!DensityforMAT2
MP,DENS,3,8.00!DensityforMAT3
/COM,***DefineGeometry
R=1.9185!SETradius,cone1
R1=1.905!SETradius,cone2
R2=1.8995!SETradius,cone3
R3=1.900!SETradius,cylinderI.D.
H=4.632!SETHeightofcone1
H1=4.600!SETHeightofcone2
H2=4.586!SETHeightofcone3
H3=5.0E1!SETHeightofcylinder(MAT1)
H4=3.50!SETHeightofcylinder(MAT3)
THK1=RR1!CylinderthicknessandconedispforMAT1
THK2=R1R2!PaintdisplacementinxdirforMAT2
THK3=R1R3!CylinderthicknessforMAT3
DH=0.05
DR=DH*R/H!rateofchangeofcopperconeradius
DH1=0.02
DR1=DH1*R/H!rateofchangeofcopperconeradius
!nearthetip
CSYS,0
N,1,R,H3!Node1
NGEN,11,1,1,,,0,DH!Node111
NGEN,91,1,11,,,DR,DH!Node11101
NGEN,5,1,101,,,DR1,DH1!Node101105
N,150,0,H!Node150isthetipofcone1
NGEN,2,200,1,105,1,THK1!Node201305
N,350,0,H1!Node350isthetipofcone2
NGEN,2,1,350,,,THK1!Node351oncone1
NGEN,2,200,211,305,1,THK2&!Node411505
N,550,0,H2!Node550isthetipofcone3
NGEN,2,1,550,,,THK2!Node551oncone2
NGEN,2,1,551,,,THK1!Node552oncone1
N,601,R1,H4!Node601atcylinderbottom
NGEN,71,1,601,,,0,DH!Node601671
NGEN,2,100,601,671,1,THK3!Node701771
MAT,1&!MAT1iscopper
E,201,1,2,202!Elem1
EGEN,104,1,1!Elem1104
/PNUM,ELEM,1
E,305,105,552,551!Elem105
E,551,552,351,350!Elem106
E,350,351,150,150!Elem107
EPLOT
*ASK,KC,'<CR>tocontinue:',0
*IF,KC,NE,0,THEN
FINISH
/EXIT
*ENDIF
MAT,2&!MAT2ispaint
E,411,211,212,412!Elem108
EGEN,94,1,108!Elem108201
E,505,305,551,550!Elem202
E,550,551,350,350!Elem203
EPLOT
*ASK,KC,'<CR>tocontinue:',0
*$IF,KC,NE,0,THEN
FINISH
/EXIT
*ENDIF
MAT,3!MAT3isstainlesssteel
E,701,601,602,702!Elem204
*GET,LELM,ELEM,,NUM,MAX!Findthelastelementnumber
!LELM=204
EGEN,70,1,LELM!Elem204273
EPLOT
NUMMRG,NODE
SAVE
FINISH
ANSYSExample2
/TITLE,FullNISTPiezoShaker,CaseAwithDamping
/PREP7
ET,1,SOLID5!3DMultifieldsolidelement
/COM,***MaterialpropertiesforPiezoelectric
/COM,***ceramicPZT5CLEVITECORP
MP,DENS,3,.000722
/COM,***Permittivity(X,YandZDirections)
MP,PERX,3,3.8853E10
TB,PIEZ,3![E]=Piezoelectricmatrix
TBDATA,3,.00511
TBDATA,6,.00511
TBDATA,9,.00972
TBDATA,11,.00795
TBDATA,13,.00795
MP,MURX,3,1!Createdummypropertiestoavoid
MP,KXX,3,1!warningmessages
/COM***B4CBoronCarbideProperties(table)
MP,DENS,2,.000345
MP,EX,2,54.E6
MP,NUXY,2,.345
/COM***AdhesiveProperties
MP,DENS,4,.00016
MP,EX,4,15.E5
MP,NUXY,4,.38
/COM***WCTungstenCarbideProperties(base)
MP,DENS,5,.00163
MP,EX,5,99.E6
MP,NUXY,5,.3
DMPRAT,.01
HAA=1.002!Heightoftopofloweradhesivelayer
HP=1.202!Heighttotopofpiezoelectriclayer
HAB=1.204!Heighttotopofupperadhesivelayer
RB=.75
HBA=.9
RT=.6
HT=1.6!Heighttotablesurface
HS=HT.2!Heighttobaseofstudhole
/COM,***DefineGeometry
DH=.10!Elementhigh
DANG=11.25!11.25Degrees
DR=0.075!Radicallengthofelement
CYCS,1
N,1,RB
NGEN,33,1,1,,,0,DANG
NGEN,8,100,1,33,1,DR
ND1=701
*DO,I,1,2
N2I=2**I
ND2=ND1+32
NGEN,2,100,ND1,ND2,N2I,DR
ND1=ND1+100
*ENDDO
ND1=ND1+98
N,ND1,0
NGEN,10,1000,1,ND1,1,0,0,DH
NGEN,2,1000,9201,9000+ND1,1,0,0,DH
NGEN,2,1000,10201,10000+ND1,1,0,0,0.002
NGEN,3,1000,11201,11000+ND1,1,0,0,DH
NGEN,2,1000,13201,13000+ND1,1,0,0,0.002
NGEN,5,1000,14201,14000+ND1,1,0,0,DH
NEGEN=32
MAT,5!WCTungstenCarbide(base)
E,1,2,102,101,1001,1002,1102,1101
EGEN,NEGEN,1,1
EGEN,7,100,1,NEGEN,1
ND1=701
*DO,I,1,2
N2I=2**I
N2IM1=N2I/2
NEGS=NEGEN/N2I
NEGS=NEGEN/N2I
ND2=ND1+100
ND3=ND1+1000
ND4=ND2+1000
ND2=ND1+100
ND3=ND1+1000
ND4=ND2+1000
E,ND1,ND1+N2IM1,ND2,ND3,ND3+N2IM1,ND4
E,ND2,ND2+N2I,ND1+N2IM1,ND4,ND4+N2I,ND3+N2IM1
E,ND1+N2IM1,ND1+N2I,ND2+N2I,ND3+N2IM1,ND3+N2I,ND4+N2I
*GET,LELM,ELEM,,NUM,MAX!Findthelastelementnumber
EGEN,NEGS,N2I,LELM2,LELM,1
ND1=ND1+100
*ENDDO
ND2=ND1+98
ND3=ND1+1000
ND4=ND3+98
*DO,I,1,8
E,ND1,ND1+N2I,ND2,ND3,ND3+N2I,ND4
ND1=ND1+N2I
ND3=ND3+N2I
*ENDDO
*GET,LELM,ELEM,,NUM,MAX!Findthelastelementnumber
EGEN,9,1000,1,LELM,1
NELM=LELM64
*GET,LELM1,ELEM,,NUM,MAX!Findthelastelementnumber
EGEN,2,1000,LELM1NELM+1,LELM1,1
MAT,4!MAT4isthebdhesiveglue
*GET,LELM1,ELEM,,NUM,MAX!Findthelastelementnumber
EGEN,2,1000,LELM1NELM+1,LELM1,1
MAT,3!MAT4isthebdhesiveglue
*GET,LELM1,ELEM,,NUM,MAX!Findthelastelementnumber
EGEN,3,1000,LELM1NELM+1,LELM1,1
*GET,LELM1,ELEM,,NUM,MAX!Findthelastelementnumber
MAT,2!MAT2isB4CBoronCarbide(table)
*GET,LELM1,ELEM,,NUM,MAX!Findthelastelementnumber
EGEN,5,1000,LELM1NELM+1,LELM1,1
/PNUM,ELEM,1
EPLOT
NUMMRG,NODE
SAVE
FINISH
FLOTRANExample1
/TITLE,FlowthroughaCurvedChannel
/UNITS,SI!SIunits
/PREP7!BeginPREP7preprocessing
ET,1,55!Plane55Elementtype
!Definepipedimensions
D=20!channelwidth
R=0.5*D
RI=40!Radiusofcurvedcenterlineofchannel
D4=D*4!Fourtimeschannelwidth
RR=R*R
V0=200
K,1,,R
K,2,,R
K,3
L,1,2
/pnum,line,1
/pnum,kp,1
/pnum,area,1
/pnum,node,1
lplot
LESIZE,1,,,16,4
ESHAPE,2!Quadrilateralsonly
/triad,off!turnoffcoordinatetraidatorigin
KPLOT
K,4,D4+RI
K,5,D4+RI,D4*2+RI
L,3,4
L,4,5
LFILL,2,3,RI
LESIZE,2,,,32,0.5
LESIZE,3,,,48,2.5
LESIZE,4,,,32
LPLOT
ADRAG,1,,,,,,2,4,3
APLOT
AMESH,ALL
FlowthroughaCurvedChannel
FLOTRANModelingExample2
/TITLE,FlowthroughaCurvedPipe
/UNITS,SI
/PREP7
ET,1,55
ET,2,70
!Definepipedimensions
D=20!Pipediameter
RI=40!Radiusofcurvedcenterlineofpipe
D4=D*4!Fourtimesdiameterlength
RR=(0.5*D)**2
V0=200
PCIRC,0.4*D,,0,90
PCIRC,0.4*D,0.5*D,0,90
NUMMRG,ALL
/PNUM,line,1
/PNUM,area,1
/PNUM,kp,1
RR=(0.5*D)**2
V0=200
PCIRC,0.4*D,,0,90
PCIRC,0.4*D,0.5*D,0,90
NUMMRG,ALL
/PNUM,line,1
/PNUM,area,1
/PNUM,kp,1
LPLOT
TYPE,1
LESIZE,1,,,8
LESIZE,2,,,8,2
LESIZE,3,,,8,0.5
LESIZE,5,,,4,2
LESIZE,7,,,4,2
APLOT
ESHAPE,2
AMESH,ALL
ARSYM,X,ALL
NUMMRG,ALL
ARSYM,Y,ALL
NUMMRG,ALL
NUMCMP,NODE
/pnum,node,1
/triad,off
TYPE,2
K,23,,,D4+RI
K,24,D4*2+RI,,D4+RI
L,3,23
L,23,24
lplot
LFILL,13,16,RI
LESIZE,13,,,16,0.25
LESIZE,18,,,32
LESIZE,16,,,24,5
/VIEW,1,1,1
VDRAG,ALL,,,,,,13,18,16
NUMMRG,NODE
ASEL,S,TYPE,,1
ACLEAR,ALL
/pnum,node,0
/pnum,kp,0
/pnum,elem,0
/triad,on
EPLOT
VSEL,S,TYPE,,2
NSLV,S,1
FlowthroughaCurvedPipe
HaiTang,lastupdatedDecember12,1995