+ All Categories
Home > Documents > Solution of the Navier–Stokes Equations

Solution of the Navier–Stokes Equations

Date post: 03-Feb-2022
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
22
Chapter 4 Solution of the Navier–Stokes Equations The motion of a fluid can be described by the Navier–Stokes equations, which are the continuity equation and the non-linear transport equations for the conservation of momentum, with additional transport equations for any scalar fields (such as temperature and concentration) that affect the flow. The coupling and solution of these equations is a non-trivial operation, and the coupling methods used in this study are derived and described in this Chapter. The basic scheme used is the SIMPLE scheme of Patankar and Spalding[123, 122] as modified by Rhie and Chow[139] for collocated (ie: nonstaggered) meshes, which has been modified to use a fractional-step method for transient flows. At the end of the Chapter the flow solver is applied to two benchmark problems as a test of the correctness of the implementation. 4.1 The Navier–Stokes Equations The motion of a Newtonian fluid is described by the Navier–Stokes equations, which are a set of transport equations for the conservation of momentum and the continuity equation enforcing the con- servation of mass. For a three dimensional flow the equations for the Cartesian velocity components and can be written as (4.1) where is the dynamic viscosity, the pressure, the acceleration due to gravity in the coordinate direction, and are any remaining body forces resolved onto the axis, such as Coriolis forces due to a rotating reference frame. The first group on the left hand side of the equations in (4.1) is the transient term for the rate of change of momentum with respect to time, whilst the second term is the rate of change of momentum due to spatial changes in velocity, denoted advection. On the right hand side, the first term is a diffusion term quantifying shear stresses generated by the viscosity of the fluid and any gradients in the velocity field. This is followed by forces due to pressure gradients, buoyancy forces due to gravity, and a source term for any remaining body forces. The continuity equation describes the interaction of the orthogonal velocity components, enforcing 93
Transcript
Page 1: Solution of the Navier–Stokes Equations

Chapter 4

Solution of the Navier–StokesEquations

The motion of a fluid can be describedby the Navier–Stokesequations,which are the continuityequationandthe non-lineartransportequationsfor the conservationof momentum,with additionaltransportequationsfor any scalarfields (suchastemperatureandconcentration)thataffect theflow.The coupling andsolutionof theseequationsis a non-trivial operation,and the couplingmethodsusedin this studyarederivedanddescribedin this Chapter. Thebasicschemeusedis the SIMPLEschemeof PatankarandSpalding[123, 122] asmodifiedby Rhie andChow[139] for collocated(ie:nonstaggered)meshes,whichhasbeenmodifiedto useafractional-stepmethodfor transientflows. Attheendof theChaptertheflow solveris appliedto two benchmarkproblemsasatestof thecorrectnessof theimplementation.

4.1 The Navier–StokesEquations

The motion of a Newtonianfluid is describedby the Navier–Stokesequations,which area set oftransportequationsfor theconservationof momentumandthecontinuityequationenforcingthecon-servationof mass.For a threedimensionalflow theequationsfor theCartesianvelocity components����� and � canbewrittenas������ �� ������ ���� �� � ��� �� ���� �������! � �#"!$ ��% $ ����� �� �& ������ ���� �& � ��� �� ���& �� �'��!( � �#"!) ��% ) ����� �� � ��*��� +�,� � -� ��� �� � � �� ����,. � �!"!/ ��% / �

(4.1)

where� is thedynamicviscosity, � thepressure,"!0 theaccelerationdueto gravity in the 132+4 coordinatedirection,and % 0 areany remainingbodyforcesresolvedontothe 132+4 axis,suchasCoriolis forcesdueto a rotatingreferenceframe. The first groupon the left handsideof the equationsin (4.1) is thetransienttermfor therateof changeof momentumwith respectto time,whilst thesecondtermis therateof changeof momentumdueto spatialchangesin velocity, denotedadvection.On theright handside,thefirst termis adiffusiontermquantifyingshearstressesgeneratedby theviscosityof thefluidandany gradientsin thevelocityfield. This is followedby forcesdueto pressuregradients,buoyancyforcesdueto gravity, anda sourcetermfor any remainingbodyforces.

The continuity equationdescribesthe interactionof the orthogonalvelocity components,enforcing

93

Page 2: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 94

theconservationof mass,andmaybewrittenas� ���� ����� ���� 5�768� (4.2)

Otherequationsthataffectafluid flow aretheenergyandspeciesequations,sincethesecanforcefluidmotion throughthe creationof densitygradientsgeneratingbuoyancy forces. For a low speedflowwherecompressibilityeffectsareignoredtheenergy equationcanbewritten for thespecificenthalpy9

as ����+� 9 ��*��� ���� 9 :�;���=<?>@BA � 9C �*%�D8� (4.3)

where> is thethermalconductivity, @BA theconstantpressurespecificheat,and % D theenthalpy sourceterms.A similarequationcanbewritten for theconservationof achemicalspeciesE ,��=�&+�#FHG I����� �����FHG J�K��� 3LIG � FHG ��*% G � (4.4)

where FMG is themassfractionof speciesE , L�G is thediffusivity of thespecies,and % G is therateofgenerationof thespeciesfrom chemicalreactionsor masstransferacrossaboundary.

For this thesisonly incompressibleflow will beconsidered,andassuchtheabove equationscanbesimplifiedfor smallvariationsin temperatureandconcentration.UsingtheBoussinesqapproximationwe assumethedensity � to bea constantandabsorbthe �#" terminto thepressuregradient,with theexceptionof thevariationsin densitydueto temperatureandmassfractionwhich generatebuoyancyforces,whichareassumedto belinearfunctionsof temperatureandconcentration,giving+�ONP��Q SR "!0 � �#"!0�TJ+UVNWU�Q � �!"!0YX RJ�+�ONP��Q G "!0 � �#"!0�T G �F G NPF G Q Z� �!"!0YX G � (4.5)

whereT is thecoefficientof volumetricexpansionfor temperatureand T�G is it’sequivalentfor species.

By dividing theNavier–Stokesequations(4.1)by � , usingtheaboveapproximationsfor thebuoyancyforces,andusingthekinematicviscosity [ � �I\]� , theequationsin (4.1)become� ���� �*��� Y� �� � ��� [ ���� ��_^� �'��# � +X R�� X G " $ �`^� % $ �� ��=� �*��� Y� �& � ��� [ ���& I� ^� �'��#( � +X R � XaG " ) � ^� % ) �� ���� �*��� +� � b� ��� [ � � c� ^� ����,. � YX R � XdG " / � ^� % / �

(4.6)

Similarly, theconstantdensityapproximationreducesthecontinuityequationto��� � �e6� (4.7)

Therelationshipbetweenenergy andtemperaturecanoftenbeapproximatedaslinear, with9 �7@fA U .

Usingthisapproximation,anddividing throughby theconstantdensity, theenergy equation(4.3)canberecastasanequationfor temperature,� U��� �*��� Y��U :�K��� E � U ��*% R � (4.8)

where E � > \]� @ A is thethermaldiffusivity, andthesourceterm % R �K%�D \]� @ A .

Page 3: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 95

4.2 Solution of the Navier–StokesEquations

The solution of the systemof equationsdescribedin the previous sectionis complicatedby theirinterdependenceupon eachother, with buoyancy forcesarising from the temperatureand speciesequationsdriving themomentumequations,andtheadvective termsin all equationsdependinguponthe velocity field. To solve the systemsomemethodmustbeusedto couplethe equationstogether,and typically this is doneiteratively, with an initial approximationof one equationbeing usedinthe solution of the others. The methoddescribedherefor coupling the equationsis the SIMPLEschemeof PatankarandSpalding[123, 122], asmodifiedby RhieandChow[139] for collocated(ie:nonstaggered)grids. Rhie andChow’s methodfor interpolatingvelocitiesfrom cell centresto cellfacesis discussed,andafractional-stepschemethattakesadvantageof asemi-explicit timemarchingschemeis described.

4.2.1 The SIMPLE Velocity–Pressure Coupling Scheme

TheSIMPLEvelocity–pressurecouplingschemewasdevelopedby PatankarandSpalding[123, 122]and hassincebeenrefinedby a numberof authors. The schemeis a predictor–correctormethod,with an initial estimatefor thevelocity field from theNavier–Stokesequationsbeingcorrectedwiththe continuity equationto force the conservationof mass.The predictionandcorrectionoperationsareenclosedin an iterative loop which (hopefully) convergesto give a solutionthat satisfiesall theequationsin thesystem.Theinitial schemeby PatankarandSpaldingwasfor a staggeredCartesianmesh,with the velocity valuesbeing locatedat the facesof finite volume cells, and the pressure,temperatureandotherscalarvariablesbeinglocatedat thecell centres.RhieandChow[139] extendedthemethodto usecollocatedgrids,wherethevelocitiesandtheothervariablesareall locatedat thecell centres,and this hasbeenfurther developedby Peric andother authors[129, 72, 43]. Suchagrid allows for aneasierconversionto non-Cartesianmeshes,andis themethodusedin this study. Itwill beinitially describedfor Cartesianmeshes,with a generalisationto non-Cartesianmeshesbeingdiscussedin Chapter5.

The first stageof the solutionprocessis the solutionof the discretisedversionsof the momentumequations(4.6)usingthecurrentestimateof thepressurefield, andusinga cell facemassflux that isinterpolatedin somemannerfrom thecurrentestimateof thevelocity field (this interpolationproce-dureis discussedin greaterdepthin Section4.2.2). ThemomentumEquations(4.6) arein thesamegeneralform asthegenerictransportequation,thesolutionof which wasdescribedin Chapter2. Fora givenmassflux field andpressurefield they canbediscretisedinto equationsof theformg�hi��jh �-klnm�l!o g l ��jl � % $ ��p $ ����! �g�hi� jh � kl!m�l!o g l � jl � % ) ��p ) ����#( �g h � jh � klnm�l!o g l � jl � % / �qp / ����,. �

(4.9)

where� j �r� j and � j arethenew estimatesof velocity in the � ( and . axis,and s�t refersto thecellsthatareneighboursof cell u , ie: s�t �wvx�fyz�r{H�f%c� U � X . The p $ , p ) and p / termsaretheareasoffacesof thecell normalto the , ( and . axis.Thepressuregradientcanbefoundby interpolatingthepressurefield to thecell facesusinga linearinterpolation,andthenapproximatingthegradientacross

Page 4: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 96

thecell with acentreddifferenceas �'��# | �~} N �=�� �����#( | � l N ���� ( �����,. | �=� N � o� . � (4.10)

for a regularmeshwhere� � � ( and

� . arethecell dimensions.

After the calculationof the velocity field estimates,the cell facevelocitiescanbe interpolatedfromtheir valuesat thecell centres,andthecell facemassfluxescanbecalculated.For theeasternfaceofa cell thevelocity normalto thefaceis � } , whilst thefacehasanareap } . Themassflow acrossthefaceis F } � � p } � } � (4.11)

In generalthis interpolatedvelocity field will not bemassconserving(ie: it will not have a discretedivergenceof zero),andsowill not satisfythediscretisedversionof thecontinuityequation,F } NPF � � F l NWF � � F � NPF o �e68� (4.12)

which canbewritten for thefacevelocitieson aCartesianmeshesas� p } � } NP� p � � � � � p l � l NW� p � � � � � p � � � NP� p o � o �768� (4.13)

Wethereforewishtocalculateacorrectedvelocityfield, � jfj ��� jBj � � jBj and� jfj thatis massconserving,togetherwith a correspondingpressurefield. We do soby addinga velocity andpressurecorrectionto theoriginalestimationof thevelocityandpressurefields� jfj � � j �q���Y�� jfj � � j �q� � �� jfj � � j � � � �� jfj � � � � � � (4.14)

wherea dash� signifiesthecorrectionfield.

Theexpressionsin Equation(4.14)aresubstitutedinto the � equationin Equation(4.9)g,h ��jh �q� �h �� klnm�l#o g l ��jl �q� �l :�K% $ ��p $ ��! � � � � �� (4.15)

andthesumof theneighbouringvelocity termsapproximatedbyklnm�l!o g l ��jl �q� �l | klnm�l#o g l ��jl � (4.16)

which shouldbe valid as � ��� 6 and � ��� 6 . Subtractingthe momentumequationthengivesanexpressionrelatingthecorrectionpressureandvelocityfield to eachother,g h � �h | p $ ��� ��# � (4.17)

or � �h � p $g�h �'� ��! �� �h � p )g h ��� ��#( �� �h � p /g h ��� ��,. �(4.18)

Page 5: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 97

wheresimilarapproximationshavebeenmadefor the ( and . componentsof velocity. By interpolat-ing theexpressionsin Equation(4.18)to thefacesof thecell, thecorrectedcell facevelocitiesnormalto thefacearegivenby � � } � p $ }g h } � �� N � �h� } �� �l � p ) lg,h l � �� N � �h� ( l �

� �� � p / �g,h � � �R N � �h� . l � (4.19)

with the g h termsbeingapproximatedat thefacesby a linearinterpolationg h } � g h#� �*g h#�� �g h l � g h#� �*g h#�� �g h � � g h#� �*g h#�� � (4.20)

In this interpolationg h#� is the g h termin theequationfor thecell u , whilst g h#� is the g h termin theequationfor cell v . Substitutingtheequationsin (4.14)into thediscretisedcontinuityequation(4.13)yields, p } � j} ��� �} N p � � j� �q� �� ���p l � jl ��� �l N p � � j� �q� �� ���p � � j� � � �� N p o � jo � � �o 5�e6� (4.21)

which canberearrangedto formp } �~�} N p � ���� �qp l �,�l N p � �,�� ��p � � �� N p o � �o �p � � j� N p } � j} ��p � � j� N p l � jl ��p o � joaN p � � j� � (4.22)

Usingtheexpressionsfor � � from Equation(4.19)andfactorisingyieldsanequationfor thepressurecorrection t h � �h � t � � �� � t�� � � � � t � � �� � t�� � � � � t R � �R � t�� � �� �7@n� (4.23)

where t � � p��}g h } �t'� � p���g�h � �t � � p��lg�h l �t � � p���g h � �t R � p���g h � �t�� � p��og h o �t h � NO t � � t�� � t � � t�� � t R�� t�� ��@ � ^� �F � NPF } � F � NPF l � F o NWF � ��

(4.24)

This canbesolvedfor thepressurecorrection� � , which is thenusedto updatethecell centreandcellfacevelocitiesusingEquations(4.19)and(4.14),theresultingfacevelocitiessatisfyingthecontinuityequation.Thepressurefield is updatedusingEquation(4.14),andthentheprocessis repeated,withthenew velocityandpressurefield beingusedto calculatethe � j velocities.

TheSIMPLEalgorithmis summarisedin Figure4.1for thesolutionof athermallydriventhreedimen-sionalflow. To obtainthevelocity, pressureandtemperaturefields,anestimateof thevelocity field

Page 6: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 98

� j ��� j and � j is calculatedusingEquation(4.9).Thecell facevelocitiesaretheninterpolatedfrom the� j velocity field andthecell facemassfluxescalculatedF j . Thepressurecorrectionequation(4.23)is solved for � � , andthe velocity, massflux, andpressurefields areupdatedusingEquation(4.14).Theresultingmassconservingvelocityfield is thenusedto solveany transportequationsfor auxiliaryscalarfields,suchasTemperatureandspeciesconcentration.� setinitial fieldsfor ������� � � � and U .� interpolateto find cell facemassfluxes F .

repeat� solveEquation(4.9) for � j ��� j � � j .� interpolateto find cell facemassfluxes F j .� calculatepressurecorrection� � from Equation(4.23)� update������� � � � and F usingEquation(4.14).� calculateU andany otherscalarfields.� checkfor convergence.If converged,halt.

Figure4.1: TheSIMPLEvelocity–pressurecouplingalgorithm.

Thedivergenceof the F j massflux field (calculatedasthesourcetermin Equation(4.23))is usuallyusedasaconvergencecriteria.Thesystematthisstagesatisfiesthemomentumequations(they havingjust beensolved)whilst a divergencefree F j massflux field signifiesthe solutionalsosatisfiesthecontinuityequation.After theupdateof the F fieldswith thepressurecorrection� � , thedivergenceshouldbe equalto zero,a non-zerodivergencesignifying an incorrectlysolved pressurecorrectionequation.However, thecorrectionsto thevelocityfieldsmeansthatthemomentumequationsmaynolongerbesatisfied,andsothealgorithmrepeats.

To aid the convergenceof the method,the velocity, pressureandscalarfield updatescanbe under-relaxedusingsomerelaxationparameter. Therearetwo obviousmethodsof under-relaxation,eitherby relaxingtheupdate � � � j � E�� �~���� � � j � E � � � �� � � j � E � � � �� � � Q � E A � � � (4.25)

where EI� and E A arethe relaxationparametersfor the velocity andpressurefields respectively, orby relaxingthediagonalcoefficientof thelinearsystemfor eachvariable,for examplethe � velocityequation(4.9)beingmodifiedtog�hE�� � jh � klnm�l!o g l � jl �;% $ ��p $ ����# � (4.26)

Thepressureequationrelaxationshouldalwaysbeof theform of Equation(4.25),andno relaxationshouldbe usedin the updateof the facevelocitiesandmassfluxes. Unlike the transportequation,the pressureequationis alwaysdiagonallydominantanddoesn’t requiretheunder-relaxationof thediagonal. By not relaxingthe facevelocity updatesa massconservingflux field is ensured,whichcanensurethe conservationof energy, momentumandotherproperties.It canalsobe notedthat ifa relaxationof the form of Equation(4.26) is usedfor the momentumequations,thena non-relaxedvalueof g h shouldbeusedin thepressurecorrectionandvelocity interpolationoperations.

To modela transientproblemtheiterativeprocessoutlinedin Figure(4.1) is carriedout at every timestep,usingthevelocity, pressureandscalarfieldsfrom theprevioustime stepasthe initial guessforthevaluesat thenew timestep.This canbequitetimeconsuming,andamoreefficient timesteppingprocedureis describedbelow in Section4.2.3.

For steadystateproblemstheSIMPLEcouplingschemecanbeconsideredasapseudo-transientpro-cess,with animplicit calculationof themomentumequationsbeingcorrectedvia anexplicit pressure

Page 7: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 99

correctionprocess,eachiterationof the schemecorrespondingto a pseudotime step. Whenmod-elling a transientflow, eachtimestepcomprisesanumberof pseudo-transienttimestepsto obtaintheconvergedsolutionfor thephysicallyrealtimestep.

The basicSIMPLE schemewas initially describedby PatankarandSpaldingin 1972[123]. Sincethena numberof modificationsto the couplingmethodhave beenmade(asidefrom the conversionto collocatedor non-staggeredmeshesby Rhie and Chow[139] that is describedabove) – mostlywith the aim of improving computationalefficiency and speedingthe coupling process. Variantsrejoicing in the namesof SIMPLEC[175, 135], SIMPLEX[135], SIMPLER[122] andPISO[69] allaim to improvethecouplingof themomentumandpressureequations,via minormodificationsto theSIMPLEalgorithm.In thisstudythebasicSIMPLEalgorithmwasused.

4.2.2 Rhie–Chow Velocity Inter polation

Thekey to theshift from a staggeredto a collocatedmeshis theinterpolationof thevelocity field tothecell faces.A naıve linearinterpolationof thecell centrevelocitiescanleadto a pressurechequer-boardingprocess,wherethe pressureson odd and even numberedcells are uncoupledfrom eachother[122].

TheRhie–Chow interpolationmethod[139] interpolatesin a form consistentwith thevelocitycorrec-tion equation(4.18)asfollows. Theequationfor the axiscomponentof momentumcanbewrittenas � h N p $g h ����! � % $g h N ^g h klnm�l!o g l � l � (4.27)

Writing equation(4.27)for the u and v cellsas�~h N < p $g h C h < ����! C h � < % $g h C h N�� ^g h klnm�l#o g l � l�� h �� � N < p $g h C � < �'��# C � � < % $g h C � N�� ^g h klnm�l!o g l � l�� � � (4.28)

andassuminga similarequationcanbewritten for thevelocityat theeastfaceof thecell� } N < p $g�h C } < �'��# C } � < % $g�h C } N � ^g�h klnm�l#o g l � l � } � (4.29)

This equationis thenapproximatedby a linear interpolationof the equationsfor the centresof thev and u cells given in Equation(4.28). Performingsuchan interpolationfor the left handsideofEquation(4.29)gives� } N < p $g h C } < ����! C } � ^� <&�~h N < p $g h C h < ����! C h �q� � N < p $g h C � < �'��# C � C � (4.30)

which canberewrittenasanexpressionfor � }� } � ��h��q� �� �_< p $g h C } < ����! C } N ^� <�< p $g h C h < ����! C h �_< p $g h C � < �'��# C � C � (4.31)

Thepressuregradientscanbeapproximatedby centreddifferencesas< �'��# C } � � � N � h� } �< �'��# C h � � � N � �� } � � � �< �'��# C � � � ��� N � h� }S} � � } �

(4.32)

Page 8: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 100

Theapproximationof the p $ \ g h } termby a linearinterpolation< p $g h C } � ^� <�< p $g h C � � < p $g h C h C � (4.33)

givesa completeinterpolationformulafor � } as� } � � } � < p $g h C } < �'��# C } N < p $g h ����! C } � (4.34)

whereanoverbar } signifiesa linearinterpolationof thevaluesat the u and v cell centres.Similarexpressionscanbe obtainedfor the � l and � � facevelocities,and the facemassfluxes F canbecalculatedby multiplying by thedensityandtheareaof therelevantcell face.

4.2.3 A Fractional-StepMethod for Transient Flow

To solve thetransientNavier–StokesequationsusingtheSIMPLEcouplingscheme,theequationsfortheconservationof momentum(previouslygivenin Equation(4.1) )�����+� �� ��*��� +�,� �~ � ��� �+� ���~ �� �'��# � �#"!$ �*% $ ����� +� �& I�*��� r���� �& � ��� �+� ���� �� ����#( � �!"!) �*% ) ����� +� � I�*��� �+�,� � -� ��� �+� � � I� �'��#. � �#"!/ �*% / �

(4.35)

may be discretisedusingeithera backwardsEuler or Crank–Nicolsontime steppingscheme.TheCrank–Nicolsondiscretisationmaybesummarisedas� j N � l��� � ����3  ln¡ � � j ��   l � l r¢£� N�¤ $ � ln¡ � �� �� � 3¥� � j �� ¥� � l � ��� j N � l��� � �� �   ln¡ � � j I�   l � l ¢ � N�¤¦)& � ln¡ � �� �� � 3¥� � j �� ¥� � l � ~�� j N � l��� � �� �   ln¡ � � j ��   l � l ¢ � N�¤ / � l!¡ �' �� �� � +¥� � j �� ¥§ � l r ~� (4.36)

where  �¨ is thediscreteadvectionoperatorcalculatedusingthevelocity field at the F 2Y4 time step,¤ thediscretegradient,and ¥ thediscreteLaplaceoperator.

The � j ��� j and� j velocityfieldscalculatedusingEquation(4.36)will notgenerallysatisfycontinuity,andsoapressurecorrection� � is calculatedandappliedto correctthevelocityfields,� l!¡ � � � j � ��� ¤ $ � � �� l!¡ � � � j � ��� ¤¦) � � �� ln¡ � � � j � ��� ¤¦/ � � �� ln¡ � � � l!¡ � � � � � (4.37)

the � ln¡ � �r� ln¡ � and � ln¡ � fieldssatisfyingthecontinuityequation.

Thenew valueof � ln¡ � is thenusedin Equation(4.36),with theadvectionoperator  l!¡ � beingre-evaluatedusingthenew estimationof the s � ^ � D velocity field, � ln¡ � ��� ln¡ � and � l!¡ � . Theprocessis repeated,hopefullyiteratingto convergence.

A moreefficientmethodfor calculatingtransientflow is to useafractional-stepmethodthatsolvestheunsteadyNavier–Stokesequationsin asegregatedmanner, with themomentumandpressureequationsbeingsolvedonly oncepertimestep.Thisremoval of theiterativecouplingateachtimestepachieves

Page 9: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 101

a largegain in computationalefficiency, a desirablefeaturein transientflows calculationswhich aregenerallycomputationallyexpensive. Thefractionalstepmethodswerefirst proposedby Harlow andWelch[57] andChorin[24], with the methodof Chorin beingmodifiedby Kim andMoin[79] for astaggeredmeshfinite volumediscretisation[79]. Theschemedescribedhere[4, 5] usesamodificationof theSIMPLE couplingschemedescribedabove,with theadvectionoperator  for themomentumequationsbeingappliedusinganAdams–Bashforthtimediscretisationinsteadof theCrank–Nicolsondiscretisationusedin Equation(4.36).Thediscretemomentumequationsgivenin (4.36)aremodifiedto � j N � l��� � ©�   l � l N ��   l�ª � � l�ª � Z� N�¤¦$8 � l �� �� � Y¥� � j �� ¥� � l � ��� j N � l��� � ©�   l � l N ��   l�ª � � l�ª � «� N�¤¦)& � l �� �� � 3¥� � j �� ¥� � l � ��� j N � l��� � ©�   l � l N ��   l�ª � � l&ª � ;� N�¤¦/, � l �� �� � +¥§ � j� �� ¥� � l � ~� (4.38)

whicharesolvedfor theinitial estimateof thevelocityfield, � j �r� j and � j . A pressurecorrection,� � ,is thencalculatedandappliedto obtaina massconservingvelocityfield,� l!¡ � � � j � ��� ¤ $ � � �� l!¡ � � � j � ��� ¤¦) � � �� ln¡ � � � j � ��� ¤¦/ � � �� ln¡ � � � l!¡ � � � � � (4.39)

In Equation(4.38) the advectionoperators  areevaluatedfor the previous two time steps,andnolongerdependon the velocity field at time s � ^ , andthe pressureforce is explicitly extrapolatedfrom time steps . Theequationthereforeno longerreliesuponvaluesat the s � ^ time step,andthesolutionto Equation(4.39)is thefinal estimateof thevelocity andpressurefieldsfor the s � ^ timestep.

UnlikethetransientcalculationsmadeusingaCrank–Nicolsonor BackwardsEulerdiscretisationanda SIMPLE couplingscheme,thereis no iterationnecessaryto couplethe pressureandmomentumequations.Insteadthemomentumequationsandthepressurecorrectionequationcanbebothsolvedjust onceper time step,resultingin a considerablegain in computationefficiency. The methodhasbeenshown to besecondorderaccuratein time[4, 5], andshowssimilarerrorpropertiesto theCrank–Nicolsonsecondorder(in time)SIMPLEschemedescribedin Equations(4.36)and(4.37).

4.3 Boundary Conditions

The individual boundaryconditionsthatareusedfor theNavier–Stokesequationsareessentiallythesameas thosefor the generictransportequationgiven in Section2.3, but with the differentveloc-ity componentsandthe pressurefield having a mixture of NeumannandDirichlet conditionsat theboundary.

The simplestboundarycondition is that for a stationarywall. At a wall the no-slip condition isimposed,with thevelocitycomponentsbeingsetto zero,�¬�e�­� � �K6� (4.40)

Sincethevelocity is known at theboundary, thevelocitycorrectionat theboundaryis � � �K6 , andsofrom Equation(4.19)aNeumannboundaryconditionis foundfor thepressurecorrectionequationof�'� �� s �768� (4.41)

Page 10: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 102

where s is a directionnormal to the boundary. Whilst a zeronormalderivative is imposedin thepressurecorrectionequation,the valuefor the pressureat the externalboundarycell is setusingasecondorderextrapolationfrom theinternalnodes[72, 129, 43]. Failureto do soresultsin velocitiesnormalto theboundaryin thecellsontheinteriorsideof theboundary. A movingwall is implementedin thesamemannerasa fixedwall, with thevelocitiesat thefacebeingsetto thewall velocity.

Symmetryplanesaresetwith amixtureof Dirichlet andNeumannboundaries.For asymmetryplanenormalto the axisthevelocitiesaresetas��� � ��! � � ��# �K6� (4.42)

whilst thepressureboundaryconditionis thesameasthatfor a wall. For symmetryplanesnormaltothe ( and . axisthevelocityboundaryconditionsare� ��!( �e�­� � ��#( �K6� (4.43)

and � ��,. � � ��#. � � �K6� (4.44)

As with solid boundaries,the pressurecorrectionequationhasa Neumannzeronormalderivativeboundaryconditionsetat symmetryplanes.

At flow inlets,wherefluid entersthedomainbeingstudied,thevelocitiescanbespecified,whilst thepressurecorrectionhasazeronormalderivativeboundaryconditionaswith thewall boundarycondi-tions.Outletboundariesconditionsaremoreempiricalin basis,onetypicalsetof boundaryconditionsbeingazeroderivativenormalto theboundaryfor thevelocities,with thepressurecorrectionequationhaving a zerosecondderivative normalto the boundary. Anotherform usesan initial estimationofthevelocitiesat theoutletby extrapolatingfrom theinteriornodes,with theseextrapolatedvelocitiesbeingcorrectedto ensureglobalconservationof mass.

At a free surfacethe pressureis constant,with the velocitieshaving similar boundaryconditionstoa symmetryplane.However thevelocity normalto thesurfaceis zeroonly for a steadysurface,andtypically hasanon-zerovalueassociatedwith wave motionof thesurface.In generalthefreesurfacewill only beplanarfor infinite Froudenumbers,andsomemethodmustotherwisebefoundto couplethefreesurfacegeometrywith thevelocityandpressureboundaryconditions.This topic is discussedfurtherin Chapter8.

For thefractionalstepmethod,thephysicalboundaryconditionsdescribedabovewereappliedto theintermediatevelocityfields, � j �r� j and � j .4.4 Benchmark Solutions

To test the SIMPLE coupling scheme,and to comparethe Finite Volume discretisationsderivedin Chapter2, the codewas applied to solve two classicbenchmarktest problems,both for two-dimensionalsteadyinternalflow. Thefirst, the“drivencavity” problem,modelsflow in a squareboxwhich is drivenby themotionof thelid of thebox. Thesecondmodelsnaturalconvectionin asquarecavity, wherethesidewalls areat two differenttemperaturesandtheupperandlower boundariesareadiabatic.

4.4.1 The Dri ven Cavity Flow

Thedrivencavity problemhaslong beenusedasa testcasefor Navier–Stokessolvers,thanksto it’ssimplegeometryandboundaryconditions.Thetwo-dimensionalsquarecavity hasno slip boundary

Page 11: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 103

conditionson all walls, theflow beingdrivenby thetop wall sliding acrossthecavity whilst thesideandbottomwallsarestatic1. A diagramof thebasicgeometryis givenin Figure4.2.

®¯ °

±

²9

³´

µµµµµµµµµµµ

µµµµµµµµµµµ

µVµ*µ¶µ*µ¶µ¶µ*µ¶µ*µ··³³

Figure4.2: Thegeometryfor thedrivencavity problem.

Thenon-dimensionalparameterdescribingsuchaflow is theReynoldsnumber, definedfor thecavityby ¸º¹ � ´ °[ � (4.45)

where ° is thewidth of thecavity,´

is thevelocity of thetop surface,and [ is thekinematicviscos-ity. For low Reynoldsnumbers,on theorderof ^ 6#6 or less,theviscositydominatestheflow andthefirst andsecondorderdifferencingschemesgive similar solutions.However, asthe Reynoldsnum-bersincreasesto ^ 6!6#6 or greatertheerrorsin thesolutionsgivenby thefirst-orderschemesbecomeapparent.

Early numericalsolutionsto this problemincludethoseby Kawaguti[75], Simuni[156], Mills[111],Burggraf[19], Runchal,SpaldingandWolfshtein[144, 143] andBozemanandDalton[15], with Burggrafproviding a summaryof previouswork, includingtherecirculatingflow theoryof Batchelor[10] andtheanalyticcornereddymodelof Moffatt[119]. In morerecenttimestheproblemhasbeenusedasastandardcasefor comparingdifferencingschemes[35, 56, 131, 124, 43]. High resolutionbenchmarksolutionsfor the problemareprovidedby Ghia, Ghia andShin[50, 49] with solutionsfor Reynoldsnumbersin the rangeof ^ 6!6 to ^ 6!6!6#6 using a secondorder streamfunction–vorticity formulation.The problemhasbeenextendedby otherauthorsto non-orthogonalmeshes[130, 36] and to three-dimensionalflow[34, 35, 184].

For the currentstudythe problemwassolved for a Reynoldsnumberof 1000on a seriesof regularmeshes,the coarsestmeshbeingoneof ^�» � cells,whilst thefinesthad ^½¼^ � cells. For eachmeshacalculationwasperformedusingeachof thedifferencingschemesdescribedin Section2.2– thefourfirst ordermethods,the FOU, Hybrid, ExponentialandPower law differencingschemes,the threesecondordermethods,the Central,SOU andMSOU differencingschemes,andthe two third ordermethods,theQUICK andULTRA differencingschemes.Resultswerecomparedwith thebenchmarksolutionsof Ghia et al[50] which weregeneratedusinga finite differencevorticity-streamfunctionsolverusingaCentraldifferenceapproximation.To increasethedataavailableasetof solutionsweregeneratedusingafinite differencestreamfunction-vorticity program(namedSLIDE),whichis similarto themethodusedby Ghiaetal, but which usedeithercentralor FOU differencing.

1The top boundaryslides,andhasa no-slip boundaryconditionimposeduponit in it’s moving referenceframe. Suchaboundaryconditionis differentfrom aslip boundary, whichhaszeroshearstressnormalto theboundary.

Page 12: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 104

Thestreamlinesfor theflow calculatedona ^�¼8^�¾d^�¼8^ meshusingtheQUICK differencingschemeareshown in Figure4.3. Theflow consistsof a coreof fluid undergoingsolid bodyrotation,surroundedby a shearlayer. Two small counter-rotatingvorticesarelocatedin the lower corners.Accordingtothetheoryof Moffatt[119] thereshouldbeaninfinite cascadeof cornervortices,but themeshis onlyfine enoughto capturea singlesubvortex in thelower right corner.

Figure4.3: Thestreamlinesfor a Re= 1000flow calculatedon a ^�¼8^¦¾z^�¼^ meshusingtheQUICKdifferencingscheme.Contoursfor streamfunctionareat 68� 6 ^ intervals for N 6� ^!^P¿`ÀÁ¿ 6 , withfurthercontoursat  ^ 6 ª © �  ^ 6 ª=à �  ^ 6 ª�Ä �  ^ 6 ª~Å and  ^ 6 ª�Æ .Thestreamlinescalculatedon a coarsermeshareshown in Figure4.4 for calculationsusingtheFOUandULTRA differencingschemes.The ULTRA schemeis not greatlydifferentfrom its fine meshcounterpart,but thesolutioncalculatedusingFOU schemehasa weaker centralvortex, andsmallercornervorticesat thelower two corners.

Figure4.4: Thestreamlinesfor aRe= 1000flow calculatedona Ç ^J¾ Ç ^ meshusingtheFOUscheme(left) andtheULTRA scheme(right). Contoursareat 6� 6 ^ intervalsfor N 6� ^!^a¿*Àe¿ 6 , with furthercontoursat  ^ 6 ª © �  ^ 6 ª=à �  ^ 6 ª~Ä �  ^ 6 ª�Å and  ^ 6 ª�Æ .Plots of the and ( componentsof velocity, the velocity magnitude,and the vorticity, calculatedusingthe QUICK differencingschemeon a ^½¼^i¾q^�¼8^ mesh,aregiven in Figure4.5. The vorticityandvelocity magnitudeplots reveal theflow asa centralcoreof constantvorticity undergoingsolidbodyrotation,surroundedby a shearlayer thatbuffers therotatingcoreandtheflow adjacentto thecavity boundaries.

Page 13: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 105

Figure4.5: Contoursof velocity componentsin the and ( axis ( � top left, � top right), andof thevelocity magnitudeandvorticity ( È � È bottomleft, É bottomright), for a Re = 1000flow calculatedon a ^�¼8^¦¾�^�¼^ meshusingtheQUICK differencingscheme.Velocity contoursareat 68� 6 Ç intervalsbetween ^ , andvorticity contoursareat intervalsof ^ between ^ 6!6 .The convergenceof the differentschemesasthe meshis refinedis shown in Figure4.6. The axisplotsthegrid size,whilst the ( axisplotsthe � velocityata location �r�Å�à th’sabovethelowerboundaryontheverticalcentrelineof thecavity. This is thelocationgivenby Ghiaetal ashaving themaximumnegative � velocity on the centrelineof the cavity, andwasfoundusinga cubic interpolationof thevelocityfieldsfrom thecalculatedsolutions.

Thetop five linesarefrom calculationsusingthefirst orderdifferencingschemes–theFOU, Hybrid,ExponentialandPower law schemesusingtheSIMPLE solver describedin this chapter, anda FOUschemein theSLIDEfinite differencevorticity-streamfunctionsolver. Thepowerlaw andExponentialschemesgivealmostidenticalsolutions,showing that thepolynomialfunctionchosenby Patankarisa goodapproximationof the exponentialfunction. The first orderschemesareall grosslyin error,and areconverging very slowly towardsthe correctsolution. The mostaccurateof the first orderschemesis thesolutioncalculatedusingtheHybrid scheme,perhapsbecauseregionswherethecellPecletnumberis lessthan2 areusinga centraldifferenceapproximation.For the finestmeshthiscorrespondsto avelocity lessthan0.25,which is thecasefor mostof thelowerhalf of thecavity.

Thetwo centraldifferencesolutions(calculatedusingtheFiniteVolumeSIMPLEcodeandtheSLIDEFinite Differencecode)bothconvergeat a similar rate,which is of interestconsideringthedifferent

Page 14: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 106

-0.45

-0.4

-0.35

-0.3

-0.25

-0.2

-0.15

-0.1

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08

Vel

ocityÊ

Mesh Size

FOU

Hybrid

Exp

Power

Central

SOU

MSOU

QUICK

ULTRA

Slide FOU

Slide Central

Ghia

Figure4.6: The � velocity at a location �B�Årà th’s above thecavity floor on thecentrelineof thecavity.For eachof thedifferencingschemesthecalculatedvelocity is plottedasa functionof themeshsize� . Thebenchmarksolutionof Ghiaet al is offsetto

� �Ë6 for clarity, althoughit wascalculatedon a regularmeshof ^�¼8^ � points,with ameshsizeof

� �768� 6#6,Ì]Í .methodbeingusedto modeltheflow. Thefinestsolutionfor theSLIDE finite differencecodegivesanalmostidenticalsolutionto that from Ghiaet al calculatingon thesamemesh.Thesecondorderup-wind schemeovershootsthevelocity, but theovershootis reducedwith theMSOU scheme,althoughthe valueis still greaterthanthat given by the centraldifferencebenchmark.For all of the secondordermethodsthe error is lessthanthat for the first orderschemes,with the exceptionof the SOUschemewhich hasanerrorcomparableto theHybrid schemeon thecoarsestmesh.

Finally the third orderschemes,using QUICK and ULTRA differencing,converge fasterthan thesecondordermethods,the QUICK schemegiving a bettersolutionon the coarsermesh. For boththeMSOU andULTRA flux limiter schemes,theadditionof theflux limiter dampsthesolution.FortheSOUscheme,wherethereis anovershootin thecalculatedvelocity, this hastenstheconvergencewith theexactsolution,whilst for theQUICK schemewhich monotonicallyconvergeswith theexactsolution,thishastheeffectof slowing meshconvergence.

Froma comparisonof theconvergenceof thevelocity, thethird orderschemesareclearly thefastestconvergingmethods,with thefirst ordermethodsbeingtheslowestto convergeandexhibiting a largeerror.

Thevelocity profile alongtheverticalcentrelineof thecavity is shown in Figure4.7, with solutionsbeing shown for eachof the differencingschemesfor eachcalculatedmesh,with the benchmarksolutionsof Ghiaetal beingincludedfor comparison.For reasonsof spacenosolutionis givenfor thePowerdifferencingscheme,but thesolutionsarenearlyidenticalto thoseof theExponentialscheme.The largeerror in thefirst ordersolutionsis readilyapparent,which make a strongcontrastwith thecomparatively rapid convergenceof the third orderschemes.The first orderschemesunder-predictthe velocity peakin the lower half of the cavity, andsmearout the shearlayer betweenthe centralcoreof themainvortex andtheboundaryflow. On thefinestmeshtheHybrid schemeis surprisinglyaccuratewhencomparedwith the otherfirst orderschemes,but this is thoughtto be dueto the cellPecletnumbersbeinglow enoughon thefine meshfor themethodto switchto usinga secondordercentraldifferencediscretisation.Theerrorin theSOUschemeis of interest,with a region of reverseflow beingpredictedon thecoarsermeshes,andwith thevelocity in thelowerhalf of thecavity beingoverestimated.

Page 15: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 107

0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

yÎU velocity

FOU Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

yÎU velocity

Hybrid Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia

0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

yÎU velocity

Exponential Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

yÎU velocity

Central Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia

0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

yÎU velocity

SOU Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

yÎU velocity

MSOU Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia

0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

yÎU velocity

QUICK Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

yÎU velocity

ULTRA Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia

Figure4.7: Profilesof the � velocity alongthe vertical centreline,calculatedusingdifferentdiffer-encingschemesfor a rangeof meshsizes,andcomparedwith thebenchmarksolutionsof Ghiaet al.Theschemesusedare(clockwisefrom top right), Hybrid, Central,MSOU, ULTRA, QUICK, SOU,ExponentialandFOU differencing.

Page 16: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 108

0

0.2

0.4

0.6

0.8

1

-5 0 5 10 15 20

yÎVorticity

FOU

QUICK

SLIDE

Figure4.8: Thevorticity É distribution alongtheverticalcentrelineof thecavity. Solutionsaregivenfor calculationsmadeusingthe FOU andQUICK differencingschemeson a ^½¼^q¾�^½¼^ mesh,andarecomparedwith a solutioncalculatedusinga finite differencevorticity-streamfunctioncode.

The smearingeffect of a first orderschemeis shown in Figure4.8, which shows the distribution ofthe vorticity alongthe vertical centrelineof the cavity for the finestmeshsolutionsobtainedusingthe FOU andQUICK differencingschemes(ie: on a ^½¼^�¾Ï^�¼8^ mesh),togetherwith the solutionobtainedwith thevorticity-streamfunctionfinite differencesolver on a ^ � »V¾�^ � » mesh.ThefinitevolumeQUICK solutionagreeswith thevorticity–streamfunctionsolution,revealinga centralregionof constantvorticity, with athinshearlayerattheupperboundary,andthepresenceof two overlappingregionsof shearin thelower half of thecavity, theshearlayerat theedgeof thevortex coremergingwith theboundarylayerat thebaseof thecavity. Theexcessive diffusivity of thefirst orderupwindschememanifestsitself with anover-predictionof thewidth of theshearlayerat theupperboundary,andamergingof thetwo lowershearlayersinto a singlelayer. Thesizeof theconstantvorticity coreflow is reduced,with thevorticity of this regionbeingunder-predicted.

Finally, the verticalvelocity profilesalongthe horizontalcentrelineareshown in Figure4.9 for cal-culationsmadewith the FOU andQUICK differencingschemes.As with the velocitiesalongthevertical centrelinethe first order schemegrosslyunder-predictsthe velocity whilst the third orderschemerapidlyconvergesto thefinemeshsolution.

-0.6

-0.4

-0.2

0

0.2

0.4

0 0.2 0.4 0.6 0.8 1

V v

eloc

ityÐx

FOU Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia

-0.6

-0.4

-0.2

0

0.2

0.4

0 0.2 0.4 0.6 0.8 1

V v

eloc

ityÐx

QUICK Differencing

19x19

27x27

35x35

51x51

67x67

99x99

131x131

Ghia

Figure4.9: Profilesof the � velocity alongthehorizontalcentreline,calculatedusingtheFOU (left)andQUICK (right) differencingschemesfor arangeof meshsizes,andcomparedwith thebenchmarksolutionsof Ghiaet al.

Page 17: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 109

4.4.2 The Natural Convection Flow

Anothercommonlyencounteredbenchmarkis onemodellingnaturalconvectionin atwo-dimensionalsquarecavity, with isothermalconductingsidewalls andadiabaticupperandlower boundaries.Thenon-dimensionalnumberscharacterisingtheflow aretheRayleighandPrandtlnumbers,¸�Ñ � "�T � U ° ©[&E � (4.46)ÒJÓ � [E � (4.47)

where[ is thekinematicviscosity, E thethermaldiffusivity, ° thewidth of thecavity,� U thetempera-

turedifferenceacrossthecavity, T thevolumetricthermalexpansioncoefficientand " theaccelerationdueto gravity. For low Rayleighnumbers(ontheorderof ^ 6 © to ^ 6 Ã ) theflow is dominatedby viscos-ity andthefirst orderschemeareadequate,however, for largerRayleighnumbers( Ô ^ 6 Ä ) theerrorsin thefirst orderschemesareexpectedto becomeapparent.

Theearliestanalysesof thisproblemarethoseof Batchelor[9] who drew uponthelittle experimentaldatathatwasavailableat thattime,andPoots[132] who modelledtheflow numerically, usinga handcalculatedspectralmethod,with MissesFaithfull andWatkinsactingas the computationalengine.Two early finite differencemodelsthatwererun on electroniccomputerswerethoseof WilkesandChurchill[180] anddeVahl Davis[29]. Sincethatdatethemethodhasbeenusedasa benchmarkforthecomparisonof naturalconvectioncodes[32, 31], abenchmarksolutionbeinggivenin detailby deVahlDavis in [30, 73], with anothersolutionbeingprovidedby HortmannandPeric[66].

®¯ °

±

²9U � �� U � N ��

"² µ¶µ*µ¶µ¶µ*µ¶µ*µ¶µ¶µ*µ¶µ

µ¶µ*µ¶µ¶µ*µ¶µ*µ¶µ¶µ*µ¶µ

··³³

Figure4.10:Thegeometryfor thenaturalconvectionproblem.

A flow with a Rayleighnumberof ^ 6 Å anda Prandtlnumberof 68�ÕÌ ^ wascalculatedusingthe dif-ferencingschemesdescribedin Chapter2, with calculationsbeingmadeon meshesrangingin sizefrom ^�»x¾q^½» to Ç ^ Ç ¾ Ç ^ Ç cells. Theresultsarecomparedwith thebenchmarksolutionof deVahlDavis[30], who calculatedtheflow usinga vorticity-streamfunctionfinite differencemethodusingacentraldifferenceapproximationon meshesof dimension

� ^i¾ � ^ ��Ö ^�¾ Ö ^ and × ^­¾ × ^ , andusedRichardsonextrapolationto estimateagrid independentsolution.

Page 18: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 110

Figure4.11:Thestreamlines(left) andisotherms(right) for aRa � ^ 6 Å Pr �K6�ØÌ ^ flow calculatedona ^½¼^d¾z^�¼^ meshusingtheULTRA differencingscheme.Streamfunctioncontoursarefor therangeN �#� ¿;Àw¿ 6 at

�intervals,with furthercontoursat N � ¼ and N � ¼ � ^ . Temperaturecontoursarefor

theinterval  68� Ç at 6� 6 Ç intervals.

Figure4.12: Thestreamlinesandisothermsfor a Ra � ^ 6 Å Pr �Ù68�ÕÌ ^ flow calculatedon a ¼ Ç ¾§¼ Çmeshusingthe FOU scheme(top) andtheULTRA scheme(bottom). Streamlinesareat

�intervals

betweenN � Í ¿¶Àe¿ 6 . Isothermsareat 6� 6 Ç intervalsbetween 6� Ç

Page 19: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 111

Thestreamlinesandtemperaturefield for theflow calculatedon a ^�¼8^�¾W^�¼8^ meshusingtheULTRAdifferencingschemeareshown in Figure4.11,with the and ( componentsof velocity, thevelocitymagnitude,andthevorticity beinggivenin Figure4.14.Theflow is rotationallysymmetricaboutthecentreof thecavity, with a jet of fluid attachedto thewalls of thecavity surroundinga comparativelymotionlessbody of fluid at the centreof the cavity. The velocity is at a maximumin the narrowboundarylayersadjacentto the left and right walls, where the fluid is heatedand cooledby theboundary. Thesethermallydrivenboundarylayersdischarge jets of fluid alongthe top andbottomwalls, which thickenasthey travel alongthe adiabaticwalls, sheddingtheir velocity in the process.The vertical boundarylayersaredrivenby the sharptemperaturegradientsthat exist at the left andright walls, andthehorizontaljetsarecomparatively isothermal.Thecomparatively stationaryfluidin thecentreof thecavity is stablystratifiedwith a linear temperaturegradientexisting betweentheupperandlower jets.

The fine meshsolutionsin Figure4.11 may be comparedwith the solutionscalculatedon a ¼ Ç ¾¼ Ç meshusing the FOU andULTRA schemes,given in Figure4.12. The ULTRA solution is verysimilar to theconvergedsolution,whilst theerrorsin theFOUschemearequiteminor. Thefirst orderschemeoverestimatesthestrengthof theflow acrossthecavity, underestimatesthetemperatureof thehorizontaljets,anddoesn’t capturethesharpnessof thetemperaturegradientsandstreamlinesin thetop left/bottomright cornersof thecavity.

0.315

0.325

0.335

0.345

0.355

0.365

0 0.01 0.02 0.03 0.04 0.05 0.06

Tem

pera

tureÚ

Mesh Size

FOU

Hybrid

Power

Central

SOU

MSOU

QUICK

ULTRA

de Vahl Davis

Figure4.13: The temperatureat the top boundaryon the vertical centrelineof the cavity. For eachof thedifferencingschemesthecalculatedtemperatureis plottedasa functionof themeshsize

� .Thecalculatedtemperaturesconvergeto thesolutionof deVahlDavis, whichwasapproximatedfor ameshof

� �76 usingRichardsonextrapolation.

The convergenceof the temperatureat the top boundaryon the vertical centrelineis shown in Fig-ure4.13, with the calculatedwall temperaturebeingplotted asa function of the grid size. As themeshis refinedthe solutionsconvergeto the extrapolatedsolutionof deVahl Davis. Excludingthecoarsestmeshsolutionscalculatedon a ^�»¬¾�^½» grid, the convergenceis quite regularandsmooth,justifying the useof Richardsonextrapolation. It is interestingto notethat the SOU schemeis thefastestconvergingscheme,whilst theFOU schemeunderpredictsthetemperature,all otherschemesoverpredictingthe temperature.Surprisingly, thefirst orderPower schemeis fasterconverging thanall of thesecondandthird orderschemes,with theexceptionof theSOUmethod.This is theoppositeof thecasewith thedrivencavity benchmark,andwasnot anexpectedoutcomeof thetest.

Thisunexpectedaccuracy of thePowerschemeis thoughtto arisefrom thevelocityfield beinglargely

Page 20: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 112

alignedwith the meshalongthe vertical andhorizontalboundariesof the cavity. Sincethe flow islargely parallelto the meshaxis the error arisingfrom falsediffusion in the lower orderschemesisminimised.

Figure4.14: Contoursof velocity componentsin the and ( axis( � top left, � top right), andof thevelocity magnitudeandvorticity ( È � È bottomleft, É bottomright), for a Ra � ^ 6 Å Pr �Û68�ÕÌ ^ flowcalculatedon a ^�¼8^O¾�^�¼8^ meshusingtheULTRA differencingscheme.Velocity contoursareat

� 6intervalsbetween ¼ 6#6 , with extra contoursat ÂdÇ �  ^ 6 and  ¼ 6 . Vorticity contoursareat

� ¾q^ 6 ©intervalsbetween � ¾W^ 6 à , with extra contoursat ^ 6 © and  ¼i¾P^ 6 © .Finally theprofilesof velocity alongtheverticalandhorizontalcentrelinesareplottedfor theFOU,Power, CentralandULTRA differencingschemesin Figures4.15and4.16.TheFOUschemeoverpre-dictsthe � velocityontheverticalcentreline,but all otherschemesquickly convergeto thebenchmarksolution. Thesameis trueof theverticalvelocity profilesin thehorizontalcentrelineshown in Fig-ure4.16.

Page 21: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 113

0

0.2

0.4

0.6

0.8

1

-120 -80 -40 0 40 80 120

yÎU velocity

FOU Differencing

19x19

35x35

67x67

131x131

259x259

515x515

de Vahl Davis0

0.2

0.4

0.6

0.8

1

-120 -80 -40 0 40 80 120

yÎU velocity

Power Differencing

19x19

35x35

67x67

131x131

259x259

de Vahl Davis

0

0.2

0.4

0.6

0.8

1

-120 -80 -40 0 40 80 120

yÎU velocity

Central Differencing

35x35

67x67

131x131

259x259

de Vahl Davis0

0.2

0.4

0.6

0.8

1

-120 -80 -40 0 40 80 120

yÎU velocity

ULTRA Differencing

19x19

35x35

67x67

131x131

259x259

de Vahl Davis

Figure4.15: Profilesof the � velocity alongthe vertical centreline,calculatedfor a rangeof meshsizesandcomparedwith the benchmarksolutionsof de Vahl Davis. The solutionsarecalculatedusing(clockwisefrom top left), FOU,Power, ULTRA andCentraldifferencing.

-300

-200

-100

0

100

200

300

0 0.2 0.4 0.6 0.8 1

V v

eloc

ityÐx

FOU Differencing

19x19

35x35

67x67

131x131

259x259

515x515

de Vahl Davis

-300

-200

-100

0

100

200

300

0 0.2 0.4 0.6 0.8 1

V v

eloc

ityÐx

Power Differencing

19x19

35x35

67x67

131x131

259x259

de Vahl Davis

-300

-200

-100

0

100

200

300

0 0.2 0.4 0.6 0.8 1

V v

eloc

ityÐx

Central Differencing

35x35

67x67

131x131

259x259

de Vahl Davis

-300

-200

-100

0

100

200

300

0 0.2 0.4 0.6 0.8 1

V v

eloc

ityÐx

ULTRA Differencing

19x19

35x35

67x67

131x131

259x259

de Vahl Davis

Figure4.16: Profilesof the � velocity alongthehorizontalcentreline,calculatedfor a rangeof meshsizesandcomparedwith thebenchmarksolutionsof deVahlDavis. Thesolutionsarecalculatedusing(clockwisefrom top left), FOU,Power, ULTRA andCentraldifferencing.

Page 22: Solution of the Navier–Stokes Equations

CHAPTER4. SOLUTION OF THE NAVIER–STOKESEQUATIONS 114

4.5 Conclusions

Theflow of fluid maybemodelledwith theNavier–Stokesequations,whichdescribetheconservationof massandmomentumin a fluid. Theequationsarenonlinearandcoupled,andsomemethodmustbefoundto solve themfor thevelocityandpressurefields,giving a solutionthatconservesmassandmomentum.

In thischaptertwo couplingschemeshavebeendescribed.It is arguedthatthefirst ismoreefficientforcalculatingsteadyflows,whilst thesecondis moreefficient in thesolutionof transientflow problems.Themethodshavebeenimplementedin aCFDcode,andthesteadyflow solverhasbeenusedto solvetwo benchmarktestproblems,bothasa testof thecouplingscheme,andin additionasa furthertestof theadvectiondifferencingschemesdescribedin Chapter2.

For bothproblemsthesolutionsobtainedconvergedto thebenchmarkasthemeshwasrefined.Thissuggeststhatthediscretisationandcouplingcodeis correctlymodellingtheNavier–Stokesequationsandthermaltransportequationfor steadyflows. All differencingschemesseemedto convergeto thebenchmarksolutionasthe meshwasrefined,althoughthe rateof convergencevarieddependingontheproblemandthedifferencingscheme.

For the Natural Convectionbenchmarkall schemesconvergedrapidly to the benchmarksolution,with the SOU and Power differencingschemesshowing the fastestconvergence. In contract,fortheDrivenCavity problemthePower, ExponentialandFOU schemesweretheslowestto converge,the secondorderschemesconvergedrapidly, whilst the third orderschemeswerefastestof all. Thedifferencein theratesof convergencebetweenthe two benchmarkingproblemsis thoughtto bedueto thealignmentof theflow with themesh;for theNaturalConvectionbenchmarktheflow is mostlyparallelto themesh,andso the falsediffusionfrom thefirst orderschemesis minimised.However,for the Driven Cavity problemmuchof the flow is at an angleto the meshaxes,andso the falsediffusionis morelikely to manifestitself. As suchtheDrivenCavity problemis a muchmoreseveretestof thedifferencingschemesthantheNaturalConvectionbenchmark,andit morereadily revealstheinadequaciesin thefirst orderdifferencingschemes.


Recommended