CONTINUOUS_MODEL CeDetZon ABSTRACT "Detailed ZONe w T**4 lw radiation, view factors, displacement vent... " /* PG 020508 MiscMeasure implemented using a matrix of coefficients (to avoid problems with Jacobians) PS 020506 New options for MiscMeasure, positive electricity consumption for local cooling units LE 020425 New OUT variable MiscMeasure on link MiscMeasureLink determined by PG new S_P MiscSelector PG 010821 The range of xDesk and yDesk changed to [-BIG, BIG] (was [SMALL, BIG]) MV 010618 Occupancy loads are revised. Error when PMV < 0 PG 010615 range of M (Activity level) changed to [0.6, 10] (was [0.8, 4]) min of zTerm_0 and zTerm changed to 0 (was SMALL) MV 010420 lmPerW calc is revised. EWorkPlane ***** result -bug is fixed MV 010411 The latent load from occupancies is changed to QLatent=M-Qcv-Qlw MV 010411 CInt calc was revised MV 010409 nIntWall == 0 is allowed as well. MV 010409 Total # of working hours and lost # of working hours are introduced and cost of lost working hours is removed MV 010409 Tiny error in QCvOcc2Zone AB 010401 'IntWall' Furniture removed; Inside walls and internal masses added AB 010401 'QLocUnit' added into QHC2Zone AB 010314 'TranspLite' bug fixed MV 010221 Evaporative humidity loads are added AB 010221 ExclSub Added changes needed for sw_fac PG 010202 ExclSub Excluded subsurfaces. Some SMP changed to CMP. AB 010131 'SubSub' Allow intersecting subsurfaces AB 010130 'TranspLite' Light surface changed place with HC surfaces. Light surface is 'transparent' and acts only as a radiation source; it is excluded in the LW exchange matrix, but has an extra line in the view factor matrix. The following other models are affected: LITEFAC LWFAC LWFACRAD SW_FAC VIEW_FAC VIEW_MRT MV 010110 Workloss due to temperature is added. MV 010110 EWorkplane is changed from LOC to OUT variable. It is introduced in link as well. The AutoLiteOn input variable is introduced for automatic lite control. AB 001023 Removed back radiation from QDayLite AB 001010 Convective devices w height and TQ interface LE 000523 Modify test on SchedOcc to avoid loss of Jacobian elements AB 000210 Heat balance corrected for moisture MV 990407 T**4 is written ABS(T**3) * T to help the solver MV 981215 Directed mean radiant and operative temperatures are introduced to 1st operative location (if it exists) MV 981214 Non-linear calc of mean radiant temp MV 981125 Local units are introduced. MV 980925 Local variable Q2SurfSpec[i] was assigned at two different places. MV 980923 CO2 ppm / vol is added MV 980923 lwrad between lite and ceiling is linearized MV 980923 Displacement event is changed MV 980604 Tair at furniture level is corrected in the case of gradient. PS 980525 RelativeHum LOC -> OUT ReadHumdity link type W -> Generic Variable on ReadHumdity link XHum -> RelativeHum MV 980520 Air exchange is changed to const rho_air instead of function rhomois. EWorkplane is changed into generic MV 980515 Garbage removed from PPD calc. MV 980325 Change in moisture calc to handle saturation MV 980323 Air energy balance is corrected MV 980323 Neg. moisture case in PVap calc. MV 980206 Fix bug with fixed gradient MV 980129 Fixed gradient option has precedence over well-mixed/displacement option. TAirFloor changed for presentation purposes. AB 980123 Added window transmission for energy balance output MV 980115 Matrix psilwrad is changed to vector Default values and limits for variable PMV and PPD are added MV 971210 Gradient calc. changed. Well mixed model is used when TAir is less than TAirFloor. Negative gradient is not allowed. MV 971210 Latent heat is added to QEquip2Zone and QOcc2Zone variables. MV 971209 TAirFloor changed to TAir in the case of well-mixed case. MV 971125 Relative hum and ACH variables are added. MV 971124 hc calculation fixed in the cases when Tcl and TAirOp are equal AB 971016 Added QHC2Zone for heat balance AB 971014 Added QRadOcc2Zone to QLw2Surf AB 971013 fiMRT matrix transposed AB 971013 Bug in QEquip2Zone; QLw2Surf depends on QRadEquip2Zone, not QEquip2Zone AB 970927 Change event function for gradient AB 970915 Avoid division w MSupply when zero AB 970912 Added new local variables to be included in default output References: Wyon, D. 2000. "Individual control at each workplace: The means and the potential benefits", In: Clements - Croome, D. (editor). "Creating the productive workplace. E & FN Spon. London and New York. !! marks places where further changes could be called for ISO ref 7730 Explicit exclusion of floor in daylighting calc Do we need both locOp and zOp ? */ EQUATIONS /********************* General preparations ***********************/ /* - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Collect general surface temperatures from specialized vectors. Calculate air temperatures at surfaces' average heights, prepare film coefficien ts and emitted long wave radiation, for all surfaces*/ FOR i = 1, nSurf TSurf[i] := IF i <= nWall THEN TWall[i] ELSE_IF i <= (nWall+nHCSurf) THEN THCSurf[i - nWall] /* IntWall - ELSE TWind[i - (nWall+nHCSurf)] IntWall + */ ELSE_IF i < nSurf THEN TWind[i - (nWall+nHCSurf)] ELSE TIntWall /* IntWall */ END_IF; TAirSurf[i] := IF GradOn > 0.5 THEN TAir - (zAir-zSurf[i]) * Gradient ELSE TAir END_IF; h[i] := IF LINEARIZE(1) THEN 1. ELSE U_film (TAirSurf[i], TSurf[i], slopeSurf[i]) END_IF; /* (TSurf[i] - ABS_ZERO)**4 */ M0[i] := BOLTZ * ABS((TSurf[i] - ABS_ZERO)**3)*(TSurf[i] - ABS_ZERO); END_FOR; /* - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Calculate air temperatures at various locations */ /* - - 'operative' points */ FOR i=1, nOp TAirOp[i] := IF GradOn > 0.5 THEN TAir - (zAir-zOp[i]) * Gradient ELSE TAir END_IF; END_FOR; /* - - air flow terminals */ TAirTerm_0 = IF GradOn > 0.5 THEN TAir - (zAir-zTerm_0) * Gradient ELSE TAir END_IF; FOR i=1, nTerminal TAirTerm[i] = IF GradOn > 0.5 THEN TAir - (zAir-zTerm[i]) * Gradient ELSE TAir END_IF END_FOR; /* - - sensors */ FOR i=1, nSensor TSensor[i] = IF GradOn > 0.5 THEN TAir - (zAir - zSensor[i]) * Gradient ELSE TAir END_IF END_FOR; /* - - mid air */ TAirMean:= IF GradOn > 0.5 THEN TAir - zAir/2 * Gradient ELSE TAir END_IF; /* - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Air temperatures at HC surfaces appear on links */ FOR i=1, nHCSurf TAirHCSurf[i] = TAirSurf[nWall + i]; END_FOR; /* - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Air temperatures at convective devices appear on links */ FOR i = 1, nCvDev TCvDevAir[i] = IF GradOn > 0.5 THEN TAir - (zAir-zCvDev[i]) * Gradient ELSE TAir END_IF; END_FOR; /* - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Currently, direct solar is distributed isotropically */ FOR j = 1, nWind QSwWind2Zone[j] := QDrWind2Zone[j] + QDfWind2Zone[j]; END_FOR; /********************* Lighting ***********************/ /* Distribute power from lights */ QLite := AutoLiteOn * LiteOn * liteRatedInput; QSwLite := liteFractVisible * QLite; QLwLite := liteFractLw * QLite; QCvLite := QLite - QSwLite - QLwLite; /* IntWall - FOR i = 1, nWall Q2SurfSpec[i]:= 0; END_FOR; */ /********************* Radiation to surfaces ***********************/ /* Distribute emitted black body radiation to accumulate absorbed LW in surfaces, and incoming SW from windows and lighting to accumulate absorbed SW in surfaces */ /*!! psiLwRad could be total absorbed from internal rad sources; alternatively just area fraction of total area. */ QRadEquip2Zone := SUM j=1, nUnit schedEquip[j]*QSrcRadEquip[j] END_SUM; FOR i = 1, nSurf QLw2Surf[i] := SUM k = 1, nSurf psiLw[i,k] * M0[k] END_SUM + psiLwrad[i] * (QLwOcc2Zone + QRadEquip2Zone + QLwLite); QSw2Surf[i] := psiSw[i, nWind + nLite] * QSwLite + SUM k = 1, nWind psiSw[i, k] * QSwWind2Zone[k] END_SUM; END_FOR; /* - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Heat balances for surfaces */ /* IntWall - walls, add extra heat flows for hidden surfaces */ /* walls */ FOR i = 1, nWall 0 = QCdWall2Surf[i] + ASurf[i] * h[i] * (TAirSurf[i] - TSurf[i]) + QLw2Surf[i] + QSw2Surf[i] /* IntWall - + Q2SurfSpec[i] */ END_FOR; /* light */ /* windows */ FOR i = 1, nWind 0 = QLcWind2Zone[i] + ASurf[nWall+nHCSurf+i] * h[nWall+nHCSurf+i] * (TAirSurf[nWall+nHCSurf+i] - TSurf[nWall+nHCSurf+i]) + QLw2Surf[nWall+nHCSurf+i] END_FOR; /* HC surfaces */ FOR i = 1, nHCSurf 0 = QHCSurfFront[i] + ASurf[nWall + i] * h[nWall + i] * (TAirSurf[nWall + i] - TSurf[nWall + i]) + QLw2Surf[nWall + i] + QSw2Surf[nWall + i] END_FOR; /* - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Let re-circulated short wave leave into windows. Note: QSwWind2Amb is positive inwards, but QSw2Amb positive outwards */ FOR j = 1, nWind QSwWind2Amb[j] = - QSw2Surf[nWall+nHCSurf + j]; END_FOR; QSw2Amb := SUM j = 1, nWind -QSwWind2Amb[j] END_SUM; /******************** Convection from surfaces **********************/ /* Accumulate convected heat to air */ QCvDev2Zone := SUM i = 1, nCvDev QCvDev[i] END_SUM; QCv2Zone := SUM k = 1, nSurf ASurf[k] * h[k] * (TSurf[k] - TAirSurf[k]) END_SUM + QCvLite /* IntWall + */ + hAInt * (TIntWall-TAirMean) + SUM i = 1, nHCSurf QHCSurfBack[i] END_SUM + QCvDev2Zone; /********************* Air flows ***********************/ /* Mass flow balance */ 0 = MF_0 + SUM i = 1, nTerminal MF[i] END_SUM; /* Total supply massflow */ MSupply := IF MF_0 > 0 THEN MF_0 ELSE 0 END_IF + SUM i = 1, nTerminal IF MF[i] > 0 THEN MF[i] ELSE 0 END_IF END_SUM; /* Total ACH */ ACH := MSupply*3600 / (Rho_air * VZone); /* Supply air enthalpy */ HSupply := ( IF MF_0 > 0 THEN Q_0 ELSE 0 END_IF + SUM i = 1, nTerminal IF MF[i] > 0 THEN Q[i] ELSE 0 END_IF END_SUM ) / MSupply; /* Supply air humidity */ HumSupply := ( IF MF_0 > 0 THEN VapF_0 ELSE 0 END_IF + SUM i = 1, nTerminal IF MF[i] > 0 THEN VapF[i] ELSE 0 END_IF END_SUM ) / MSupply; /* Supply air temperature */ TSupply := (HSupply - HumSupply*HF_VAP) / (CP_AIR + HumSupply*CP_VAP); /********************* Gradient and strategy ***********************/ /* Temperature just above floor level, determined, either by fixed gradient, or by balance between transports (from supply) & (to floor). Variable gradient fits this temperature. TAirFloor = TSurf[nFloor] */ TAirFloorChk := IF FixGradient > 0 THEN TAir - FixGradient * zAir ELSE ( MSupply * CP_AIR * TSupply + h[nFloor] * AFloor * TSurf[nFloor] ) / ( MSupply * CP_AIR + h[nFloor] * AFloor ) END_IF; /* In case of given fixed gradient, TairFloorChk is calculated from FixGradient */ Gradient = IF (LINEARIZE(1) OR GradOn < 0.5) THEN -1 ELSE (TAir - TAirFloorChk) / zAir END_IF; TAirFloor := IF GradOn < 0.5 THEN TAir ELSE TAirFloorChk END_IF; /********************* PPD and PMV ***********************/ /*!! Nomenclature according to SS 02 40 01 (ISO 7730) */ /* TranspLite ?? LW radiation from light here ?? */ FOR j=1, nOp TMrtOp[j] := (SUM i = 1, nSurf fiMrt[i,j]*(TSurf[i] - ABS_ZERO)**4 END_SUM / SumFiMRT[j]) ** (1/4) + ABS_ZERO; END_FOR; FOR j = 1, nOp TOp[j] := 0.5 * (TAirOp[j] + TMrtOp[j]); END_FOR; PVap := (P+10**5) * XHum / (0.62198 + XHum); FOR i=1, nOp hCl[i] := IF ABS(TCl[i]-TAirOp[i]) < (12.1/2.38 * SQRT(AirVel[i]))**4 THEN 12.1 * SQRT(AirVel[i]) ELSE_IF ABS(TCl[i]-TAirOp[i]) < 0.001 THEN 2.38 * ABS(0.001)**0.25 ELSE 2.38 * ABS(TCl[i]-TAirOp[i])**0.25 END_IF; TCl[i] = IF LINEARIZE(1) THEN (35.7+TAir)/2 ELSE_IF schedOcc[i] > 0 THEN 35.7 - 0.028 * (M[i]*58-W[i]) - 0.155*iCl[i]* ( 3.96E-8 * fCl[i] * ((TCl[i]-ABS_ZERO)**4 - (TMrtOp[i]-ABS_ZERO)**4) + fCl[i] * hCl[i] * (TCl[i]-TAirOp[i]) ) ELSE (35.7+TAir)/2 END_IF; PMV[i] := IF schedOcc[i] > 0 AND PVap > 0 THEN (0.303*EXP(-0.036*M[i]*58)+0.028) * ( ( M[i]*58-W[i]) - 3.05E-3 * (5733 - 6.99*(M[i]*58-W[i]) - PVap ) - 0.42 * ((M[i]*58 - W[i]) - 58.15) - 1.7E-5 * M[i]*58 * (5867-PVap) - 0.0014 * M[i]*58 * (34-TAirOp[i]) - 3.96E-8 * fCl[i] * ( (TCl[i]-ABS_ZERO)**4 - (TMrtOp[i]-ABS_ZERO)**4 ) - fCl[i] * hCl[i] * (TCl[i]-TAirOp[i]) ) ELSE 0 END_IF; PPD[i]:= IF schedOcc[i] > 0 THEN 100 - 95*EXP(-(0.03353*PMV[i]**4+0.2719*PMV[i]**2)) ELSE 0 END_IF; QCvOcc[i] := schedOcc[i] * nOcc[i] * 1.8 * (fCl[i] * hCl[i] * (TCl[i] - TAirOp[i]) + 0.0014 * M[i] * 58 * (34 - TAirOp[i])); QLwOcc[i] := schedOcc[i] * nOcc[i] * 1.8 * (3.96E-8 * fCl[i] *((TCl[i]-ABS_ZERO)**4 - (TMrtOp[i]-ABS_ZERO)**4)); QOccVap[i]:= schedOcc[i] * nOcc[i] * 1.8 * ( 3.05E-3 * ( 5733 - 6.99 * (M[i]*58 - W[i]) - PVap) + /* Diff through skin */ 1.7E-5 * M[i]*58 * (5867 - PVap) /*Latent respiration */ ); QOccMet[i] := schedOcc[i] * nOcc[i] * 1.8 * M[i] * 58 ; QSweat[i]:= IF (QOccMet[i] - (QCvOcc[i] + QLwOcc[i] + QOccVap[i])) < 0 THEN 0 ELSE (QOccMet[i] - (QCvOcc[i] + QLwOcc[i] + QOccVap[i])) END_IF; END_FOR; /********************* Internal loads ***********************/ /* IntWall - */ /* Furniture heat balance */ /* QFurn2Zone := hAFurn * (TFurn - IF GradOn > 0.5 THEN (TAir - (zAir-0.6) * Gradient) ELSE TAir END_IF); CFurn * TFurn' = - QFurn2Zone; */ /* IntWall . */ /* Convective heat from occupants */ QCvOcc2Zone := SUM i = 1, nOp QCvOcc[i] END_SUM; /* 970912 */ /* LW radiation from occupants */ QLwOcc2Zone = SUM i = 1, nOp QLWOcc[i] END_SUM; /* Convective heat from equipment */ QCvEquip2Zone := SUM i = 1, nUnit schedEquip[i] * QSrcCvEquip[i] END_SUM; VapFOcc2Zone := SUM i=1, nOp QOccVap[i] + QSweat[i] END_SUM / 2430000; /*heat of vaporization of water 30 C*/ /* Local units */ HAir := Enthal(TAir, XHum); FOR i=1, nLocUnit QLocalUnit[i] := CtrLocUnit[i] * QMaxLoc[i]; IF QMaxLoc[i] < 0 THEN /* Negative QMaxLoc assumes potentially wet coil. Positive QMaxLoc in combination with a negative control signal will provide dry cooling */ WChillCoil[i] := HumRat((P+10**5), SatPres(TCoil[i])); HChillCoil[i] := Enthal(TCoil[i], MIN(XHum,WChillCoil[i])); MAir[i] := -QLocalUnit[i] / (HAir-HChillCoil[i]); Wf[i] := MAir[i] * (XHum - MIN(XHum,WChillCoil[i])); ELSE Wf[i] := 0.0; END_IF; QEl[i] := ABS(QLocalUnit[i]/COP[i]); END_FOR; QLocUnit:= SUM i = 1, nLocUnit QLocalUnit[i] END_SUM; /* IntWall + */ /* Internal and inside walls heat balance */ QCdInt2Zone := IF nIntWall < 0.5 THEN 0 ELSE - hAInt * (TAirMean-TIntWall) - QLw2Surf[nSurf] - QSw2Surf[nSurf] END_IF; 0 = CIntWall*TIntWall' + QCdInt2Zone; /* IntWall . */ /********************* Air energy balance ***********************/ /* CAir*TAir' has to be added for stratification calculations */ /* Poor default values??? */ /* massAir * ((CP_Air + XHumLoc*CP_Vap) * TAir' + HF_Vap * XHumLoc') */ ((massAir+numAirmass)*CP_Air + massAir*XHumLoc*CP_Vap) * TAir' + massAir*HF_Vap * XHumLoc' /* IntWall = = QFurn2Zone + QCvOcc2Zone */ = QCvOcc2Zone + QCvEquip2Zone + QCv2Zone + Q_0 + SUM i = 1, nTerminal Q[i] END_SUM + SUM i = 1, nLocUnit QLocalUnit[i] END_SUM + 2430000 * VapFOcc2Zone /* 2430000 is heat of vaporization of water 30 C*/ + HF_VAP * (SUM i = 1, nUnit schedEquip[i] * VapFSrcEquip[i] END_SUM); /********************* CO2 balance ***********************/ MassAir * XCO2' = 17 * SUM i=1,nOp IF schedOcc[i] >= 0 THEN schedOcc[i] * nOcc[i] * M[i] / 3.6 * 1.8 ELSE 0 END_IF END_SUM + SUM i=1, nUnit schedEquip[i] * CO2FSrcEquip[i] END_SUM + XF_0 + SUM i = 1, nTerminal XF[i] END_SUM; /********************* Humidity balance ***********************/ PVapSat := SATPRES (TAirMean); RelativeHum = RELHUM ((P+10**5), PVapSat, XHum); MassAir * XHumLoc' = VapFOcc2Zone - SUM i=1, nLocUnit Wf[i] END_SUM + SUM i = 1, nUnit schedEquip[i] * (VapFSrcEquip[i] + EvapVapFSrcEquip[i]) END_SUM + VapF_0 + SUM i=1, nTerminal VapF[i] END_SUM; HumSat:=HumRat((P+10**5), PVapSat); XHum = Saturated * (HumSat-0.0001) + (1-Saturated)* XHumLoc; /********************* Misc measure signal ***********************/ FOR i=1, nMisc MiscMeasure[i] = IF MiscSelector[i] <= 1.9999 THEN SUM j=1,nOp MiscCoef[i,j]*TOp[j] END_SUM ELSE_IF MiscSelector[i] <= 2.9999 THEN SUM j=1,nOp MiscCoef[i,j]*(PPD[j]-5) * sign(1.0, PMV[j]) END_SUM ELSE_IF MiscSelector[i] <= 3.9999 THEN SUM j=1,nOp MiscCoef[i,j]*TMrtOp[j] END_SUM ELSE_IF MiscSelector[i] <= 5.9999 THEN SUM j=1,nSurf MiscCoef[i,j]*TSurf[j] END_SUM ELSE_IF MiscSelector[i] <= 6.9999 THEN SUM j=1,nOp MiscCoef[i,j]*TAirOp[j] END_SUM ELSE_IF MiscSelector[i] <= 7.9999 THEN DewPnt(XHumLoc) ELSE 0 END_IF; END_FOR; /********************* Daylighting ***********************/ /* Daylight radiosity from surfaces */ FOR i=1,nSurf QSwSurf2Zone[i] := SUM j=(nWall+nHCSurf+1),(nWall+nHCSurf+nWind) jSw[i,j] * QSwWind2Zone[j-(nWall+nHCSurf)] END_SUM END_FOR; /* Luminous flux [lm] / SW radiation [W] */ QDayLite := SUM i = 1, nWind QSwWind2Zone[i] END_SUM - QSw2Amb; lmPerW := IF (QDayLite + QSw2Amb) > 1E-4 THEN SUM i = 1, nWind 103 * QDrWind2Zone[i] + 133.5 * QDfWind2Zone[i] END_SUM / (QDayLite + QSw2Amb) ELSE 0 END_IF; /* Illuminance on workplane */ /* ASeesDesk / ASurf is surface ratio above desk level */ /* QSwSurf2Zone is total SW radiosity from whole surf area */ EWorkplane = lmPerW * SUM i=1,nSurf fiDesk[i] * ASeesDesk[i]/ASurf[i] * QSwSurf2Zone[i] END_SUM; /* Condensation checking */ /* Removed due to lack of support for nmf_warning in IDA Modeler FOR i =1,nSurf IF TSurf[i] < DewPnt(XHumLoc) THEN CALL nmf_warning("There is condensation on a surface"); END_IF; END_FOR; */ /* End of condensation checking */ /********************* Heat balance terms ***********************/ /* Local variables intended for inclusion in default output */ /* Note: These groupings are not the same as above, where physics is the guide; e.g. QCvDev2Zone is included in QHC2Zone here but in QCv2Zone above; Other variables included in heat balance report: QLite QDayLite */ /* IntWall - QFurn2Zone */ QTerm2Zone := Q_0 + SUM i = 1, nTerminal Q[i] END_SUM; QOcc2Zone := QCvOcc2Zone + QLwOcc2Zone + VapFOcc2Zone * 2430000; /* IntWall = QCdWalls2Zone := SUM i = 1, nWall QCdWall2Surf[i] END_SUM; */ QCdWalls2Zone := QCdInt2Zone + SUM i = 1, nWall QCdWall2Surf[i] END_SUM; QLcWinds2Zone := SUM i = 1, nWind QLcWind2Zone[i] END_SUM; QHC2Zone := SUM i = 1, nHCSurf QHCSurfFront[i] + QHCSurfBack[i] END_SUM /* QLocUnit + */ + QLocUnit + QCvDev2Zone; QTerm2Air := QTerm2Zone; QEquip2Zone := QCvEquip2Zone + QRadEquip2Zone+ HF_VAP * SUM i = 1, nUnit schedEquip[i] * VapFSrcEquip[i] END_SUM; XCO2Vol := XCO2 / 1.8; /* Directed mean radiant and operative temperatures */ IF nOp > 0.5 THEN FOR i = 1, nMain TMrtOpDir[i] := ((fiMrt[i,1] * (TSurf[i] - ABS_ZERO)**4 + SUM j = (nMain+1) , nSurf IF NINT (mainSurf[j-nMain]) == i THEN fiMRT[j,1] * (TSurf[j] - ABS_ZERO)**4 ELSE 0 END_IF END_SUM) / SumFiMRTDir[i])**(1/4) + ABS_ZERO; TOpDir[i] := 0.5 * (TAirOp[1] + TMrtOpDir[i]); END_FOR ELSE FOR i = 1, nMain TMrtOpDir[i] := 20; TOpDir[i] := 0.5 * (TAirOp[1] + TMrtOpDir[i]); END_FOR END_IF; /***** Workloss due to temperature *****/ TotWorkHour := SUM i=1, nOp SchedOcc[i] * nOcc[i] END_SUM; LostWorkHour := SUM i=1, nOp SchedOcc[i] * nOcc[i] * lostWorkPerC * IF Top[i] < 20 THEN (20 - Top[i]) ELSE_IF Top[i] > 25 THEN (Top[i] - 25) ELSE 0 END_IF END_SUM; /***** Workloss due to temperature *****/ GradOn := IF ( ( FixGradient > 0 ) OR ( Displace > 0.5 AND event(ChgStrat,TAir - TAirFloorChk) > 0 ) ) THEN 1 ELSE 0 END_IF; Saturated := IF Event(HumAS,XHumLoc - HumSat) > 0 THEN 1 ELSE 0 END_IF; /********************* Declarations ***********************/ LINKS /* type name variables .... */ /* Flows from walls */ FOR i = 1, nWall TQ TqWall[i] TWall[i], POS_IN QCdWall2Surf[i] END_FOR; /* Flows from windows */ FOR i = 1, nWind TQ TqWind[i] TWind[i], POS_IN QLcWind2Zone[i]; RRRWW RadWind[i] POS_IN QDfWind2Zone[i], POS_IN QDrWind2Zone[i], POS_IN QSwWind2Amb[i], AzimutIn[i], ElevIn[i] END_FOR; /* Flows from Heated / Cooled surfaces */ FOR i= 1, nHCSurf TQ TqHCFront[i] THCSurf[i], POS_IN QHCSurfFront[i]; TQ TqHCBack[i] TAirHCSurf[i], POS_IN QHCSurfBack[i]; END_FOR; /* Flows from convective heating/cooling devices */ FOR i= 1, nCvDev TQ TqCvDev[i] TCvDevAir[i], POS_IN QCvDev[i]; END_FOR; /* Air flows, ventilation & leaks */ BiDirAir Term_0 P, POS_IN MF_0, TAirTerm_0, POS_IN Q_0, XCO2, POS_IN XF_0, XHum, POS_IN VapF_0; FOR i = 1, nTerminal BiDirAir Term[i] P, POS_IN MF[i], TAirTerm[i], POS_IN Q[i], XCO2, POS_IN XF[i], XHum, POS_IN VapF[i] END_FOR; /* Schedules */ /* - - occupants */ FOR i = 1, nOp ControlLink SetOcc[i] schedOcc[i]; END_FOR; /* - - equipment */ FOR i = 1, nUnit ControlLink SetEquip[i] schedEquip[i]; END_FOR; /* - - local units */ FOR i = 1, nLocUnit ControlLink CtrLocalUnit[i] CtrLocUnit[i]; END_FOR; /* Control of lighting */ ControlLink CtrlLight LiteOn; ControlLink AutoCtrlLight AutoLiteOn; GENERIC LiteLevel EWorkplane; /* Readings of sensors */ /* - - temperatures */ FOR i=1, nSensor T ReadTemp[i] TSensor[i]; END_FOR; /* - - humidity */ GENERIC ReadHumidity RelativeHum; /* - - CO2 */ X_y ReadCO2 XCO2; /* - - Misc measure signal */ FOR i=1, nMisc GENERIC MiscMeasLink[i] MiscMeasure[i]; END_FOR; VARIABLES /* type name role def min max description */ /* WINDOWS */ /* Solar angles, not used */ Angle AzimutIn[nWind] IN 0 0 360 "Az of incident direct" Angle ElevIn[nWind] IN 0 -90 90 "Elev of incident direct" Radiation QDfWind2Zone[nWind] IN 0 0 BIG "SW diff rad entering" Radiation QDrWind2Zone[nWind] IN 0 0 BIG "SW dir rad entering" Radiation QSwWind2Amb[nWind] OUT 0 -BIG 0 "SW rad leaving, (all diffuse), POS_IN " Radiation QSwWind2Zone[nWind] LOC 0 0 BIG "total SW in thru wdw" Radiation QDayLite LOC 0 0 BIG "total SW net thru all wdws" Radiation QSw2Amb LOC 0 0 BIG "total SW back thru all wdws" /* LIGHT */ ElPowerCons QLite LOC 0 0 BIG "Supplied lite power" HeatFlux QSwLite LOC 0 0 BIG "SW radiation from light" HeatFlux QLwLite LOC 0 0 BIG "LW radiation from light" HeatFlux QCvLite LOC 0 0 BIG "Convective heat from light" /* CONVECTION AND RADIATION */ /* IntWall + */ HeatFlux QCdInt2Zone LOC 216 -BIG BIG "Total from internal walls" HeatFlux QCdWall2Surf[nWall] OUT 0 -BIG BIG "Conducted from wall" HeatFlux QCdWalls2Zone LOC 0 -BIG BIG "Conducted from walls" HeatFlux QLcWind2Zone[nWind] OUT 0 -BIG BIG "Flow from window" HeatFlux QLcWinds2Zone LOC 0 -BIG BIG "Flow from windows" HeatFlux QHCSurfFront[nHCSurf] OUT 0 -BIG BIG "Flow from HCSurf front" HeatFlux QHCSurfBack[nHCSurf] IN 0 -BIG BIG "Flow from HCSurf back" HeatFlux QHC2Zone LOC 0 -BIG BIG "Total flow from HCSurf" HeatFlux QCvDev[nCvDev] IN 0 -BIG BIG "Flow from conv device" HeatFlux QCvDev2Zone LOC 0 -BIG BIG "Total flow from cv dev" HeatFlux QCv2Zone LOC 0 -BIG BIG "Convected flux to zone" Radiation QLw2Surf[nSurf] LOC 0 -BIG BIG "LW net to surface" Radiation QSw2Surf[nSurf] LOC 0 -BIG BIG "SW net to surface" /* IntWall HeatFlux Q2SurfSpec[nWall] LOC 0 -BIG BIG "From zone into hidden parts of wall surfaces"¨ */ RadiationA M0[nSurf] LOC 462 SMALL BIG "Black body rad" ElPowerCons QCvEquip2Zone LOC 0 -BIG BIG "Conv load from equipm" ElPowerCons QRadEquip2Zone LOC 0 -BIG BIG "Rad load from equipm" HeatFlux QEquip2Zone LOC 0 -BIG BIG "Total load from equipm" HeatFlux QCvOcc2Zone LOC 0 -BIG BIG "Conv load from occ (total)" HeatFlux QSweat[nOp] LOC 0 -BIG BIG "Sweat from occ" HeatFlux QCvOcc[nOp] LOC 0 -BIG BIG "Conv load from occ" HeatFlux QOccVap[nOp] LOC 0 -BIG BIG "Vapour load from occ" HeatFlux QOccMet[nOp] LOC 0 -BIG BIG "Total load from occ" HeatFlux QLwOcc[nOp] LOC 0 -BIG BIG "Rad load from occ" HeatFlux QLwOcc2Zone OUT 0 -BIG BIG "Rad load from occ (total)" HeatFlux QOcc2Zone LOC 0 -BIG BIG "Total load from occ" /* IntWall - HeatFlux QFurn2Zone LOC 0 -BIG BIG "Heat from furniture" */ HeatCondA h[nSurf] LOC 2 0 BIG "Surface film coeff" /* TEMPERATURES */ Temp TAir OUT 25 ABS_ZERO BIG "Zone air temp, at ceiling level" Temp TAirMean LOC 25 ABS_ZERO BIG "Mean air temp" Temp TAirSurf[nsurf] LOC 25 ABS_ZERO BIG "Mean air temp at surf" Temp TAirHCSurf[nHCSurf] OUT 25 ABS_ZERO BIG "Air temp at HC surf" /* IntWall - Temp TFurn OUT 25 ABS_ZERO BIG "Furniture temp" */ Temp TSurf[nSurf] LOC 25 ABS_ZERO BIG "Surface temp" Temp TWall[nWall] IN 25 ABS_ZERO BIG "Wall surface temp" /* IntWall + */ Temp TIntWall OUT 25 ABS_ZERO BIG "Temp of internal walls" Temp TWind[nWind] IN 25 ABS_ZERO BIG "Window surface temp, innermost pane" Temp THCSurf[nHCSurf] IN 25 ABS_ZERO BIG "Heating or Cooling surface Temp" Temp TCvDevAir[nCvDev] OUT 25 ABS_ZERO BIG "Air temp at devices" /* CONTROLS */ Temp TSensor[nSensor] OUT 25 ABS_ZERO BIG "Temp read for ctrl" Control schedOcc[nOp] IN 0 0 1 "Occupancy On / Off" Control schedEquip[nUnit] IN 0 0 1 "Equipment On / Off" Control LiteOn IN 0 0 1 "Scheduled Lite On / Off" Control AutoLiteOn IN 0 0 1 "Autom. conrolled Lite On / Off" /* AIR SUPPLY */ MassFlow MSupply LOC 0 -BIG BIG "Supply mass flow" HumRatio HumSupply LOC 0 0 BIG "Humidity in supply" Temp TSupply LOC 25 ABS_ZERO BIG "Supply air temp" Enthalpy HSupply LOC 40000 -BIG BIG "Enthalpy of supply air" /* STRATIFICATION */ Temp TAirFloor LOC 25 ABS_ZERO BIG "Temp just above floor" Temp TAirFloorChk LOC 25 ABS_ZERO BIG "Temp just above floor" Factor Gradient OUT -1 -BIG BIG "Temperature gradient, >0 determined by model w displacement vent, -1 w/o displacement" Control ChgStrat A_S 0 -1 1 "Ventilation change" Generic GradOn A_S 0 0 1 "Gradient on / off" /* PMV AND PPD CALCULATION */ Temp TAirOp[nOp] LOC 25 ABS_ZERO BIG "Air temp at 'operative'location" Temp TMrtOp[nOp] LOC 25 ABS_ZERO BIG "Mean rad temp at op loc" Temp TMrtOpDir[nMain] LOC 25 ABS_ZERO BIG "Directed mean rad temp at op loc" Temp TOpDir[nMain] LOC 25 ABS_ZERO BIG "Directed operative temperature at op loc" Temp TOp[nOp] LOC 25 ABS_ZERO BIG "Operative temperature" Factor PMV[nOp] LOC 0 -3 3 "PMV index" Factor PPD[nOp] LOC 5 5 100 "PPD index" Factor hCl[nOp] LOC 4 0 BIG "Heat transfer coeff clothes to air" Temp TCl[nOp] OUT 30 ABS_ZERO BIG "Temp of clothes" /* Workloss cost */ Generic TotWorkHour LOC 0 0 BIG "Total working hours" Generic LostWorkHour LOC 0 0 BIG "Lost working hours" /* DAYLIGHT */ Radiation QSwSurf2Zone[nSurf] LOC 0 0 BIG "Daylight from surfaces" Generic EWorkplane OUT 0 0 BIG "Illumin. at work plane" Factor lmPerW LOC 118 0 BIG "Lumen per solar watt" /* TERMINALS */ Temp TAirTerm_0 OUT 20 ABS_ZERO BIG "Temp at term_0 heigth" Temp TAirTerm[nTerminal] OUT 20 ABS_ZERO BIG "Temp at term[i] heigth" MassFlow MF_0 OUT 0.024 -BIG BIG "Mass flow from term_0" MassFlow MF[nTerminal] IN 0.024 -BIG BIG "Mass flow from term[i]" HeatFlux Q_0 IN 917 -BIG BIG "Heat flux from term_0" HeatFlux Q[nTerminal] IN 917 -BIG BIG "Heat flux from term[i]" HeatFlux QTerm2Zone LOC 917 -BIG BIG "Heat flux from terminals" HeatFlux QTerm2Air LOC 917 -BIG BIG "Heat flux from terminals" /* FRACTION C02 */ Fraction_y XCO2 OUT 594 SMALL BIG "Fraction conc in zone" FractFlow_y XF_0 IN 0 -BIG BIG "Fract flow from term_0" FractFlow_y XF[nTerminal] IN 0 -BIG BIG "Fract flow from term[i]" Generic XCO2Vol LOC 330 SMALL BIG "CO2 ppm/vol" /* HUMIDITY */ HumRatio XHum OUT 0.002 SMALL BIG "Humidity in zone, repoerted out from model ratio [kg/kg]" HumFlow VapFOcc2Zone LOC 0 0 BIG "Vapour flow from occ" HumFlow VapF_0 IN 0 -BIG BIG "Vapour flow, term_0" HumFlow VapF[nTerminal] IN 0 -BIG BIG "Vapour flow, term[i]" HumRatio XHumLoc OUT 0.002 SMALL BIG "Humidity in zone, local only ratio [kg/kg]" HumRatio HumSat LOC 0.005 SMALL BIG "Saturated humidity" HumRatio HumAS A_S -0.1 -BIG BIG "Sat memory " Factor Saturated A_S 0 0 1 "0 = Normal 1 = Saturated " /* PRESSURE */ Pressure P IN 1325 SMALL BIG "Zone air pressure" Pressure PVap LOC 1300 SMALL 2700 "Vapour pressure" Pressure PVapSat LOC 4000 SMALL BIG "Saturation pressure " Factor RelativeHum OUT 0.3 SMALL 1 "Zone relative humidity" NumFlow_h ACH LOC 0.5 0 BIG "Air change per hour" /* Local units */ Enthalpy HAir LOC 20000 -BIG BIG "Air enthalpy" Enthalpy HChillCoil[nLocUnit] LOC 20000 -BIG BIG "Leaving air enthalpy" HeatFlux QLocalUnit[nLocUnit] LOC 0 -BIG BIG "Heatflux from local unit[i]" HeatFlux QLocUnit LOC 0 -BIG BIG "Heatflux from all local units" Control CtrLocUnit[nLocUnit] IN 0 0 1 "Local unit On / Off" HumRatio WChillCoil[nLocUnit] LOC 0.003 SMALL BIG "Moisture cont of cooling coil leaving air" MassFLow MAir[nLocUnit] LOC 0 0 BIG "Ficticious air massflow throug the unit" ElPowerCons QEl[nLocUnit] LOC 0 0 BIG "El. consumption" HumFLow Wf[nLocUnit] LOC 0 0 BIG "Condesation in local unit" /* Misc measure signal */ Generic MiscMeasure[nMisc] OUT 0 -BIG BIG "MiscMeasure signal" MODEL_PARAMETERS /* Separate parameter vectors are maintained in IDA Modeller for different types of surfaces: walls, ceiling light, windows, heated and cooled surfaces. Much of the modelling, including some parameter processing, is done in the same way for all surfaces; thus some vectors are defined for all surfaces. Surfaces are ordered: Walls, HCSurfaces, windows and light, excluded surfaces. HC surfaces, windows, and lights (currently exactly 1) are all subsurfaces. The main surfaces are walls by default; if there are any wall subsurfaces, they have to appear first among the subsurfaces. */ /* IntWall- | all surfaces | nAll | solid surfaces | transp | excl | nSurf + nTransp + nExcl | mains | subsurfaces | nMain + nSub | walls | HC surfaces | windows | light | nWall + nHCSurf + nWind + nLite | dark surfaces | SW rad surfs | nDark + nRad (cf sw_fac.for) */ /* IntWall + | all surfaces | nAll | solid surfaces | transp | excl | nSurf + nTransp + nExcl | mains | subsurfaces | nMain + nSub | walls | HC surfaces | windows | inside walls | light | nWall + nHCSurf + nWind + 1 + nLite | dark surfaces | SW rad | 1 | SW rad | nDark + nRad + 1 (cf sw_fac.for) All surfaces have detailed geometry. All inside walls are represented by one surface, which is always present, also when no such walls are specified. The location of this surface is specified with four corners in origo. */ /* IntWall . */ /* Inside walls and internal convective masses are described as wall constructions; the main influence on the zone is assumed to be the extra thermal capacity. They are all combined into one single mass. The walls interact as surfaces, i.e. they receive SW and exchange LW radiation. Convection coefficients are specified for both walls and masses, negative values identify the walls (absolute values are used). NOTE: The detailed zone model is intended for detailed radiation climate and relies on a detailed geometry; it is not recommended in the presence of inside walls. The inside walls are really half-walls, since only the A-side is considered exposed. This handling was chosen to agree with CeSimZon. View factors for inside walls use only area; view factors for other solid surfaces are corrected accordingly. */ /* type name role [def min max] NUMBER OF */ INT nSurf CMP 6 2 BIGINT "solid surfaces (in LW balance)" INT nMain SMP 6 1 BIGINT "main surfaces" INT nS CMP 2 2 2 "surf in surf" INT nSubSub SMP 0 0 BIGINT "number of [sub of sub] relations" INT nWall SMP 6 1 BIGINT "walls" INT nLite SMP 1 1 1 "lighted surfaces" INT nWind SMP 0 0 BIGINT "windows" INT nHCSurf SMP 0 0 BIGINT "heated or cooled surfaces" INT nSub CMP 1 0 BIGINT "subsurfaces" INT nRad CMP 1 1 BIGINT "SW-emitting surfaces" INT nAll CMP 6 1 BIGINT "all surfaces" INT nTransp CMP 6 1 BIGINT "transparent surfaces (currently lights)" INT nExcl SMP 0 0 BIGINT "subsurf excluded to avoid overlapping" INT nC CMP 3 3 3 "coordinates/vertex = 3" INT nV CMP 4 3 BIGINT "vertices/surface" INT nVert SMP 8 8 BIGINT "vertices" INT nCSurf CMP 12 9 BIGINT "coordinates/surface" INT nCvDev SMP 0 0 BIGINT "convective devices" INT nUnit SMP 0 0 BIGINT "equipment loads" INT nOp SMP 0 0 BIGINT "operative points, where MRT is calculated" INT nTerminal SMP 1 0 BIGINT "air flow terminals" INT nSensor SMP 1 0 BIGINT "temperature sensors" INT nLocUnit SMP 0 0 BIGINT "local units cooler / heater" /* IntWall + */ INT nMaxLayr SMP 4 1 BIGINT "max number of layers in any wall" INT nIntWall SMP 1 0 BIGINT "inside walls and internal masses combined to one mass in parameter proc" /* Misc measure signal */ INT nMisc SMP 0 0 BIGINT "number of signals for MiscMeasure" INT nMiscCf CMP 0 0 BIGINT "number of coefficients for MiscMeasure" /* IntWall . */ PARAMETERS /* type name role def min max description */ /* Load sources */ Power liteRatedInput S_P 150 0 BIG "Rated light input power" Factor liteFractVisible S_P .1 0 1 "Fraction short wave" Factor liteFractLw S_P .6 0 1 "Fraction long wave" HeatFlux QSrcCvEquip[nUnit] S_P 100 -BIG BIG "Conv load from equipm" Radiation QSrcRadEquip[nUnit] S_P 50 -BIG BIG "Rad load from equipm" HumFlow VapFSrcEquip[nUnit] S_P 0.01 -BIG BIG "Vapour load from equipm" HumFlow EvapVapFSrcEquip[nUnit] S_P 0 0 BIG "Evaporative humidity load from equipm" FractFlow_y CO2FSrcEquip[nUnit] S_P 50 -BIG BIG "CO2 load from equipm" Factor nOcc[nOp] S_P 0 0 BIG "number of occupants" Mass numAirmass S_P 30.0 0 BIG "Additional mass to increase numerical robustness" /* Surface properties and geometry */ Factor epsSurf[nSurf] S_P .9 SMALL 1 "long wave emissivity" Factor reflSurf[nSurf] S_P .5 SMALL 1 "short wave reflectance" Angle slopeSurf[nSurf] S_P 90 0 180 "surface slope, 0=floor, 180=ceiling" Factor mainSurf[nSub] S_P 1 1 BIG "subsurface's main surface number" Factor SubSub[nS,nSubSub] S_P 1 1 BIG "[1,s] is part of [2,s]; sorted from innermost; not used for parts of main" /* IntWall + */ /* Structure and properties of inside walls and internal masses */ Area aIntWall[nIntWall] S_P 3 SMALL BIG "Area of internal walls" Factor nLayers[nIntWall] S_P 1 1 BIG "Number of layers" Length l[nMaxLayr,nIntWall] S_P 0.01 SMALL BIG "Layer thickness" Density rho[nMaxLayr,nIntWall] S_P 1000 SMALL BIG "Layer density" HeatCondL lambda[nMaxLayr,nIntWall] S_P 0.13 SMALL BIG "Layer heat cond" HeatCapM cp[nMaxLayr,nIntWall] S_P 1300 SMALL BIG "Layer heat cap" Factor epsSurfI[nIntWall] S_P .9 SMALL 1 "long wave emissivity" Factor reflSurfI[nIntWall] S_P .5 SMALL 1 "short wave reflectance" HeatCondA hConv[nIntWall] S_P 1 -BIG BIG "Convective film coeff negative for walls positive for convective masses" /* IntWall . */ Length coordVert[nc,nVert] S_P 0 -BIG BIG "coordinates of vertices" Factor vertSurf[nv,nAll] S_P 1 1 BIG "vertices of surfaces" /* PMV and PPD calculations */ /* Nomenclature according to SS 02 40 01 (ISO 7730) */ Length locOp[nc,nOp] S_P 0 -BIG BIG "locations of op points" Factor M[nOp] S_P 1 .6 10 "Activity[Met], 1 Met = 58 W/m2" HeatCond W[nOp] S_P 0 0 BIG "Outer work, normally 0" Factor iCl[nOp] S_P 1 0 2 "Heat res[clo] of clothes 1 clo = 0.155 (m2 K)/W" Velocity AirVel[nOp] S_P .1 0 1 "Air velocity" Factor fCl[nOp] C_P "Factor for area increase thru clothes" /* Gradient part */ Factor nFloor C_P 1 1 BIG "Floor surface number" Factor nCeil C_P 2 1 BIG "Ceiling surface number" Length zOp[nOp] S_P .6 0 BIG "Avg height of person, sitting .6, standing 1.1" Factor Displace S_P 0 0 1 "Displacement ventilation 0 = No 1 = Yes" Factor fixGradient S_P -1 -1 5 "Fixed temp gradient -1 if not applicable" /* Center location of workplane */ Length xDesk S_P 1 -BIG BIG " " Length yDesk S_P 1 -BIG BIG " " Length zDesk S_P 0.85 SMALL BIG " " /* Air terminals */ Length zTerm_0 S_P 2.4 0 BIG "Height of terminal" Length zTerm[nTerminal] S_P 2.4 0 BIG "Height of terminal" /* IntWall - /* Furniture */ Factor levelFurn S_P 0.2 0 BIG "Fraction of floor area" generic furnDens S_P 50 SMALL BIG "Mass / area covered" */ Length zSensor[nSensor] S_P 2.4 SMALL BIG "Height of sensor" /* Local units */ HeatFlux QMaxLoc[nLocUnit] S_P 0 -BIG BIG "Max power of local unit" Temp TCoil[nLocUnit] S_P 5 -BIG BIG "Coil temperature" Factor COP[nLocUnit] S_P 1 1 BIG "COP of local (cooling) unit" /* Convective devices */ Length zCvDev[nCvDev] S_P 2.4 0 BIG "Height of conv device" /* Workloss costs */ Generic lostWorkPerC S_P 0.02 0 1 "Loss in work efficency per C < 20 and > 25 (ie 10 % at 30 C)" /* Misc measure signal */ Factor MiscSelector[nMisc] S_P 1.01 1.0 7.0 "determines signal for MiscMeasure 1.0i = Operative temp at op loc i 2.0i = (PPD - 5) index with PMV sign at op loc i 3.0i = Mean rad temp at op loc i 4.0i = Mean sufr temp of main surf i 5.0i = Surface temper at surf i 6.0i = Air temp at op loc i 7.0 = Air dewpoint temperature" Generic MiscIndex[nMisc] C_P "Auxiliary parameter" Generic MiscCoef[nMisc,nMiscCf] C_P 0 0 BIG "Auxiliary parameter" Area MiscArea C_P 0 0 BIG "Auxiliary parameter" /* CALCULATED PARAMETERS */ Length zSurf[nAll] C_P "Avg height of surface" Area ASurf[nAll] C_P "Surface area" Area AIntWalls C_P "Total area of internal walls" Area ATot C_P "Total surface area for shoebox zone plus inside walls" Length zAir C_P "Reference height for zone air temperature, = zone height" Area AFloor C_P "Floor area" Volume VZone C_P "Zone volume" Factor fi[nAll,nAll] C_P "View factors" Factor sumFi[nSurf] C_P "Row sum of view factors" Factor psiLw[nSurf,nSurf] C_P "LW absorption matrix [from,to]" Factor psilwrad[nSurf] C_P "internal source LW absorption coeff" Factor psiSw[nSurf,nRad] C_P "SW absorption matrix [to solid surfaces, from SW rad sources: windows,lights]" /* IntWall = Factor fiMrt[nSurf,nOp] C_P "View factors for */ Factor fiMrt[nAll,nOp] C_P "View factors for operative points" Factor SumfiMrt[nOp] C_P "Sum of view factors for operative points" Factor SumfiMrtDir[nMain] C_P "Sum of view factors from 1st operative point to main surfaces including their subsurfaces" /* IntWall = Factor fiDesk[nSurf] C_P "View factors from workplane" Area ASeesDesk[nSurf] C_P "Surface area above desk level" */ Factor fiDesk[nAll] C_P "View factors from workplane" Area ASeesDesk[nAll] C_P "Surface area above desk level" /* IntWall . */ Factor jSw[nSurf,nSurf] C_P "Daylite (SW) radiosity matrix [emitted & reflected from, originated at]" Mass MassAir C_P "Mass of air" HeatCap CAir C_P "Heat capacity of air" /* IntWall - HeatCap CFurn C_P "Heat capacity of furniture" HeatCond hAFurn C_P "Heat transfer coeff" */ HeatCapA Ca[nIntWall] C_P "Active heat capacity of internal wall (inner side)" HeatCapA Cb[nIntWall] C_P "Active heat capacity of internal wall (outer side)" HeatCap CIntWall C_P "Total inside active heat capacity of internal walls" /* IntWall + */ HeatCond hAInt C_P "Convective film coefficients times areas" PARAMETER_PROCESSING nTransp := nLite; nS := 2; nC := 3; nV := 4; nCSurf := 12; /* IntWall = nSurf := nWall + nHCSurf + nWind; */ nSurf := nWall + nHCSurf + nWind + 1; nAll := nSurf + nTransp + nExcl; nSub := nSurf - nMain - 1; FOR i=1,nMain IF slopeSurf[i]<30 THEN nFloor := i; ELSE_IF slopeSurf[i]>150 THEN nCeil := i; END_IF; END_FOR; nRad := nWind + nLite; /* IntWall + */ AIntWalls := SUM i = 1, nIntWall IF hConv[i] < 0 THEN aIntWall[i] ELSE 0 END_IF END_SUM; IF AIntWalls < SMALL THEN epsSurf[nSurf] := 0.9; reflSurf[nSurf] := 0.5; ASurf[nSurf] := 0.001; ELSE ASurf[nSurf] := AIntWalls; epsSurf[nSurf] := ( SUM i = 1, nIntWall IF hConv[i] < 0 THEN aIntWall[i] * epsSurfI[i] ELSE 0 END_IF END_SUM ) / AIntWalls; reflSurf[nSurf] := ( SUM i = 1, nIntWall IF hConv[i] < 0 THEN aIntWall[i] * reflSurfI[i] ELSE 0 END_IF END_SUM ) / AIntWalls; END_IF; hAInt := SUM i=1, nIntWall ABS(hConv[i])*aIntWall[i] END_SUM; /* IntWall . */ CALL view_fac(nAll, nMain, nSub, nSubSub, nc,nv,nvert,ncsurf, mainSurf[1],SubSub[1,1], coordVert[1,1],vertSurf[1,1], VZone,zAir, ASurf[1],zSurf[1], fi[1,1]); FOR i = 1 , nSurf sumFi[i]:= SUM j = 1, nSurf fi[i,j] END_SUM; IF ABS(sumFi[i]-1) > 0.001 THEN CALL nmf_error ("Coord error: Check zone geometry or use simpler view_fact calc"); END_IF; END_FOR; AFloor := ASurf[nfloor]; ATot := SUM i=1, nSurf ASurf[i] END_SUM; /* IntWall = CALL lwfac(nSurf,nTransp,epsSurf[1], */ CALL lwfac(nSurf,nAll,epsSurf[1],fi[1,1],ASurf[1], psiLw[1,1]); /* IntWall = CALL lwfacrad(nSurf,nTransp,epsSurf[1], */ CALL lwfacrad(nSurf,ASurf[1],ATot, psilwrad[1]); CALL sw_fac(nAll,nTransp,nRad,nSurf,reflSurf[1],fi[1,1],ASurf[1], psiSw[1,1]); /* IntWall = CALL view_mrt(nSub,mainSurf[1],nSurf,nTransp,nc,nv,nvert, nMain,coordVert[1,1],vertSurf[1,1], nOp,locOp[1,1], fiMrt[1,1]); */ CALL view_mrt(nAll,nMain,nSub,nsubSub, nc,nv,nvert,ncsurf, mainSurf[1],SubSub[1,1], coordVert[1,1],vertSurf[1,1], aTot, aIntWalls, nOp,locOp[1,1], fiMrt[1,1]); /* IntWall = CALL litefac(xDesk,yDesk,zDesk,nSub,mainSurf[1],nSurf,nTransp,nc,nv,nvert, ncsurf,nMain,coordVert[1,1],vertSurf[1,1], fi[1,1],ASurf[1],reflSurf[1], fiDesk[1],jSw[1,1],ASeesDesk[1]); */ CALL litefac(nAll,nMain,nSub,nSurf,nsubSub, nc,nv,nvert,ncsurf, xDesk,yDesk,zDesk, mainSurf[1],SubSub[1,1], coordVert[1,1],vertSurf[1,1], fi[1,1],aSurf[1],reflSurf[1], zAir, fiDesk[1],jSw[1,1],ASeesDesk[1]); /* m3 * kg/m3 */ MassAir := VZone * RHO_AIR; /* kg * J/(kg K) */ CAir := MassAir * CP_AIR; /* IntWall - /* m2 * kg/m2 * J/(kg K) */ CFurn := (levelFurn * AFloor) * FurnDens * 800; /* (lw + conv) * m2 * m2/m2 */ hAFurn := (5 + 1) * (levelFurn * AFloor) * 3; */ /* IntWall + */ FOR i=1,nIntWall CALL ActivCap (nLayers[i],l[1,i],lambda[1,i],rho[1,i],cp[1,i],24, Ca[i],Cb[i]); END_FOR; CIntWall:= IF nIntWall < 0.5 THEN 1000 /* dummy value to avoid zero row */ ELSE SUM i=1, nIntWall Ca[i]*aIntWall[i] END_SUM END_IF; /* IntWall . */ FOR i=1, nOp fCl[i] := IF 0.155*iCl[i] < 0.078 THEN 1.00+1.29*(0.155*iCl[i]) ELSE 1.05+0.645*(0.155*iCl[i]) END_IF END_FOR; FOR j=1, nOp SumFiMRT[j]:= SUM i=1,nSurf fiMrt[i,j] END_SUM END_FOR; IF nOp > 0.5 THEN FOR i=1, nMain SumFiMRTDir[i] := fiMrt[i,1] + SUM j = (nMain+1) , nSurf IF NINT (mainSurf[j-nMain]) == i THEN fiMrt[j,1] ELSE 0 END_IF END_SUM END_FOR ELSE FOR i=1 ,nMain SumFiMRTDir[i] := 1 END_FOR END_IF; nMiscCf := MAX(nSurf,nOp); FOR i=1, nMisc MiscIndex[i] := max(1.0, 100*Mod(MiscSelector[i],1.0)); IF 4.0 <= MiscSelector[i] <= 4.9999 THEN MiscArea := ASurf[MiscIndex[i]] + SUM j=(nMain+1),nWall IF Abs(MainSurf[j-nMain]-MiscIndex[i])<0.5 THEN ASurf[j] ELSE 0.0 END_IF END_SUM; FOR j=(nMain+1),nWall MiscCoef[i,j] := IF Abs(MainSurf[j-nMain]-MiscIndex[i])<0.5 THEN ASurf[j]/MiscArea ELSE 0.0 END_IF; END_FOR; MiscCoef[i,MiscIndex[i]] := ASurf[MiscIndex[i]]/MiscArea; ELSE MiscCoef[i,MiscIndex[i]] := 1.0; END_IF; END_FOR; END_MODEL