19820020720.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
A//Z_o',_i/.,_,/a3 NASA-CR-169103 ..-- 19820020720 A Reproduced Copy , Reproduced for NASA by the NASA Scientific and Technical Information Facility ,_",t:'"l':t', _i<_,r.v__ GOTz: 1%9 LANGLEY RESEARCH CENTER LIBRARY NASA HA_,J.PhT{O.VtRGIFLA • ....,, .. FFNo672 Aug 65 3 1176 01342 5849 LA--8872 DE82 007360 LA-8872 UC-32 Issued:August1981 VNAP2: A Computer Program for Computatlon of Two-Dlmenslonal, Tlme-Dependent, Compres_;'b!e, Turbulent Flow MichaelC.Cline O_SCLAlilleR • I I LosAlamos,NewMexico87545(_ : CONTEh'TS ABSTRACT ............................................. ! !. THE BASIC METHOD .................................... ! A. Introductioa ...................... ........... ..... I B. Dimmion ......................................... 2 c. _ovem_ F.qamom.................................... 2 D. PhyskalandOmimtatica,,!FlowSpaces ......................... 8 F.. Numes4csl Method ..................................... 10 F. Cornme_ on the Cakulation _ Steady Sub_ak Fknq ................. 19 G. _ and__ .................................... ,,-, II. DESCRIPTION AND USE OF THE VAHP2 PROGRAM ................. 24 A. S_ Deacrlp_a ................................... 24 lB. ComputationaGl rid Descdpt_ .............................. 27 c. tn_atDataDescriptim.................................. 28 D. OapuDt e_xk,. ..................................... 42 E. Cornering System Co_ ............................. 43 F. Artificial Viscmit7 Discusatoa ............................... 44 G. Sample Caicu_cm .................................... 44 ACKNOWLEDGMENTS eeeeoe eo'ea* oeoeeeeeeeeeteeeeeeeee., e e46 REFERENCES • • • • • • i • • • o e e e e e . • • • • • I e o t e . • , . a . • • e o . e e . e FIGURES • . ° m • • • • e e a o I e • • • • t e • e ee • • • eee* e* eee e.e * Je*o* t e 49 APPENDIX. FORTRAN LISTING OF THE VNAP2 PROGRAM ............... 91 --.., __ ---:i ................................... o VNAP2: A COMPUTER PROGRAM FOR COMPUTATION OF TWO-DIMENSIONAL, TIME-DEPENDENT, COMPRESSIBLE, TURBULENT FLOW by Michael C. Cline ABSTRACT VNAP2 is a computer prolFam for calculating tu_oul_t (as weft as laminar and invlscid_ steady, and unready flow. VNAP2 solves _e tw_ time- dependent, €ompress_ Navkr-SWkes equatlo_ The turbulence b modded with elther an algebr_ mlxinS-k_th model, a one_iuation model, or the Jone_Laund_ two-equs21onmodel.The geometrymay be a slnsk-or a dual-fk_In8stream.The _',_" gridIx_ts are €ornered ush_Sthe umplit MaeConaa_ ,eheme. Two cS_cm to speed up the cakuJations for htsh Re_ls numbe_"_ are tnciod_ The boundaS__ Oelnuarecouq,utusin8eda_ tchemwithe the viscous tu'ms truttcdas source fimctJom.Au cxli_ _ viscosity b included for sho_ €omputs_x_ The fluidis _ to be a _ gu. The flow boundL,.ics may be 8d:_'ary curve:!solid walls, JnfMw/_ boundaries,or _e-jet T)_ _ thttctnbe,_'_ cooc_n_ _nku,Ja-pm,a...dt_txxrxs, a_oih,andfree-jeextpansions.Theaccuracyande_'kncyof theIXOpamareslmwn by ctlcult_m of severtl _ and turbuJ_ flows. The proFam 8ndJU use are descn'bedc_q_qely,andsixsampkcasesand• code_ areincluded. I. THE BASIC METHOD A. Introduction VNAP_. is a computer programfor calcu]atlngturbulent(as wel]as laminarand inviscid),steady, 8rid .,,-_" unsteady flow. VNAP2 is a modifiedverz_ of the VNAP code discussed in Ref. 1. Like the VNAP code, VNAP2 solves the tw_al (2D, axisymme_.'c), time-dependent,€om_ Navler- Stokes couat]ons by • second-onkr-accurate t'mit_'-differcncme ethod.Uniike the VNAP code, VNAP2 allows arbitrarygrid spacing, hts two options to speed up the cakulatk_ for high Reynokls number flows, containsthreediffe_nt tm_tdence nxx_s, and can solve either _ or dual-flowing stream gcomctrk_ This last option alkn_ the VNAP2 €ode to computeintenu_eztenud fk,ws, such as inku, and jet-powu'cd aftatxxiies as w_l as airfot_. Bectt_ of the variable grid tad tbe opfoas to speed up the cti_ulstiom far high _ number flows, VNAP2 computes high P.eyn_ds numL-_flawsmo,'.hmored'fickndy than VNAP. Howew=, ful- scale Reynolds numbers (lift-10s) still require fairly ioog run times (tee Sec. LG). In addition, °°-- I i determin_tkmof a reasonable variable grid and selection of the best numericalscheme paramete_ for high Reynolds numberflows requirea certainamount of trialand error.. AlthougLthe VNAP code replacedthe NAP2 code, VNAP2 is not r_-cessa_y intendedto replacethe VNAP code. Although VNAP2 can handle all the flows that VNAP is capable of solving, as well as many additionalflows, VNAP2 is approximatelydoublethe sizeof VNAP andsomewhat morecomplex. As aresulLVNAPis2 moredifl'_-ulttomodifyu wellu torunonsraalk.rcomputingsystems.Forthese reasons, many users may prefe_to use both codes. B. Disculsbm The VNAP2 code follows the philosophyof the VNAP code; that is, theboundarygridpoints arethe mc_. important.In addition, except for purely supersonic inflow and outflow, these grid points are generallythe mo_ dif_cult. For these reasons, the construction_1"boundary grid pointroutines is not left to the generaluser, and V_AP2 contains complete and acctr.lte routines for cak:ulafingall boundary grid points. Several differentboundary conditions are included as options, and all unspecit'_! variables are calculated using a second-order-accurate, rcf'e_ence-plane-characteristicscheme, with the viscous terms treatedas source functions. The code also continuallychecks for subsonic or supersonicflow, as well as inflow or outflow, to apply the correct boundary €_Jnditions.Mostof the options for inflow and outflow bounchtryconditions include nonreflectingcondi_.kmsto acoderate the convergence to steady rtate. Like VNAP, VNAP2 employs the unsplit MacCornutck scheme3 to compute the interiorgrid points. The governingequations sue left in nonconservation form. For flows with thin boundarylayers or fre_ shearlays's` the smallIlridspacingrequiredfor resolutiongreatlym thecomputertime.To reduce this time, the gridpoints L-tthef'me_partsof the meshare subeycled. In addition,an explicitmodif'mation to the MscCon'nack scheme (allowing the removal of the speedof sound fromthe C-F-L conditionand thus increasing the time-step size) is eJso included. An explicit ar_cial viscosity model stablises the computationsfor shock waves. C. GoverningEquations The 2D time-dependent,compressible,Navier-Stokesequationsfor turbulentflow of a perfectgas can be writtenas I • _+_N_p. _p+vTy_p+p(o.N+To,,y+ y) =_ + +-_-TyJ" (') --at a, vTy+ .....pa, pa, (_+2,) +_ _,i _ a,I " ,o_T_\p_,I ay_p_/ (x+,)+,a, p n2 apq (2) p3ax ' 2 --+t+v+°+++ay p a), p"YLv+++;+:;+r2_),-_vy++°o]T; +;_,+[1'(,'_,+_,v_+y+)] +;-OrL _\T-v_-y+_,,o°+ _ -;--_-y )+_.0(,,+)],[(x+2.)(0,_y _)_+]+ 1 2 alXl p 3 ay " (3) ++o_+'"++. _-" '_+[_+"_x++"+_ay]:(,')-{(_-_++_,_'+_+.,_._"+[()l_._,_ +,rr+,+'.,,__'fl;+(+y.-- ,+,o,_+, - _,,,o.+_(._++,,._+k_)+_,(,,e) -aRT[_\T-_,]oc,,+,_+_+y_,_--,.pTy0,,+)] ',-4+_+(_o+_°0.1 +k__+y _R'r_.po_]+.}. (4) and p = pRT, (5) where p is the density; p is the pressure;T is the temperature;u and v are the velocity components; q isthe turbulenceenergy; e is the turbulencedissipationrate;a is the speed of sotmd;R is thegas constant; st = stM+ I_r:_"= Zu + Zr; It,,,,and Zu are the firs_ and second coefficients of molecuJarviscosity; PTand Zr are the correspondingturbulentquan55es; ¥ is the ratio of specific heats;k = k. + _; ku is the coefficientof molecularconductivity; kr is the turbulentvalue; x and y are the spacecoordinates;t is -" the time; O is a constant; and _ is 0 for planar flow and 1 for axisyrnruetricflows. Equations (2}{4) are written for thetwo-equation turbulencemodel. For themixing-lengthand one-equationmodelsdiscussed below, Eqs. (2}{4) r.reslightly different.The density gradientterms, premul_pliedby the constant e, on the right-hand s_deof Eqs. (!}{4) are from turbulentdensity fluctuations and are, therefore, zero for laminar flows. Equation(I) is the conservation of mass or continuity equation,Eqs. (2) and (3) arethe x and y momentum equations, respectively, and Eq. (4) is theinternale_ergy equat_n writtenin termsof _essure usingthe equation of state for a perfectgas, Eq. (5). Thus there is a system of fiveequations for the eight unknownsu,v, p, p, 1",ttr, Z_, and kr (Inthe two-equationturbulence model, there are two additionalequations for the unknowns q and e.) To close this set ofequafons, the turbulmce qmmtitles St. Zr and kTneed definition. VNAP2 uses the followingthree turbulencemodelsto accomplishthis. 1. Mixlng-LengthTurbulenceModel. The _ model is an algebraicmi_-length model that can he written as ,.:,,[(++)+(+__y/ j _, _+_'T (6) = _,/" • (7) and 3 I kr= _'R_r/(-y I)Pr_, (S) where f is the mixing lengthdef'medbelow and Prr is the turbulentPrandtlnumber. Forfree shear layer flows, the model follows Ref. 4. For monotonic velocityprordes,r is det'medas t = C.,t. lY_- Yt] . (9) whereCu,, is a constant and U -- UL yt=y for --=0.1 , u U -- u t U -- UL y==y for --=0.9, u u -- u L and u_ and uu are the lower and upper velocitiesof a monotonically increasing or decreasing velocity profile.For free shearflows with a velocity profile that has the minimumvelocity uu in the interior, I is deFm_as t =cult•I y_- ytI • 00) where CuLt is a constant and U -- U L y,=y for ----O.landy<y_, u M -- UL U -- Uu y_=y for --= 0.9 and y > y: , UU -- Uu and y:=y for u----uu . Theprogram continuallychecks to determinethe type of velocity profile present.Ifu, is within5% of the _nimum OfULor uu,then the monotonic prordeis assumed. This check on the sizeofu u is intendedto stop small velocity variations, away fromthe shearr_on. from switchingthe velocity prordetype. The 5% value is arbitraryand