Skip to content

Commit 1c11a3d

Browse files
mjwittejmarrec
authored andcommitted
Squash #11051 - Fix Controller:MechanicalVentilation with DesignSpecification:OutdoorAir:SpaceList
Delete unused MechVent totals Add calcIAQMethods argument to calcDesignSpecificationOutdoorAir Use calcDesignSpecificationOutdoorAir in MechVent - Part 1 Split up desFlow OA functions Use calcDesignSpecificationOutdoorAir in MechVent - Part 2 Add new OARequirements functions Trim copied values in VentilationMechanicalZoneProps - use DSOA directly Fix diffs and other cleanup Fix diffs again Simplify OA functions and fix missing table rows Fix unit test failures and other cleanup Address comments Add DSOA:SpaceList unit test Fix DSOA:SpaceList unit test Add DSOA:SpaceList to unit test Use DSOA:SpaceList in Controller:MechVent Fix EPVector out of range issue: good candidate for a lambda! Output rules
1 parent 6fee28e commit 1c11a3d

8 files changed

Lines changed: 944 additions & 459 deletions

File tree

src/EnergyPlus/DataSizing.cc

Lines changed: 321 additions & 38 deletions
Large diffs are not rendered by default.

src/EnergyPlus/DataSizing.hh

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,6 @@ namespace DataSizing {
208208
// parameter for (time-of-peak) sizing format
209209
static constexpr std::string_view PeakHrMinFmt("{:02}:{:02}:00");
210210

211-
// Zone Outdoor Air Method
212-
constexpr int ZOAM_ProportionalControlDesOcc(9); // Use ASHRAE Standard 62.1-2004 or Trane Engineer's newsletter (volume 34-5)
213-
// to calculate the zone level outdoor air flow rates based on design occupancy
214-
215211
enum class SysOAMethod
216212
{
217213
Invalid = -1,
@@ -1129,18 +1125,45 @@ namespace DataSizing {
11291125
int CO2GainErrorIndex = 0; // Index for recurring error message when CO2 generation from people is zero for SOAM_ProportionalControlSchOcc
11301126
bool myEnvrnFlag = true;
11311127

1128+
Real64 oaFlowArea(EnergyPlusData &state,
1129+
int const zoneNum,
1130+
bool const useMinOASchFlag = true, // Use min OA schedule in DesignSpecification:OutdoorAir object
1131+
int const spaceNum = 0); // Space index (if applicable)
1132+
1133+
Real64 floorArea(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
1134+
11321135
Real64 desFlowPerZoneArea(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
11331136

1134-
Real64 desFlowPerZonePerson(EnergyPlusData &state, int const actualZoneNum, int const spaceNum = 0);
1137+
Real64 oaFlowPeople(EnergyPlusData &state,
1138+
int const zoneNum, // Zone index
1139+
bool const useOccSchFlag = true, // Use occupancy schedule
1140+
bool const useMinOASchFlag = true, // Use min OA schedule in DesignSpecification:OutdoorAir object
1141+
int const spaceNum = 0); // Space index (if applicable)
1142+
1143+
Real64 people(EnergyPlusData &state,
1144+
int const zoneNum, // Zone index
1145+
bool const useOccSchFlag = true, // Use occupancy schedule
1146+
int const spaceNum = 0); // Space index (if applicable)
1147+
1148+
Real64 desFlowPerZonePerson(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
1149+
1150+
Real64 desFlowPerZone(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
1151+
1152+
Real64 desFlowPerACH(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
11351153

11361154
Real64 calcOAFlowRate(EnergyPlusData &state,
1137-
int ActualZoneNum, // Zone index
1138-
bool UseOccSchFlag, // Zone occupancy schedule will be used instead of using total zone occupancy
1139-
bool UseMinOASchFlag, // Use min OA schedule in DesignSpecification:OutdoorAir object
1140-
bool const PerPersonNotSet, // when calculation should not include occupants (e.g., dual duct)
1141-
bool const MaxOAVolFlowFlag, // TRUE when calculation uses occupancy schedule (e.g., dual duct)
1142-
int const spaceNum = 0 // Space index (if applicable)
1155+
int ActualZoneNum, // Zone index
1156+
bool UseOccSchFlag, // Zone occupancy schedule will be used instead of using total zone occupancy
1157+
bool UseMinOASchFlag, // Use min OA schedule in DesignSpecification:OutdoorAir object
1158+
bool const PerPersonNotSet, // when calculation should not include occupants (e.g., dual duct)
1159+
bool const MaxOAVolFlowFlag, // TRUE when calculation uses occupancy schedule (e.g., dual duct)
1160+
int const spaceNum = 0, // Space index (if applicable)
1161+
bool const calcIAQMethods = true // For IAQProcedure, PCOccSch, and PCDesOcc, calculate if true, return zero if false
11431162
);
1163+
1164+
Sched::Schedule *getZoneFlowFracSched(EnergyPlusData &state, bool notAllSame);
1165+
1166+
Sched::Schedule *getZonePropCtlMinRateSched(EnergyPlusData &state, bool notAllSame);
11441167
};
11451168

11461169
struct ZoneAirDistributionData
@@ -1177,20 +1200,25 @@ namespace DataSizing {
11771200
Real64 &DesExitHumRat // returned design coil exit humidity ratio [kg/kg]
11781201
);
11791202

1180-
Real64 calcDesignSpecificationOutdoorAir(EnergyPlusData &state,
1181-
int const DSOAPtr, // Pointer to DesignSpecification:OutdoorAir object
1182-
int const ActualZoneNum, // Zone index
1183-
bool const UseOccSchFlag, // Zone occupancy schedule will be used instead of using total zone occupancy
1184-
bool const UseMinOASchFlag, // Use min OA schedule in DesignSpecification:OutdoorAir object
1185-
bool const PerPersonNotSet = false, // when calculation should not include occupants (e.g., dual duct)
1186-
bool const MaxOAVolFlowFlag = false, // TRUE when calculation uses occupancy schedule (e.g., dual duct)
1187-
int const spaceNum = 0);
1203+
Real64 calcDesignSpecificationOutdoorAir(
1204+
EnergyPlusData &state,
1205+
int const DSOAPtr, // Pointer to DesignSpecification:OutdoorAir object
1206+
int const ActualZoneNum, // Zone index
1207+
bool const UseOccSchFlag, // Zone occupancy schedule will be used instead of using total zone occupancy
1208+
bool const UseMinOASchFlag, // Use min OA schedule in DesignSpecification:OutdoorAir object
1209+
bool const PerPersonNotSet = false, // when calculation should not include occupants (e.g., dual duct)
1210+
bool const MaxOAVolFlowFlag = false, // TRUE when calculation uses occupancy schedule (e.g., dual duct)
1211+
int const spaceNum = 0, // Space index (if applicable)
1212+
bool const calcIAQMethods = true); // For IAQProcedure, PCOccSch, and PCDesOcc, calculate if true, return zero if false
1213+
1214+
int getDefaultOAReq(EnergyPlusData &state); // get index to default OA requirements - used by Controller:MechanicalVentilation
11881215

11891216
} // namespace DataSizing
11901217

11911218
struct SizingData : BaseGlobalStruct
11921219
{
11931220
int NumOARequirements = 0; // Number of OA Requirements objects
1221+
int OARequirements_Default = 0; // Index to default DesignSpecification:OutdoorAir
11941222
int NumZoneAirDistribution = 0; // Number of zone air distribution objects
11951223
int NumZoneSizingInput = 0; // Number of Zone Sizing objects
11961224
int NumSysSizInput = 0; // Number of System Sizing objects

0 commit comments

Comments
 (0)