. Introdcton to CFD Ths s a qck ntrodcton to the basc concepts nderlyng CFD. The concepts are llstrated by applyng them to a smple D example. We dscss the followng topcs brefly:. Applcatons of CFD. The Strategy of CFD 3. Dscretsaton Usng the Fnte-Dfference Method 4. Dscretsaton Usng The Fnte-Volme Method 5. Assembly of Dscrete System and Applcaton of Bondary Condtons 6. Solton of Dscrete System 7. Grd Convergence 8. Dealng wth Non-lnearty 9. Drect and Iteratve Solvers 0. Iteratve Convergence. Nmercal Stablty. Trblence Modellng The materal contaned n ths docment s sefl back p for the corse yo are attendng, bt t s not key to partcpatng n the corsework modle. Whle the CFD soltons are convergngwhy not have a browse throgh the materal attached.
. Applcatons of CFD CFD s sefl n a wde varety of applcatons and here we note a few to gve yo an dea of ts se n ndstry. The smlatons shown below have been performed sng the FLUENT software. CFD can be sed to smlate the flow over a vehcle. For nstance, t can be sed to stdy the nteracton of propellers or rotors wth the arcraft fselage. The followng fgre shows the predcton of the pressre feld ndced by the nteracton of the rotor wth a helcopter fselage n forward flght. Rotors and propellers can be represented wth models of varyng complexty. The temperatre dstrbton obtaned from a CFD analyss of a mxng manfold s shown below. Ths mxng manfold s part of the passenger cabn ventlaton system on the Boeng 767. The CFD analyss showed the effectveness of a smpler manfold desgn wthot the need for feld testng. Bo-medcal engneerng s a rapdly growng feld and ses CFD to stdy the crclatory and respratory systems. The followng fgre shows pressre contors and a ctaway vew that reveals velocty vectors n a blood pmp that assmes the role of heart n open-heart srgery. CFD s attractve to ndstry snce t s more cost-effectve than physcal testng. However, one mst note that complex flow smlatons are challengng and errorprone and t takes a lot of engneerng expertse to obtan valdated soltons.
. The Strategy of CFD Broadly, the strategy of CFD s to replace the contnos problem doman wth a dscrete doman sng a grd. In the contnos doman, each flow varable s defned at every pont n the doman. For nstance, the pressre p n the contnos D doman shown n the fgre below wold be gven as p = p(x); 0 < x < In the dscrete doman, each flow varable s defned only at the grd ponts. So, n the dscrete doman shown below, the pressre wold be defned only at the N grd ponts. p = p(x); = ; ; : : : ;N Contnos Doman Dscrete Doman 0 x x = x, x,,x N Copled PDEs + bondary condtons n contnos varables Grd pont Copled algebrac eqs. n dscrete varables In a CFD solton, one wold drectly solve for the relevant flow varables only at the grd ponts. The vales at other locatons are determned by nterpolatng the vales at the grd ponts. The governng partal dfferental eqatons and bondary condtons are defned n terms of the contnos varables p, V r etc. One can approxmate these n the dscrete doman n terms of the dscrete varables p, V r etc. The dscrete system s a large set of copled, algebrac eqatons n the dscrete varables. Settng p the dscrete system and solvng t (whch s a matrx nverson problem) nvolves a very large nmber of repettve calclatons and s done by the dgtal compter. Ths dea can be extended to any general problem doman. The followng fgre shows the grd sed for solvng the flow over an arfol.
3. Dscretsaton Usng the Fnte-Dfference Method To keep the detals smple, we wll llstrate the fndamental deas nderlyng CFD by applyng them to the followng smple D eqaton: d m + = 0; 0 x ; dx () 0 = () We ll frst consder the case where m = when the eqaton s lnear. We ll later consder the m = case when the eqaton s non-lnear. We ll derve a x =/3 x=0 x=/3 x3=/3 x4= dscrete representaton of the above eqaton wth m = on the followng grd: Ths grd has for eqally-spaced grd ponts wth x beng the spacng between sccessve ponts. Snce the governng eqaton s vald at any grd pont, we have d + = 0 () dx where the sbscrpt represents the vale at grd pont x. In order to get an expresson for (d/dx) n terms of at the grd ponts, we expand - n a Taylor s seres: d = x + O( x ), rearrangng ths gves dx d = + O( x ) (3) dx x The error n (d/dx) de to the neglected terms n the Taylor s seres s called the trncaton error. Snce the trncaton error above s O( x), ths dscrete representaton s termed frst order accrate. Snce the error n (d/dx) de to the neglected terms n the Taylor s seres s of O( x), ths representaton s termed as frst-order accrate. Usng (3) n () and excldng hgher order terms n the Taylor s seres, we get the followng dscrete eqaton: + = 0. (4) x Note that we have gone from a dfferental eqaton to an algebrac eqaton! Ths method of dervng the dscrete eqaton sng Taylor s seres expansons s called the fnte-dfference method. However, most commercal CFD codes se the fntevolme or fnte-element methods whch are better sted for modellng flow past complex geometres. For example, the FLUENT code ses the fnte-volme method whereas IDEAS ses the fnte-element method. We ll brefly ndcate the phlosophy of the fnte-volme method next bt wll keep sng the fnte-dfference approach to llstrate the nderlyng concepts snce they are very smlar between the dfferent approaches wth the fnte-dfference method beng easer to nderstand.
4 Dscretsaton Usng The Fnte-Volme Method If yo look closely at the arfol grd shown earler, yo ll see that t conssts of qadrlaterals. In the fnte-volme method, sch a qadrlateral s commonly referred to as a cell and a grd pont as a node. In D, one cold also have tranglar cells. In 3D, cells are sally hexahedrals, tetrahedrals, or prsms. In the fnte-volme approach, the ntegral form of the conservaton eqatons are appled to the control volme defned by a cell to get the dscrete eqatons for the cell. For example, the ntegral form of the contnty eqaton was gven earler. For steady, ncompressble flow, ths eqaton redces to S r V nˆ ds = 0 The ntegraton s over the srface S of the control volme and ˆn s the otward normal at the srface. Physcally, ths eqaton means that the net volme flow nto the control volme s zero. Consder the rectanglar cell shown below: (5) r The velocty at face s taken to be V = ˆ + v ˆ j. Applyng the mass conservaton eqaton (5) to the control volme defned by the cell gves - y - v x + 3 y + v 4 x = 0. Ths s the dscrete form of the contnty eqaton for the cell. It s eqvalent to smmng p the net mass flow nto the control volme and settng t to zero. So t ensres that the net mass flow nto the cell s zero.e. that mass s conserved for the cell. Usally the vales at the cell centres are stored. The face vales, v, etc. are obtaned by stably nterpolatng the cell-centre vales for adjacent cells. Smlarly, one can obtan dscrete eqatons for the conservaton of momentm and energy for the cell. One can readly extend these deas to any general cell shape n D or 3D and any conservaton eqaton. Take a few mntes to contrast the dscretsaton n the
fnte-volme approach to that n the fnte-dfference method dscssed earler. Look back at the arfol grd. When yo are sng FLUENT or another fnte-volme code, t s sefl to remnd yorself that the code s fndng a solton sch that mass, momentm, energy and other relevant qanttes are beng conserved for each cell.
5 Assembly of Dscrete System and Applcaton of Bondary Condtons Recall that the dscrete eqaton that we obtaned sng the fnte-dfference method was + = 0. x Rearrangng, we get - + ( + x) = 0. Applyng ths eqaton to the D grd shown earler at grd ponts = ; 3; 4 gves : - + ( + x) = 0 ( = ) (6) - + ( + x) 3 = 0 ( = 3) (7) - 3 + ( + x) 4 = 0 ( = 4) (8) The dscrete eqaton cannot be appled at the left bondary (=) snce - s not defned here. Instead, we se the bondary condton to get = (9). Eqatons (6)-(9) form a system of for smltaneos algebrac eqatons n the for nknowns,, 3 and 4. It s convenent to wrte ths system n matrx form: 0 0 0 + x 0 0 0 = (0) 0 + x 0 3 0 0 0 + x 4 0 In a general staton, one wold apply the dscrete eqatons to the grd ponts (or cells n the fnte-volme method) n the nteror of the doman. For grd ponts (or cells) at or near the bondary, one wold apply a combnaton of the dscrete eqatons and bondary condtons. In the end, one wold obtan a system of smltaneos algebrac eqatons wth the nmber of eqatons beng eqal to the nmber of ndependent dscrete varables. The process s essentally the same as above wth the detals beng mch more complex. FLUENT, lke other commercal CFD codes, offers a varety of bondary condton optons sch as velocty nlet, pressre nlet, pressre otlet, etc. It s very mportant that yo specfy the proper bondary condtons n order to have a well-defned problem. Also, read throgh the docmentaton for a bondary condton opton to nderstand what t does before yo se t (t mght not be dong what yo expect). A sngle wrong bondary condton can gve yo a totally wrong reslt.
6 Solton of Dscrete System The dscrete system (0) for or own smplstc D example can be easly nverted to obtan the nknowns at the grd ponts. Solvng for,, 3 and 4 n trn and sng x = /3, we get =, = ¾, 3 = 9/6, 4 = 7/64. The exact solton for the D example s easly calclated to be exact = exp(-x). The fgre below shows the comparson of the dscrete solton obtaned on the forpont grd wth the exact solton. The error s largest at the rght bondary where t s eqal to 4.7%. In a practcal CFD applcaton, one wold have thosands to mllons of nknowns n the dscrete system and f one ses, say, a Gassan elmnaton procedre navely to nvert the matrx, t wold be take the compter forever to perform the calclaton. So a lot of work goes nto optmsng the matrx nverson n order to mnmse the CPU tme and memory reqred. The matrx to be nverted s sparse.e. most of the entres n t are zeros snce the dscrete eqaton at a grd pont or cell wll contan only qanttes from the neghborng ponts or cells. A CFD code wold store only the non-zero vales to mnmse memory sage. It wold also generally se an teratve procedre to nvert the matrx; the longer one terates, the closer one gets to the tre solton for the matrx nverson.
7 Grd Convergence Whle developng the fnte-dfference approxmaton for the D example, we saw that the trncaton error n or dscrete system s O( x). So one expects that as the nmber of grd ponts s ncreased and x s redced, the error n the nmercal solton wold decrease and the agreement between the nmercal and exact soltons wold get better. Let s consder the effect of ncreasng the nmber of grd ponts N on the nmercal solton of the D problem. We ll consder N = 8 and N = 6 n addton to the N = 4 case solved prevosly. We can easly repeat the assembly and solton steps for the dscrete system on each of these addtonal grds. The followng fgre compares the reslts obtaned on the three grds wth the exact solton. As expected, the nmercal error decreases as the nmber of grd ponts s ncreased. When the nmercal soltons obtaned on dfferent grds agree to wthn a level of tolerance specfed by the ser, they are referred to as grd converged soltons. The concept of grd convergence apples to the fnte-volme approach also where the nmercal solton, f correct, becomes ndependent of the grd as the cell sze s redced. It s very mportant that yo nvestgate the effect of grd resolton on the solton n every CFD problem yo solve. Never trst a CFD solton nless yo have convnced yorself that the solton s grd converged to an acceptance level of tolerance (whch wold be problem dependent).
8 Dealng wth Non-lnearty The momentm conservaton eqaton for a fld s non-lnear de to the convecton r r term ( V )V. Phenomena sch as trblence and chemcal reacton ntrodce addtonal non-lneartes. The hghly non-lnear natre of the governng eqatons for a fld makes t challengng to obtan accrate nmercal soltons for complex flows of practcal nterest. We wll demonstrate the effect of non-lnearty by settng m = n or smple D example (): d + = 0; 0 x ; dx () 0 = A frst-order fnte-dfference approxmaton to ths eqaton, analogos to that n (4) for m= s: + = 0. () x Ths s a non-lnear algebrac eqaton wth the term beng the sorce of the nonlnearty. The strategy that s adopted to deal wth non-lnearty s to lnearse the eqatons abot a gess vale of the solton and to terate ntl the gess agrees wth the solton to a specfed tolerance level. We ll llstrate ths on the above example. Let g be the gess for, and defne = - g. Rearrangng and sqarng ths eqaton gves + + = 0. = g g Assmng that << g, we can neglect the g g g + = + g term to get ( ) g Ths,. g g The fnte-dfference approxmaton () after lnearsaton becomes + = g 0. () x g Snce the error de to lnearsaton s O( ), t tends to zero as g. In order to calclate the fnte-dfference approxmaton (), we need gess vales g at the grd ponts. We start wth an ntal gess vale n the frst teraton. For each sbseqent teraton, the vale obtaned n the prevos teraton s sed as the gess vale. () Iteraton : g = Intal Gess () () Iteraton : g =... ( ) ( ) Iteraton n: n = n g
The sperscrpt ndcates the teraton level. We contne the teratons ntl they converge. We ll defer the dscsson on how to evalate convergence ntl a lttle later. Ths s essentally the process sed n CFD codes to lnearse the non-lnear terms n the conservatons eqatons, wth the detals varyng dependng on the code. The mportant ponts to remember are that the lnearsaton s performed abot a gess and that t s necessary to terate throgh sccessve approxmatons ntl the teratons converge.
9 Drect and Iteratve Solvers We saw that we need to perform teratons to deal wth the non-lnear terms n the governng eqatons. We next dscss another factor that makes t necessary to carry ot teratons n practcal CFD problems. Verfy that the dscrete eqaton system resltng from the fnte-dfference approxmaton () on or for-pont grd s 0 0 0 + x 0 g 0 0 + x g 3 0 0 0 + x g 4 3 4 x = x x g g3 g 4. (3) In a practcal problem, one wold sally have mllons of grd ponts or cells so that each dmenson of the above matrx wold be of the order of a mllon (wth most of the elements beng zeros). Invertng sch a matrx drectly wold take a prohbtvely large amont of memory. So nstead, the matrx s nverted sng an teratve scheme as dscssed below. Rearrange the fnte-dfference approxmaton () at grd pont so that s expressed n terms of the vales at the neghborng grd ponts and the gess vales: = + + x x g g If a neghborng vale at the crrent teraton level s not avalable, we se the gess vale for t. Let s say that we sweep from rght to left on or grd.e. we pdate 4, then 3 and fnally n each teraton. In the m th ( m) teraton, s not avalable whle pdatng ( m) ( m) and so we se the gess vale for t nstead: m = g( ) ( m) ( m) g( ) + x g ( m) + x g Snce we are sng the gess vales at neghborng ponts, we are effectvely obtanng only an approxmate solton for the matrx nverson n (3) drng each teraton bt n the process have greatly redced the memory reqred for the nverson. Ths trade-off s good strategy snce t doesn t make sense to expend a great deal of resorces to do an exact matrx nverson when the matrx elements depend on gess vales whch are contnosly beng refned. In an act of cleverness, we have combned the teraton to handle non-lnear terms wth the teraton for matrx nverson nto a sngle teraton process. Most mportantly, as the teratons converge and g, the approxmate solton for the matrx nverson tends towards the exact solton for the nverson snce the error ntrodced by sng g nstead of n (4) also tends to zero. Ths, teraton serves two prposes:. It allows for effcent matrx nverson wth greatly redced memory reqrements.. It s necessary to solve non-lnear eqatons. In steady problems, a common and effectve strategy sed n CFD codes s to solve the nsteady form of the governng eqatons and march the solton n tme ntl the solton converges to a steady vale. In ths case, each tme step s effectvely an teraton, wth the gess vale at any tme level beng gven by the solton at the prevos tme level. (4)
0 Iteratve Convergence Recall that as g, the lnearzaton and matrx nverson errors tends to zero. So we contne the teraton process ntl some selected measre of the dfference between g and, referred to as the resdal, s small enogh. We cold, for nstance, defne the resdal R as the RMS vale of the dfference between and g on the grd: R = N ( ) g = N It s sefl to scale ths resdal wth the average vale of n the doman. An nscaled resdal of, say, 0.0 wold be relatvely small f the average vale of n the doman s 5000 bt wold be relatvely large f the average vale s 0.. Scalng ensres that the resdal s a relatve rather than an absolte measre. Scalng the above resdal by dvdng by the average vale of gves = N R = = N N N ( ) ( ) N g g N = N = =. (5) For the non-lnear D example, we ll take the ntal gess at all grd ponts to be eqal to the vale at the left bondary.e. () g =. In each teraton, we pdate g, sweep from rght to left on the grd pdatng, n trn, 4, 3 and sng (4) and calclate the resdal sng (5). We ll termnate the teratons when the resdal falls below 0-9 (whch s referred to as the convergence crteron). Take a few mntes to mplement ths procedre n MATLAB whch wll help yo gan some famlarty wth the mechancs of the mplementaton. The varaton of the resdal wth teratons obtaned from MATLAB s shown below. Note that logarthmc scale s sed for the ordnate. The teratve process converges to a level smaller than 0-9 n jst 6 teratons. In more complex problems, a lot more teratons wold be necessary for achevng convergence.
The solton after,4 and 6 teratons and the exact solton are shown below n the rght fgre. It can easly be verfed that the exact solton s gven by exact = x + The soltons for teratons 4 and 6 are ndstngshable on the graph. Ths s another ndcaton that the solton has converged. The converged solton doesn t agree well wth the exact solton becase we are sng a coarse grd for whch the trncaton error s relatvely large. The teratve convergence error, whch s of order 0-9, s swamped ot by the trncaton error of order 0 -. So drvng the resdal down to 0-9 when the trncaton error s of order 0 - s a waste of comptng resorces. In a good calclaton, both errors wold be of comparable level and less than a tolerance level chosen by the ser. The agreement between the nmercal and exact soltons shold get mch better on refnng the grd as was the case for m =. Some ponts to note:. Dfferent codes se slghtly dfferent defntons for the resdal. Read the docmentaton to nderstand how the resdal s calclated.. In the FLUENT code, resdals are reported for each conservaton eqaton. A dscrete conservaton eqaton at any cell can be wrtten n the form LHS = 0. For any teraton, f one ses the crrent solton to compte the LHS, t won t be exactly eqal to zero, wth the devaton from zero beng a measre of how far one s from achevng convergence. So FLUENT calclates the resdal as the (scaled) mean of the absolte vale of the LHS over all cells. 3. The convergence crteron yo choose for each conservaton eqaton s problem and code-dependent. It s a good dea to start wth the defalt vales n the code. One may then have to tweak these vales.
Nmercal Stablty In or prevos D example, the teratons converged very rapdly wth the resdal fallng below the convergence crteron of 0-9 n jst 6 teratons. In more complex problems, the teratons converge more slowly and n some nstances, may even dverge. One wold lke to know a pror the condtons nder whch a gven nmercal scheme converges. Ths s determned by performng a stablty analyss of the nmercal scheme. A nmercal method s referred to as beng stable when the teratve process converges and as beng nstable when t dverges. It s not possble to carry ot an exact stablty analyss for the Eler or Naver-Stokes eqatons. Bt a stablty analyss of smpler, model eqatons provdes sefl nsght and approxmate condtons for stablty. As mentoned earler, a common strategy sed n CFD codes for steady problems s to solve the nsteady eqatons and march n tme ntl the solton converges to a steady state. A stablty analyss s sally performed n the context of tme-marchng. Whle sng tme-marchng to a steady state, we are only nterested n accrately obtanng the asymptotc behavor at large tmes. So we wold lke to take as large a tme-step t as possble to reach the steady state n the least nmber of tme-steps. There s sally a maxmm allowable tme-step t max beyond whch the nmercal scheme s nstable. If t > t max, the nmercal errors wll grow exponentally n tme casng the solton to dverge from the steady-state reslt. The vale of t max depends on the nmercal dscretsaton scheme sed. There are two classes of nmercal schemes, explct and mplct, wth very dfferent stablty characterstcs whch we ll brefly dscss next. Explct and Implct Schemes The dfference between explct and mplct schemes can be most easly llstrated by applyng them to the wave eqaton + c = 0 t x where c s the wave speed. One possble way to dscretse ths eqaton at grd pont and tme-level n s n n n n + c = O x, t t x ( ) (6) The crcal thng to note here s that the spatal dervatve s evalated at the n- tmelevel. Solvng for gves n c t c t = + x x n n n (7) n Ths s an explct expresson.e. the vale of at any grd pont can be calclated drectly from ths expresson wthot the need for any matrx nverson. The scheme n (6) s known as an explct scheme. Snce n at each grd pont can be pdated ndependently, these schemes are easy to mplement on the compter. On the downsde, t trns ot that ths scheme s stable only when
c t C x where C s called the Corant nmber. Ths condton s referred to as the Corant- Fredrchs-Lewy or CFL condton. Whle a detaled dervaton of the CFL condton throgh stablty analyss s otsde the scope of the crrent dscsson, t can seen that the coeffcent of n n (7) changes sgn dependng on whether C > or C < leadng to very dfferent behavor n the two cases. The CFL condton places a rather severe lmtaton on t max. In an mplct scheme, the spatal dervatve term s evalated at the n tme-level: n n n n + c = O x, t t x ( ) n In ths case, we can t pdate at each grd pont ndependently. We nstead need to solve a system of algebrac eqatons n order to calclate the vales at all grd ponts smltaneosly. It can be shown that ths scheme s ncondtonally stable so that the nmercal errors wll be damped ot rrespectve of how large the tme-step s. The stablty lmts dscssed above apply specfcally to the wave eqaton. In general, explct schemes appled to the Eler or Naver-Stokes eqatons have the same restrcton that the Corant nmber needs to be less than or eqal to one. Implct schemes are not ncondtonally stable for the Eler or Naver-Stokes eqatons snce the non-lneartes n the governng eqatons often lmt stablty. However, they allow a mch larger Corant nmber than explct schemes. The specfc vale of the maxmm allowable Corant nmber s problem dependent. Some ponts to note:. CFD codes wll allow yo to set the Corant nmber (whch s also referred to as the CFL nmber) when sng tme-steppng. Takng larger tme-steps leads to faster convergence to the steady state, so t s advantageos to set the Corant nmber as large as possble wthn the lmts of stablty.. Yo may fnd that a lower Corant nmber s reqred drng start-p when changes n the solton are hghly non-lnear bt t can be ncreased as the solton progresses. 3. Under-relaxaton for non-tme steppng
Trblence Modellng There are two radcally dfferent states of flows that are easly dentfed and dstngshed: lamnar flow and trblent flow. Lamnar flows are charactersed by smoothly varyng velocty felds n space and tme n whch ndvdal lamnae (sheets) move past one another wthot generatng cross crrents. These flows arse when the fld vscosty s sffcently large to damp ot any pertrbatons to the flow that may occr de to bondary mperfectons or other rreglartes. These flows occr when at low-to-moderate vales of the Reynolds nmber. In contrast, trblent flows are charactersed by large, nearly random flctatons n velocty and pressre n both space and tme. These flctatons arse from nstabltes that grow ntl nonlnear nteractons case them to break down nto fner and fner whrls that eventally are dsspated (nto heat) by the acton of vscosty. Trblent flows occr n the opposte lmt of hgh Reynolds nmbers. Fgre : Example of a tme hstory of a component of a flctatng velocty at a pont n a trblent flow. (a) Shows the velocty, (b) shows the flctatng component of velocty and (c) shows the sqare of the flctatng velocty. Dashed lnes n (a) and (c) ndcate the tme averages. A typcal tme hstory of the flow varable at a fxed pont n space s shown n Fg. (a). The dashed lne throgh the crve ndcates the average velocty. We can defne three types of averages:. Tme average. Volme average 3. Ensemble average The most mathematcally general average s the ensemble average, n whch yo repeat a gven experment a large nmber of tmes and average the qantty of nterest (say velocty) at the same poston and tme n each experment. For practcal reasons, ths s rarely done. Instead, a tme or volme average (or combnaton of the two) s
made wth the assmpton that they are eqvalent to the ensemble average. For the sake of ths dscsson, let s defne the tme average for a statonary flow as τ ( y) ( y, t) dt (8) lm τ τ τ The devaton of the velocty from the mean vale s called the flctaton and s sally defned as (9) Note that by defnton ( 0) = 0 (the average of the flctaton s zero). Conseqently, a better measre of the strength of the flctaton s the average of the sqare of a flctatng varable. Fgres (b) and (c) show the tme evolton of the velocty flctaton,, and the sqare of that qantty,. Notce that the latter qantty s always greater than zero as s ts average. The eqatons governng a trblent flow are precsely the same as for a lamnar flow, however, the solton s clearly mch more complcated n ths regme. The approaches to solvng the flow eqatons for a trblent flow feld can be roghly dvded nto two classes. Drect nmercal smlatons (DNS) se the speed of modern compters to nmercally ntegrate the Naver Stokes eqatons, resolvng all of the spatal and temporal flctatons, wthot resortng to modellng. In essence, the solton procedre s the same as for lamnar flow, except the nmercs mst contend wth resolvng all of the flctatons n the velocty and pressre. DNS remans lmted to very smple geometres (e.g., channel flows, jets and bondary layers) and s extremely expensve to rn. The alternatve to DNS fond n most CFD packages (ncldng FLUENT) s to solve the Reynolds Averaged Naver Stokes (RANS) eqatons. RANS eqatons govern the mean velocty and pressre. Becase these qanttes vary smoothly n space and tme, they are mch easer to solve; however, as wll be shown below, they reqre modellng to close the eqatons and these models ntrodce sgnfcant error nto the calclaton. To demonstrate the closre problem, we consder flly developed trblent flow n a channel of heght H. Recall that wth RANS we are nterested n solvng for the mean velocty ( ) y only. If we formally average the Naver Stokes eqatons and smplfy for ths geometry we arrve at the followng dv dp d ( y + = ) (0) dy ρ dy dy sbject to the bondary condtons d At y = 0, = 0, and at y = H, = 0. dy The qantty v, known as the Reynolds stress 3, s a hgher-order moment that mst y and ts dervatves). Ths s referred be modelled n terms of the knowns (.e., ( ) A statonary flow s defned as one whose statstcs are not changng n tme. An example of a statonary flow s steady flow n a channel or ppe. The largest DNS to date was recently pblshed by Kaneda et al., Phys. Flds 5():L L4 (003); they sed 40963 grd pont, whch corresponds roghly to 0.5 terabytes of memory per varable! 3 Name after the same Osborne Reynolds from whch we get the Reynolds nmber.
to as the closre approxmaton. The qalty of the modellng of ths term wll determne the relablty of the comptatons. 4 Trblence modellng s a rather broad dscplne and an n-depth dscsson s beyond the scope of ths ntrodcton. Here we smply note that the Reynolds stress s modelled n terms of two trblence parameters, the trblent knetc energy k and the trblent energy dsspaton rate ε defned below ( ) k + v + w (3) v v v w w w ε ν + + + + + + + + x y z x y z x y z (4) where (, v, w ) s the flctatng velocty vector. The knetc energy s zero for lamnar flow and can be as large as 5% of the knetc energy of the mean flow n a hghly trblent case. The famly of models s generally known as k ε and they form the bass of most CFD packages (ncldng FLUENT). 4 Notce that f we neglect the Reynolds stress, the eqatons redce to the eqatons for lamnar flow; ths, the Reynolds stress s solely responsble for the dfference n the mean profle for lamnar and trblent flow.
3 Tps for good geometry generaton It s now remarkably easy to create a CFD geometry and mesh t. However not all meshes have the same lkelhood of a sccessfl modellng otcome. Here are a few tps to avod problematc geometres. 3. Over Complcaton The power of compters that are avalable for CFD solton means that the level of detal that may be captred can be qte mpressve. However gve some tme to consder what s reqred from the CFD solton. Small bts and peces (nts and bolts, clps, thn flanges) that wll have lttle or no mpact on the reslt are best removed - at the end of the day the geometry wll be represented by lttle flat sded elements n the mesh anyway. Many of the more tme-consmng and annoyng problems wth mesh generaton are cased by small peces of geometry - n partclar small slvers left floatng n space close to other srfaces. 3. Large Enttes If one consders that each entty has to be descrbed mathematcally wth CAD, then t can well be magned that large srfaces wll begn to ntrodce nmercal errors. These sbseqently manfest as meshng problems and for ths reason, the entty shold be splt p nto a nmber of smaller peces dependng on the complexty of the srface. Ths may typcally be acheved by sng the ct entty wth a plane tool wthn the model men. 3.3 Very Small Srfaces Very small srfaces, whch are part of a larger srface are not a problem, bt where they arse to form an edge of a component, ths wll reqre very small meshng elements to captre them. For ths reason (nless crtcal to the flow predcton) remove them completely and replace wth a sharp edge (otherwse the edge of the mesh wll be jagged) or, f nmportant, blend ot completely. 3.4 Hgh Aspect Rato Srfaces Ths s a smlar problem to 3. above. Long, thn srfaces wll reqre very many mesh elements to captre and may add lttle, f anythng, to the fnal solton. These shold be blended ot or removed completely as above. 3.5 Shallow Angles Where shallow angles are prodced ether where two srfaces meet at an acte angle, or where an arc asymptotcally toches a straght lne, the mesh wll have problems fttng nto the corner. Why not ct the corner slghtly so that the element volme does not tend to zero. 3.6 Fllets Fllet geometry s very dffclt to mesh satsfactorly wthot a hge mesh, and even then t can be very spky. Replace the fllet wth a corner, or even a chamfer t s the small concave crvatre that creates the problem. 3.7 Cyclc Symmetry Cyclc or Perodc meshes are very dffclt to prodce. The geometry mst match exactly on each of the matng faces. Normal practce s to copy and paste every ndvdal srface, lne and pont from one bondary to the other wthn the meshng software, bt t s essental that the geometry that meets normal to the bondary matches perfectly at each end as well. 3.8 Very Poor Geometry Practce Bldng p a CAD model where the srfaces overlap, don t meet or have nterestng wggles that sholdn t really be there s jst askng for problems and mst be avoded.