Streamfuctio-Vorticity Formulatio A. Salih Departmet of Aerospace Egieerig Idia Istitute of Space Sciece ad Techology, Thiruvaathapuram March 2013 The streamfuctio-vorticity formulatio was amog the first usteady, icompressible Navier Stokes algorithms. The origial fiite differece algorithm was developed by Fromm [1] at Los Alamos laboratory. For icompressible two-dimesioal flows with costat fluid properties, the Navier Stokes equatios ca be simplified by itroducig the streamfuctio ψ ad vorticity ω as depedet variables. The vorticity vector at a poit is defied as twice the agular velocity ad is which, for two-dimesioal flow i x-y plae, is reduced to ω = V 1 ω z = ω ˆk = v u 2 For two-dimesioal, icompressible flows, a scalar fuctio may be defied i such a way that the cotiuity equatio is idetically satisfied if the velocity compoets, expressed i terms of such a fuctio, are substituted i the cotiuity equatio Such a fuctio is kow as the streamfuctio, ad is give by I Cartesia coordiate system, the above relatio becomes u + v = 0 3 V = ψ ˆk 4 u = ψ v = ψ 5 Lies of costat ψ are streamlies lies which are everywhere parallel to the flow, givig this variable its ame. Now, a Poisso equatio for ψ ca be obtaied by substitutig the velocity compoets, i terms of streamfuctio, i the equatio 2. Thus, we have 2 ψ = ω 6 where the subscript z is dropped from ω z. This is a kiematic equatio coectig the streamfuctio ad the vorticity. So if we ca fid a equatio for ω we will have obtaied a formulatio that automatically produces divergece-free velocity fields. 1
Fially, by takig the curl of the geeral Navier Stokes equatio, we obtai the followig Helmholtz equatio: ω + V ω = f t e + ω V ω V + 1 1 ρ 2 ρ p + ρ τ 7 For a Newtoia fluid with costat kiematic viscosity coefficiet ν, the viscous stress term reduces to the Laplacia of the vorticity 1 ρ τ = ν 2 ω For icompressible flow with costat desity, the third ad fourth terms o the right-had side become zero. Further, i the absece of body force, Helmholtz equatio reduces to ω t + V ω = ω V + ν 2 ω 8 For two-dimesioal flows, the term, ω V = 0 by cotiuity equatio 3, ad the Helmholtz equatio further reduces to a form ω + V ω = ν 2 ω 9 t This parabolic PDE is called the vorticity trasport equatio. A alterate approach to derive the vorticity trasport equatio from the scalar form of mometum is by cross-differetiatio. The two-dimesioal Navier Stokes equatio for icompressible flow without body force term is give by u t + u u + v u = 1 p ρ v t + u v + v v = 1 p ρ + ν 2 + ν u 2 + 2 u 2 2 v 2 + 2 v 2 10 11 Differetiatig equatio 10 ad 11 with respect to y ad x respectively yield 2 u t + u u + u 2 u + v u 2 + v u 2 = 1 2 p 3 ρ + ν u 2 + 3 u 3 2 v t + u v 2 + u v 2 + v v + v 2 v = 1 2 p 3 ρ + ν v 3 + 3 v 2 12 13 Subtract 12 from 13 to obtai assume sufficiet smoothess to permit chagig the order of differetiatio v t u + u v u + v v u u + + v v [ 2 v = ν 2 u + 2 2 u v u Note that the fourth term o the left-had side is zero by cotiuity. The substitutio of vorticity defied by 2, we obtai the vorticity trasport equatio ω t + u ω 2 + v ω = ν ω 2 2 + 2 ω 2 ] 14
The relatio coectig the streamfuctio ad vorticity 6 is listed below: 2 ψ 2 + 2 ψ = ω 15 2 Equatios 14 ad 15 form the system PDEs for streamfuctio-vorticity formulatio. The pressure does ot appear i either of these equatios i.e. it has bee elimiated as a depedet variable. Thus the Navier Stokes equatios have bee replaced by a set of just two partial differetial equatios, i place of the three for the velocity compoets ad pressure. It is istructive to ote that the absece of a explicit evolutio equatio for pressure i the system of equatio is reflected i the absece of a evolutio equatio for streamfuctio. Further, the mixed elliptic-parabolic ature of the origial Navier Stokes system is clearly see from the ew system of equatio. The two equatios are coupled through the appearace of u ad v which are derivatives of ψ i the vorticity equatio ad by the vorticity ω actig as the source term i the Poisso equatio for ψ. The velocity compoets are obtaied by differetiatig the streamfuctio. If the pressure field is desired it ca be obtaied a posteriori by solvig the Pressure Poisso Equatio PPE. Pressure Poisso Equatio The PPE ca be derived by takig the divergece of vector form of mometum equatio V t + V V = 1 ρ p + ν 2 V or substitutig the compoet form of the mometum equatios 10 ad 11 ito the scalar form of cotiuity equatio. Differetiatig 10 with respect to x to provide u u 2 + + u 2 u t 2 + v u + v 2 u = 1 2 p ρ 2 + ν 2 u 16 Similarly, differetiatig 11 with respect to y to provide v + u v t + u 2 v v 2 + + v 2 v 2 = 1 2 p ρ 2 + ν 2 v 17 Additio of equatios 16 ad 17 yields u t + v + u 2 + v 2 + 2 v u 2 + u u 2 + 2 v = 1 2 p ρ 2 + 2 p 2 + ν 2 u + v + 2 v 2 [ 2 u + 2 v ] 18 Note that first, fifth, ad sixth terms each cotai the cotiuity equatio ad therefore disappear: u t + v = 0 2 u 2 + 2 v = u + v = 0 2 v 2 + 2 u = u + v = 0 3
The right-had is ow rearraged to provide 2 u 2 + 2 u 2 + 2 v 2 + 2 v 2 = 2 2 u + v + 2 u 2 + v = 0 Thus, the equatio 18 reduces to u 2 + v 2 + 2 v u = 1 2 p ρ 2 + 2 p 2 19 Now, the left-had side ca be further reduced as follows u 2 + v 2 + 2 u v = u + v 2 2 u v + 2 v u = 2 v u u v Therefore the PPE ca be writte as 2 p = 2ρ u v v u The PPE ca also be writte i ters of streamfuctio usig the relatios i 5 [ 2 2 ψ 2 ψ 2 2 ] p = 2ρ 2 2 ψ 20 21 Poisso equatio for pressure is a elliptic equatio, showig the elliptic ature of pressure i icompressible flows. For a steady flow problem, the PPE is solved oly oce, i.e., after the steady state values of ω ad ψ have bee computed. To solve PPE, boudary coditios for pressure are required. O a solid boudary, boudary values of pressure obtaied by tagetial mometum equatio to the fluid adjacet to the wall surface. For a wall located at y = 0 i Cartesia coordiate system, the tagetial mometum equatio x-mometum equatio reduces to p = µ 2 u wall 2 = µ ω wall wall sice v/ = 0 alog such a wall. Equatio 22 ca be discretized as 22 p i+1,1 p i 1,1 2 = µ 3ω i,1 + 4ω i,2 ω i,3 23 where we have used secod-order accurate oe-sided forward differece formula to approximate the derivative ω/. Note that, i order to apply equatio 23, the pressure must be kow for at least oe poit o the wall surface. Equatio 23 whe applied to the grid poit 2,1 becomes p 3,1 p 1,1 2 = µ 3ω 2,1 + 4ω 2,2 ω 2,3 The pressure p 2,1 at the adjacet poit ca be determied usig a first-order expressio for p/ as give below: p 2,1 p 1,1 = µ 3ω 2,1 + 4ω 2,2 ω 2,3 Thereafter, equatio 23 ca be used to fid the pressure at all other bottom wall poits. 4
Discretizatio of goverig equatios The goverig equatios for icompressible, two-dimesioal Navier Stokes equatio usig streamfuctiovorticity are derived i the previous Sectio. Essetially, the system is composed of the vorticity trasport equatio 9 ad the Poisso equatio for streamfuctio 15. As metioed earlier, the vorticity trasport equatio is a parabolic PDE ad thus ay suitable method for parabolic PDE ca be used to solve equatio 14. Here we use the explicit FTCS scheme, where Euler forward differece for temporal derivative ad cetral differeces for space derivatives are used. ω +1 i j t ω i j ω i+ ω i ω i, j+1 ω i, j 1 + u i j + v i j 2 ω i+ 2ωi j = ν + ω i 2 The stability coditios for the FTCS scheme are + ω i, j+1 2ω i j + ω i, j 1 y 2 24 d ν t 2 + ν t y 2 1 2 or Re c x + Re y c y 2 25 where Re = u ν Re y = v y ν c x = u t c y = v t y Recall that CDS approximatio of covective terms does ot model the physics of the problem accurately i that it does ot correctly represet the directioal ifluece of a disturbace. Therefore, the use of upwid type differecig scheme may be more appropriate i particular if the flow field is covectio domiated. However, first-order upwid scheme is too diffusive ad may ot be suitable for practical applicatios. Thus, we use the secod-order upwid scheme for the discretizatio of covectio terms. The discretized vorticity trasport equatio ca be writte as ω +1 i j where t ω i j ω i+ ω i + u i j + q u + ωx + u ω x + 2 + q v + ω y + v ω + y = ν ω i+ 2ω i j + ω i 2 u miu i j, 0 u + maxu i j, 0 v miv i j, 0 v + maxv i j, 0 ω i, j+1 ω i, j 1 + vi j + ω i, j+1 2ω i j + ω i, j 1 y 2 26 ω x ω i 2, j 3ω i + 3ω i j ω i+ 3 ω y ω i, j 2 3ω i, j 2 + 3ω i j ω i, j+1 3 ω + x ω i 3ω i j + 3ω i+ ω i+2, j 3 ω + y ω i, j 1 3ω i j + 3ω i, j+1 ω i, j+2 3 It may be oted that q = 0.5 represets the third-order accurate upwid formula ad for other values of q, the modified formula is oly secod-order accurate. Also, q = 0 correspods to the cetral differece scheme. 5
It may also be oted that, whe the discretized equatio is applied to grid poits adjacet to boudaries, grid poits i 2, j, i + 2, j, i, j 2 etc. lie outside the domai ad we have o iformatio about the value of ω o such poits. This problem ca be avoided by settig q = 0 for grid poits immediately adjacet to the boudary. The streamfuctio equatio 15 is solved at every time step usig a appropriate umerical scheme. Sice it is a elliptic equatios, we use the stadard cetral differecig scheme for discretizatio of secod order spatial derivatives. The discretized equatio is give as follows Boudary coditios ψ +1 i+ 2ψ+1 i j + ψ +1 i 2 + ψ+1 i, j+1 2ψ+1 i j + ψi, +1 j 1 y 2 = ωi +1 j 27 The solutio of vorticity trasport equatio ad stream fuctio equatio requires that appropriate vorticity ad streamfuctio boudary coditios are specified at the boudaries. The specificatio of these boudary coditios is extremely importat sice it directly affects the stability ad accuracy of the solutio. Sice the flow is parallel to a solid boudary, solid boudaries ad symmetry plaes are surfaces of costat streamfuctio. However, either vorticity or its derivatives at the boudary are usually kow i advace. Therefore a set of boudary coditios must be costructed. We will cosider this i the cotext of a classical problem which has wall boudaries surroudig the etire computatioal regio, the so-called lid-drive cavity problem depicted i figure 1. We cosider the domai icluded i a square of uit legth, with 0 x,y 1, where the upper boudary the lid at y = 1, moves with a costat velocity U = 1. The Reyolds umber based o the size of the domai, the velocity of the movig wall, desity ρ = 1 ad viscosity µ = 0.005 is Re = 200. The boudary Figure 1: Lid-drive cavity flow - typical streamlie patter. 6
coditios are set as follows ux,0 = 0 vx,0 = 0 ux,1 = 1 vx,1 = 0 u0,y = 0 v0,y = 0 u1,y = 0 v1,y = 0 Sice flow is parallel to the walls of the cavity, walls may be treated as streamlie. Thus, the streamfuctio value o the wall streamlie is set as a costat. That is ψ = c, where c is a arbitrary costat, which may be set equal to zero. Let us examie the applicatio of boudary coditios o a solid wall. Sice streamfuctio is a costat alog a wall, all the derivatives of streamfuctio alog the wall vaish. Hece, the Poisso equatio for streamfuctio 15 reduces to 2 ψ 2 = ω wall 28 wall where is the ormal directio. For a wall located at x = 0 left wall, equatio 28 takes the form ω = 2 ψ 2 29 To obtai a fiite differece approximatio for the secod-order derivative i the equatio above, cosider the Taylor series expasio ψ 2, j = ψ + ψ + 2 ψ 2 2 2 + Alog left wall ψ = v Therefore, Taylor series expasio ca be rearraged to get 2 ψ 2 = 2 ψ 2, j ψ 2 + 2v 30 Substitutio of equatio 30 ito 29 yields ω = 2 ψ ψ 2, j 2 2v A similar procedure is used to derive the boudary coditios at right, bottom, ad top wall. The appropriate expressios are ω M, j = 2 ψ 2 = 2 ψ M, j ψ M M, j 2 + 2v M, j 32 ω i,1 = 2 ψ 2 = 2ψ i,1 ψ i,2 i,1 y 2 + 2u i,1 33 y ω i,n = 2 ψ 2 = 2ψ i,n ψ i,n 1 i,n y 2 2u i,n 34 y 31 7
It is also possible to approximate the secod-order derivatives with secod order expressios. These are give by ω = 7ψ 8ψ 2, j + ψ 3, j 2 2 3v ω M, j = 7ψ M, j + 8ψ M ψ M 2, j 2 2 ω i,1 = 7ψ i,1 8ψ i,2 + ψ i,3 2 + 3u i,1 y ω i,n = 7ψ i,n + 8ψ i,n 1 ψ i,n 2 2 + 3v M, j 3u i,n y 35 36 37 38 It may be oted that the first-order expressios for ω at the boudaries ofte gives better results tha higher-order expressios which are susceptible to istabilities at higher Reyolds umbers. Other type of boudaries The specificatio of appropriate values for ψ ad ω at other type of boudaries such as far-field, symmetry lies, iflow, ad outflow plaes is extremely importat ad care must be take to esure that the physics of the problem is correctly modeled. Far-field For a true far-field boudary which is set parallel to the freestream, the boudary represets a streamlie. Therefore a costat value for the streamfuctio alog this boudary ca be specified. However, the assigmet of a value for the streamfuctio alog various boudaries must be cosistet with respect to the cotiuity equatio. Recall that the differece betwee the values of streamfuctio represet volumetric flow. Lie of symmetry Whe the flow is truly symmetrical, the axis of symmetry ca be cosidered a streamlie. therefore the value of streamfuctio alog this boudary ca be specified. Obviously, the velocity compoet ormal to the the symmetry boudary would be zero, whereas the streamwise compoet is extrapolated from the iterior solutio. Iflow boudary At the iflow boudary, the values of streamfuctio are determied by the followig method. Let us assume that the iflow boudary is o the left-side west. O the part below ad above the iflow sectio, we ca respectively assig ψ = c 1 ad ψ = c 2. For coveiece we may set c 1 = 0 ad c 2 = c, that is ψ L = 0 ψ U = c Sice ψ L ψ U represets the volume flow rate betwee the streamlies correspodig to ψ L ad ψ U, the costatc ca be so selected that it is equal to the volume flow rate through iflow boudary per uit depth ormal to the paper. 8
I geeral, the velocity vector may be iclied to the iflow boudary. Therefore, we may write ψ = v The first-order derivative o the left-had side ca be approximated by the oe-sided forward differece formula to obtai, 3ψ + 4ψ 2, j ψ 3, j = v 2 Therefore, ψ = 4ψ 2, j ψ 3, j + 2v 39 3 The vorticity at the iflow boudary may be determied i the followig way: ω = v u = 2 ψ 2 u O the iflow sectio ω = 2 ψ 2 which may be approximated usig formula 31 as ω = 2 ψ ψ 2, j 2 u 2v u +1 u 1 40 This is first-order approximatio, ad a secod-order approximatio is give by ω = 7ψ 8ψ 2, j + ψ 3, j 2 2 3v u +1 u 1 41 Outflow boudary The method we discussed for the iflow boudary ca be used for outflow boudary as well. Let us assume that the iflow boudary is o the right-side east. I geeral, the velocity vector may be iclied to the outflow boudary. Therefore, we may write ψ = v M, j M, j The first-order derivative o the left-had side ca be approximated by the oe-sided backward differece formula to obtai, 3ψ M, j 4ψ M + ψ M 2, j = v M, j 2 Therefore, ψ M, j = 4ψ M ψ M 2, j 2v M, j 42 3 O the iflow sectio ω M, j = 2 ψ 2 9 u M, j M, j
which may be approximated usig formula 32 as ω = 2 ψ M, j ψ M 2 + 2v M, j u M, j+1 u M, j 1 43 This is first-order approximatio, ad a secod-order approximatio is give by ω = 7ψ M, j + 8ψ M ψ M 2, j 2 2 + 3v M, j u M, j+1 u M, j 1 44 Algorithm for streamfuctio-vorticity formulatio A solutio algorithm for computig evolutio of icompressible, two-dimesioal flow usig streamfuctiovorticity formulatio is give as follows: 1. Iitialize the velocity field ad compute the associated vorticity field ad streamfuctio field usig equatios 2 ad 15. 2. Compute the boudary coditios for vorticity. 3. Solve the vorticity trasport equatio 14 to compute the vorticity at ew time step; ay stadard time marchig scheme may be used for this purpose. 4. Solve the Poisso equatio for streamfuctio 15 to compute the streamfuctio field at ew time step; ay iterative scheme for elliptic equatios may be used. 5. Compute the velocity field at ew time step usig the relatios 5. 6. Retur to step 2 ad repeat the computatio for aother time step. The vorticity-streamfuctio approach has see cosiderable use for two-dimesioal icompressible flows. It has become less popular i recet years because its extesio to three-dimesioal flows is difficult. Both the vorticity ad streamfuctio become three-compoet vectors i three dimesios so oe has a system of six partial differetial equatios i place of the four that are ecessary i a velocity-pressure formulatio. It also iherits the difficulties i dealig with variable fluid properties, compressibility, ad boudary coditios that were described above for two dimesioal flows. Refereces 1. Fromm, J. E., The Time Depedet Flow of a Icompressible Viscous Fluid, Meth. Comput. Phys., 3, 345-382 1964. 2. Hoffma, K. A. ad Chiag, S. T., Computatioal Fluid Dyamics for Egieers, Vol. I, 4 th ed., Egieerig Educatio Systems 2000. 3. Pletcher, R. H., Taehill, J. C., ad Aderso, D. A., Computatioal Fluid Dyamics ad Heat Trasfer, 3 rd ed., Taylor & Fracis 2011. 4. Roache, P. J., Fudametals of Computatioal Fluid Dyamics, 2 d ed., Hermosa Pub. 1998. 10