You are on page 1of 19

UofAANSYSTutorial

ANSYS
UTILITIES

BASIC
TUTORIALS

BicycleSpaceFrame
PlaneStressBracket
ModelingTools

ADVANCED
TUTORIALS

POSTPROC.
TUTORIALS

COMMAND
LINEFILES

PRINTABLE
VERSION

PlaneStressBracket

TwoDimensionalTruss

INTERMEDIATE

TUTORIALS

|VerificationExample||Preprocessing||Solution||Postprocessing||CommandLine|
|BracketExample||Preprocessing||Solution||Postprocessing||CommandLine|

SolidModeling

Introduction

Index

Contributions
Comments

ThistutorialisthesecondofthreebasictutorialscreatedtoillustratecommomfeaturesinANSYS.The
planestressbrackettutorialbuildsupontechniquescoveredinthefirsttutorial(3DBicycleSpace
Frame),itisthereforeessentialthatyouhavecompletedthattutorialpriortobeginningthisone.
The2DPlaneStressBracketwillintroducebooleanoperations,planestress,anduniformpressure
loading.

MecE563
MechanicalEngineering
UniversityofAlberta

ProblemDescription
Theproblemtobemodeledinthisexampleisasimplebracketshowninthefollowingfigure.This
bracketistobebuiltfroma20mmthicksteelplate.Afigureoftheplateisshownbelow.

ANSYSInc.

Copyright2001
UniversityofAlberta

Thisplatewillbefixedatthetwosmallholesontheleftandhavealoadappliedtothelargerholeon
theright.

VerificationExample
Thefirststepistosimplifytheproblem.Wheneveryouaretryingoutanewanalysistype,youneed
something(ieanalyticalsolutionorexperimentaldata)tocomparetheresultsto.Thiswayyoucanbe
surethatyou'vegottenthecorrectanalysistype,units,scalefactors,etc.
Thesimplifiedversionthatwillbeusedforthisproblemisthatofaflatrectangularplatewithahole
showninthefollowingfigure:

Preprocessing:DefiningtheProblem
1.GivetheSimplifiedVersionaTitle
UtilityMenu>File>ChangeTitle
2.FormGeometry
Booleanoperationsprovideameanstocreatecomplicatedsolidmodels.Theseproceduresmake
iteasytocombinesimplegeometricentitiestocreatemorecomplexbodies.Subtractionwillused
tocreatethismodel,however,manyotherBooleanoperationscanbeusedinANSYS.
a.Createthemainrectangularshape
Insteadofcreatingthegeometryusingkeypoints,wewillcreateanarea(usingGUI)
Preprocessor>Modeling>Create>Areas>Rectangle>By2Corners

Fillinthewindowasshownabove.Thiswillcreatearectanglewherethebottomleft
cornerhasthecoordinates0,0,0andthetoprightcornerhasthecoordinates
200,100,0.
(Alternatively,thecommandlinecodefortheabovecommandisBLC4,0,0,200,100)
b.Createthecircle
Preprocessor>Modeling>Create>Areas>Circle>SolidCircle

Fillinthewindowasshownabove.Thiswillcreateacirclewherethecenterhasthe
coordinates100,50,0(thecenteroftherectangle)andtheradiusofthecircleis20
mm.
(Alternatively,thecommandlinecodefortheabovecommandisCYL4,100,50,20)
c.Subtraction
Nowwewanttosubtractthecirclefromtherectangle.Priortothisoperation,your
imageshouldresemblethefollowing:

ToperformtheBooleanoperation,fromthePreprocessormenuselect:
Modeling>Operate>Booleans>Subtract>Areas
Atthispointa'SubtractAreas'windowwillpopupandtheANSYSInputwindow
willdisplaythefollowingmessage:[ASBA]Pickorenterbaseareasfromwhich
tosubtract(asshownbelow)

Therefore,selectthebasearea(therectangle)byclickingonit.Note:Theselected
areawillturnpinkonceitisselected.

Thefollowingwindowmayappearbecausethereare2areasatthelocationyou
clicked.

Ensurethattheentirerectangularareaisselected(otherwiseclick'Next')andthen
click'OK'.
Click'OK'onthe'SubtractAreas'window.
Nowyouwillbepromptedtoselecttheareastobesubtracted,selectthecircleby
clickingonitandthenclick'OK'.
Youshouldnowhavethefollowingmodel:

(Alternatively,thecommandlinecodefortheabovestepisASBA,1,2)
3.DefinetheTypeofElement
Itisnownecessarytodefinethetypeofelementtouseforourproblem:
PreprocessorMenu>ElementType>Add/Edit/Delete
Addthefollowingtypeofelement:Solid(undertheStructuralheading)andtheQuad82
element,asshownintheabovefigure.

PLANE82isahigherorderversionofthetwodimensional,fournodeelement
(PLANE42).PLANE82isaneightnodedquadrilateralelementwhichisbettersuitedto
modelcurvedboundaries.
Forthisexample,weneedaplanestresselementwiththickness,therefore

Clickonthe'Options...'button.ClickandholdtheK3button,andselect'Planestrsw/thk',
asshownbelow.

(Alternatively,thecommandlinecodefortheabovestepisET,1,PLANE82followedby
KEYOPT,1,3,3)
4.DefineGeometricProperties
AsinpreviousexamplesPreprocessormenu>RealConstants>Add/Edit/Delete
Enterathicknessof20asshowninthefigurebelow.Thisdefinesaplatethicknessof
20mm)

(Alternatively,thecommandlinecodefortheabovestepisR,1,20)
5.ElementMaterialProperties
Asshowninpreviousexamples,selectPreprocessor>MaterialProps>Material
models>Structural>Linear>Elastic>Isotropic
WearegoingtogivethepropertiesofSteel.Enterthefollowingwhenprompted:

EX200000
PRXY0.3

(Alternatively,thecommandlinecodefortheabovestepisMP,EX,1,200000followedby
MP,PRXY,1,0.3)
6.MeshSize
TotellANSYShowbigtheelementsshouldbe,Preprocessor>Meshing>SizeCntrls>
ManualSize>Areas>AllAreas

Selectanelementedgelengthof25.Wewillreturnlatertodetermineifthiswasadequate
fortheproblem.
(Alternatively,thecommandlinecodefortheabovestepisAESIZE,ALL,25,)
7.Mesh

Nowtheframecanbemeshed.
Inthe'Preprocessor'menuselectMeshing>Mesh>Areas>Freeandselectthearea
whenprompted
(Alternatively,thecommandlinecodefortheabovestepisAMESH,ALL)
Youshouldnowhavethefollowing:

SavingYourJob
UtilityMenu>File>Saveas...

SolutionPhase:AssigningLoadsandSolving
Youhavenowdefinedyourmodel.Itisnowtimetoapplytheload(s)andconstraint(s)andsolvethe
theresultingsystemofequations.
1.DefineAnalysisType
EnsurethataStaticAnalysiswillbeperformed(Solution>AnalysisType>New
Analysis).
(Alternatively,thecommandlinecodefortheabovestepisANTYPE,0)
2.ApplyConstraints
Asshownpreviously,theleftendoftheplateisfixed.
IntheSolution>DefineLoads>Apply>Structural>Displacement>OnLines
Selecttheleftendoftheplateandclickon'Apply'inthe'ApplyU,ROTonLines'window.
Fillinthewindowasshownbelow.

ThislocationisfixedwhichmeansthatallDOF'sareconstrained.Therefore,select'All
DOF'byclickingonitandenter'0'intheValuefieldasshownabove.
Youwillseesomebluetrianglesinthegraphicswindowindicatingthedisplacement
contraints.
(Alternatively,thecommandlinecodefortheabovestepisDL,4,,ALL,0)
3.ApplyLoads
Asshowninthediagram,thereisaloadof20N/mmdistributedontherighthandsideof
theplate.Toapplythisload:
Solution>DefineLoads>Apply>Structural>Pressure>OnLines
Whenthewindowappears,selectthelinealongtherighthandedgeoftheplateandclick
'OK'
Calculatethepressureontheplateendbydividingthedistributedloadbythethicknessof
theplate(1MPa).
Fillinthe"ApplyPRESonlines"windowasshownbelow.NOTE:
Thepressureisuniformalongthesurfaceoftheplate,thereforethelastfieldisleft
blank.
Thepressureisactingawayfromthesurfaceoftheplate,andisthereforedefinedas
anegativepressure.

Theappliedloadsandconstraintsshouldnowappearasshownbelow.

4.SolvingtheSystem
Solution>Solve>CurrentLS

Postprocessing:ViewingtheResults
1.HandCalculations
Now,sincethepurposeofthisexercisewastoverifytheresultsweneedtocalculatewhatwe
shouldfind.
Deflection:Themaximumdeflectionoccursontherighthandsideoftheplateandwas
calculatedtobe0.001mmneglectingtheeffectsoftheholeintheplate(iejustaflatplate).
Theactualdeflectionoftheplateisthereforeexpectedtobegreaterbutinthesamerangeof
magnitude.
Stress:Themaximumstressoccursatthetopandbottomoftheholeintheplateandwasfound
tobe3.9MPa.
2.ConvergenceusingANSYS
Atthispointweneedtofindwhetherornotthefinalresulthasconverged.Wewilldothisby
lookingatthedeflectionandstressatparticularnodeswhilechangingthesizeofthemeshing
element.
Sincewehaveananalyticalsolutionforthemaximumstresspoint,wewillcheckthestress
atthispoint.Firstweneedtofindthenodecorrespondingtothetopoftheholeintheplate.
Firstplotandnumberthenodes
UtilityMenu>Plot>Nodes
UtilityMenu>PlotCtrls>Numbering...
Theplotshouldlooksimilartotheoneshownbelow.Makeanoteofthenodeclosesttothe
topofthecircle(ie.#49)

Listthestresses(GeneralPostproc>ListResults>NodalSolution>Stress,Principals
SPRIN)andchecktheSEQV(EquivalentStress/vonMisesStress)forthenodein
question.(asshownbelowinred)

Theequivalentstresswasfoundtobe2.9141MPaatthispoint.Wewillusesmaller
elementstotrytogetamoreaccuratesolution.
ResizeElements
a.Tochangetheelementsize,weneedtogobacktothePreprocessorMenu
Preprocessor>Meshing>SizeCntrls>ManualSize>Areas>AllAreas
nowdecreasetheelementedgelength(ie20)
b.Nowremeshthemodel(Preprocessor>Meshing>Mesh>Areas>Free).Once
youhaveselectedtheareaandclicked'OK'thefollowingwindowwillappear:

c.Click'OK'.Thiswillremeshthemodelusingthenewelementedgelength.
d.Solvethesystemagain(notethattheconstraintsneednotbereapplied).(Solution
Menu>CurrentLS)
Repeatsteps'a'through'd'untilthemodelhasconverged.(notethenumberofthenodeat
thetopoftheholehasmostlikelychanged.Itisessentialthatyouplotthenodesagainto
selecttheappropriatenode).Plotthestress/deflectionatvaryingmeshsizesasshown
belowtoconfirmthatconvergencehasoccured.

Notetheshapesofboththedeflectionandstresscurves.Asthenumberofelementsinthemesh
increases(ietheelementedgelengthdecreases),thevaluesconvergetowardsafinalsolution.
ThevonMisesstressatthetopoftheholeintheplatewasfoundtobeapproximatly3.8MPa.
Thisisamere2.5%differencebetweentheanalyticalsolutionandthesolutionfoundusing
ANSYS.
Theapproximatemaximumdisplacementwasfoundtobe0.0012mm,thisis20%greaterthan
theanalyticalsolution.However,theanalyticalsolutiondoesnotaccountforthelargeholeinthe
centeroftheplatewhichwasexpectedtosignificantlyincreasethedeflectionattheendofthe
plate.
Therefore,theresultsusingANSYSweredeterminedtobeappropriatefortheverificationmodel.
3.Deformation
GeneralPostproc>PlotResults>DeformedShape>Def+undeformdtoviewboth
thedeformedandtheundeformedobject.

Observethelocationsofdeflection.
4.Deflection
GeneralPostproc>PlotResults>NodalSolution...ThenselectDOFsolution,USUM
inthewindow.

Alternatively,obtaintheseresultsasalist.(GeneralPostproc>ListResults>Nodal
Solution...)
Aretheseresultswhatyouexpected?Notethatalltranslationaldegreesoffreedomwere
constrainedtozeroattheleftendoftheplate.
5.Stresses
GeneralPostproc>PlotResults>NodalSolution...ThenselectStress,vonMisesinthe
window.

YoucanlistthevonMisesstressestoverifytheresultsatcertainnodes
GeneralPostproc>ListResults.SelectStress,PrincipalsSPRIN

CommandFileModeofSolution
TheaboveexamplewassolvedusingamixtureoftheGraphicalUserInterface(orGUI)andthe
commandlanguageinterfaceofANSYS.ThisproblemhasalsobeensolvedusingtheANSYS
commandlanguageinterfacethatyoumaywanttobrowse.Openthe.HTMLversion,copyandpaste
thecodeintoNotepadorasimilartexteditorandsaveittoyourcomputer.Nowgoto'File>Read
inputfrom...'andselectthefile.A.PDFversionisalsoavailableforprinting.

BracketExample

Nowwewillreturntotheanalysisofthebracket.AcombinationofGUIandtheCommandlinewillbe
usedforthisexample.
Theproblemtobemodeledinthisexampleisasimplebracketshowninthefollowingfigure.This
bracketistobebuiltfroma20mmthicksteelplate.Afigureoftheplateisshownbelow.

Thisplatewillbefixedatthetwosmallholesontheleftandhavealoadappliedtothelargerholeon
theright.

Preprocessing:DefiningtheProblem
1.GivetheBracketexampleaTitle
UtilityMenu>File>ChangeTitle
2.FormGeometry
Again,BooleanoperationswillbeusedtocreatethebasicgeometryoftheBracket.
a.Createthemainrectangularshape
Themainrectangularshapehasawidthof80mm,aheightof100mmandthebottomleft
cornerislocatedatcoordinates(0,0)
EnsurethatthePreprocessormenuisopen.(Alternativelytype/PREP7intothe
commandlinewindow)
NowinsteadofusingtheGUIwindowwearegoingtoentercodeintothe'command
line'.NowIwillexplainthelinerequiredtocreatearectangle:

BLC4,XCORNER,YCORNER,WIDTH,HEIGHT
BLC4,Xcoord(bottomleft),Ycoord(bottomleft),width,height

Therefore,thecommandlineforthisrectangleisBLC4,0,0,80,100
b.Createthecircularendontherighthandside
Thecenterofthecircleislocatedat(80,50)andhasaradiusof50mm
Thefollowingcodeisusedtocreateacirculararea:

CYL4,XCENTER,YCENTER,RAD1
CYL4,Xcoordforthecenter,Ycoordforthecenter,radius

Therefore,thecommandlineforthiscircleisCYL4,80,50,50
c.Nowcreateasecondandthirdcircleforthelefthandsideusingthefollowingdimensions:
parameter circle2 circle3
XCENTER 0

YCENTER 20

80

RADIUS

20

20

d.Createarectangleonthelefthandendtofillthegapbetweenthetwosmallcircles.
XCORNER 20
YCORNER 20
WIDTH

20

HEIGHT

60

Yourscreenshouldnowlooklikethefollowing...

e.BooleanOperationsAddition
Wenowwanttoaddthesefivediscreteareastogethertoformonearea.
ToperformtheBooleanoperation,fromthePreprocessormenuselect:
Modeling>Operate>Booleans>Add>Areas
Inthe'AddAreas'window,clickon'PickAll'
(Alternatively,thecommandlinecodefortheabovestepisAADD,ALL)
Youshouldnowhavethefollowingmodel:

f.CreatetheBoltHolesWenowwanttoremovetheboltholesfromthisplate.
Createthethreecircleswiththeparametersgivenbelow:
parameter circle1 circle2 circle3
WPX

80

WPY

50

20

80

radius

30

10

10

Nowselect
Preprocessor>Modeling>Operate>Booleans>Subtract>Areas
Selectthebaseareasfromwhichtosubract(thelargeplatethatwascreated)
Nextselectthethreecirclesthatwejustcreated.Clickonthethreecirclesthatyou
justcreatedandclick'OK'.
(Alternatively,thecommandlinecodefortheabovestepisASBA,6,ALL)
Nowyoushouldhavethefollowing:

3.DefinetheTypeofElement

Asintheverificationmodel,PLANE82willbeusedforthisexample
Preprocessor>ElementType>Add/Edit/Delete
Usethe'Options...'buttontogetaplanestresselementwiththickness
(Alternatively,thecommandlinecodefortheabovestepisET,1,PLANE82followedby
KEYOPT,1,3,3)
UndertheExtraElementOutputK5selectnodalstress.
4.DefineGeometricContants
Preprocessor>RealConstants>Add/Edit/Delete
Enterathicknessof20mm.
(Alternatively,thecommandlinecodefortheabovestepisR,1,20)
5.ElementMaterialProperties
Preprocessor>MaterialProps>MaterialLibrary>Structural>Linear>Elastic>
Isotropic
WearegoingtogivethepropertiesofSteel.Enterthefollowingwhenprompted:

EX200000
PRXY0.3

(ThecommandlinecodefortheabovestepisMP,EX,1,200000followedbyMP,PRXY,1,0.3)
6.MeshSize
Preprocessor>Meshing>SizeCntrls>ManualSize>Areas>AllAreas
Selectanelementedgelengthof5.Again,wewillneedtomakesurethemodelhas
converged.
(Alternatively,thecommandlinecodefortheabovestepisAESIZE,ALL,5,)
7.Mesh
Preprocessor>Meshing>Mesh>Areas>Freeandselecttheareawhenprompted
(Alternatively,thecommandlinecodefortheabovestepisAMESH,ALL)

SavingYourJob
UtilityMenu>File>Saveas...

SolutionPhase:AssigningLoadsandSolving
Youhavenowdefinedyourmodel.Itisnowtimetoapplytheload(s)andconstraint(s)andsolvethe
theresultingsystemofequations.
1.DefineAnalysisType
'Solution'>'NewAnalysis'andselect'Static'.
(Alternatively,thecommandlinecodefortheabovestepisANTYPE,0)
2.ApplyConstraints
Asillustrated,theplateisfixedatbothofthesmallerholesonthelefthandside.
Solution>DefineLoads>Apply>Structural>Displacement>OnNodes
Insteadofselectingonenodeatatime,youhavetheoptionofcreatingabox,polygon,or
circleofwhichallthenodesinthatareawillbeselected.Forthiscase,select'circle'as
showninthewindowbelow.(YoumaywanttozoomintoselectthepointsUtiltyMenu/
PlotCtrls/Pan,Zoom,Rotate...)Clickatthecenteroftheboltholeanddragthecircle
outsothatittouchesallofthenodesontheborderofthehole.

Clickon'Apply'inthe'ApplyU,ROTonLines'windowandconstrainallDOF'sinthe
'ApplyU,ROTonNodes'window.
Repeatforthesecondbolthole.
3.ApplyLoads
Asshowninthediagram,thereisasingleverticalloadof1000N,atthebottomofthelargebolt
hole.Applythisforcetotherespectivekeypoint(Solution>DefineLoads>Apply>
Structural>Force/Moment>OnKeypointsSelectaforceintheydirectionof1000)
Theappliedloadsandconstraintsshouldnowappearasshownbelow.

4.SolvingtheSystem
Solution>Solve>CurrentLS

PostProcessing:ViewingtheResults
Wearenowreadytoviewtheresults.Wewilltakealookatthedeflectedshapeandthestresscontours
oncewedetermineconvergencehasoccured.
1.ConvergenceusingANSYS
Asshownpreviously,itisnecessarytoprovethatthesolutionhasconverged.Reducethe
meshsizeuntilthereisnolongerasizeablechangeinyourconvergencecriteria.
2.Deformation
GeneralPostproc>PlotResults>Def+undeformedtoviewboththedeformedandthe
undeformedobject.
Thegraphicshouldbesimilartothefollowing

Observethelocationsofdeflection.Ensurethatthedeflectionattheboltholeisindeed0.
3.Deflection

ToplotthenodaldeflectionsuseGeneralPostproc>PlotResults>ContourPlot>
NodalSolutionthenselectDOFSolutionUSUMinthewindow.

Alternatively,obtaintheseresultsasalist.(GeneralPostproc>ListResults>Nodal
Solution...)
Aretheseresultswhatyouexpected?Notethatalltranslationaldegreesoffreedomwere
constrainedtozeroattheboltholes.
4.Stresses
GeneralPostproc>PlotResults>NodalSolution...ThenselectvonMisesStressinthe
window.

YoucanlistthevonMisesstressestoverifytheresultsatcertainnodes
GeneralPostproc>ListResults.SelectStress,PrincipalsSPRIN

CommandFileModeofSolution
TheaboveexamplewassolvedusingamixtureoftheGraphicalUserInterface(orGUI)andthe
commandlanguageinterfaceofANSYS.ThisproblemhasalsobeensolvedusingtheANSYS
commandlanguageinterfacethatyoumaywanttobrowse.Openthe.HTMLversion,copyandpaste
thecodeintoNotepadorasimilartexteditorandsaveittoyourcomputer.Nowgoto'File>Read
inputfrom...'andselectthefile.A.PDFversionisalsoavailableforprinting.

QuittingANSYS
ToquitANSYS,click'QUIT'ontheANSYSToolbarorselectUtilityMenu>File>Exit...Inthe
windowthatappears,select'SaveEverything'(assumingthatyouwantto)andthenclick'OK'.