1二维椭圆型流动传热通用程序变量表及算例说明(本材料仅供教学参考)西安交通大学CFD&NHT/EHT研究中心陶文铨教授2002/10/15西安2目录一、FORTRAN变量表…………………………………………………………………………3二、关于程序的主要说明………………………………………………………………………6(1)二维椭圆型流动和传热问题通用计算机算法方面的特点………………………………6(2)各程序的主要功能…………………………………………………………………………7(3)三种坐标系统………………………………………………………………………………8(4)网格系统与节点命名方法…………………………………………………………………9十一个例题的已知条件与求解内容…………………………………………………………12例题1直角坐标中二维稳态无内热源的导热……………………………………………………12例题2空心圆柱内的稳态热传导…………………………………………………………………12例题3正方形管道内的充分发展对流换热………………………………………………………13例题4内壁上有直肋的环形通道内充分发展对流换热…………………………………………13例题5给定流场条件下温度场的计算……………………………………………………………14例题6二维突扩通道中的流动与换热……………………………………………………………14例题7方形通道内的复杂充分流动………………………………………………………………15例题8旋转圆盘上的冲击流动……………………………………………………………………15例题9轴对称燃烧内的瞬间燃烧过程……………………………………………………………16例题10带中心射流的通道内的紊流换热………………………………………………………16例题11有质量源的流动问题……………………………………………………………………173一、FORTRAN变量表ListofFORTRANVariablesACOFQuantitycalculatedbysubroutineDIFLOWtogivethecombinedconvectionanddiffusioneffect.AIM(I,J)ThecoefficientWa.AIP(I,J)ThecoefficientEa.AJM(I,J)ThecoefficientSa.AJP(I,J)ThecoefficientNa.AP(I,J)tThecoefficientPa;alsoPSinGAMSOR.APTTheunsteadyterm/t.AREALocalvariable,usuallytheareaofaC.V.face.ARHOLocalvariable,(area)().ARX(J)TheareaofthemainC.V.facenormaltothexdirection.ARXJ(J)ThepartofARX(J)thatoverlapsontheC.V.forV(I,J).ARXJP(J)ThepartofARX(J)thatoverlapsontheC.V.forV(I,J+1).BLBLCBLMBLPCoefficientsusedintheblockcorrection.CON(I,J)Theconstanttermbinthediscriminationequation;alsostandsforCsinGAMSOR.DENOMTemporarystorage.DIFFDiffusionconductanceD.DTThetimestept.DU(I,J)edInfluencingU(I,J).DV(I,J)ndInfluencingV(I,J).F(I,J,NF)Various.FLTemporarystorageleadingtoFLOW.FLMTemporarystorageleadingtoFLOW.FLOWFLPMassflowratethroughaC.V.face.TemporarystorageleadingtoFLOW.4FV(J)FVP(J)InterpolationfactorswhichgivethemassflowvrAtamaingridpoint,I,JasFV(J)vr(I,J)+FVP(I,J)vr(I,J+1)FX(I)Interpolationfactors,whichgivetheinterface.FXM(I)DensityRHOM(atthelocationofU(I,J))asFX(I)RHO(I,J)+FXM(I)RHO(I-1,J).FY(J)Interpolationfactors,whichgivetheinterface.FYM(J)DensityRHOM(atthelocationofV(I,J))asFY(J)RHO(I,J)+FYM(J)RHO(I,J-1).GAM(I,J)Thediffusioncoefficient.IIndexdenotingthepositioninx.IBEGIENDTemporaryvaluesusedinPRINT.IFSTThefirstvalueofIforwhichtheprint-outisarranged;usedinPRINT.IITemporaryindex.IPREFThevalueofIforthegridpoint,whichisusedasareferenceforpressure.ISTThefirstinternal-pointvalueofI.ISTFIST-1;usedinSOLVE.ITERAcounterforiterations.IT1IT2TemporaryvaluesusedinSOLVE.JIndexdenotingthepositioniny.JFLTemporaryindexusedinPRINT.JFSTSimilartoILST.JJTemporaryindexJLSTSimilartoILSTJPREFSimilartoIPREF.JSTThefirstinternal-pointvalueofJ.JSTFJST-1;usedinSOLVE.JT1JT2TemporaryvaluesusedinSOLVE.LASTThemaximumnumberofiterationsallowedbytheuser.LBLK(NF)When.TRUE.TheblockcorrectionforF(I,J,NF)isused.5LPRINT(NF)When.TRUE.,F(I,J,NF)isprinted.LSOLVE(NF)When.TRUE.,WesolveforF(I,J,NF).LSTOPWhen.TRUE.Computationstops.L1ThevalueofIforthelastgridlocationinthexdirection.L2(L1-1).L3(L1-2).MODEIndexforthecoordinatesystem;=1forxy,=2forrx,=3forr.M1ThevalueofIforthelastgridlocationintheydirection.M2(M1-1).M3(M1-2).NTemporarystorageforNF.NFIndexdenotingaparticular.NFMAXThelargestvalueofNFforwhichstorageisassigned.NGAMNFMAX+3;GAM(I,J)canbeconsideredasF(I,J,NGAM).NPNFMAX+1;P(I,J)canbeconsideredasF(I,J,NP).NRHONFMAX+2;RHO(I,J)canbeconsideredasF(I,J,NRHO).NTIMES(NF)ThenumberofrepetitionsofthesweepsinSOLVEforthevariableF(I,J,NF).P(I,J)Thepressurep.PC(I,J)Thepressurecorrection'p.PREFThepressureatthereferencepoint.PT(I)orPT(J)QT(I)orQT(J)TransformedcoefficientsintheTDMA.R(J)TheradiusrforamaingridpointI,J.REL1.0-RELAX(NF).RELAX(NF)RelaxationfactorforF(I,J,NF).RHO(I,J)Thedensity.RHOCONThevalueofforaconstant-densityproblem.RMN(J)ThevalueofradiusrforthelocationtowhichV(I,J)refers.SMAXThelargestabsolutevalueofthe“masssource”usedinthe'pequation.SSUMThealgebraicsumofallthe“masssources”inthe'pequation.SX(J)ScalefactorforthexdirectionatthemaingridlocationsY(J).SXMN(J)ScalefactorforthexdirectionatinterfacelocationsYV(J).6TEMPTemporarystorage.TIMETimetforunsteadyproblems.TITLE(NF)AlphabetictitleforF(I,J,NF).U(I,J)Thex-directionvelocityu.V(I,J)They-directionvelocityv.VOLVolumeoftheC.V.X(I)Thevaluesofxatgridpoints.XCV(I)Thex-directionwidthsofmainC.V..XCVI(I)ThepartofXCV(I)thatoverlapsontheC.V.forU(I,J).XCVIP(I)ThepartofXCV(I)thatoverlapsontheC.V.forU(I+1,J).XCVS(I)Thex-directionwidthofthestaggeredC.V.forU(I,J).XDIF(I)ThedifferenceX(I)-X(I-1).XLThex-directionlengthofthecalculationdomain.XU(I)ThelocationsoftheC.V.faces;i.e.thelocationofU(I,J).Y(J)Thevaluesofyatgridpoints.YCV(J)They-directionwidthsofmainC.V.YCVR(J)TheareayrforamainC.V.YCVRS(J)TheareayrfortheC.V.forv(I,J).YCVS(J)They-directionwidthofthestaggeredC.V.forV(I,J).YDIF(J)ThedifferenceY(J)-Y(J-1).YLThey-directionlengthofthecalculationdomain.YV(J)ThelocationsoftheC.V.faces;i.e.thelocationofV(I,J).二关于程序的主要说明(1)二维椭圆型流动和传热问题通用计算机程序算法方面的特点1、采用原始变量法,即以速度U、V及压力P作为直接求解的变量2、守恒型的差分格式,离散方程系对守恒型的控制方程通过对控制容积作积分而得出的,无论网格疏密程度如何,均满足在计算区域内守恒的条件;3、采用区域离散化方法B,即先定控制体界面、再定节点位置4、采用交叉网格,速度U、V与其他变量分别存储