Skip to content

Commit

Permalink
Space IV-ZoneCoolTowerShower
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Aug 9, 2024
1 parent 8d8fec6 commit 2a966e9
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 18 deletions.
4 changes: 2 additions & 2 deletions doc/input-output-reference/src/overview/group-airflow.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1965,9 +1965,9 @@ \subsubsection{Inputs}\label{inputs-8-002}

This field is the name of the schedule that denotes whether the cooltower can run during a given time period. A schedule value greater than 0 (usually 1 is used) indicates that the cooltower is available and can be on during the time period. A value less than or equal to 0 (usually 0 is used) denotes that the cooltower is not available and must be off for the time period. If this field is blank, the schedule has values of 1 for all time periods.

\paragraph{Field: Zone Name}\label{field-zone-name-6}
\paragraph{Field: Zone or Space Name}\label{field-zone-name-6}

This field is the name of the zone (ref: Zone) and attaches a particular cooltower statement to a thermal zone in the building.
This field is the name of the zone (ref: Zone) or space the cooltower is attached to.

\paragraph{Field: Water Supply Storage Tank Name}\label{field-water-supply-storage-tank-name}

Expand Down
5 changes: 3 additions & 2 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -24795,18 +24795,19 @@ ZoneCoolTower:Shower,
\memo A cooltower (sometimes referred to as a wind tower or a shower cooling tower)
\memo models passive downdraught evaporative cooling (PDEC) that is designed to capture the
\memo wind at the top of a tower and cool the outdoor air using water evaporation before
\memo delivering it to a space.
\memo delivering it to a zone (or space).
A1, \field Name
\required-field
A2, \field Availability Schedule Name
\note Availability schedule name for this system. Schedule value > 0 means the system is available.
\note If this field is blank, the system is always available.
\type object-list
\object-list ScheduleNames
A3, \field Zone Name
A3, \field Zone or Space Name
\required-field
\type object-list
\object-list ZoneNames
\object-list SpaceNames
A4, \field Water Supply Storage Tank Name
\note In case of stand alone tank or underground water, leave this input blank
\type object-list
Expand Down
46 changes: 34 additions & 12 deletions src/EnergyPlus/CoolTower.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ namespace CoolTower {
}
}

state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZoneName = state.dataIPShortCut->cAlphaArgs(3); // Name of zone where cooltower is serving
state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(3), Zone);
if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr == 0) {
state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr =
Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(3), state.dataHeatBal->space);
if ((state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr == 0) && (state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr == 0)) {
if (lAlphaBlanks(3)) {
ShowSevereError(state,
format("{}=\"{}\" invalid {} is required but input is blank.",
Expand All @@ -216,6 +217,9 @@ namespace CoolTower {
state.dataIPShortCut->cAlphaArgs(3)));
}
ErrorsFound = true;
} else if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr == 0) {
state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr =
state.dataHeatBal->space(state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr).zoneNum;
}

state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterSupplyName = state.dataIPShortCut->cAlphaArgs(4); // Name of water storage tank
Expand Down Expand Up @@ -627,7 +631,12 @@ namespace CoolTower {
thisZoneHB.MCPTC = 0.0;
thisZoneHB.MCPC = 0.0;
thisZoneHB.CTMFL = 0.0;

if ((state.dataHeatBal->doSpaceHeatBalance) && (state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr > 0)) {
auto &thisSpaceHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr);
thisSpaceHB.MCPTC = 0.0;
thisSpaceHB.MCPC = 0.0;
thisSpaceHB.CTMFL = 0.0;
}
if (ScheduleManager::GetCurrentScheduleValue(state, state.dataCoolTower->CoolTowerSys(CoolTowerNum).SchedPtr) > 0.0) {
// check component operation
if (state.dataEnvrn->WindSpeed < MinWindSpeed || state.dataEnvrn->WindSpeed > MaxWindSpeed) continue;
Expand Down Expand Up @@ -707,22 +716,35 @@ namespace CoolTower {
AirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, OutletTemp, OutletHumRat); // Outlet air density
CVF_ZoneNum = state.dataCoolTower->CoolTowerSys(CoolTowerNum).ActualAirVolFlowRate *
ScheduleManager::GetCurrentScheduleValue(state, state.dataCoolTower->CoolTowerSys(CoolTowerNum).SchedPtr);
thisZoneHB.MCPC = CVF_ZoneNum * AirDensity * AirSpecHeat;
thisZoneHB.MCPTC = thisZoneHB.MCPC * OutletTemp;
thisZoneHB.CTMFL = thisZoneHB.MCPC / AirSpecHeat;
Real64 thisMCPC = CVF_ZoneNum * AirDensity * AirSpecHeat;
Real64 thisMCPTC = thisMCPC * OutletTemp;
Real64 thisCTMFL = thisMCPC / AirSpecHeat;
Real64 thisZT = thisZoneHB.ZT;
Real64 thisAirHumRat = thisZoneHB.airHumRat;
thisZoneHB.MCPC = thisMCPC;
thisZoneHB.MCPTC = thisMCPTC;
thisZoneHB.CTMFL = thisCTMFL;
if ((state.dataHeatBal->doSpaceHeatBalance) && (state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr > 0)) {
auto &thisSpaceHB =
state.dataZoneTempPredictorCorrector->zoneHeatBalance(state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr);
thisSpaceHB.MCPC = thisMCPC;
thisSpaceHB.MCPTC = thisMCPTC;
thisSpaceHB.CTMFL = thisCTMFL;
thisZT = thisSpaceHB.ZT;
thisAirHumRat = thisSpaceHB.airHumRat;
}

state.dataCoolTower->CoolTowerSys(CoolTowerNum).SenHeatPower = thisZoneHB.MCPC * std::abs(thisZoneHB.ZT - OutletTemp);
state.dataCoolTower->CoolTowerSys(CoolTowerNum).LatHeatPower = CVF_ZoneNum * std::abs(thisZoneHB.airHumRat - OutletHumRat);
state.dataCoolTower->CoolTowerSys(CoolTowerNum).SenHeatPower = thisMCPC * std::abs(thisZT - OutletTemp);
state.dataCoolTower->CoolTowerSys(CoolTowerNum).LatHeatPower = CVF_ZoneNum * std::abs(thisAirHumRat - OutletHumRat);
state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletTemp = OutletTemp;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletHumRat = OutletHumRat;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirVolFlowRate = CVF_ZoneNum;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirMassFlowRate = thisZoneHB.CTMFL;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirVolFlowRateStd = thisZoneHB.CTMFL / state.dataEnvrn->StdRhoAir;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirMassFlowRate = thisCTMFL;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirVolFlowRateStd = thisCTMFL / state.dataEnvrn->StdRhoAir;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).InletDBTemp = Zone(ZoneNum).OutDryBulbTemp;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).InletWBTemp = Zone(ZoneNum).OutWetBulbTemp;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).InletHumRat = state.dataEnvrn->OutHumRat;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterConsumpRate =
(std::abs(InletHumRat - OutletHumRat) * thisZoneHB.CTMFL) / RhoWater;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterConsumpRate = (std::abs(InletHumRat - OutletHumRat) * thisCTMFL) / RhoWater;
state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterStarvMakeupRate = 0.0; // initialize -- calc in update
state.dataCoolTower->CoolTowerSys(CoolTowerNum).PumpElecPower =
state.dataCoolTower->CoolTowerSys(CoolTowerNum).RatedPumpPower * PumpPartLoadRat;
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/CoolTower.hh
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ namespace CoolTower {
std::string Name; // The component name
std::string CompType; // Type of component
std::string Schedule; // Available schedule
std::string ZoneName; // Name of zone the component is serving
int SchedPtr = 0; // Index to schedule
int ZonePtr = 0; // Point to this zone
int ZonePtr = 0; // Index to zone
int spacePtr = 0; // Index to space (if applicable)
int PumpSchedPtr = 0; // Index to schedule for water pump
FlowCtrl FlowCtrlType = FlowCtrl::Invalid; // Type of cooltower operation
WaterSupplyMode CoolTWaterSupplyMode = WaterSupplyMode::FromMains; // Type of water source
Expand Down

4 comments on commit 2a966e9

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SpaceSizingHVACPart4 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3351 of 3695 tests passed, 5 test warnings)

Messages:\n

  • 344 tests had: Table big diffs.
  • 5 tests had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 467
  • Failed: 344

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SpaceSizingHVACPart4 (mjwitte) - x86_64-MacOS-10.18-clang-15.0.0: OK (3311 of 3654 tests passed, 5 test warnings)

Messages:\n

  • 343 tests had: Table big diffs.
  • 5 tests had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 448
  • Failed: 343

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SpaceSizingHVACPart4 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (795 of 795 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SpaceSizingHVACPart4 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2070 of 2070 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.