Sie sind auf Seite 1von 9

BasicAnalysisGuide

ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:1
3.5. Function Tool Example
Thefollowingexampleshowshowtocreateandapplyaboundaryconditionusinga
functionrepresentation.
Theconvectionheattransfercoefficientfromafluidflowingoveraflatplateisappliedasa
functionboundarycondition,usingthecorrelationforlaminarheattransfercoefficient.The
figurebelowshowstheflatplatewiththeappliedboundaryconditions.
Thebottomoftheplateisfixedataconstanttemperature.Thetopoftheplate,wherethe
convectionboundaryconditionisbeingapplied,issplitintotworegimes:
Regime 1isdefinedforXbetween1 X<5,andtheconvectionheattransfercoefficient
isgivenby:
h(x)=0.332*(kxx/x)*Re**(1/2)*Pr**(1/3)
Regime 2isdefinedforXbetween5<X 10,andtheconvectionheattransfer
coefficientisgivenby:
h(x)=0.566*(kxx/x)*Re**(1/2)*Pr**(1/3)
Intheaboveequations,theReynoldsnumberReisgivenby:
Re=(dens*vel*x)/visc
andthePrandtlnumberPRisgivenby:
Pr=(visc*c)/kxx
BasicAnalysisGuide
ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:2
Thepropertiesofthefluidovertheflatplateare:
Density(dens)=1,thermalconductivity(kxx)=10,specificheat(c)=10,andviscosity
(visc)=0.01
Thevelocityofthefluid(vel)overtheflatplateisequalto100forRegime1and50for
Regime2.Bulktemperatureforthefluidforbothregimesis100degrees.
1. CreatearectangleandassignelementtypePLANE55,defineyourmaterial
properties,andmesh:
/prep7rect,1,10,,.5et,1,55!DefineFluidPropertiesmp,KXX,1,10!Thermal
conductivitymp,DENS,1,1!Densitymp,C,1,10!Specificheatmp,VISC,1,0.01!
Viscosity!DefinePlatePropertiesmp,kxx,2,10mp,dens,2,10mp,c,2,5mat,2esize,,
25amesh,all
2. Definetheconvectionboundaryconditionasafunction.
SelectUtility Menu> Parameters> Functions> Define/Edittobringupthe
functioneditor.Thefunctionboundaryconditionbeingappliedisamultivalued
function,itsfinalvaluebeingdependentontheXlocationinthedomain.Inthe
Function Editordialogbox,clickontheradiobuttonforMultivaluedfunction
basedonregimevariableandtypexlocasthenameoftheregimevariableinthe
textentrybox.Thenamexlocappearsasthenameoftheregimevariable.To
definexloc,selectXfromthedropdownboxonthelowerhalfofthedialog
box.Yourdialogboxshouldlooklikethis:
BasicAnalysisGuide
ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:3
3. Definetheequationsfortheheattransfercoefficientinthetworegimes.Clickon
theRegime 1tab.Underthistab,youwilldefinetheequationforthefirst
regime,1 X 5.Type1and5intheRegime1Limitstextentryboxes.
4. Forthesakeofconvenience,definethoseexpressionsintheequationsthatyou
willusemorethanonceorthatarepartofaverylongequation,andstorethem
inmemory.
Inthisexample,expressionsfortheReynold'snumberandPrandtlnumberare
usedrepeatedlyinbothequations.Theyaregoodexamplesofexpressionsthat
canbestoredandusedthroughoutthefunctioneditor,inallregimes.
TostoretheReynold'snumber,fillintheResultboxasshownbelow.Selectthe
primaryvariablesDENS,X,andVISC(shownin{brackets})fromthedropdown
listonthelowerhalfofthedialogbox.Usethekeypadtoinsertthemath
functionssuchas*and/.Yourdialogboxshouldlooklikethis:
BasicAnalysisGuide
ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:4
ClickonSTO,thenonM0onthenumberpadtostoretheexpressioninmemory
location0.
TostorethePrandtlnumber,cleartheResultsboxbyclickingtheClearbutton
andthenfillitagainasshownbelow.SelectthetermsVISC,SPHT,andKXXfrom
thedropdownlist.Yourdialogboxshouldlooklikethis:
BasicAnalysisGuide
ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:5
ClickonSTO,thenonM1onthenumberpadtostoretheexpressioninmemory
location1.
5. Defineanexpressionfortheheat-transfercoefficientforRegime1.
ClickontheClearbuttontoclearthecontentsofthetextentrybox.Typeinthe
expressionfortheheattransfercoefficientforRegime1asshownbelow.Select
theprimaryvariables({KXX}and{X})fromthedrop-downlist.ThetermsM0and
M1arethetermsyoustoredinmemoryearlier.Toplacethemintheequation,
clickontheINVbutton,andthenRCL,thenM0andM1respectively.
BasicAnalysisGuide
ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:6
6. DefinetheequationforRegime2.
ClickontheRegime2tab.First,enter10astheupperlimitfortheregime
variableforwhichthisequationisvalid.Noticethatthelowerlimitforthisregime
isalreadysetastheupperlimitfromRegime1.Thisfeatureensurescontinuity
betweentheregimes.Typeintheexpressionfortheheattransfercoefficientas
shownbelow.YoucanusethesamestoredmemorylocationsM0andM1to
replaceexpressionsforReynold'snumberandPrandtlnumber,respectively.Your
dialogboxshouldlooklikethis:
BasicAnalysisGuide
ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:7
7. Optional:Entercommentsforthisfunction.
SelectFile> Comments.
8. Savethefunction.
SelectFile> Save.Functionsaresavedwitha.funcextension.
Youmustsavethefunction.Afteryouhavesavedthefunction,youcanthenload
itasatableparameterintoANSYS.
9. Loadthefunction.SelectUtility Menu> Parameters> Functions> Read
from File.Selectthe.funcfilethatyousavedearlier.TheFunction Loader
dialogboxappears.
10. Provideatableparameternamethatyouwillusewhenapplyingthefunctionasa
boundarycondition.
Typeheatcfforthisexample.(Theparameternamecannotcontainmorethan
sevencharacters.)Providevaluesforanyvariablesthatyoudefinedinthe
FunctionEditor.
ClickontheRegime 1tabandenter1forthematerialID(toobtainthe
BasicAnalysisGuide
ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:8
materialprimaryvariables)andenter100forthevelocity.(TheFunctionTool
promptsyouforthematerialIDonlyifyouhaveusedamaterialpropertyinyour
expression.)Yourdialogboxshouldlooklikethis:
Note:Onlynumericdataissupportedfortheconstantvaluesin
theFunctionLoaderdialogbox.Characterdataandexpressionsare
notsupportedasconstantvalues.
11. ClickontheRegime 2tabandenter1forthematerialIDandenter50forthe
BasicAnalysisGuide
ContainsproprietaryandconfidentialinformationofANSYS,Inc.
anditssubsidiariesandaffiliates
Page:9
velocity.
NoticethattheOKbuttonisnotactiveuntilallrequiredvariableshavebeen
entered.ClickonOKwhenthebuttonbecomesactive.
12. Youcannowfinishtheanalysis.Whenyouapplythisfunctionasaboundary
condition,usethetablenamethatyouassignedearlier.
nsel,s,loc,y,0d,all,temp,25nsel,s,loc,y,0.5sf,all,conv,%heatcf%,100Applythe
functionasaboundaryconditionfinish/solutime,1deltim,.1outres,all,allallsel
solvefinish/post1set,last/psf,conv,hcoe,2,0.e+00,1/replot!showsurfaceload
symbolsfinish
Release14.5-SASIP,Inc.Allrightsreserved.

Das könnte Ihnen auch gefallen