NumericalHeatTransfer(数值传热学)Chapter1OGeneralCodefor2DEllipticalFluidFlowandHeatTransfer(2)1/79
1/79 Numerical Heat Transfer (数值传热学) Chapter 10 General Code for 2D Elliptical Fluid Flow and Heat Transfer (2)
Chapter 10 General Code for 2D Elliptical Fluid Flowand Heat Transfer Problems (2)10.6Methods of application and explanation ofMainProgram10.6.1Methods of Code application10.6.2ExplanationofMainProgram10.6.2.1 MODULE START L10.6.2.2PROGRAMMAIN10.6.2.3 SUBROUTINE DIFLOW10.6.2.4 SUBROUTINE SOLVE10.6.2.5 SUBROUTINE SETUP10.6.2.6 SUBROUTINE SUPPLY2/79
2/79 Chapter 10 General Code for 2D Elliptical Fluid Flow and Heat Transfer Problems (2) 10.6 Methods of application and explanation of Main Program 10.6.1 Methods of Code application 10.6.2 Explanation of Main Program 10.6.2.2 PROGRAM MAIN 10.6.2.3 SUBROUTINE DIFLOW 10.6.2.4 SUBROUTINE SOLVE 10.6.2.5 SUBROUTINE SETUP 10.6.2.6 SUBROUTINE SUPPLY 10.6.2.1 MODULE START_L
10.6MethodsofApplicationandExplanationofMainProgram10.6.1MethodsofCodeapplication1.Establishing complete mathematical formulation andcomparing with the standard equation:('+di(p'g)=div(grad)+S,atDetermineS,, I,, and p,2. Calling (调用) a USER(will be taught in Chapter 11)similarto the problem studied3/79
10.6.1 Methods of Code application 1. Establishing complete mathematical formulation and comparing with the standard equation: * * * ( ) div u div grad S ( ) ( ) t + = + 2. Calling (调用)a USER(will be taught in Chapter 11) similar to the problem studied 10. 6 Methods of Application and Explanation of Main Program Determine * * S , , and 3/79
3. Using a few nodes, 5~7 in each direction, andsetting a small value of LAST, say 3-5, to go throughgrammatical examination; Then gradually increasingthe complexity.4. Making correspondent modifications for the six-Module in USER, according to the problem studied,especially forfollowing parts:(1) LSOLVE(NF)for variable NF to be solved setting :.TRUE.(2) LAST-Specify iteration number, default value is 5.4/79
3. Using a few nodes, 5~7 in each direction, and setting a small value of LAST, say 3-5, to go through grammatical examination; Then gradually increasing the complexity. 4. Making correspondent modifications for the sixModule in USER, according to the problem studied, especially for following parts: (1) LSOLVE(NF)—for variable NF to be solved setting : .TRUE. 4/79 (2) LAST—Specify iteration number, default value is 5
(3) NTIMES(NF)Defaultvalue equals 1;for steadynonlinear one, setting: 1 to 2; unsteady linear: 5 to 6(4) DT-Time step, default value is 1030For fullyimplicit scheme,in the a.-term there is aterm of a, = p△V/△t, if △t →oo,ap →O , leadingto steady state results. Default value is for steady case.(5) RELAX(NF)Default value is 1.5 Defining a new dependent variable, say C(ij), as follows:First defining C(NI,NJ),then using EOUIVALENCE:EQUIVALENCE (F(1,1,5), C(1,1))5/79
(3) NTIMES(NF)—Default value equals 1; for steady nonlinear one, setting: 1 to 2; unsteady linear: 5 to 6 5/79 (5) RELAX(NF)—Default value is 1. For fully implicit scheme, in the ap -term there is a term of , if , leading to steady state results. Default value is for steady case. 0 P a V t = 0 , 0 P → → t a (4) DT—Time step, default value is 30 10 5 Defining a new dependent variable, say C(i,j), as follows: First defining C(NI,NJ), then using EQUIVALENCE: EQUIVALENCE (F(1,1,5), C(1,1))