DISPLAY VENTS LINKED TO REMOTE HEAT DETECTORS The well insulated room of cold ceiling is heated up by hot floor. The room dimensions are LEN and HIG. When the air temperature at the checkpoint of IXP and IYP grid coordinates becomes largee than pre-determined tolerable value, TLIM, the vents of fixed outside pressures and temperatures are opened at the room walls. The bulk air temperature in the room is calculated at the final stage of simulation. Two PLANT options, namely, Global Summation and Indexed Variable Operations are used to make the settings. ENDDIS GROUP 1. Run title and other preliminaries TEXT(VENTS LINKED TO REMOTE DETECTOR REAL(TCOLD,THOT,TOUT,BETA,AGRAVTY,LEN,HIG,TLIM) INTEGER(IXP,IYP) ** Main input data ** + LEN = 0.1 ; HIG = 0.1 + TCOLD = 1.0 ; THOT = 10.0 + TLIM = 8.5 ; TOUT = TCOLD + BETA = 0.003 ; AGRAVTY = -9.81 + IXP = NX/2+1 ; IYP = 1 GROUP 2. Transience; time-step specification STEADY=F;GRDPWR(T,5,15,1.0) GROUP 3. X-direction grid specification GRDPWR(X,10,LEN,1.0) GROUP 4. Y-direction grid specification GRDPWR(Y,10,HIG,1.0) GROUP 7. Variables stored, solved & named SOLVE(P1,U1,V1,TEM1);SOLUTN(TEM1,Y,Y,N,N,N,Y) GROUP 8. Terms (in differential equations) & devices TERMS(TEM1,N,Y,Y,Y,P,P) GROUP 9. Properties of the medium (or media) RHO1=1.207; ENUL=1.5E-04; PRNDTL(TEM1)=0.71 GROUP 11. Initialization of variable or porosity fields FIINIT(P1)=0.0;FIINIT(U1)=0.0;FIINIT(V1)=0.0;FIINIT(TEM1)=0.0 INIADD=F GROUP 13. Boundary conditions and special sources 1. Hot floor: constant temperature of THOT deg. PATCH(SOUTHWAL,SWALL,1,NX,1,1,1,NZ,1,LSTEP) COVAL(SOUTHWAL,U1,1.,0.0) COVAL(SOUTHWAL,TEM1,1.,THOT) 2. Cold ceiling: constant temperature of TCOLD deg. PATCH(NORTHWAL,NWALL,1,NX,NY,NY,1,NZ,1,LSTEP) COVAL(NORTHWAL,U1,1.,0.0) COVAL(NORTHWAL,TEM1,1.,TCOLD) 3. West wall : Adiabatic but with friction ** Zero-slip-always wall part PATCH(WESTWALL ,WWALL,1,1,NY/2+1,NY,1,NZ,1,LSTEP) COVAL(WESTWALL ,V1,1.0,0.0) 4. East wall : Adiabatic but with friction PATCH(EASTWALL,EWALL,NX,NX,NY/2+1,NY,1,NZ,1,LSTEP) COVAL(EASTWALL,V1,1.0,0.0) 6. Buoyancy force PATCH(BUOYAA,PHASEM,1,NX,1,NY,1,1,1,LSTEP) COVAL(BUOYAA,U1,FIXFLU,BOUSS);COVAL(BUOYAA,V1,FIXFLU,BOUSS) BUOYB=-1.0;BUOYE=TCOLD;BUOYD=BETA*AGRAVTY PLANTBEGIN ** PLANT inserts zero-slip-when-vents-closed PATCH(WESTWALF,WEST,1,1,1,NY/2,1,NZ,1,LSTEP)CO=(1.-AMAX1((OLD(TEM1[:IXP:,:IYP:,])-:TLIM:)/ABS(OLD($ TEM1[:IXP:,:IYP:,])-:TLIM:),0.))*:ENUL:*2*:RHO1:/DXU2D COVAL(WESTWALF,V1,GRND,0.0) PATCH(EASTWALF,EAST,NX,NX,1,NY/2,1,NZ,1,LSTEP) CO=(1.-AMAX1((OLD(TEM1[:IXP:,:IYP:,])-:TLIM:)/ABS(OLD($ TEM1[:IXP:,:IYP:,])-:TLIM:),0.))*:ENUL:*2.*:RHO1:/DXU2D COVAL(EASTWALF,V1,GRND,0.0) 7. Reference pressure at the room corner PATCH(FIXPRESS,CELL,NX,NX,NY,NY,1,1,1,LSTEP) ** PLANT switches off/on the pressure relief CO=(1.-AMAX1((OLD(TEM1[:IXP:,:IYP:,])-:TLIM:)/$ ABS(OLD(TEM1[:IXP:,:IYP:,])-:TLIM:),0.))*FIXVAL COVAL(FIXPRESS,P1,GRND,0.0) COVAL(FIXPRESS,V1,ONLYMS,0.0) COVAL(FIXPRESS,U1,ONLYMS,0.0) COVAL(FIXPRESS,TEM1,ONLYMS,SAME) 8. West vent PATCH(WESVEN,WEST,1,1,1,NY/2,1,NZ,1,LSTEP) ** PLANT switches off/on the vent CO=AMAX1((OLD(TEM1[:IXP:,:IYP:,])-:TLIM:)/$ ABS(OLD(TEM1[:IXP:,:IYP:,])-:TLIM:),0.)*FIXVAL COVAL(WESVEN,P1,GRND,0.0) COVAL(WESVEN,TEM1,ONLYMS,1.0) 9. East vent PATCH(EASVEN,EAST,NX,NX,1,NY/2,1,NZ,1,LSTEP) CO=AMAX1((OLD(TEM1[:IXP:,:IYP:,])-:TLIM:)/$ ABS(OLD(TEM1[:IXP:,:IYP:,])-:TLIM:),0.)*FIXVAL COVAL(EASVEN,P1,GRND,0.0) COVAL(EASVEN,TEM1,ONLYMS,1.0) ** PLANT calculates the bulk room temperature and dump it in a commented globcalc file BULTEM=SUM(TEM1*VOL/(YVLAST*XULAST)) Bulk room temperature PLANTEND GROUP 15. Termination of sweeps LSWEEP=500 SPEDAT(SET,GXMONI,TRANSIENT,L,F) GROUP 17. Under-relaxation devices relax(p1,linrlx,0.5) RELAX(U1,FALSDT,0.1);RELAX(V1,FALSDT,0.1) NAMSAT=MOSG GROUP 22. Spot-value print-out NPRMON=LSWEEP;IXMON=NX/2+1;IYMON=1;IZMON=1 GROUP 23. Print-out & plot control OUTPUT(DEN1,N,N,N,N,N,N);OUTPUT(VISL,N,N,N,N,N,N) OUTPUT(PRPS,N,N,N,N,N,N);OUTPUT(BLOK,N,N,N,N,N,N) TSTSWP=-1;ITABL=3;nxprin=1;nyprin=1;NTPRIN=1 idispa=1; csg1=p; selref=t; resfac=1.e-2 PHOTON USE p p1; use patgeo con tem1 z 1 fi;0.001 vec z 1 msg at 3 sec. pause p p2; use patgeo con tem1 z 1 fi;0.001 vec z 1 msg at 6 sec. pause p p3; use patgeo con tem1 z 1 fi;0.001 vec z 1 msg at 9 sec. pause p p4; use patgeo con tem1 z 1 fi;0.001 vec z 1 msg at 12 sec. pause p p5; use patgeo con tem1 z 1 fi;0.001 vec z 1 msg at 15 sec. ENDUSE LIBREF=350 tstswp=-1 dmpstk=t DISTIL=T EX(P1)=1.562E-03; EX(U1)=5.983E-03 EX(V1)=7.473E-03; EX(TEM1)=3.081E+00 LIBREF=350 STOP