Point-strokeline点-划线MAINSUPPLYSETUPUSEROnlyexecutedUGRIDonceforGRIDMAINSETUP1onecaseCodeSTARTDENSEENDBOUNDExecutedPRINTOUTPUTfor eachUSERDIFLOWouteriterationGAMSORSETUP21+SOLVE6/75
6/75 N ? USER Y MAIN Code Only executed once for one case Executed for each outer iteration Point-stroke line 点-划线
1.MODULESTARTL2MAIN3.SUBROUTINEDIFLOW4.Structure ofSOLVE5.Blockcorrection6.Structure of SETUP7.MODE executionFor the Main8.Determination of neighbor coefficientsProgram,9.DeterminationofAPcoefficientsthese parts will10.Structure of SIMPLER11.Temporal storage of coefficients for SIMPLERbe explained in12.Accumulated additiondetail.13.Storage of coefficients of p-equation14.Nominal densityfortemperature15.Iteration=Marching forward16.Data Format for print out7/79
7/79 1. MODULE START_L 2.-MAIN - 3. SUBROUTINE DIFLOW 4. Structure of SOLVE 5. Block correction 7. MODE execution 8. Determination of neighbor coefficients 6. Structure of SETUP 9. Determination of AP coefficients 10. Structure of SIMPLER 11. Temporal storage of coefficients for SIMPLER 12. Accumulated addition 14. Nominal density for temperature 15. Iteration=Marching forward For the Main Program, these parts will be explained in detail. 13. Storage of coefficients of p-equation 16. Data Format for print out
10-6-2ExplanationofMainprogramsCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC This computer program was copied from thegraduate student courseC program of the University of Minnesota. Part of it was re-formulatedC to meetthe local computational environment. SomeinappropriateC expressions were also corrected. The program is used only for theC teaching purpose. No part ofit may be published.You may use it as aC frameto re-developyourowncodefor research purpose.C --------Instructor of Numerical Heat Transfer, XJTU,2013..CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC The current version of theprogram was updated from Fortran 77toC Fortran 95 by Dr. Yu-Tong Mu,Dr. LiChen and Dr.Kong Ling of NHTCgroupofXJTUduring2013.01-04CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC******************水********水**************水*************水******8/79
10-6-2 Explanation of Main programs CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C This computer program was copied from the graduate student course C program of the University of Minnesota. Part of it was re-formulated C to meet the local computational environment. Some inappropriate C expressions were also corrected. The program is used only for the C teaching purpose. No part of it may be published. You may use it as a C frame to re-develop your own code for research purpose. C -Instructor of Numerical Heat Transfer, XJTU,2013.- CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C The current version of the program was updated from Fortran 77 to C Fortran 95 by Dr. Yu-Tong Mu , Dr. Li Chen and Dr.Kong Ling of NHT C group of XJTU during 2013.01-04 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C*************************************************************** 8/79
LOSALAMOSereDiscoveriesAreMade!凌空陈黎母玉同10.6.2.1 MODULE START I9/79
母玉同 凌 空 陈 黎 10.6.2.1 MODULE START_L 9/79
(1)-Explained!Name of ModuleMODULESTARTLindetailPARAMETER(NI=100,NJ=200,NIJ=NI,NFMAX=10,NFX4=NFMAX+4)光光CHARACTER*8TITLE(NFX4)LOGICALLSOLVE(NFX4),LPRINT(NFX4),LBLK(NFX4),LSTOPREAL*8DIMENSION(NI,NJ,NFX4)::F!One3DfunctionREAL*8,DIMENSION(NI,NJ,6):COE,COFU,COFV,COFPREAL*8,DIMENSION(NI,NJ)::PRHO.GAM,CPCON.AIPAIM,AJPAJM.APREAL*8,DIMENSION(NI)::U,V,PC,T,DU,DV,UHAT,VHATREAL*8,DIMENSION(NI)::X,XU,XDIF,XCV,XCVS,XCVI,XCVIPREAL*8,DIMENSION(NJ):Y,YV,YDIF,YCV,YCVS,YCVR,YCVRSARX,ARXJ,&ARXJPR,RMN,SX,SXMNScorbREAL*8.DIMENSION(NI)::FV.FVPFX,FXMae,aw,an,as,apREAL*8.DIMENSION(NJ)::FY,FYMREAL*8.DIMENSION(NIJ)::PTQTREAL*8RELAX(NFX3).TIME.DT.XL.YL.RHOCON(1)Packagingdata(封装数据);INTEGER*4NE.NP.NRHO.NGAM.NCPL1.L2.L3.M1.M2.M3(2)Initializingdata(数据初始化);&ISTJSTITER,LAST,MODE.NTIMES(NFX4).IPREFJPREF(3)Declaringtypeofdata(声明数据类型)REAL*8SMAX.SSUMREAL*8FLOW.DIFE.ACOF10/79
MODULE START_L !One 3D function REAL*8 RELAX(NFX3),TIME,DT,XL,YL,RHOCON INTEGER*4 NF,NP,NRHO,NGAM,NCP,L1,L2,L3,M1,M2,M3, & IST,JST,ITER,LAST,MODE,NTIMES(NFX4),IPREF,JPREF REAL*8 SMAX,SSUM REAL*8 FLOW,DIFF,ACOF PARAMETER (NI=100,NJ=200,NIJ=NI,NFMAX=10,NFX4=NFMAX+4) C****************************************** CHARACTER*8 TITLE(NFX4) LOGICAL LSOLVE(NFX4),LPRINT(NFX4),LBLK(NFX4),LSTOP REAL*8,DIMENSION(NI,NJ,NFX4)::F REAL*8,DIMENSION(NI,NJ,6)::COF,COFU,COFV,COFP REAL*8,DIMENSION(NI,NJ)::P,RHO,GAM,CP,CON,AIP,AIM,AJP,AJM,AP REAL*8,DIMENSION(NI):: U,V,PC,T,DU,DV,UHAT,VHAT REAL*8,DIMENSION(NI):: X,XU,XDIF,XCV,XCVS,XCVI,XCVIP REAL*8,DIMENSION(NJ)::Y,YV,YDIF,YCV,YCVS,YCVR,YCVRS,ARX,ARXJ, & ARXJP,R,RMN,SX,SXMN REAL*8,DIMENSION(NI)::FV,FVP,FX,FXM REAL*8,DIMENSION(NJ)::FY,FYM REAL*8,DIMENSION(NIJ)::PT,QT Sc or b ae , aw , an , as , ap 10/79 (1)-Explained in detail ! Name of Module