GROUP 1. Run title and other preliminaries TEXT(Cooling Of A Heated Block (1) TITLE DISPLAY In this case, the flow of air over a solid block is computed, and the velocity fields are saved. In the subsequent case, the enthalpy field that results from the uniform heating of the solid block cooled by the velocity field determined in the first run is calculated. fixed pressure | \ |- - - - - - - - - - - - - - - - - - - - - - - - - - - -| | -|--> ------> ----> | | | ------> | / -|--> ----> |/ | |---------| ---> | -|--> |/////////| ^ | ----> | | |//solid//| | v | | |//block//| <--- | |--------------|----------------------------------------| ^ | x| 50W. heat source |---> z ENDDIS Flow is prevented from entering the solid region by fixing the velocities to zero. (The porosities are NOT set to zero, because in the heat transfer calculation the heat flows from the box interior into the air through the surface of the block.) For simplicity, wall friction has not been activated. Although enthalpy is not solved in the first run, all specifications necessary for the enthalpy calculation are set, so that it would be an easy matter to activate the simultaneous solution of the hydrodynamics and heat transfer. This would be necessary if, for example, buoyancy was to be simulated. The high conductivity of the metal compared with the air is represented by setting enlarged porosity factors within the metal. Locally defined variables: Boundary values: WIN = velocity of air at inlet in Z direction TIN = temperature of air at inlet POWIN = total heat generated inside the cube (including half not represented due to symmetry) Physical properties: KSOL = Conductivity for steel CPAIR = Specific heat capacity for air ENAIR = Laminar kinematic viscosity for air PRTAIR = Prandtl number for air RHOAIR = Density of air COND = Adjusted area porosities for metal conductivity Grid cell numbers: NHX = Greatest solid cell in X direction (Least = 1 due to symmetry NLZ = Least solid cell in Z direction NHZ = Greatest solid cell in Z direction REAL(WIN,TIN,POWIN) REAL(KSOL,CPAIR,ENAIR,PRTAIR,RHOAIR,COND) INTEGER(NHX,NLZ,NHZ) WIN=0.01; TIN=0.0; POWIN=100.0; KSOL=40.0 CPAIR=1.0E3; ENAIR=2.0E-5; PRTAIR=0.7; RHOAIR=1.0 COND=KSOL*PRTAIR/(RHOAIR*ENAIR*CPAIR) **The grid cell numbers are arranged to allow a layer of small cells around the cube... NHX=4; NLZ=7; NHZ=14 GROUP 3. X-direction grid specification **The method of pairs is used to prescribe a finer grid near the box NX=15; XULAST=1.0 XFRAC(1)=-5.0; XFRAC(2)=3.125E-3 XFRAC(3)=10.0; XFRAC(4)=8.4375E-3 GROUP 5. Z-direction grid specification NZ=25; ZWLAST=1.0 ZFRAC(1)=-5.0; ZFRAC(2)=6.875E-3 ZFRAC(3)=10.0; ZFRAC(4)=3.125E-3 ZFRAC(5)=10.0; ZFRAC(6)=2.34357E-2 GROUP 7. Variables stored, solved & named SOLVE(P1,U1,W1) STORE(BLOK,H1) **Whole field solver for pressure and enthalpy SOLUTN(P1,Y,Y,Y,N,N,N) GROUP 9. Properties of the medium (or media) PRNDTL(H1)=PRTAIR; RHO1=RHOAIR; ENUL=ENAIR GROUP 11. Initial values FIINIT(W1)=WIN **Enlarge the area porosities to represent the conductivity of the metal... CONPOR(COND,EAST,1,NHX-1,1,NY,NLZ,NHZ) CONPOR(COND,HIGH,1,NHX,1,NY,NLZ,NHZ-1) **At the cube surface, the porosity factor is set to 2 represent the small temperature gradient within the metal compared with that within the air CONPOR(2,EAST,NHX,NHX,1,NY,NLZ,NHZ) CONPOR(2,HIGH,1,NHX,1,NY,NLZ-1,NLZ-1) CONPOR(2,HIGH,1,NHX,1,NY,NHZ,NHZ) **The following instructions partition the domain into two zones over which block corrections are to be applied by the linear equation solver. This promotes rapid convergence of the enthalpy solution, which because of the great disproportion of conductivities in the air and metal, is otherwise difficult to obtain. FIINIT(BLOK)=1.0 PATCH(PART2,INIVAL,1,NHX,1,NY,NLZ,NHZ,1,LSTEP) INIT(PART2,BLOK,0.0,2.0) GROUP 13. Boundary conditions and special sources ** Inlet of air at fixed speed WIN and temperature TIN INLET(INLET,LOW,1,NX,1,NY,1,1,1,LSTEP) VALUE(INLET,P1,RHOAIR*WIN) VALUE(INLET,W1,WIN); VALUE(INLET,H1,TIN*CPAIR) ** 0 Pressure on east, west and high boundaries of domain PATCH(ESIDE,EAST,NX,NX,1,NY,1,NZ,1,LSTEP) COVAL(ESIDE,P1,FIXVAL,0.0); COVAL(ESIDE,U1,ONLYMS,0.0) COVAL(ESIDE,W1,ONLYMS,0.0) COVAL(ESIDE,H1,ONLYMS,CPAIR*TIN) PATCH(OUTLET,HIGH,1,NX,1,NY,NZ,NZ,1,LSTEP) COVAL(OUTLET,P1,FIXVAL,0.0); COVAL(OUTLET,H1,ONLYMS,CPAIR*TIN) COVAL(OUTLET,U1,ONLYMS,0.0); COVAL(OUTLET,W1,ONLYMS,0.0) ** The velocities are fixed to zero in and around the solid region to prevent mass flow into the solid PATCH(SOLIDX,CELL,1,NHX,1,NY,NLZ,NHZ,1,LSTEP) COVAL(SOLIDX,U1,FIXVAL,0.0) PATCH(SOLIDZ,CELL,1,NHX,1,NY,NLZ-1,NHZ,1,LSTEP) COVAL(SOLIDZ,W1,FIXVAL,0.0) ** Heat generation within block: total power= POWIN PATCH(BHEAT,CELL,1,NHX,1,NY,NLZ,NHZ,1,LSTEP) COVAL(BHEAT,H1,FIXFLU,POWIN/(2.0*NHX*(NHZ+1-NLZ))) GROUP 15. Termination of sweeps LSWEEP=100 GROUP 16. Termination of iterations LITER(P1)=20 GROUP 17. Under-relaxation devices RELAX(U1,FALSDT,0.3/WIN); RELAX(W1,FALSDT,0.3/WIN) GROUP 22. Spot-value print-out IXMON=NHX+1; IZMON=(NHX+NHZ)/2 GROUP 23. Field print-out and plot control **Tables and line-printer plots of residuals are printed every 2 sweeps NPLT=1; ITABL=3 GROUP 24. Dumps for restarts