diff --git a/doc/input-output-reference/src/overview/group-airflow.tex b/doc/input-output-reference/src/overview/group-airflow.tex index 157e30f5a91..f70b854e548 100644 --- a/doc/input-output-reference/src/overview/group-airflow.tex +++ b/doc/input-output-reference/src/overview/group-airflow.tex @@ -1518,7 +1518,7 @@ \subsection{ZoneRefrigerationDoorMixing}\label{zonerefrigerationdoormixing} ZoneRefrigerationDoorMixing is ideally suited for two zones, at least one of which is refrigerated, that exchange an equal amount of dry air. As with \hyperref[zonemixing]{ZoneMixing}, this is a simplified interzone airflow in EnergyPlus. The ZoneRefrigerationDoorMixing approach shares some features of both \hyperref[zonemixing]{ZoneMixing} and \hyperref[zonecrossmixing]{ZoneCrossMixing}. Like \hyperref[zonecrossmixing]{ZoneCrossMixing}, ZoneRefrigerationDoorMixing has an energy effect on both the source and the receiving zone, thus maintaining both the air mass and energy balances in the two zones. Unlike the other two mixing objects, ZoneRefrigerationDoorMixing always calculates the air exchange rate based on the zone temperature and relative humidity. That is, the user does not specify the air flow rate. The user can moderate the flow through a door-opening schedule. -ZoneRefrigerationDoorMixing can only be entered once for any unique pair of zones. It doesn't matter which zone is listed first and the zones will automatically switch back and forth between source and receiving zones depending upon which zone is colder. If space heat balance is active and a space name is specified for Space or Zone Name 1 or 2, then the space conditions will be used and the exchange will be with that space only. If space heat balance is active and a zone name is specified, then the aveerage zone conditions will be used, and the exchange will be proportioned to all spaces in the zone by space volume. +ZoneRefrigerationDoorMixing can only be entered once for any unique pair of zones. It doesn't matter which zone is listed first and the zones will automatically switch back and forth between source and receiving zones depending upon which zone is colder. If space heat balance is active and a space name is specified for Zone or Space Name 1 or 2, then the space conditions will be used and the exchange will be with that space only. If space heat balance is active and a zone name is specified, then the aveerage zone conditions will be used, and the exchange will be proportioned to all spaces in the zone by space volume. \subsubsection{Inputs}\label{inputs-7-003} @@ -2185,9 +2185,9 @@ \subsubsection{Inputs} This dimensionless number is the discharge coefficient of the thermal chimney. The ventilation rate enhanced by the thermal chimney is also dependent on the discharge coefficient. -\paragraph{Field: Zone \textless{}\#\textgreater{} Name}\label{field-zone-name-8} +\paragraph{Field: Zone or Space Name \textless{}\#\textgreater{}}\label{field-zone-name-8} -This field is the name of the zone (ref: Zone) to which the thermal chimney is attached. It is used in conjunction with the next three fields. Note that up to 20 sets of zone name, distance from the top of the thermal chimney to each inlet, relative ratios of air flow rates passing through each zone and cross sectional areas of each air channel inlet may be entered for a single thermal chimney if multiple zones share the common thermal chimney. +This field is the name of the zone (ref: Zone) or space to which the thermal chimney is attached. It is used in conjunction with the next three fields. Note that up to 20 sets of zone or space name, distance from the top of the thermal chimney to each inlet, relative ratios of air flow rates passing through each zone and cross sectional areas of each air channel inlet may be entered for a single thermal chimney if multiple zones or spaces share the common thermal chimney. If space heat balance is active and a space name is specified for Zone or Space Name, then the space conditions will be used and the exchange will be with that space only. If space heat balance is active and a zone name is specified, then the aveerage zone conditions will be used, and the exchange will be proportioned to all spaces in the zone by space volume. \paragraph{Field: Distance from Top of Thermal Chimney to Inlet \textless{}\#\textgreater{}}\label{field-distance-from-top-of-thermal-chimney-to-inlet} diff --git a/idd/Energy+.idd.in b/idd/Energy+.idd.in index 1d4e673dd17..ba438f1829c 100644 --- a/idd/Energy+.idd.in +++ b/idd/Energy+.idd.in @@ -24866,11 +24866,11 @@ ZoneThermalChimney, \memo A thermal chimney is a vertical shaft utilizing solar radiation to enhance natural \memo ventilation. It consists of an absorber wall, air gap and glass cover with high solar \memo transmissivity. - \min-fields 10 + \min-fields 10 A1, \field Name \required-field A2, \field Zone Name - \note Name of zone that is the thermal chimney + \note Name of zone that is the thermal chimney. \required-field \type object-list \object-list ZoneNames @@ -24894,16 +24894,17 @@ ZoneThermalChimney, \minimum 0 \maximum 1 \default 0.8 - A4, \field Zone 1 Name + A4, \field Zone or Space Name 1 \required-field \type object-list \object-list ZoneNames + \object-list SpaceNames N4, \field Distance from Top of Thermal Chimney to Inlet 1 \required-field \units m \type real \minimum 0 - N5, \field Relative Ratios of Air Flow Rates Passing through Zone 1 + N5, \field Relative Ratios of Air Flow Rates Passing through Inlet 1 \type real \minimum 0 \maximum 1 @@ -24913,14 +24914,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A5, \field Zone 2 Name + A5, \field Zone or Space Name 2 \type object-list \object-list ZoneNames + \object-list SpaceNames N7, \field Distance from Top of Thermal Chimney to Inlet 2 \units m \type real \minimum 0 - N8, \field Relative Ratios of Air Flow Rates Passing through Zone 2 + N8, \field Relative Ratios of Air Flow Rates Passing through Inlet 2 \type real \minimum 0 \maximum 1 @@ -24928,14 +24930,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A6, \field Zone 3 Name + A6, \field Zone or Space Name 3 \type object-list \object-list ZoneNames + \object-list SpaceNames N10, \field Distance from Top of Thermal Chimney to Inlet 3 \units m \type real \minimum 0 - N11, \field Relative Ratios of Air Flow Rates Passing through Zone 3 + N11, \field Relative Ratios of Air Flow Rates Passing through Inlet 3 \type real \minimum 0 \maximum 1 @@ -24943,14 +24946,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A7, \field Zone 4 Name + A7, \field Zone or Space Name 4 \type object-list \object-list ZoneNames + \object-list SpaceNames N13, \field Distance from Top of Thermal Chimney to Inlet 4 \units m \type real \minimum 0 - N14, \field Relative Ratios of Air Flow Rates Passing through Zone 4 + N14, \field Relative Ratios of Air Flow Rates Passing through Inlet 4 \type real \minimum 0 \maximum 1 @@ -24958,14 +24962,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A8, \field Zone 5 Name + A8, \field Zone or Space Name 5 \type object-list \object-list ZoneNames + \object-list SpaceNames N16, \field Distance from Top of Thermal Chimney to Inlet 5 \units m \type real \minimum 0 - N17, \field Relative Ratios of Air Flow Rates Passing through Zone 5 + N17, \field Relative Ratios of Air Flow Rates Passing through Inlet 5 \type real \minimum 0 \maximum 1 @@ -24973,14 +24978,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A9, \field Zone 6 Name + A9, \field Zone or Space Name 6 \type object-list \object-list ZoneNames + \object-list SpaceNames N19, \field Distance from Top of Thermal Chimney to Inlet 6 \units m \type real \minimum 0 - N20, \field Relative Ratios of Air Flow Rates Passing through Zone 6 + N20, \field Relative Ratios of Air Flow Rates Passing through Inlet 6 \type real \minimum 0 \maximum 1 @@ -24988,14 +24994,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A10, \field Zone 7 Name + A10, \field Zone or Space Name 7 \type object-list \object-list ZoneNames + \object-list SpaceNames N22, \field Distance from Top of Thermal Chimney to Inlet 7 \units m \type real \minimum 0 - N23, \field Relative Ratios of Air Flow Rates Passing through Zone 7 + N23, \field Relative Ratios of Air Flow Rates Passing through Inlet 7 \type real \minimum 0 \maximum 1 @@ -25003,14 +25010,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A11, \field Zone 8 Name + A11, \field Zone or Space Name 8 \type object-list \object-list ZoneNames + \object-list SpaceNames N25, \field Distance from Top of Thermal Chimney to Inlet 8 \units m \type real \minimum 0 - N26, \field Relative Ratios of Air Flow Rates Passing through Zone 8 + N26, \field Relative Ratios of Air Flow Rates Passing through Inlet 8 \type real \minimum 0 \maximum 1 @@ -25018,14 +25026,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A12, \field Zone 9 Name + A12, \field Zone or Space Name 9 \type object-list \object-list ZoneNames + \object-list SpaceNames N28, \field Distance from Top of Thermal Chimney to Inlet 9 \units m \type real \minimum 0 - N29, \field Relative Ratios of Air Flow Rates Passing through Zone 9 + N29, \field Relative Ratios of Air Flow Rates Passing through Inlet 9 \type real \minimum 0 \maximum 1 @@ -25033,14 +25042,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A13, \field Zone 10 Name + A13, \field Zone or Space Name 10 \type object-list \object-list ZoneNames + \object-list SpaceNames N31, \field Distance from Top of Thermal Chimney to Inlet 10 \units m \type real \minimum 0 - N32, \field Relative Ratios of Air Flow Rates Passing through Zone 10 + N32, \field Relative Ratios of Air Flow Rates Passing through Inlet 10 \type real \minimum 0 \maximum 1 @@ -25048,14 +25058,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A14, \field Zone 11 Name + A14, \field Zone or Space Name 11 \type object-list \object-list ZoneNames + \object-list SpaceNames N34, \field Distance from Top of Thermal Chimney to Inlet 11 \units m \type real \minimum 0 - N35, \field Relative Ratios of Air Flow Rates Passing through Zone 11 + N35, \field Relative Ratios of Air Flow Rates Passing through Inlet 11 \type real \minimum 0 \maximum 1 @@ -25063,14 +25074,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A15, \field Zone 12 Name + A15, \field Zone or Space Name 12 \type object-list \object-list ZoneNames + \object-list SpaceNames N37, \field Distance from Top of Thermal Chimney to Inlet 12 \units m \type real \minimum 0 - N38, \field Relative Ratios of Air Flow Rates Passing through Zone 12 + N38, \field Relative Ratios of Air Flow Rates Passing through Inlet 12 \type real \minimum 0 \maximum 1 @@ -25078,14 +25090,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A16, \field Zone 13 Name + A16, \field Zone or Space Name 13 \type object-list \object-list ZoneNames + \object-list SpaceNames N40, \field Distance from Top of Thermal Chimney to Inlet 13 \units m \type real \minimum 0 - N41, \field Relative Ratios of Air Flow Rates Passing through Zone 13 + N41, \field Relative Ratios of Air Flow Rates Passing through Inlet 13 \type real \minimum 0 \maximum 1 @@ -25093,14 +25106,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A17, \field Zone 14 Name + A17, \field Zone or Space Name 14 \type object-list \object-list ZoneNames + \object-list SpaceNames N43, \field Distance from Top of Thermal Chimney to Inlet 14 \units m \type real \minimum 0 - N44, \field Relative Ratios of Air Flow Rates Passing through Zone 14 + N44, \field Relative Ratios of Air Flow Rates Passing through Inlet 14 \type real \minimum 0 \maximum 1 @@ -25108,14 +25122,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A18, \field Zone 15 Name + A18, \field Zone or Space Name 15 \type object-list \object-list ZoneNames + \object-list SpaceNames N46, \field Distance from Top of Thermal Chimney to Inlet 15 \units m \type real \minimum 0 - N47, \field Relative Ratios of Air Flow Rates Passing through Zone 15 + N47, \field Relative Ratios of Air Flow Rates Passing through Inlet 15 \type real \minimum 0 \maximum 1 @@ -25123,14 +25138,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A19, \field Zone 16 Name + A19, \field Zone or Space Name 16 \type object-list \object-list ZoneNames + \object-list SpaceNames N49, \field Distance from Top of Thermal Chimney to Inlet 16 \units m \type real \minimum 0 - N50, \field Relative Ratios of Air Flow Rates Passing through Zone 16 + N50, \field Relative Ratios of Air Flow Rates Passing through Inlet 16 \type real \minimum 0 \maximum 1 @@ -25138,14 +25154,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A20, \field Zone 17 Name + A20, \field Zone or Space Name 17 \type object-list \object-list ZoneNames + \object-list SpaceNames N52, \field Distance from Top of Thermal Chimney to Inlet 17 \units m \type real \minimum 0 - N53, \field Relative Ratios of Air Flow Rates Passing through Zone 17 + N53, \field Relative Ratios of Air Flow Rates Passing through Inlet 17 \type real \minimum 0 \maximum 1 @@ -25153,14 +25170,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A21, \field Zone 18 Name + A21, \field Zone or Space Name 18 \type object-list \object-list ZoneNames + \object-list SpaceNames N55, \field Distance from Top of Thermal Chimney to Inlet 18 \units m \type real \minimum 0 - N56, \field Relative Ratios of Air Flow Rates Passing through Zone 18 + N56, \field Relative Ratios of Air Flow Rates Passing through Inlet 18 \type real \minimum 0 \maximum 1 @@ -25168,14 +25186,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A22, \field Zone 19 Name + A22, \field Zone or Space Name 19 \type object-list \object-list ZoneNames + \object-list SpaceNames N58, \field Distance from Top of Thermal Chimney to Inlet 19 \units m \type real \minimum 0 - N59, \field Relative Ratios of Air Flow Rates Passing through Zone 19 + N59, \field Relative Ratios of Air Flow Rates Passing through Inlet 19 \type real \minimum 0 \maximum 1 @@ -25183,14 +25202,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A23, \field Zone 20 Name + A23, \field Zone or Space Name 20 \type object-list \object-list ZoneNames + \object-list SpaceNames N61, \field Distance from Top of Thermal Chimney to Inlet 20 \units m \type real \minimum 0 - N62, \field Relative Ratios of Air Flow Rates Passing through Zone 20 + N62, \field Relative Ratios of Air Flow Rates Passing through Inlet 20 \type real \minimum 0 \maximum 1 diff --git a/src/EnergyPlus/ThermalChimney.cc b/src/EnergyPlus/ThermalChimney.cc index ba0329917ed..58b236f75c5 100644 --- a/src/EnergyPlus/ThermalChimney.cc +++ b/src/EnergyPlus/ThermalChimney.cc @@ -264,6 +264,7 @@ namespace ThermalChimney { state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib = NumAlpha - 3; state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr.allocate(state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib); + state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr.allocate(state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib); state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName.allocate(state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib); state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet.allocate( state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib); @@ -277,6 +278,15 @@ namespace ThermalChimney { state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum) = state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3); state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3), state.dataHeatBal->Zone); + if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == 0) { + int spaceNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3), state.dataHeatBal->space); + if (spaceNum > 0) { + state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum) = spaceNum; + int zoneNum = state.dataHeatBal->space(spaceNum).zoneNum; + state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) = zoneNum; + } + } + state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet(TCZoneNum) = state.dataIPShortCut->rNumericArgs(3 * TCZoneNum + 1); state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) = @@ -676,8 +686,6 @@ namespace ThermalChimney { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: // Real local vaiables - int TCZoneNumCounter; - int TCZoneNum; Real64 minorW; // width of enclosure (narrow dimension) Real64 majorW; // width of major surface Real64 TempmajorW; @@ -771,28 +779,41 @@ namespace ThermalChimney { DischargeCoeffTC = state.dataThermalChimneys->ThermalChimneySys(Loop).DischargeCoeff; AirInletCrossArea = 0.0; - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { AirInletCrossArea += state.dataThermalChimneys->ThermalChimneySys(Loop).EachAirInletCrossArea(TCZoneNum); } RoomAirTemp = 0.0; - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { - TCZoneNumCounter = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); - RoomAirTemp += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * - state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter).MAT; + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + int tcSpacePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum); + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + RoomAirTemp += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * + state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr).MAT; + } else { + int tcZonePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); + RoomAirTemp += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * + state.dataZoneTempPredictorCorrector->zoneHeatBalance(tcZonePtr).MAT; + } } RoomAirTemp += Constant::Kelvin; Process1 = 0.0; Process2 = 0.0; - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { - TCZoneNumCounter = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); - auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter); - Process1 += PsyHFnTdbW(thisTCZoneHB.MAT, thisTCZoneHB.airHumRat) * - state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet(TCZoneNum) * + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + int tcZonePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); + auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(tcZonePtr); + Real64 tcZoneMAT = thisTCZoneHB.MAT; + Real64 tcZoneHumRat = thisTCZoneHB.airHumRat; + int tcSpacePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum); + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + auto &thisTCspaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr); + tcZoneMAT = thisTCspaceHB.MAT; + tcZoneHumRat = thisTCspaceHB.airHumRat; + } + Real64 tcZoneEnth = PsyHFnTdbW(tcZoneMAT, tcZoneHumRat); + Process1 += tcZoneEnth * state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet(TCZoneNum) * state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum); - Process2 += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * - PsyHFnTdbW(state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter).MAT, thisTCZoneHB.airHumRat); + Process2 += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * tcZoneEnth; } OverallThermalChimLength = Process1 / Process2; @@ -888,23 +909,39 @@ namespace ThermalChimney { } // Now assignment of the overall mass flow rate into each zone - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { - TCZoneNumCounter = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); - auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter); - AirDensity = PsyRhoAirFnPbTdbW(state, - state.dataEnvrn->OutBaroPress, - state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter).MAT, - thisTCZoneHB.airHumRat); - CpAir = PsyCpAirFnW(thisTCZoneHB.airHumRat); - thisTCZoneHB.MCPThermChim = + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + int tcZonePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); + auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(tcZonePtr); + Real64 tcZoneMAT = thisTCZoneHB.MAT; + Real64 tcZoneHumRat = thisTCZoneHB.airHumRat; + int tcSpacePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum); + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + auto &thisTCSpaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr); + tcZoneMAT = thisTCSpaceHB.MAT; + tcZoneHumRat = thisTCSpaceHB.airHumRat; + } + // ToDo - Let this persist to avoid diffs, but should be local + AirDensity = PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, tcZoneMAT, tcZoneHumRat); + CpAir = PsyCpAirFnW(tcZoneHumRat); + Real64 thisMCPThermChim = TCVolumeAirFlowRate * AirDensity * CpAir * state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum); - if (thisTCZoneHB.MCPThermChim <= 0.0) { - thisTCZoneHB.MCPThermChim = 0.0; + if (thisMCPThermChim <= 0.0) { + thisMCPThermChim = 0.0; + } + Real64 thisThermChimAMFL = thisMCPThermChim / CpAir; + Real64 thisMCPTThermChim = thisMCPThermChim * state.dataHeatBal->Zone(tcZonePtr).OutDryBulbTemp; // Only zones have an ODB temp value + thisTCZoneHB.MCPThermChim = thisMCPThermChim; + thisTCZoneHB.ThermChimAMFL = thisThermChimAMFL; + thisTCZoneHB.MCPTThermChim = thisMCPTThermChim; + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + auto &thisTCSpaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr); + thisTCSpaceHB.MCPThermChim = thisMCPThermChim; + thisTCSpaceHB.ThermChimAMFL = thisThermChimAMFL; + thisTCSpaceHB.MCPTThermChim = thisMCPTThermChim; } - thisTCZoneHB.ThermChimAMFL = thisTCZoneHB.MCPThermChim / CpAir; - thisTCZoneHB.MCPTThermChim = thisTCZoneHB.MCPThermChim * state.dataHeatBal->Zone(TCZoneNumCounter).OutDryBulbTemp; } + // ToDo - This should probably be using AirDensityThermalChim here instead of AirDensity which is leftover from the last inlet zone thisZoneHB.MCPThermChim = TCVolumeAirFlowRate * AirDensity * CpAir; if (thisZoneHB.MCPThermChim <= 0.0) { thisZoneHB.MCPThermChim = 0.0; @@ -922,12 +959,19 @@ namespace ThermalChimney { state.dataThermalChimneys->ThermalChimneyReport(Loop).OutletAirTempThermalChim = ThermChimSubTemp(NTC) - Constant::Kelvin; if (GetCurrentScheduleValue(state, state.dataThermalChimneys->ThermalChimneySys(Loop).SchedPtr) <= 0.0) { - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { - TCZoneNumCounter = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); - auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter); + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + int tcZonePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); + auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(tcZonePtr); thisTCZoneHB.MCPThermChim = 0.0; thisTCZoneHB.ThermChimAMFL = 0.0; thisTCZoneHB.MCPTThermChim = 0.0; + int tcSpacePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum); + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + auto &thisTCSpaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr); + thisTCSpaceHB.MCPThermChim = 0.0; + thisTCSpaceHB.ThermChimAMFL = 0.0; + thisTCSpaceHB.MCPTThermChim = 0.0; + } } thisZoneHB.MCPThermChim = 0.0; thisZoneHB.ThermChimAMFL = 0.0; diff --git a/src/EnergyPlus/ThermalChimney.hh b/src/EnergyPlus/ThermalChimney.hh index 4731ca007e5..797594f6756 100644 --- a/src/EnergyPlus/ThermalChimney.hh +++ b/src/EnergyPlus/ThermalChimney.hh @@ -79,6 +79,7 @@ namespace ThermalChimney { bool EMSOverrideOn; // if true then EMS is requesting to override Real64 EMSAirFlowRateValue; // value EMS is setting for air flow rate Array1D_int ZonePtr; + Array1D_int spacePtr; Array1D_string ZoneName; Array1D DistanceThermChimInlet; Array1D RatioThermChimAirFlow;