32
Chapter 5 Finite Volume Methods for Non-Orthogonal Meshes For most fluid mechanics problems of interest to Engineers the geometry of the problem can not be represented by a Cartesian mesh. Instead it is common for the boundaries to be curved in space. The Cartesian finite volume methods described in Chapters 2 and 4 must be extended to a non-orthogonal mesh to allow non-rectangular geometries to be accurately modelled. A structured mesh is topologically rectangular, but may be deformed in space such that it is no longer Cartesian. Such a mesh may still be orthogonal, with the intersections of the mesh lines being at , but such a mesh can be difficult to generate, and so a completely general mesh will be non-orthogonal with no restriction on the angles of the intersections of the mesh lines. In this chapter the finite volume discretisation of the transport equation on a non-orthogonal mesh is discussed in five parts. First there is a description of the geometry of the mesh, which is followed by the discretisation of the Diffusion terms of the transport equation. The advective terms will then be discretised and the boundary conditions described. Finally the solution of the Navier–Stokes equations on a non-orthogonal mesh will be described, using the SIMPLE scheme discussed in Chapter 4. The method used to discretise the equations is similar to that described by Jones[72] and Peri´ c[129, 43]. 5.1 The Geometry of a Non-Orthogonal Mesh The calculation of the geometric properties of a non-orthogonal mesh is non-trivial, and so it deserves discussion before discretising a PDE upon the mesh. Both two and three dimensional meshes are dis- cussed, the simplifications arising from the use of a two-dimensional mesh warranting their separate discussion. A non-orthogonal regular two-dimensional mesh is shown in Figure 5.1, with the mesh being shown in both computational and physical space. In computational space the coordinate space is represented by the axes, whilst in physical space the axis system is used, with there being a one to one mapping between the two coordinate systems. For a finite volume discretisation the mesh is defined by the cell vertex points. From these points we wish to find the cell centre, the centre of the cell faces, the area vectors of the cell faces, and the cell volume. For the code used in this study the cell centre and the centre of the cell faces were approximated by 115

adt-NU20010730.12021506_chapter_5

Embed Size (px)

DESCRIPTION

tyrtyr

Citation preview

Page 1: adt-NU20010730.12021506_chapter_5

Chapter 5

Finite Volume Methods forNon-Orthogonal Meshes

For mostfluid mechanicsproblemsof interestto Engineersthegeometryof theproblemcannot berepresentedby a Cartesianmesh.Insteadit is commonfor theboundariesto becurvedin space.TheCartesianfinite volumemethodsdescribedin Chapters2 and4 mustbeextendedto a non-orthogonalmeshto allow non-rectangulargeometriesto beaccuratelymodelled.

A structuredmeshis topologicallyrectangular, but maybedeformedin spacesuchthatit is no longerCartesian.Sucha meshmaystill beorthogonal,with theintersectionsof themeshlinesbeingat

,

but suchameshcanbedifficult to generate,andsoacompletelygeneralmeshwill benon-orthogonalwith no restrictionon theanglesof theintersectionsof themeshlines.

In this chapterthefinite volumediscretisationof thetransportequationon a non-orthogonalmeshisdiscussedin five parts.First thereis a descriptionof thegeometryof themesh,which is followedbythe discretisationof theDiffusion termsof the transportequation.Theadvective termswill thenbediscretisedandtheboundaryconditionsdescribed.Finally thesolutionof theNavier–Stokesequationson a non-orthogonalmeshwill bedescribed,usingtheSIMPLE schemediscussedin Chapter4. Themethodusedto discretisetheequationsis similar to thatdescribedby Jones[72] andPeric[129, 43].

5.1 The Geometryof a Non-Orthogonal Mesh

Thecalculationof thegeometricpropertiesof anon-orthogonalmeshis non-trivial, andsoit deservesdiscussionbeforediscretisingaPDEuponthemesh.Both two andthreedimensionalmeshesaredis-cussed,thesimplificationsarisingfrom theuseof a two-dimensionalmeshwarrantingtheir separatediscussion.

A non-orthogonalregulartwo-dimensionalmeshis shown in Figure5.1,with themeshbeingshownin bothcomputationalandphysicalspace.In computationalspacethecoordinatespaceis representedby the axes,whilst in physicalspacethe axissystemis used,with therebeinga onetoonemappingbetweenthetwo coordinatesystems.

For a finite volumediscretisationthemeshis definedby thecell vertex points.Fromthesepointswewish to find thecell centre,thecentreof thecell faces,theareavectorsof thecell faces,andthecellvolume.

For thecodeusedin this studythecell centreandthecentreof thecell faceswereapproximatedby

115

Page 2: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 116

"! ! ! ! # # # # ! ! ! ! # # # # ! ! ! ! # # # # "! ! ! ! # # # #$ $% %& &&'''

$ $% %& &&'''

$ $% %& &&'''

$ $% %& &&'''

( ( ( ( ) ) ) ) * * * * + + + +

( ( ( ( ) ) ) ) * * * * + + + +

, ,.- -/ //000

, ,1- -/ //000

2

Figure5.1: Two Dimensionalgrid in computationalspace(top)andphysicalspace(bottom).

theaverageof thecell vertex values.Whilst this doesn’t give thegeometriccentroidof thecell it wasconsideredareasonableapproximation.

For two dimensionalcells thecell faceareavectorscanbecalculatedasthecrossproductof thecellfaceandthe vectornormalin the directionof a third (fictitious) axis. Thusfor the eastfacefor thecell in Figure5.2 thecell facevectoris 35468794;:6=<>4?6 (5.1)

andsothefaceareais @ 6 7A354 6CBEDGF(5.2)

In componentform this becomes H 6JI 7 3 6 H 6LK 7 <C3 6MF (5.3)

Thevolumeof thecell, N , canbeeasilycalculatedashalf themagnitudeof thecrossproductof thecell diagonals,thevolumeof thecell in Figure5.2beingN 7POQSRRUT 4;:6V<>4?LWYX B T 4;:.WZ<[4?J6\X RR F (5.4)

It is prudentto usethe magnitudeof the volumeto prevent the inadvertentcalculationof negativevolumes.

For a threedimensionalmeshthecell faceareasarefoundashalf thecrossproductof thefacediago-nals,sofor thecell facein Figure5.3thefaceareais givenby@ 7 OQ T^] BE_ X F (5.5)

Page 3: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 117

P

sw

nw

se

ne

A e

x

y

Figure5.2: Thegeometryof a two-dimensionalcell.

A

x

y

z

a

b

n

nx

Figure5.3: Thegeometryof a three-dimensionalcell, andthecalculationof the areaof onefaceofthecell.

Thevolumeof thecell canbecalculatedby integratingthefaceareaover thesurfaceof thecell usingtheGaussdivergencetheorem.Thevolumeof thecell is thusN 7 O` RRR a : @ :F 4 : RRR (5.6)

where@ :

is thevectorareaof thefaceb foundwith Equation(5.5),and4;:

is thecentroidof thefaceb .5.2 TheDiscretisationof theDiffusion TermsonaNon-Orthogonal

Mesh

To discretisethediffusionequationon a non-orthogonalmeshwe needto find anapproximationforthediffusive flux acrossa faceof a meshvolumein a mannersimilar to thatusedin Section2.2. Forour examplewe will take theeasternfaceof a cell, but theprocesscanbeappliedto any faceof thevolume. Thegeometryof the facein physicalspaceis shown in Figure5.4 alongwith thegeometryin computationalspace.

FromFick’s law thediffusiveflux is givenby cCdfed b (5.7)

whereb is thedirectionnormalto thesurface.If@ :

is theareavectorof theface,andH :g7ih @ :;h

is

Page 4: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 118

P

W

E

N

NE

S

SE

x

y

ηξ

AA11

12

Figure5.4: Theareavectorsof theeasternfaceof a two-dimensionalmesh.

themagnitudeof thefacearea,thenthetotal flux acrossthefaceis approximatedbyH : cjdfed b F (5.8)

The areaH :

is easilycalculatedfrom the meshgeometryaswasdescribedin the previoussection,andc

is a givenproperty, soall thatremainsis to approximatethederivative kMlk : . We canreadilyap-proximatethederivativesin thecomputationalaxes or usingcentreddifferenceapproximations.Unfortunatelyfor a non-orthogonalmeshthefacenormalis not necessarilyin thedirectionof any ofthemeshaxes or , but it canbeapproximatedusingthederivativesin themeshaxesby useofthechainrule dfed b 7 d d b dfed nm d d b ded Zm d d b dfed F (5.9)

As wasmentioned,thederivativesof e in computationalspacecanbeapproximatedby centreddif-ferenceapproximations,which for theeastfaceof thecell maybewrittenasdfed o eqp < er dfed o e :16 < e ?J6 o Os T et m etup < ev < evp X dfed o exw 6=< ey 6 o Os T ez m ez p < e < e p X

(5.10)

notingthatfor a unit cell in computationalspace,3 7A3 7|~M2J 7 F

The meshtransformationtermscanbe calculatedfrom a dot productof the cell faceunit normal andthecontravariantbasisvectors ~ O 7 d d 4 ~ Q 7 d d 4 ~ ` 7 d d 4

(5.11)

Page 5: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 119

with d d b 7 d d 4 F Vd d b 7 d d 4 F Vd d b 7 d d 4 F V(5.12)

andwith theunit normalbeinggivenby 7 @ :h @ :h F (5.13)

e

e e

e

2 1

12

Figure5.5: Thecovariant~ O ~ Q andcontravariant

~ O ~ Q basisvectorsfor theeasternfaceof a cell ina two-dimensionalmesh.

Unfortunatelythecontravariantbasisvectors~ O ~ Q ~ ` (shown in Figure5.5)which arenormalto the meshsurfacesareunknown. However, anapproximationto thecovariantbasisvectors,which

aretangentialto the surfaces ~ O 7 d 4d ~ Q 7 d 4d ~ ` 7 d 4d (5.14)

canbereadilycalculatedfrom themeshgeometry. Thuswe wish to estimatethecontravariantbasisvectorsfrom their covariantcounterparts.

By consideringaparallelepipedformedat theeastfaceof a cell by thecovariantvectors(Figure5.6),we canapproximatethe contravariantvectorsfrom the ratio of the faceareasto the volumeof theparallelepiped.Thus ~ O 7 d d 4 o @ ON ~ Q 7 d d 4 o @ QN ~ ` 7 d d 4 o @ `N F

(5.15)

Thefaceareasareeasilycalculatedby takingthecrossproductsof thecovariantbasisvectors,whilstthevolumeis calculatedfrom thedotproductof thenormalareaand

~ O ,@ O 7 ~ Q B ~ ` @ Q 7 ~ ` B ~ O @ ` 7 ~ O B ~ Q N 7 @ O F ~ O F (5.16)

Page 6: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 120

@ Ois equivalentto thecell facenormalpreviouslydenotedas

@ :.

Ω

A

A

2

1

Figure5.6: Theparallelepipedformedat theeastfaceof acell by thecovariantvectors.

Substitutingtheapproximationsin Equation(5.15)into (5.12)givesd d b 7 @ ON F @ Oh @ O h d d b 7 @ QN F @ Oh @ O h d d b 7 @ `N F @ Oh @ O h (5.17)

where@ O

hasbeensubstitutedfor@ :

. One final simplification is available from Equation(5.8)whereit is seenthat the derivativesmultiplied by the facearea

h @ O harerequired.Substitutinginto

Equation(5.17)givestheexpressionsfor thegeometricdiffusioncoefficients for theeastface(orface1), O 7 @ O F @ ON Q 7 @ O F @ QN ` 7 @ O F @ `N (5.18)

where h @ : h ded b 7 O dfed m Q dfed m ` dfed F (5.19)

Similar expressionscanbe derived for the north and top faces(faces2 and3) of the cell, and thederivativesnormalto thesefacescanbeapproximatedas

RR @ OO RR ded b O 7 OO dfed RRRR O m O Q ded RRRR O m O ` dfed RRRR O RR @ QQ RR ded b Q 7 Q O dfed RRRR Q m QQ ded RRRR Q m Q` dfed RRRR Q RR @ `` RR ded b ` 7 ` O dfed RRRR ` m `Q ded RRRR ` m `` dfed RRRR ` (5.20)

where b is the normalof the face,@

is the areaof the face,the geometricdiffusioncoefficients aregivenby 7 @ F @ N (5.21)

Page 7: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 121

andthefollowing approximationsareusedfor thederivativesin computationalspacedfed RRRR O o e p < e r dfed RRRR O o Os T e t m e tup < e v < e vp X dfed RRRR O o Os T ez m ez p < e < e p X (5.22)

dfed RRRR Q o Os T ep m etup < e < et8 X dfed RRRR Q o et < er dfed RRRR Q o Os T ez m eqz t < e < eq t X (5.23)

ded RRRR ` o Os T e p m ez p < e < ez X ded RRRR ` o Os T e t m ez t < e v < ez v X ded RRRR ` o ez < e r F(5.24)

Theareasandcell geometricdiffusioncoefficientsarepropertiesof thefacesof thecell. Thusthereareareavectors

@ O locatedat both the eastandwestfacesof the cell, with theareasin bothcases

being definedpointing out of the cell. The areaterms@ O

for the eastfaceof the cell are thenegativeof the

@ O areasof thewestfaceof thecell . Thegeometricdiffusioncoefficient is always

positive,andis thesamefor thefaceregardlessof whetherthefaceis beingconsideredtheeastfaceof cell of thewestfaceof cell .

For theimplementationof thenon-orthogonalmeshsolver thefacegeometricpropertiesfor thehighsidefacesof eachcell (theeast,northandtop faces)arecalculatedandstored.Thesepropertiesaredenoted

@ O 6 @ Q : @ ` w O 6 Q : and ` : . Thevaluesfor thelow faces@ O W Q ? arethentakenfrom

thehigh facesof theneighbouringcells.

Usingtheapproximationsfor thederivativesnormalto thecell faces,thediffusivetermin thetransportequation(Equation(2.1)) T c e X (5.25)

canbediscretisedandfactorisedinto a linearsystem@ e (5.26)

wheretheindividualequationscanbeexpandedas r e r m p e p m e m t e t m v e v m z5eqz m gem tup e tup m t e t m v1p e vp m v e vm z t ez t m z v eqz v m t e t m v e vm z p ez p m z ez m p eq p m e (5.27)

Page 8: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 122

andwheretheequationcoefficientsaregivenby p 7 OO6 m Os T Q O: < Q O? m ` Ow < ` Oy X 7 OOW < Os T Q O: < Q O? m ` Ow < ` Oy X t 7 QQ: m Os T O Q6 < O QW m `Qw < Q`y X v 7 QQ? < Os T O Q6 < O QW m `Qw < Q`y X z 7 ``w m Os T O `6 < O `W m Q`: < Q`? X 7 ``y < Os T O `6 < O `W m Q`: < Q`? X r 7 OO6 m OOW m QQ: m QQ? m ``w m ``y tup 7 Os T O Q6 m Q O: X t 7 < Os T O QW m Q O: X vp 7 < Os T O Q6 m Q O? X v 7 Os T O QW m Q O? X z t 7 Os T Q`: m `Qw X z v 7 < Os T Q`? m `Qw X t 7 < Os T Q`: m `Qy X v 7 Os T Q`? m `Qy X z p 7 Os T O `6 m ` Ow X z 7 < Os T O `W m ` Ow X p 7 <Os T O `6 m ` Oy X 7 Os T O `W m ` Oy X F

(5.28)

For a two dimensionalsystemtheslightly moremanageablediscretisationis r e r m p e p m e m t e t m v e vm tup e tup m t e t m vp e vp m v e v (5.29)

with theequationcoefficients p 7 OO6 m Os T Q O: < Q O? X 7 OOW < Os T Q O: < Q O? X t 7 QQ: m Os T O Q6 < O QW X v 7 QQ? < Os T O Q6 < O QW X r 7 OO6 m OOW m QQ: m QQ? tup 7 Os T O Q6 m Q O: X t 7 <Os T O QW m Q O: X vp 7 <Os T O Q6 m Q O? X v 7 Os T O QW m Q O? X F(5.30)

The computationalmoleculefor the Cartesianequationsgiven in Section2.2 contained5 pointsforthetwo-dimensionalmesh,and7 pointsin three-dimensions.With theadditionof theextra termsforthenon-orthogonaldiffusionthesemoleculeshave expandedto 9 and19 membersin two- andthree-dimensionsrespectively. To allow the useof the linear solversdevelopedfor Cartesianmeshes,thesystemcanbecalculatedusinga deferredcorrectionscheme,with theextra diffusive termsfrom the L termsbeingabsorbedinto thesourcetermof theequation.Thusthesystemin Equation(5.26)canberewrittenas @ e m e (5.31)

with@

containingthe orthogonalcomponents,and the non-orthogonalcomponents.For a three

Page 9: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 123

dimensionalsystemtheequationcoefficientsare p 7 OO6 7 OOW t 7 QQ: v 7 QQ? z 7 ``w 7 ``y r 7 OO6 m OOW m QQ: m QQ? m ``w m ``y p 7 Os T Q O: < Q O? m ` Ow < ` Oy X 7 <Os T Q O: < Q O? m ` Ow < ` Oy X t 7 Os T O Q6 < O QW m `Qw < Q`y X v 7 < Os T O Q6 < O QW m `Qw < Q`y X z 7 Os T O `6 < O `W m Q`: < Q`? X 7 <Os T O `6 < O `W m Q`: < Q`? X r 7 t=p 7 Os T O Q6 m Q O: X t8 7 <Os T O QW m Q O: X v1p 7 < Os T O Q6 m Q O? X v 7 Os T O QW m Q O? X z t 7 Os T Q`: m `Qw X z v 7 < Os T Q`? m `Qw X t 7 < Os T Q`: m `Qy X v 7 Os T Q`? m `Qy X z p 7 Os T O `6 m ` Ow X z 7 <Os T O `W m ` Ow X p 7 < Os T O `6 m ` Oy X 7 Os T O `W m ` Oy X

(5.32)

whilst for a two dimensionalsystemthetermsfor thethird axisaredroppedandtheequationsare p 7 OO6 7 OOW t 7 QQ: v 7 QQ? r 7 OO6 m OOW m QQ: m QQ? p 7 Os T Q O: < Q O? X 7 <Os T Q O: < Q O? X t 7 Os T O Q6 < O QW X v 7 < Os T O Q6 < O QW X r 7 tup 7 Os T O Q6 m Q O: X t 7 < Os T O QW m Q O: X vp 7 <Os T O Q6 m Q O? X v 7 Os T O QW m Q O? X F

(5.33)

For anorthogonalmeshthedot product@ U F @

is only non-zerowhen 7 . Thusfor sucha mesh

Page 10: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 124

the geometricdiffusioncoefficients areonly non-zerofor 7 , andEquations(5.20) to (5.24)reduceto therathermoremanageablesystemof

RR @ OO RR dfed b O 7 OO ded RRRR O RR @ QQ RR dfed b Q 7 QQ ded RRRR Q RR @ `` RR dfed b ` 7 `` ded RRRR ` (5.34)

with dfed RRRR O o ep < er (5.35)dfed RRRR Q o et < er (5.36)dfed RRRR ` o ez < e r F (5.37)

For sucha system 7 , andthediscretisedequationcanbewrittenas,@ e (5.38)

wheretheequationcoefficientsfor a two dimensionaldiscretisationaregivenby p 7 OO6 7 OOW t 7 QQ: v 7 QQ? r 7 OO6 m OOW m QQ: m QQ? (5.39)

whilst for a threedimensionaldiscretisationthey become, p 7 OO6 7 OOW t 7 QQ: v 7 QQ? z 7 ``w 7 ``y r 7 OO6 m OOW m QQ: m QQ? m ``w m ``y F(5.40)

For anorthogonalmeshthatis Cartesian,thegeometricdiffusioncoefficients U for theabovesystemare OO 7 3 F 3 6 QQ 7 3 F 3 : `` 7 3 F 3 w (5.41)

andtheequationsreduceto thosegivenin Section2.2.

Page 11: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 125

5.3 The Discretisation of the Advective and Source Terms on aNon-Orthogonal Grid

It now only remainsto discretisetheadvectionandsourcetermsto completethediscretisationof thetransportequationon a non-orthogonalmesh.Thesourcetermsaretreatedin anidenticalmannertothatusedfor a Cartesianmesh,with thecell centrevaluebeingtakenastheaveragefor thecell asawhole,andsotheintegral for thesourceover thecell is approximatedas¡ N o r N F (5.42)

Theadvectivefluxesin thetransportequation T¢£ e X (5.43)

areapproximatedin the samemanneraswasusedwith the Cartesiandiscretisationsgiven in Sec-tion2.2,with thefacevalueof e beinginterpolatedon theregularmeshin computationalspace.Theonly differencebetweentheCartesianandnon-orthogonalgeometrydiscretisationis thecalculationof thefacemassflux. For theCartesianmeshthemassflux is calculatedas ¢ H¥¤ , where

His thearea

and¤

is thevelocity normalto theface.For thenon-orthogonalmeshthemassflux is insteadcalcu-latedfrom the dot productof the velocity andthe faceareanormal,andsoall velocity componentsmustbeinterpolatedto thefaces.Themassflux for east,northandtop facesarethengivenby,¦ 6 7 ¢T£ 6 F @ OO6 X ¦ : 7 ¢T£ :F @ QQ: X ¦ w 7 ¢T£ w F @ ``w X F (5.44)

For a Cartesianmeshtheseexpressionsreduceto¦ 6 7 ¢ ¤ 6 H 6 ¦ : 7 ¢V§ : H : ¦ w 7 ¢V¨ w H w (5.45)

which weretheexpressionsgivenin Equation(2.17).

The full discretisationof the transportequationon a non-orthogonalmeshcan now be given. Byapproximatingthe advective fluxeswith the centraldifferencescheme,which wasdescribedfor aCartesianmeshin Section2.2.3,thesteadytransportequationcanbediscretisedas@ e m© e 7«ª F (5.46)

For a discretisationof thetwo-dimensionaltransportequationtheindividual coefficientsof the@

Page 12: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 126

andª

arraysare, p 7 < OO6 m OQ ¦ 6 7 < OOW < OQ ¦ W t 7 < QQ: m OQ ¦ : v 7 < QQ? < OQ ¦ ? z 7 < ``w m OQ ¦ w 7 < ``y < OQ ¦ y r 7 < T p m m t m v X m T ¦ 6V< ¦ W m ¦ :5< ¦ ?¬X ­ 7 r N® p 7 Os T Q O: < Q O? X 7 < Os T Q O: < Q O? X t 7 Os T O Q6 < O QW X v 7 <Os T O Q6 < O QW X r 7 t=p 7 Os T O Q6 m Q O: X t8 7 < Os T O QW m Q O: X v1p 7 < Os T O Q6 m Q O? X v 7 Os T O QW m Q O? X F

(5.47)

For a discretisationof thethreedimensionaltransportequationtheequationcoefficientsaregivenby

Page 13: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 127

p 7 < OO6 m OQ ¦ 6 7 < OOW < OQ ¦ W t 7 < QQ: m OQ ¦ : v 7 < QQ? < OQ ¦ ? z 7 < ``w m OQ ¦ w 7 < ``y < OQ ¦ y r 7 < T p m m t m v m z m Xm T ¦ 6 < ¦ W m ¦ : < ¦ ? m ¦ w < ¦ y X ­ 7 r N® p 7 Os T Q O: < Q O? m ` Ow < ` Oy X 7 <Os T Q O: < Q O? m ` Ow < ` Oy X t 7 Os T O Q6 < O QW m `Qw < `Qy X v 7 <Os T O Q6 < O QW m `Qw < `Qy X z 7 Os T O `6 < O `W m Q`: < Q`? X 7 < Os T O `6 < O `W m Q`: < Q`? X r 7 tup 7 Os T O Q6 m Q O: X t 7 <Os T O QW m Q O: X vp 7 < Os T O Q6 m Q O? X v 7 Os T O QW m Q O? X z t 7 Os T Q`: m `Qw X z v 7 < Os T Q`? m `Qw X t 7 < Os T Q`: m `Qy X v 7 Os T Q`? m `Qy X z p 7 Os T O `6 m ` Ow X z 7 < Os T O `W m ` Ow X p 7 < Os T O `6 m ` Oy X 7 Os T O `W m ` Oy X F

(5.48)

Thesesystemsmaybecomparedto theequivalentsystemsgivenin Equations(2.25)and(2.26)for adiscretisationupona Cartesianmesh.Thesystemis solvedusinga deferredcorrectionscheme,withthe arraybeingmultipliedby thepreviousiterationsvalueof the e field andabsorbedinto therighthandside,sothatatany giveniterationsystembeingsolvedby thelinearsolver is@ e 7«ª< eq¯° ± (5.49)

where e ¯° ± is thepreviousiterationssolution.

For anorthogonalmesh 7 , andsothetwo andthreedimensionaltransportequationsreduceto@ e 7ª (5.50)

Page 14: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 128

wherethecoefficientsfor a two-dimensionaldiscretisationare p 7 < OO6 m OQ ¦ 6 7 < OOW <²OQ ¦ W t 7 < QQ: m OQ ¦ : v 7 < QQ? < OQ ¦ ? z 7 < ``w m OQ ¦ w 7 < ``y <²OQ ¦ y r 7 < T p m m t m v X m T ¦ 6 < ¦ W m ¦ : < ¦ ? X ­ 7 r N®(5.51)

andfor a threedimensionaldiscretisation,theequationcoefficientsaregivenby p 7 < OO6 m OQ ¦ 6 7 < OOW < OQ ¦ W t 7 < QQ: m OQ ¦ : v 7 < QQ? <²OQ ¦ ? z 7 < ``w m OQ ¦ w 7 < ``y <²OQ ¦ y r 7 < T p m m t m v m z m Xm T ¦ 6 < ¦ W m ¦ : < ¦ ? m ¦ w < ¦ y X ­ 7 r N F(5.52)

5.4 Boundary Conditions for a Non-Orthogonal Mesh

The boundaryconditionsfor a discretisationon a non-orthogonalmeshare similar to thosefor aCartesianmesh,exceptfor Neumannboundarieswhichhaveextracrossderivativecomponentsin thecalculationof thegradientnormalto theboundary.

Consideringthecasefor aneasternboundary, asillustratedin Figure5.7,aDirichlet boundarycondi-tion wherethevalueof thescalaris specifiedat theboundaryase 7 ey (5.53)

resultsin anequationfor theboundarynodeof theforme p 7³ ey < e r (5.54)

which canbesubstitutedinto theequationfor point givenin Equations(5.27)and(5.29).

For Neumannboundaryconditionsthegradientnormalto thefaceis specified,dfed b 7 e´y F (5.55)

The normalgradientis given in Equation(5.20)above, andthis is substitutedinto the systemat theboundarynodes. The non-orthogonalterms involving cross-derivatives at the facesare normallysolvedusingthedeferredcorrectionschemeaswasgivenin Equation(5.31),andsoat any iterationtheboundarygradientmaynot beasspecifiedby Equation(5.55),but for a fully convergedsolutiontheboundaryconditionwill apply.

For discontinuitiesin theboundaryconditions,suchasa stepchangein thespecifiedboundaryvaluefor Dirichlet boundariesalonga face,a changefrom Neumannto Dirichlet boundarieson a face,or a

Page 15: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 129

P

E

b

Figure5.7: Theboundaryof anon-orthogonalmesh.

cornerof themesh,thecentraldifferenceapproximationfor thecrossderivativesin themesh(suchasthosegivenin thesecondandthird equationsin Equation(5.10))will bein error, andinsteadof usingcentraldifferences,onesideddifferencesshouldbeusedasappropriate.

5.5 TheSolutionof theNavier–StokesEquationsonaNon-OrthogonalMesh

For solvingtheNavier–Stokesequationsonanon-orthogonalmeshtherearethreemoreissuesto con-sider. Thefirst concernsthediscretisationof thepressuretermin themomentumequations,theothertermsin theequationbeingtreatedin thesamemannerastheir counterpartsin thegenerictransportequation.Thesecondissueis thepressure-velocitycouplingandthegenerationof anequationfor thepressurecorrection. And finally the interpolationschemeusedto calculatedthe velocity at the cellfacesneedsto beformulated.

5.5.1 Evaluation of the Pressure Gradient Term

The pressureforce on a cell canbe approximatedby the integral of the pressureover the facesofthe cell, the pressureforce on eachfaceactingnormalto that face. Thepressureat the facecanbeapproximatedby aninterpolationof thevaluesat thecentreof thecellsoneithersideof theface.Thusthevalueat theeasternfacecanbeapproximatedas,µ 6 o µ r m µ p³ F

(5.56)

The areaof the easternfaceis given above as@ OO6

, andso the pressureforce on the easternfaceisapproximatedby ¶ 6u7< @ OO6¸· µ r m µ p³ ¹ (5.57)

the negative sign beingdueto the pressureforce actinginwardson the cell, whilst the faceareaisdefinedpointing outwards. Integratingover the six facesof the cell givesthe pressureforce on thecell as

¶ 7 < OQ»º @ OO6 T µ r m µ p X m @ OOW T µ r m µ Xm @ QQ: T µ r m µ t X m @ QQ? T µ r m µ v Xm @ ``w T µ r m µ z X m @ ``y T µ r m µ X¼ F (5.58)

Page 16: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 130

This canbefactorisedto¶ 7 < OQ»º µ p @ OO6 m µ @ OOW m µ t @ QQ: m µ v @ QQ? m µ z @ ``w m µ @ ``y ¼< OQ µ r º @ OO6 m @ OOW m @ QQ: m @ QQ? m @ ``w m @ ``y ¼GF (5.59)

Thesumof theareason thesecondline of Equation(5.59)will bezerofor a closedvolume,andtheexpressionreducesto¶ 7 < OQ5º µ p @ OO6 m µ @ OOW m µ t @ QQ: m µ v @ QQ? m µ z @ ``w m µ @ ``y ¼ F (5.60)

The individual Cartesiancomponentsof this force can then be addedto the sourceterm for eachcomponentof themomentumequation.

5.5.2 Inter polation of the FaceVelocities

The velocity interpolationat the facesis performedin an identicalmannerto the methodusedforCartesianmeshes,describedin Section4.2.2. Themethod,attributedto RhieandChow[139], inter-polatesthesumof thevelocitiesandpressureforces,ratherthaninterpolatingthevelocitiesalone.

Theequationfor theconservationof momentumat thepoint canbewritten in vectorform as,

£ r < r a¾½ @ ½ F µ ½ 7À¿ r < r a: : y : £ : (5.61)

where£ r is thevelocityvectorat thepoint , Á ½ @ ½ F µ ½ is thesumof pressureforcesonthefacesofthecell centredat , and

r is thediagonalelementof thesystemof linearequationsÁ : : y : £ : .Suchanequationexistsfor eachcell in thedomain,andwith Rhie–Chow interpolationit is assumedthata similar equationcanbeapproximatedat the facesof a cell. Thusfor theeasternfaceof a cellthereis anequationof theform,

£ 6V< · r ¹ 6 · a¾½ @ ½ F µ ½ ¹ 6 7 · ¿ r ¹ 6 < · r a: : y : £ : ¹ 6 (5.62)

with similar equationsbeingableto bewritten for thenorthandtop facesof thecell. The left handsideof equation(5.62)at thefaceof thecell is assumedto beequalto a linearinterpolationof thelefthandsidesof theequationsfor the and cellson eithersideof theface,

£ 6Â< · r ¹ 6 · a¾½ @ ½ F µ ½ ¹ 6 7 £ 6V< · r a¾½ @ ½ F µ ½ ¹ 6 (5.63)

wherean overbar T X6 signifiesa linear interpolationof the valuesat the and cell centres.Thevalueof

OÃ\Ä at theeasternfacein theleft handsideof Equation(5.63)canbeapproximatedby alinearinterpolation,andsoanexpressionfor thevelocityat theeasternfaceis

£ 6u7 £ 6 m · r ¹ 6 · aM½ @ ½ F µ ½ ¹ 6 < · r a¾½ @ ½ F µ ½ ¹ 6 F (5.64)

Thesumof thepressureforcesat theeasternfaceis approximatedbyÅ Á ½ @ ½ F µ ½Æ 6 7 º @ OO6 µ p < @ OO6 µ r ¼ m Os º @ QQ6 µ t m @ QQ:Ç µ tup < @ QQ? µ v < @ QQ?JÇ µ vp ¼m Os º @ ``w µ z m @ ``w Ç µ z p < @ ``y µ < @ ``y Ç µ p ¼ (5.65)

Page 17: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 131

where@ QQ6 Ç

is the facearea@ QQ6

for the cell . Thepressureforceson the cells and aregivenby Equation(5.60),andso all the termsin Equation(5.64)aredefinedandthe facevelocity canbecalculated.The velocitiesfor the north andtop facescanbe interpolatedusingsimilar expressions,andsothefacemassfluxescanbecalculatedusingEquation(5.44),¦ 6 7 ¢ º @ OO6 F £ 6 ¼ ¦ : 7 ¢ º @ QQ: F £ : ¼ ¦ w 7 ¢ º @ ``w F £ w ¼ F (5.66)

5.5.3 The Non-Orthogonal Pressure Corr ection Equation

The couplingof the velocity andpressureequationson a non-orthogonalmeshis performedin anidenticalmannerto that describedin Section4.2.1 for Cartesiansystems.The discretisationof theNavier–Stokeshasbeendescribedabove,ashasthemethodusedfor interpolatingthevelocity to thecell faces.Theonly remainingtaskis thederivationof thepressureandvelocitycorrections.

As wasdescribedin Section4.2.1theSIMPLE couplingschemeinvolvesthecalculationof aninitialestimateof thevelocityfield, £GÈ , from which thefacevelocitiesareinterpolated.Thegeneratedfieldwill not generallysatisfythe continuity equation,andsoa pressurecorrectionµ ´ is thencalculated,whichwhenaddedto themomentumequationsresultsin avelocitycorrection£ ´ whichwhichsatisfiesthecontinuityequation.

Theinitial calculationof thevelocityfield is with anequationof theform of r £ Èr m a : : £ È: 7 ¿ m aM½ @ ½ µ ½ F (5.67)

where b signifiesa summationof theneighbouringcells,whilst É is a summationover thecell faces.Thesolutionto this equationwill not generallysatisfythecontinuityequation.We thereforewish toaddthevelocitycorrection£ ´ generatedfrom apressurecorrectionµ ´ , suchthattheresultingvelocityfield £ È m £ ´ satisfiesthecontinuityequation.

Substitutingµ m µ ´ and £ÊÈ m £ ´ into themomentumEquation(5.67)gives r T£ Èr m £ ´r X m a : : T£ È: m £ ´: XY7 ¿ m a ½ @ ½ T µ ½ m µ ´ ½ X F (5.68)

Approximatingtheoff-diagonaltermsin themomentumequationby Equation(5.67)asa : : T^£ È: m £ ´: X o a : : £ È: (5.69)

andthensubtractingthemomentumEquation(5.67)gives r £ ´r 7 a.½ @ ½ µ ´ ½ (5.70)

or £ ´r 7 r a.½ @ ½ µ ´ ½ F (5.71)

Thecorrectionvelocitiesfor theeast,northandtopfacesof thecell arethenfoundby interpolationas

£ ´ 6 7 · r ¹ 6 Å Á ½ @ ½ µ ´ ½ Æ 6 £ ´: 7 · r ¹ : Å Á ½ @ ½ µ ´ ½ Æ : £ ´w 7 · r ¹ w Å Á ½ @½ µ ´ ½ Æ w F

(5.72)

Page 18: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 132

Following the derivationof RhieandChow[139] the crossderivative termsat the facesareignored,sincefor near-orthogonalmeshesthey aresmall, andthe µ ´ field vanishesfor a convergedsolution.Thereforetheexpressionsfor thefacevelocitycorrectionscanbewrittenas

£ ´ 6 7 · r ¹ 6 @ OO6 µ ´p < µ ´r³ £ ´: 7 · r ¹ : @ QQ: µ ´t < µ ´r³ £ ´w 7 · r ¹ w @ ``w µ ´z < µ ´r³ F (5.73)

Thediscretisedcontinuityequationcanbewrittenas¦ 6 < ¦ W m ¦ : < ¦ ? m ¦ w < ¦ y 7 F (5.74)

Substitutingin ¦ ½ 7 ¦ Ƚ m ¦ ´ ½ , where¦ Ƚ is theinterpolatedvelocity from the £ È velocityfield, and¦ ´ ½ is themassflux correctiondefinedas ¦ ´ ½ 7 ¢ @ ½ £ ´ ½ , andrearranginggives

¢ @ OO6 F @ OO6 µ ´p < µ ´r r 6 < ¢ @ OOW F @ OOW µ ´r < µ ´ r W m ¢ @ QQ: F @ QQ: µ ´t < µ ´r r : < ¢ @ QQ? F @ QQ? µ ´r < µ ´ v r ?m ¢ @ ``w F @ ``w µ ´z < µ ´r r w < ¢ @ ``y F @ ``y µ ´r < µ ´ r y 7 ¦ W¥< ¦ 6 m ¦ ?V< ¦ : m ¦ y < ¦ w F(5.75)

This canbefactorisedas r µ ´r m p µ ´p m µ ´ m t µ ´t m v µ ´ v m z µ ´z m µ ´ 7 ­ (5.76)

where p 7 @ OO6 F @ OO6 r 6 7 @ OOW F @ OOW r W t 7 @ QQ: F @ QQ: r : v 7 @ QQ? F @ QQ? r ? z 7 @ ``w F @ ``w r w 7 @ ``y F @ ``y r y r 7 < T p m m t m v m z m X ­ 7 T ¦ W < ¦ 6 m ¦ ? < ¦ : m ¦ y < ¦ w X F

(5.77)

This systemcanbesolvedfor thepressurecorrectionµ ´ , which is thenusedto correctthevelocitiesto satisfythecontinuityequation,thevelocityandpressurefieldsbeingupdatedby£SËÍÌÏÎ 7 £GÈ m £ ´ µ ËÍÌÏÎ 7 µ m µ ´ F (5.78)

Asidefrom theuseof velocityvectorsatcell faces,ratherthansingleCartesiancomponentsof veloc-ity, andtheuseof areavectorsratherthanthemagnitudesof thecell faceareas,thesystemis identicalto Equation(4.23)derivedfor aCartesiansystemin Section4.2.1.

Page 19: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 133

5.6 Examplesof Non-Orthogonal Problems

To test the implementationof the non-orthogonaldifferencingschemesthe codewasusedto solvethreetestproblems.Thefirst modelstwo-dimensionalconductionin askew domain.For thegeometrychosenaCartesianfinite differencesolutionwaseasilycalculatedthatcouldbeusedasacomparisonfor thesolutioncalculatedusingthenon-orthogonalfinite volumediscretisation.

Thesecondproblemmodelledthetwo-dimensionaldrivencavity flow describedin Section4.4.1.Theflow wassolvedfor asquarecavity, with onesolutionbeinggeneratedonasquaremesh,andtheotheron a non-orthogonalmeshthatfitted thecavity. As themeshis refinedthesolutionscalculatedon theCartesianandnon-orthogonalmeshesshouldbothconvergetowardsthebenchmarksolutionprovidedby Ghiaet al[50].

Thefinal testcasewasthedrivencavity flow providedasa benchmarktestcaseby Demirdzic, LilekandPeric[36]. This problemmodelsa drivenflow in a skew cavity, similar in shapeto the domainusedin theconductiontest.

5.6.1 Conduction in a Skew Domain

To testthediscretisationof the diffusiontermsof the transportequation,andthe implementationofDirichlet andNeumannboundaryconditions,the initial problemmodelledwasoneof steadystateconductionin a skew domain.Thegeometryof theproblemis givenin Figure5.8alongwith thetwosetsof boundaryconditionsused.

Ð Ð ÐÐ Ð Ð

Ð Ð ÐÐ

Ð Ð ÐÐ Ð Ð

Ð Ð ÐÐ

Ñ Ò Ñ Ò

ÓÒ

Ô ÕÖ

Dirichlet Boundaries

Ð Ð ÐÐÐ Ð Ð

Ð× 7 × 7 × 7 × 7

NeumannBoundaries

Ð Ð ÐÐÐ Ð Ð

Ðd ×d b 7 d ×d b 7 × 7 × 7Ø

Figure5.8: Thesteadystateconductionin a skew domainproblem,showing theproblemgeometryandthetwo boundaryconditionsmodelled.Thecavity is of unit lengthandheight,with thesidewallsangledat

ÕÖ .

Page 20: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 134

Thefirst problemappliesDirichlet conditionsonall boundaries,with thelid of thedomainbeingsettoe 7² , whilst theotherthreeboundariesaresetto e 7 . ThesecondtestimposedDirichlet conditionson thetop andbottomboundariesof thedomain,with valuesof e 7² and e 7 respectively, whilstthetwo sideboundarieshadazeroflux Neumannboundaryconditionimposed,ÙÚlÙ : 7 , with b beingthedirectionnormalto thesurface.

To provide a benchmarksolution,the problemwasalsomodelledusinga finite differencediscreti-sationon a Cartesianmesh. The two typesof meshesthat wereusedareshown in Figure5.9, withthe Cartesianmeshusedby the finite differencesolver beingon the left, whilst the boundaryfittednon-orthogonalmeshusedby thefinite volumesolver is shown on theright.

Figure5.9: Themeshesusedfor theskew conductionproblem.On the left theCartesianmeshusedby thefinite differencecode.On theright thenon-orthogonalmeshusedby thefinite volumecode.

The solutionscalculatedby the two methodsareshown in Figures5.10 and5.11, the Cartesianfi-nite differencesolutionsbeingcalculatedon a

ÜÛÚ Qmesh,whilst the non-orthogonalfinite volume

solutionsarecalculatedon aÖ Q

mesh.Thecontoursof the two solutionslook similar for both theNeumannandDirichlet problems.

Figure5.10:Thecalculatedtemperaturefield for theskew conductionwith Dirichlet boundaries.Onthe left the solutioncalculatedwith the finite differencecode,on the right that calculatedwith thefinite volumecode.

Figure5.11:Thecalculatedtemperaturefield for theskew conductionwith Neumannboundaries.Onthe left the solutioncalculatedwith the finite differencecode,on the right that calculatedwith thefinite volumecode.

Page 21: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 135

To bettercomparethe two methods,the temperatureprofilesfor eachproblem,calculatedonÝÛx Q

meshes,aregivenin Figures5.12and5.13. Figure5.12shows thetemperatureprofile acrossthedo-mainalongthehorizontalcentreline(ie: midwayupthedomain)calculatedfor theDirichlet boundaryconditionproblem.Thefinite volumesolutionis shown asa solid line, with thatcalculatedusingthefinite differenceschemebeinggivenby thecrosses.As canbeseenthetwo solutionsagreequitewell.Similarly Figure5.13shows the solutionfor the Neumannboundaryconditionsalongthecentrelinerunningupthecentreof thecavity. Againthetwo methodsarein excellentagreementwith eachother.

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

Sca

larÞ

x

Non-Orthogonal Finite Volume

Cartesian Finite Difference

Figure5.12: Thecalculatedtemperatureprofile alongthehorizontalcentrelineof theDirichlet skewconductionproblem.

Finally, the convergenceof the solutionscalculatedby the two methodsasthe meshis refinedareshown in Figures5.14and5.15.For theDirichlet problem,thetemperatureat thecentreof thedomainis plottedasa functionof thecell size,whilst for theNeumannproblemthetemperatureat themid-heightof theleft wall is plotted.For bothproblemsthetwo solutionsconvergeasthemeshis refined.No rankingof therelativeaccuracy of thetwo schemescanbemade,sincefor theNeumannproblemthefinite volumesolutionis themoreaccurate,whilst for theDirichlet problemthereverseis true.

To summarise,for theproblemstestedthenon-orthogonalfinite volumeschemegivesa solutionthatis comparablein accuracy to thatgeneratedby a Cartesianfinite differencemethod.As themeshisrefinedthesolutionsgivenby bothschemesconvergeto a commonsolution.

Page 22: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 136

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Sca

larÞ

y

Non-Orthogonal Finite Volume

Cartesian Finite Difference

Figure5.13: The calculatedtemperatureprofile alongthe vertical centrelineof the Neumannskewconductionproblem.

0.107

0.108

0.109

0.11

0.111

0.112

0.113

0.114

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07

Sca

lar

Val

ue a

t Cen

treß

Grid Size

Non-Orthogonal Finite Volume

Cartesian Finite Difference

Figure5.14: Theconvergenceof thesolutionscalculatedwith thefinite differenceandfinite volumesolversasthemeshis refined.Thetemperaturein thecentreof thedomainfor theDirichlet problemis plottedasa functionof thegrid size

3 .

Page 23: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 137

0.236

0.238

0.24

0.242

0.244

0.246

0.248

0.25

0.252

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07

Sca

lar

Val

ue a

t Cen

tre

of S

ide

Wal

l

à

Grid Size

Non-Orthogonal Finite Volume

Cartesian Finite Difference

Figure5.15: Theconvergenceof thesolutionscalculatedwith thefinite differenceandfinite volumesolversasthemeshis refined.Thewall temperatureat themid-heightof thedomainfor theNeumannproblemis plottedasa functionof thegrid size

3 .

Page 24: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 138

5.6.2 Dri ven Cavity Flow with a Distorted Mesh

ThesecondproblemthatwasmodelledwastheDrivenCavity flow for a squaredomain,previouslyencounteredin Section4.4.1.For thisflow thereexist anumberof benchmarksolutions,andanumberof solutionsfor theflow werecalculatedin thetestdescribedin Chapter4.

Ñ Ò

Óá

âã

äääääääääää

äääääääääää

äåä"ä ä"ä ä ä"ä ä"äææââ

Figure5.16:Thedrivencavity problem.

To test the non-orthogonaldiscretisationsusedin the flow solver, the problemwasmodelledon adistortedmesh,as shown in Figure5.17. Solutionswere also calculatedon a Cartesianmeshforcomparison,andthe benchmarksolutionof Ghia, Ghia andShin[50] wasalsousedasa testof thesolution. Flow wasmodelledon a rangeof meshes,for a flow with a Reynoldsnumberof 1000.SolutionswerecalculatedusingtheMSOU andFOU differencingschemes.

Figure5.17: Themeshesusedfor thedrivencavity problem.On the left theCartesianmesh,on theright thedistortednon-orthogonalmesh.

The solution for a flow calculatedon an ç Q non-orthogonalmeshusing the MSOU differencingschemeis shown in Figure5.18,with contourplotsof thestreamfunctionè , themagnitudeof velocityh £ h , andthe

¤and § componentsof velocitybeinggiven.Contourlevelsareidenticalto thoseusedin

Section4.4.1andthepaperof Ghiaet al.

Page 25: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 139

For the bulk of the flow the agreementbetweenthe Cartesianandnon-orthogonalsolutionsis ex-tremely good,with the contoursin Figure5.18 overlayingthosegiven in Figure4.5. However therecirculationbubblesin thelower left andright cornersof thecavity areincorrectlyresolved,with thereattachmentpointsbeingincorrectly located. This problemoccurswith solutionscalculatedusingtheFOU, MSOU andQUICK differencingschemes,andtheAuthor is uncertainif this is dueto theapproximationsusedin the non-orthogonaldiscretisation,or is a meshdependenterror that woulddisappearwith meshrefinement.

Thevelocitiesontheverticalandhorizontalcentrelinesareshown in Figures5.19and5.20,calculatedusing the non-orthogonalmeshesusing the MSOU differencingscheme.Solutionsaregiven for arangeof meshdensities,with thesolutionsbeingcomparedwith thebenchmarkvelocitiesof Ghiaetal. As with theCartesiancasethecalculatedvelocitiesconvergeto thebenchmarksolution,giving anexcellentagreementwith thefinermeshsolutions.

Finally thevelocityfieldscalculatedusingtheCartesianandnon-orthogonalmeshesarecomparedinFigure5.21.For eachmeshsizeused,theCartesianvelocityfieldswereinterpolatedontothedistortedmeshusing bicubic interpolation,with the RMS error betweenthe Cartesianand non-orthogonalsolutionsbeingcalculated.Theerrorbetweenthetwo solutionsvelocityfieldsis plottedasa functionof themeancell size

3 for solutionscalculatedusingtheFOUandMSOUdifferencingschemes.Asthemeshis refinedtheRMS errordecreasesandthe two solutionsconverge. TheerrorbetweentheMSOUsolutionsseemslargerthanthosebetweentheFOUsolutions.However, asthemeshis refinedtheMSOUerrorreducesata fasterratethanthatof theFOUsolutions.

Page 26: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 140

Figure 5.18: The solution field for the driven cavity calculatedon a ç Q cell distorted mesh,for a Reynolds number of 1000 using MSOU differencing. From left to right, top to bot-tom, the fields shown are the streamfunction, velocity magnitude

h ¤ h,¤

velocity and § veloc-ity. Streamfunctioncontoursare at

F intervals for

< F é è é , with further contoursatê ë ` ê ë s ê Úëì ê ëí andê Úëî

. Velocitycontoursareat F Ö

intervalsbetweenê

. Thesolutionshouldbecomparedwith thosegivenin Figures4.4and4.5.

Page 27: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 141

0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

U velocity

15x15

27x27

39x39

51x51

69x69

81x81

Ghia

Figure 5.19: The profile of the¤

velocity along the vertical centrelinecalculatedon the distortedmeshat a Reynoldsnumberof 1000usingMSOU differencing.Calculateddatacomparedwith thebenchmarkof Ghia,GhiaandShin[50].

-0.6

-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0 0.2 0.4 0.6 0.8 1

V velocity

15x15

27x27

39x39

51x51

69x69

81x81

Ghia

Figure5.20: Theprofile of the § velocity alongthehorizontalcentrelinecalculatedon thedistortedmeshat a Reynoldsnumberof 1000usingMSOU differencing.Calculateddatacomparedwith thebenchmarkof Ghia,GhiaandShin[50].

Page 28: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 142

0

0.005

0.01

0.015

0.02

0.025

0 0.02 0.04 0.06 0.08 0.1

RM

S E

rror

dx

FOU U Velocity

FOU V Velocity

MSOU U Velocity

MSOU V Velocity

Figure5.21: TheRMS errorbetweenthesolutionscalculatedon a Cartesiananddistortedmesh,asa functionof averagemeshsize

3 . Errorsgivenfor¤

and § velocity fields,for solutionscalculatedwith FOU andMSOU differencingschemes.

Page 29: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 143

5.6.3 Dri ven Cavity Flow in a Skew Cavity

As afinal test,thenon-orthogonalcodewascomparedto thebenchmarksolutiongivenby Demirdzic,Lilek andPeric[36] for adrivencavity flow in askew cavity. Thegeometryof theproblemis giveninFigure5.22,andsolutionswereobtainedfor a cavity with unit lengthwalls ( Ò 7 á 7² ), a wall angleofÕÖ

, at aReynoldsnumberof

, usingtheQUICK differencingscheme.

, , ,, , ,, , ,

, , ,, , ,, , ,

Ñ Ò

$ $$ $ $$ $ $$ ð$$$$$$$$$ ñ

áâã

ò ×ää ää ääää ää

ää ää ääää ää

äåä"ä ä"ä ä ä"ä ä"äæ æâ â

Figure5.22:Theskew drivencavity problem.

Figure5.23:Themeshusedfor thecalculationof theskew drivencavity flow field.

Thesolutionfield calculatedusinga meshofÝÛÚ B ÝÛx

pointsis shown in Figure5.24,with contourplotsof streamfunction,velocitymagnitude,andthe

¤and § componentsof velocitybeinggiven.The

contourlevelsusedareidenticalto thoseusedby Demirdzic et al in their paper, andthe agreementbetweenthepublishedandcalculatedsolutionsis excellent.

The velocitiescalculatedon the vertical andhorizontalcentrelinesareplotted in Figure5.26, withthesolutionsbeinggivenfor a numberof meshes.They arecomparedwith thebenchmarkvaluesofDemirdzic etal, andagaintheagreementis excellenton thefinermeshes.In additiontheerrorsin thecoarsermeshsolutionsshow thesametrendsasthecoarsemeshsolutionsof Demirdzic et al.

Page 30: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 144

Figure5.24: Thesolutionfield for theskew drivencavity, calculatedat a Reynoldsnumberof 1000usingQUICK differencing.Fromleft to right, topto bottom,thefieldsshown arethestreamfunction,velocitymagnitude

h ¤ h,¤

velocityand § velocity. Streamfunctioncontoursareat F Ö Ûó Ö

intervalsbetween

< F Õ ó Öand, andat

F 1 ³intervalsbetween

and F 1 ç . Velocity contoursareat

F Öintervalsbetween

ê .

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

-0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1

U velocity

19x19

35x35

67x67

131x131

Demirdzic

Figure5.25: Theprofile of the¤

velocity alongthecentrelinefor theskew drivencavity, calculatedfor aReynoldsnumberof 1000usingQUICK differencing.Calculateddatacomparedwith thebench-markof Demirdzic et al[36].

Page 31: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 145

-0.06

-0.04

-0.02

0

0.02

0.04

0.06

0.08

0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4

V v

eloc

ityô

x

19x19

35x35

67x67

131x131

Demirdzic

Figure5.26: Theprofile of the § velocity alongthecentrelinefor theskew drivencavity, calculatedfor aReynoldsnumberof 1000usingQUICK differencing.Calculateddatacomparedwith thebench-markof Demirdzic et al[36].

Page 32: adt-NU20010730.12021506_chapter_5

CHAPTER5. NON-ORTHOGONAL MESHES 146

5.7 Conclusions

The finite volume discretisationsgiven in Chapter2, and the SIMPLE pressure–velocity couplingschemedescribedin Chapter4havebeenextendedfromCartesianmeshestostructurednon-orthogonalmeshes.The discretisationof the diffusion termsin the transportequationhasbeenderived,whilstthe discretisationof the advective termsis handledin an identicalmannerto the discretisationsonCartesianmeshesdescribedin Chapter2. Thepressure–velocity couplingschemewasthenadaptedto non-orthogonalmeshes,with thepressurecorrectionequationbeingre-derived.

Theswitch from a Cartesianto a non-orthogonalmeshcomplicatesthecalculationof thegeometricpropertiesof themesh,suchasfaceareasandcell volumes,andsothetechniquesusedfor calculatingthesevaluesis describedin Section5.1. In addition,theswitchfrom anorthogonalto anon-orthogonalmeshincreasesthenumberof termsin thelinearequationsgeneratedby thefinite volumediscretisa-tion, with thenumberof termsincreasingfrom

Öto

for two-dimensionaldiscretisations,andfromóto

in discretisationson three-dimensionalmeshes.A deferredcorrectionschemethatallows theuseof thelinearsolversdevelopedin Chapter3 is describedandused.

Finally, to testthecodeit wasusedto solve threebenchmarkproblems.Thefirst, a two-dimensionalconductionproblem,testedthediscretisationandimplementationof thediffusiontermsin thetrans-portequation,andtheimplementationof theNeumannandDirichlet boundaryconditions.Thesecondandthird problemsmodelledtwo-dimensionaldrivencavity flows, with the resultsbeingcomparedagainstpublishedbenchmarks.In all casestheagreementbetweenthenon-orthogonalcodeandthebenchmarksis excellent,with convergencebeingdemonstratedto occurwith refinementof themesh.