TALK=T;RUN(1,1) DISPLAY This case simulates a FAN-like device located inside to the doma$ in area and turned revolved under some angle concerning the horizon. The fan is described by a box objects. The fan is switched on automatically when air temperature value in some cell will be more installed limits. Otherwise it is switched off. The In-Form is used for the setting of a momentum source for whole object as (SOURCE of U1 at FAN is :USORC: with WHOLOB!IF(SWTH.GT.0)) (SOURCE of V1 at FAN is :VSORC: with WHOLOB!IF(SWTH.GT.0)) The fan will work when the SWTH single real variable will be more zero. Otherwise the fan will be switched off. The significance of SWTH single variable is defined by temperature value in cell with indexes IX=IXP and IY=IYP and TLIM limiting temperature (STORE1 SWTH is TEM1[:IXP:,:IYP:]-:TLIM: with TSTFIN) The alternate way is the direct indication of x and y coordinates {0.05,0.05} of sensor position inside domain (STORE1 SWTH is TEM1{0.05,0.05}-:TLIM: with TSTFIN) The Q1 contains PHOTON USE commands ENDDIS PHOTON USE p p1;;; con tem1 z 1 fi;.0001 ve z 1 use patgeo upause 2 p p2;;; con tem1 z 1 fi;.0001 ve z 1 use patgeo upause 2 p p3;;; con tem1 z 1 fi;.0001 ve z 1 use patgeo upause 2 p p4;;; con tem1 z 1 fi;.0001 ve z 1 use patgeo upause 2 p p5;;; con tem1 z 1 fi;.0001 ve z 1 use patgeo upause 2 p p6;;; con tem1 z 1 fi;.0001 ve z 1 use patgeo enduse ************************************************************ Group 1. Run Title and Number ************************************************************ ************************************************************ TEXT(Temperature-controlled fan ) ************************************************************ ************************************************************ IRUNN = 1 ;LIBREF = 0 ************************************************************ Group 2. Time dependence STEADY = F * Set overall time and no. of steps TFIRST =0. ;TLAST =3600. FSTEP = 1 ;LSTEP = 6 TFRAC(1)=0.166667 ;TFRAC(2)=0.333333 TFRAC(3)=0.5 ;TFRAC(4)=0.666667 TFRAC(5)=0.833333 ;TFRAC(6)=1. ************************************************************ Group 3. X-Direction Grid Spacing CARTES = T NX = 40 XULAST =0.1 XFRAC(1)=0.024408 ;XFRAC(2)=0.048816 XFRAC(3)=0.073223 ;XFRAC(4)=0.097631 XFRAC(5)=0.122039 ;XFRAC(6)=0.146447 XFRAC(7)=0.1726 ;XFRAC(8)=0.198754 XFRAC(9)=0.224908 ;XFRAC(10)=0.251062 XFRAC(11)=0.277216 ;XFRAC(12)=0.30337 XFRAC(13)=0.329524 ;XFRAC(14)=0.355677 XFRAC(15)=0.381831 ;XFRAC(16)=0.407985 XFRAC(17)=0.434139 ;XFRAC(18)=0.460293 XFRAC(19)=0.486447 ;XFRAC(20)=0.507513 XFRAC(21)=0.528579 ;XFRAC(22)=0.549645 XFRAC(23)=0.570711 ;XFRAC(24)=0.596865 XFRAC(25)=0.623018 ;XFRAC(26)=0.649172 XFRAC(27)=0.675326 ;XFRAC(28)=0.70148 XFRAC(29)=0.727634 ;XFRAC(30)=0.753788 XFRAC(31)=0.779941 ;XFRAC(32)=0.806095 XFRAC(33)=0.832249 ;XFRAC(34)=0.858403 XFRAC(35)=0.884557 ;XFRAC(36)=0.910711 XFRAC(37)=0.933033 ;XFRAC(38)=0.955355 XFRAC(39)=0.977678 ;XFRAC(40)=1. ************************************************************ Group 4. Y-Direction Grid Spacing NY = 40 YVLAST =0.1 YFRAC(1)=0.025 ;YFRAC(2)=0.05 YFRAC(3)=0.075 ;YFRAC(4)=0.1 YFRAC(5)=0.125 ;YFRAC(6)=0.15 YFRAC(7)=0.176154 ;YFRAC(8)=0.202308 YFRAC(9)=0.228462 ;YFRAC(10)=0.254615 YFRAC(11)=0.280769 ;YFRAC(12)=0.306923 YFRAC(13)=0.333077 ;YFRAC(14)=0.359231 YFRAC(15)=0.385385 ;YFRAC(16)=0.411538 YFRAC(17)=0.437692 ;YFRAC(18)=0.463846 YFRAC(19)=0.49 ;YFRAC(20)=0.511066 YFRAC(21)=0.532132 ;YFRAC(22)=0.553198 YFRAC(23)=0.574264 ;YFRAC(24)=0.600418 YFRAC(25)=0.626572 ;YFRAC(26)=0.652726 YFRAC(27)=0.678879 ;YFRAC(28)=0.705033 YFRAC(29)=0.731187 ;YFRAC(30)=0.757341 YFRAC(31)=0.783495 ;YFRAC(32)=0.809649 YFRAC(33)=0.835803 ;YFRAC(34)=0.861956 YFRAC(35)=0.88811 ;YFRAC(36)=0.914264 YFRAC(37)=0.935698 ;YFRAC(38)=0.957132 YFRAC(39)=0.978566 ;YFRAC(40)=1. ************************************************************ Group 5. Z-Direction Grid Spacing PARAB = F NZ = 1 ZWLAST =0.1 ZFRAC(1)=1. ************************************************************ Group 6. Body-Fitted Coordinates ************************************************************ Group 7. Variables: STOREd,SOLVEd,NAMEd ONEPHS = T NAME(1)=P1 ;NAME(3)=U1 NAME(5)=V1 ;NAME(148)=SPH1 NAME(149)=TEM1 ;NAME(150)=PRPS * Y in SOLUTN argument list denotes: * 1-stored 2-solved 3-whole-field * 4-point-by-point 5-explicit 6-harmonic averaging SOLUTN(P1,Y,Y,Y,N,N,Y) SOLUTN(U1,Y,Y,N,N,N,Y) SOLUTN(V1,Y,Y,N,N,N,Y) SOLUTN(SPH1,Y,N,N,N,N,N) SOLUTN(TEM1,Y,Y,Y,N,N,Y) SOLUTN(PRPS,Y,N,N,N,N,Y) PRPS = 150 ************************************************************ Group 8. Terms & Devices * Y in TERMS argument list denotes: * 1-built-in source 2-convection 3-diffusion 4-transient * 5-first phase variable 6-interphase transport TERMS(P1,Y,Y,Y,N,Y,Y) TERMS(U1,Y,Y,Y,Y,Y,Y) TERMS(V1,Y,Y,Y,Y,Y,Y) TERMS(TEM1,N,Y,Y,Y,N,Y) DIFCUT =0.5 ;ZDIFAC =1. GALA = F ;ADDDIF = F ISOLX = -1 ;ISOLY = -1 ;ISOLZ = -1 ************************************************************ Group 9. Properties used if PRPS is not stored, and where PRPS = -1.0 if it is! RHO1 =1.189 ;TMP1 =0. ;EL1 =0. TSURR =0. ;TEMP0 =273. ;PRESS0 =1.0E+05 DVO1DT =3.41E-03 ;DRH1DP =0. EMISS =0. ;SCATT =0. RADIA =0. ;RADIB =0. ENUL =1.544E-05 ;ENUT =0. PRNDTL(U1)=1. ;PRNDTL(V1)=1. PRNDTL(TEM1)=1. PRT(U1)=1. ;PRT(V1)=1. PRT(TEM1)=1. CP1 =1005. ;CP2 =1. ************************************************************ Group 10.Inter-Phase Transfer Processes ************************************************************ Group 11.Initial field variables (PHIs) FIINIT(P1)=1.0E-10 ;FIINIT(U1)=1.0E-10 FIINIT(V1)=1.0E-10 ;FIINIT(SPH1)=1.0E-10 FIINIT(TEM1)=18. ;FIINIT(PRPS)=-1. PATCH(^OB1 ,INIVAL, 1, 0, 0, 0, 0, 0, 1, 1) INIT(^OB1 ,P1 ,0. ,0. ) INIT(^OB1 ,PRPS,0. ,-1. ) PATCH(^OB6 ,INIVAL, 6, 0, 0, 0, 0, 0, 1, 1) INIT(^OB6 ,PRPS,0. ,100. ) INIADD = F FSWEEP = 1 NAMFI =CHAM ************************************************************ Group 12. Patchwise adjustment of terms Patches for this group are printed with those for Group 13. Their names begin either with GP12 or & ************************************************************ Group 13. Boundary & Special Sources PATCH(^OC1 ,CELL , 1, 19, 0, 0, 0, 0, 1, 6) COVAL(^OC1 ,U1 ,In-Form:source - see Grp 19) COVAL(^OC1 ,V1 ,In-Form:source - see Grp 19) COVAL(^OC1 ,TEM1, FIXFLU ,1.0E-10 ) PATCH(OB2 ,EWALL , 40, 40, 1, 40, 1, 1, 1, 6) COVAL(OB2 ,V1 ,1. ,0. ) COVAL(OB2 ,TEM1,1. ,18. ) PATCH(OB3 ,NWALL , 1, 40, 40, 40, 1, 1, 1, 6) COVAL(OB3 ,U1 ,1. ,0. ) COVAL(OB3 ,TEM1,1. ,18. ) PATCH(OB4 ,WWALL , 1, 1, 1, 40, 1, 1, 1, 6) COVAL(OB4 ,V1 ,1. ,0. ) COVAL(OB4 ,TEM1,1. ,18. ) PATCH(OB5 ,SWALL , 1, 40, 1, 1, 1, 1, 1, 6) COVAL(OB5 ,U1 ,1. ,0. ) COVAL(OB5 ,TEM1,1. ,18. ) PATCH(^OC6 ,CELL , 6, 19, 0, 0, 0, 0, 1, 6) COVAL(^OC6 ,TEM1, FIXFLU ,5. ) PATCH(^P-REL1 ,CELL , 7, 1, 0, 0, 0, 0, 1, 6) COVAL(^P-REL1 ,P1 ,0.1 ,0. ) COVAL(^P-REL1 ,TEM1,0. , SAME ) XCYCLE = F EGWF = T WALLCO = GRND2 ************************************************************ Group 14. Downstream Pressure For PARAB ************************************************************ Group 15. Terminate Sweeps LSWEEP = 500 ;ISWC1 = 1 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1 SELREF = T RESFAC =1.0E-05 ************************************************************ Group 16. Terminate Iterations LITER(P1)=20 ;LITER(U1)=10 LITER(V1)=10 ;LITER(TEM1)=100 ENDIT(P1)=1.0E-03 ;ENDIT(U1)=1.0E-03 ENDIT(V1)=1.0E-03 ;ENDIT(TEM1)=1.0E-06 ************************************************************ Group 17. Relaxation RELAX(P1,LINRLX,0.8) RELAX(U1,FALSDT,1.) RELAX(V1,FALSDT,1.) RELAX(SPH1,LINRLX,1.) RELAX(TEM1,FALSDT,10.) RELAX(PRPS,LINRLX,1.) OVRRLX =0. EXPERT = F ;NNORSL = F ************************************************************ Group 18. Limits VARMAX(P1)=1.0E+10 ;VARMIN(P1)=-1.0E+10 VARMAX(U1)=1.0E+06 ;VARMIN(U1)=-1.0E+06 VARMAX(V1)=1.0E+06 ;VARMIN(V1)=-1.0E+06 VARMAX(SPH1)=1.0E+10 ;VARMIN(SPH1)=-1.0E+10 VARMAX(TEM1)=1.0E+10 ;VARMIN(TEM1)=18. VARMAX(PRPS)=1.0E+10 ;VARMIN(PRPS)=-1.0E+10 ************************************************************ Group 19. Data transmitted to GROUND PARSOL = F ISG62 = 1 SPEDAT(SET,DOMAIN,PHASE_1_MAT,I,0) SPEDAT(SET,GXMONI,TRANSIENT,L,F) SPEDAT(SET,SOURCE,U1!FAN,C,=6.726001E-04!WHOLOB!IF(SWTH.GT.0)) SPEDAT(SET,SOURCE,V1!FAN,C,=6.725999E-04!WHOLOB!IF(SWTH.GT.0)) SPEDAT(SET,MAKE,SWTH,C,=0) SPEDAT(SET,STORED,SWTH,C,=TEM1{0.05&0.05}-40.!TSTFIN) SPEDAT(SET,GXMONI,PLOTALL,L,T) SPEDAT(SET,OBJNAM,^OB1,C,FAN) SPEDAT(SET,OBJTYP,^OB1,C,BLOCKAGE) SPEDAT(SET,FAN,MATERIAL,R,-1.) SPEDAT(SET,OBJNAM,^OC1,C,FAN) SPEDAT(SET,OBJTYP,^OC1,C,BLOCKAGE) SPEDAT(SET,OBJNAM,!OB2,C,E_OUTLET) SPEDAT(SET,OBJTYP,!OB2,C,PLATE) SPEDAT(SET,OBJNAM,!OB3,C,N_OUTPUT) SPEDAT(SET,OBJTYP,!OB3,C,PLATE) SPEDAT(SET,OBJNAM,!OB4,C,W_OUTLET) SPEDAT(SET,OBJTYP,!OB4,C,PLATE) SPEDAT(SET,OBJNAM,!OB5,C,S_OUTLET) SPEDAT(SET,OBJTYP,!OB5,C,PLATE) SPEDAT(SET,OBJNAM,^OB6,C,HEATBLOC) SPEDAT(SET,OBJTYP,^OB6,C,BLOCKAGE) SPEDAT(SET,HEATBLOC,MATERIAL,R,100.) SPEDAT(SET,OBJNAM,^OC6,C,HEATBLOC) SPEDAT(SET,OBJTYP,^OC6,C,BLOCKAGE) SPEDAT(SET,OBJNAM,^OB7,C,PR_REL) SPEDAT(SET,OBJTYP,^OB7,C,PRESSURE_RELIEF) SPEDAT(SET,OBJNAM,^P-REL1,C,PR_REL) SPEDAT(SET,OBJTYP,^P-REL1,C,USER_DEFINED) SPEDAT(SET,FACETDAT,NUMOBJ,I,7) SPEDAT(SET,MATERIAL,100,L,T) ************************************************************ Group 20. Preliminary Printout DISTIL = T ;NULLPR = F NDST = 0 DSTTOL =1.0E-02 EX(P1)=5.564E-08 ;EX(U1)=1.288E-05 EX(V1)=1.242E-05 ;EX(SPH1)=999.700012 EX(TEM1)=45.189999 ;EX(PRPS)=3.722 ************************************************************ Group 21. Print-out of Variables INIFLD = F ;SUBWGR = F * Y in OUTPUT argument list denotes: * 1-field 2-correction-eq. monitor 3-selective dumping * 4-whole-field residual 5-spot-value table 6-residual table OUTPUT(P1,Y,N,Y,Y,Y,Y) OUTPUT(U1,Y,N,Y,Y,Y,Y) OUTPUT(V1,Y,N,Y,Y,Y,Y) OUTPUT(SPH1,Y,N,Y,N,N,N) OUTPUT(TEM1,Y,N,Y,Y,Y,Y) OUTPUT(PRPS,Y,N,Y,N,N,N) ************************************************************ Group 22. Monitor Print-Out IXMON = 20 ;IYMON = 20 ;IZMON = 1 NPRMON = 100000 ;NPRMNT = 1 ;TSTSWP = -1 UWATCH = T ;USTEER = T HIGHLO = F ************************************************************ Group 23.Field Print-Out & Plot Control NPRINT = 100000 ;NUMCLS = 5 NTPRIN = 100000 ;ISTPRF = 1 ;ISTPRL = 100000 NXPRIN = -1 ;IXPRF = 1 ;IXPRL = 10000 NYPRIN = -1 ;IYPRF = 1 ;IYPRL = 10000 IPLTF = 1 ;IPLTL = -1 ;NPLT = -1 ISWPRF = 1 ;ISWPRL = 100000 ITABL = 3 ;IPROF = 1 ABSIZ =0.5 ;ORSIZ =0.4 NTZPRF = 1 ;NCOLPF = 50 ICHR = 2 ;NCOLCO = 45 ;NROWCO = 20 No PATCHes yet used for this Group ************************************************************ Group 24. Dumps For Restarts SAVE = T ;NOWIPE = F NSAVE =CHAM IDISPA = 1 ;IDISPB = 0 ;IDISPC = 0 CSG1 ='P' STOP