You are on page 1of 10

Comsol:AnExampleProblem

FaithA.MorrisonandMariaTafurAgudelo DepartmentofChemicalEngineering MichiganTechnologicalUniversity,Houghton,MI49931USA 21October2010,revised19December2010


ProblemStatement: UsingCOMSOL4.0a,calculatethesteadystatevelocityfieldfortheflowofanincompressible Newtonianfluidbetweenparallelplates.Theplatesare0.100mlongandinfinitelywide.Thetwo platesareseparatedbyagapof0.020m.Thedensityofthefluidis1000kg/m3anditsviscosityis 0.0100Pas.Theinletflowisauniformflowofvelocity0.0000175m/s;theoutletpressureiszero gaugepressure.Inyoursubmission,pleaseanswerthefollowingquestionsandattachthe appropriateplots: 1. Howdoesyouranswerforthesteadyyvelocitycomparetotheanalyticalsolution?Be quantitative(e.g.Thenumericalandtheanalyticalresultsdifferedbyatmost4%...).Note thatyoumustmatchthepressuredropsbetweenyourhandcalculationandyourComsol calculation(seehintattheendofthishandout).Plottheexityvelocityonthesamegraphas theanalyticalresult(e.g.inExcel,vy/vmaxversusx/width). 2. Theinletflowisauniformyvelocity(samevelocityateveryxposition),andattheexitofthe flowdomaintheyvelocityhasreacheditssteady,parabolicprofile.Howfardownthetube doestheflowneedtogobeforetheflowreachesitssteadyprofile?Includeaplotofvarious crosssectionsoftheflow. 3. Whatdoesthetwodimensionalvelocityfieldlooklike?(providea2Darrowplot) 4. Howlongdidittakeyoutocompletethecalculationsforthispartoftheassignment?How longtoworkonthereport?

StepbyStepInstructions
Theseinstructionsdetailhowtocalculatethevelocityfieldintheflowthroughtwoverylong,verywide plates.Theflowisa2Dcalculationwithsteadyinflowboundaryconditionwithvelocityequalto 0.0000175m/sandzeropressureexitboundarycondition.Thewallsarenoslip.Wealsodemonstrate howtomakedifferenttypesofplotsfromtheresults. Thebasicstrategyisthis: 1. Initializetheprogramsettings 2. Drawtheflowdomain 3. Designafiniteelementmeshonwhichtodothenumericalcalculations(see en.wikipedia.org/wiki/Finite_element_methodformoreonthefiniteelementmethod).Good 1 19December2010

meshdesignensuresanaccuratecalculation.Themeshshouldbemorerefined(havesmaller divisions)inareaswherepropertieschangemostrapidly. 4. Runthesimulation 5. Useandevaluatethesimulationresultsbycalculatingplottingthequantitiesofinterest.Allthe datafromplotsmaybeexportedtoASCII(plaintext)filesthatcanthenbeimportedintoother programs(e.g.Excel)forthepreparationofthefinalplots. 6. Presentyourresultsasinstructedintheoverallassignmentmemo ContacttheTAifyouhaveanyquestionsaboutthisprocedure.

Part1:SelectProblemType
Startup 1. ClicktheStartbutton,pointtoAllProgramsOtherAppsCOMSOL4.0aCOMSOL Multiphysics4.0a TheprogramopensupintheModelNavigator 2. 3. 4. 5. 6. Select2DfromtheSpaceDimensiondropdownlist Clickthearrow fornextpage ClicktheplussignattheFluidFlowModule,SinglePhaseFlow,LaminarFlow(spf). Clickthearrow fornextpage ClicktheplussingatthePresentStudiesandselectStationary. .

7. Clicktheflag

Part2:SetuptheFlowGeometryandPhysicsSettings
GeometrySetting 8. TobringuptheRectangle/squareselectDrawRectangleanddraganysizedrectangleonthe GraphicsWindow 9. Toentertheexactdimensions:ClicktheplussignatGeometry1,andselectRectangle1(r1). Enterthedimensionsshownbelow

2 19December2010

10. ToenterthesenewdimensionsclickonBuiltSelecticon PhysicsSettings

11. RightclickonMaterialsfromtheMolderBuildermenuandselectOpenMaterialBrowser 12. ClicktheplussignattheLiquidsandGases,thenLiquids,thenselectWater 13. RightclickonwaterandselectAddMaterialtoModel

Part3:BoundaryConditionsandMeshGeneration
Boundaryconditions Inlet 14. RightclickLaminarFlow(spf)fromtheMolderBuilderandselectInlet. 15. OntheGraphicsWindowselectboundary2(bottom)andunderboundaries,choose

16. IntheinletmenuunderBoundaryConditionSelectVelocityfield.Enterthenumber0forVxand 0.0000175forVy(thereisatypointhegraphicbelow).

3 19December2010

Outlet

17. RightclickLaminarFlow(spf)fromtheMolderBuilderandselectOutlet. 18. Selectboundary3andclickon

19. SetPressure:0 Wall

20. RightclickonLaminarFlow(spf),chooseWall1and1and4willalreadybeselected.In boundaryconditionselectNoSlip

MeshGeneration

21. RightclickonMesh1fromTheMolderBuildermenuandselectFreeTriangularMesh 22. InModelbuilderselectSizeunderMesh1andinPredefinedselectExtraFine 23. UnderMesh1,rightclickonFreeTriangularandselectBuildSelected 4 19December2010

Part3:Solve
24. InMolderBuilder,Study1rightclickonandselectCompute.

Part4:GeneratePlotsandVisualizetheSolution
ArrowSurface 25. 26. 27. 28. Inresults:Clicktheplussignat2DPlotGroup1andselectSurface1. RightclickonSurface1andselectDisabletocleantheplotview Rightclickon2DPlotGroup1fromTheMolderBuildermenuandselectArrowSurface UnderArrowPositioningselect15pointsinxgridpointsand15pointsinygridpoints

29. ClickonPlottodrawthearrowplot VelocityProfileGeneration

30. RightclickonArrowSurface1andselectDisabletocleantheplotview 31. RightclickonDataSetsandselectCutLine2D

5 19December2010

32. InCutLine2Dselectx1=0,x2=0.02,y1=0andy2=0.

33. InCutLine2D,selectAdditionalparallellinesandclickontheicontotherighttobringupthe rangemenu.EnterStart=0,Stop=0.1andStep=0.005andclickonreplace

6 19December2010

34. InMolderBuilder,rightclickonResultsandselect1DPlotGroup 35. Rightclickon1DPlotGroupandselectLineGraph 36. InDataselectCutLine2D1

37. InData,YAxisData.ClickonReplaceExpressioniconontherightandselectLaminarFlow, Velocityfield,Velocityfield,ycomponent(v)

38. InData,XAxisDataselectArclength

39. ThenselectPlot 40. ToRenametheLineGraph1withtherightbuttonofyourmouseselectRenameandthengive thenewname:VelocityField

7 19December2010

41. ToRenametheCutLine2DwiththerightbuttonofyourmouseselectRenameandthengive thenewname:CutLine2DVelocityField

PressureProfileGeneration

42. InResults,1DPlotGroup,VelocityFieldrightclickandselectDisable 43. RightclickonDataSetsandselectCutLine2D

44. InCutLine2DunderLineDataenterx1=0.01,x2=0.01,y1=0andy2=0.1

8 19December2010

45. Rightclickon1DPlotGroupandselectLineGraph 46. InDataselectCutLine2D2

47. InData,YAxisData.ClickonReplaceExpressioniconandselectLaminarFlow,Pressure(p)

48. InData,XAxisDataselectArclength

49. ThenselectPlot 50. ToRenametheLineGraph2withtherightbuttonofyourmouseselectRenameandthengive thenewname:Pressuregradient

9 19December2010

51. ToRenametheCutLine2D2withtherightbuttonofyourmouseselectRenameandthengive thenewname:CutLine2DPressuregradient

Part5:ExportData
52. Choosethedesired1Dplotgroupandtheexporticonwillappearinthetoolbaratthetop. 53. SelecttheExportIconandchooseappropriatesettings.ClickonExportIconintheplotwindow

10 19December2010

You might also like