Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois,
2 : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
3 : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
4 : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
5 : // contributors. All rights reserved.
6 : //
7 : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
8 : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
9 : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
10 : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
11 : // derivative works, and perform publicly and display publicly, and to permit others to do so.
12 : //
13 : // Redistribution and use in source and binary forms, with or without modification, are permitted
14 : // provided that the following conditions are met:
15 : //
16 : // (1) Redistributions of source code must retain the above copyright notice, this list of
17 : // conditions and the following disclaimer.
18 : //
19 : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
20 : // conditions and the following disclaimer in the documentation and/or other materials
21 : // provided with the distribution.
22 : //
23 : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
24 : // the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
25 : // used to endorse or promote products derived from this software without specific prior
26 : // written permission.
27 : //
28 : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
29 : // without changes from the version obtained under this License, or (ii) Licensee makes a
30 : // reference solely to the software portion of its product, Licensee must refer to the
31 : // software as "EnergyPlus version X" software, where "X" is the version number Licensee
32 : // obtained under this License and may not use a different name for the software. Except as
33 : // specifically required in this Section (4), Licensee shall not use in a company name, a
34 : // product name, in advertising, publicity, or other promotional activities any name, trade
35 : // name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
36 : // similar designation, without the U.S. Department of Energy's prior written consent.
37 : //
38 : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
39 : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
40 : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
41 : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43 : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44 : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
45 : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46 : // POSSIBILITY OF SUCH DAMAGE.
47 :
48 : // C++ Headers
49 : #include <cmath>
50 : #include <map>
51 : #include <string>
52 :
53 : // ObjexxFCL Headers
54 : #include <ObjexxFCL/Array.functions.hh>
55 : #include <ObjexxFCL/Array1D.hh>
56 : #include <ObjexxFCL/Fmath.hh>
57 :
58 : // EnergyPlus Headers
59 : #include <EnergyPlus/CurveManager.hh>
60 : #include <EnergyPlus/Data/EnergyPlusData.hh>
61 : #include <EnergyPlus/DataContaminantBalance.hh>
62 : #include <EnergyPlus/DataDaylighting.hh>
63 : #include <EnergyPlus/DataEnvironment.hh>
64 : #include <EnergyPlus/DataHVACGlobals.hh>
65 : #include <EnergyPlus/DataHeatBalSurface.hh>
66 : #include <EnergyPlus/DataHeatBalance.hh>
67 : #include <EnergyPlus/DataIPShortCuts.hh>
68 : #include <EnergyPlus/DataLoopNode.hh>
69 : #include <EnergyPlus/DataPrecisionGlobals.hh>
70 : #include <EnergyPlus/DataRoomAirModel.hh>
71 : #include <EnergyPlus/DataViewFactorInformation.hh>
72 : #include <EnergyPlus/DataZoneEquipment.hh>
73 : #include <EnergyPlus/DaylightingDevices.hh>
74 : #include <EnergyPlus/EMSManager.hh>
75 : #include <EnergyPlus/ElectricPowerServiceManager.hh>
76 : #include <EnergyPlus/ExteriorEnergyUse.hh>
77 : #include <EnergyPlus/FuelCellElectricGenerator.hh>
78 : #include <EnergyPlus/General.hh>
79 : #include <EnergyPlus/HeatBalanceInternalHeatGains.hh>
80 : #include <EnergyPlus/HybridModel.hh>
81 : #include <EnergyPlus/InputProcessing/InputProcessor.hh>
82 : #include <EnergyPlus/InternalHeatGains.hh>
83 : #include <EnergyPlus/MicroCHPElectricGenerator.hh>
84 : #include <EnergyPlus/NodeInputManager.hh>
85 : #include <EnergyPlus/OutputProcessor.hh>
86 : #include <EnergyPlus/OutputReportPredefined.hh>
87 : #include <EnergyPlus/OutputReportTabular.hh>
88 : #include <EnergyPlus/PipeHeatTransfer.hh>
89 : #include <EnergyPlus/Psychrometrics.hh>
90 : #include <EnergyPlus/RefrigeratedCase.hh>
91 : #include <EnergyPlus/ScheduleManager.hh>
92 : #include <EnergyPlus/SetPointManager.hh>
93 : #include <EnergyPlus/UtilityRoutines.hh>
94 : #include <EnergyPlus/WaterThermalTanks.hh>
95 : #include <EnergyPlus/WaterUse.hh>
96 : #include <EnergyPlus/ZonePlenum.hh>
97 : #include <EnergyPlus/ZoneTempPredictorCorrector.hh>
98 :
99 : namespace EnergyPlus {
100 :
101 : namespace InternalHeatGains {
102 : // Module containing the routines dealing with the internal heat gains
103 :
104 : // MODULE INFORMATION:
105 : // AUTHOR Rick Strand
106 : // DATE WRITTEN August 2000
107 : // MODIFIED Aug 2005, PGE (Added object names and report variables)
108 : // Feb 2006, PGE (Added end-use subcategories)
109 : // RE-ENGINEERED na
110 :
111 : // PURPOSE OF THIS MODULE:
112 : // Part of the heat balance modularization/re-engineering. Purpose of this
113 : // module is to contain the internal heat gain routines in a single location.
114 :
115 : // METHODOLOGY EMPLOYED:
116 : // Routines are called as subroutines to supply the data-only module structures
117 : // with the proper values.
118 :
119 : // REFERENCES:
120 : // Legacy BLAST code
121 :
122 : // OTHER NOTES: none
123 :
124 : // Using/Aliasing
125 : using namespace DataEnvironment;
126 : using namespace DataHeatBalance;
127 : using namespace DataSurfaces;
128 :
129 2569280 : void ManageInternalHeatGains(EnergyPlusData &state,
130 : Optional_bool_const InitOnly) // when true, just calls the get input, if appropriate and returns.
131 : {
132 :
133 : // SUBROUTINE INFORMATION:
134 : // AUTHOR Rick Strand
135 : // DATE WRITTEN May 2000
136 : // MODIFIED Mar 2004, FCW: move call to DayltgElecLightingControl from InitSurfaceHeatBalance
137 : // RE-ENGINEERED na
138 :
139 : // PURPOSE OF THIS SUBROUTINE:
140 : // This is the main driver subroutine for the internal heat gains.
141 :
142 2569280 : if (state.dataInternalHeatGains->GetInternalHeatGainsInputFlag) {
143 771 : GetInternalHeatGainsInput(state);
144 771 : state.dataInternalHeatGains->GetInternalHeatGainsInputFlag = false;
145 : }
146 :
147 2569280 : if (present(InitOnly)) {
148 2569280 : if (InitOnly) return;
149 : }
150 :
151 2568509 : InitInternalHeatGains(state);
152 :
153 2568509 : ReportInternalHeatGains(state);
154 :
155 2568509 : CheckReturnAirHeatGain(state);
156 :
157 : // for the load component report, gather the load components for each timestep but not when doing pulse
158 2568509 : if (state.dataGlobal->ZoneSizingCalc) GatherComponentLoadsIntGain(state);
159 : }
160 :
161 771 : void GetInternalHeatGainsInput(EnergyPlusData &state)
162 : {
163 :
164 : // SUBROUTINE INFORMATION:
165 : // AUTHOR Linda K. Lawrie
166 : // DATE WRITTEN September 1997
167 : // MODIFIED September 1998, FW
168 : // May 2009, BG: added calls to setup for possible EMS override
169 : // RE-ENGINEERED August 2000, RKS
170 :
171 : // PURPOSE OF THIS SUBROUTINE:
172 : // This subroutine gets the Internal Heat Gain Data for the Zones.
173 : // Sets up the various data that will be used later with the
174 : // schedulemanager to determine the actual values.
175 :
176 : // METHODOLOGY EMPLOYED:
177 : // The GetObjectItem routines are employed to retrieve the data.
178 :
179 : // REFERENCES:
180 : // IDD Objects:
181 : // People
182 : // Lights
183 : // ElectricEquipment
184 : // GasEquipment
185 : // SteamEquipment
186 : // HotWaterEquipment
187 : // OtherEquipment
188 : // ElectricEquipment:ITE:AirCooled
189 : // ZoneBaseboard:OutdoorTemperatureControlled
190 :
191 : // Using/Aliasing
192 : using namespace ScheduleManager;
193 : using General::CheckCreatedZoneItemName;
194 :
195 : using namespace OutputReportPredefined;
196 : using namespace DataLoopNode;
197 : using Curve::GetCurveIndex;
198 : using NodeInputManager::GetOnlySingleNode;
199 :
200 : // SUBROUTINE PARAMETER DEFINITIONS:
201 : static constexpr std::string_view RoutineName("GetInternalHeatGains: ");
202 :
203 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
204 : int IOStat;
205 :
206 : // Variables for reporting nominal internal gains
207 : Real64 LightTot; // Total Lights for calculating lights per square meter
208 : Real64 ElecTot; // Total Electric Load for calculating electric per square meter
209 : Real64 GasTot; // Total Gas load for calculating gas per square meter
210 : Real64 OthTot; // Total Other load for calculating other load per square meter
211 : Real64 HWETot; // Total Hot Water Equipment for calculating HWE per square meter
212 : Real64 StmTot; // Total Steam for calculating Steam per square meter
213 1542 : std::string BBHeatInd; // Yes if BBHeat in zone, no if not.
214 : Real64 SchMin;
215 : Real64 SchMax;
216 1542 : std::string liteName;
217 :
218 : // Formats
219 : static constexpr std::string_view Format_720(" Zone Internal Gains Nominal, {},{:.2R},{:.1R},");
220 : static constexpr std::string_view Format_722(" {} Internal Gains Nominal, {},{},{},{:.2R},{:.1R},");
221 : static constexpr std::string_view Format_723(
222 : "! <{} Internal Gains Nominal>,Name,Schedule Name,Zone Name,Zone Floor Area {{m2}},# Zone Occupants,{}");
223 : static constexpr std::string_view Format_724(" {}, {}\n");
224 :
225 29270 : auto print_and_divide_if_greater_than_zero = [&](const Real64 numerator, const Real64 denominator) {
226 29270 : if (denominator > 0.0) {
227 29270 : print(state.files.eio, "{:.3R},", numerator / denominator);
228 : } else {
229 3314 : print(state.files.eio, "N/A,");
230 : }
231 30041 : };
232 :
233 771 : auto &ErrorsFound(state.dataInternalHeatGains->ErrorsFound);
234 :
235 : // TODO MJW: Punt for now, sometimes unit test need these to be allocated in AllocateZoneHeatBalArrays, but simulations need them here
236 771 : if (!state.dataHeatBal->ZoneIntGain.allocated()) {
237 771 : DataHeatBalance::AllocateIntGains(state);
238 : }
239 771 : state.dataHeatBal->ZoneRpt.allocate(state.dataGlobal->NumOfZones);
240 771 : state.dataHeatBal->spaceRpt.allocate(state.dataGlobal->numSpaces);
241 771 : state.dataHeatBal->ZoneIntEEuse.allocate(state.dataGlobal->NumOfZones);
242 771 : state.dataHeatBal->RefrigCaseCredit.allocate(state.dataGlobal->NumOfZones);
243 :
244 1542 : Array1D_bool RepVarSet;
245 771 : RepVarSet.allocate(state.dataGlobal->NumOfZones);
246 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
247 4814 : RepVarSet(zoneNum) = true;
248 : }
249 :
250 1542 : const std::string peopleModuleObject = "People";
251 1542 : const std::string lightsModuleObject = "Lights";
252 1542 : const std::string elecEqModuleObject = "ElectricEquipment";
253 1542 : const std::string gasEqModuleObject = "GasEquipment";
254 1542 : const std::string hwEqModuleObject = "HotWaterEquipment";
255 1542 : const std::string stmEqModuleObject = "SteamEquipment";
256 1542 : const std::string othEqModuleObject = "OtherEquipment";
257 1542 : const std::string itEqModuleObject = "ElectricEquipment:ITE:AirCooled";
258 1542 : const std::string bbModuleObject = "ZoneBaseboard:OutdoorTemperatureControlled";
259 1542 : const std::string contamSSModuleObject = "ZoneContaminantSourceAndSink:CarbonDioxide";
260 :
261 : // Because there are occassions where getObjectItem will be called a second time within the routine (#9680)
262 : // We should use local arrays instead of state.dataIPShortCut
263 771 : int IHGNumAlphas = 0;
264 771 : int IHGNumNumbers = 0;
265 1542 : Array1D<Real64> IHGNumbers;
266 1542 : Array1D_string IHGAlphas;
267 1542 : Array1D_bool IHGNumericFieldBlanks;
268 1542 : Array1D_bool IHGAlphaFieldBlanks;
269 1542 : Array1D_string IHGAlphaFieldNames;
270 1542 : Array1D_string IHGNumericFieldNames;
271 :
272 : {
273 771 : int MaxAlphas = 0;
274 771 : int MaxNums = 0;
275 771 : int NumParams = 0;
276 15420 : for (const auto &moduleName : {peopleModuleObject,
277 : lightsModuleObject,
278 : elecEqModuleObject,
279 : gasEqModuleObject,
280 : hwEqModuleObject,
281 : stmEqModuleObject,
282 : othEqModuleObject,
283 : itEqModuleObject,
284 : bbModuleObject,
285 1542 : contamSSModuleObject}) {
286 7710 : state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, moduleName, NumParams, IHGNumAlphas, IHGNumNumbers);
287 7710 : MaxAlphas = std::max(MaxAlphas, IHGNumAlphas);
288 7710 : MaxNums = std::max(MaxNums, IHGNumNumbers);
289 : }
290 771 : IHGAlphas.allocate(MaxAlphas);
291 771 : IHGAlphaFieldNames.allocate(MaxAlphas);
292 771 : IHGAlphaFieldBlanks.dimension(MaxAlphas, true);
293 :
294 771 : IHGNumbers.dimension(MaxNums, 0.0);
295 771 : IHGNumericFieldNames.allocate(MaxNums);
296 771 : IHGNumericFieldBlanks.dimension(MaxNums, true);
297 771 : IHGNumAlphas = 0;
298 771 : IHGNumNumbers = 0;
299 : }
300 :
301 : // PEOPLE: Includes both information related to the heat balance and thermal comfort
302 1542 : EPVector<InternalHeatGains::GlobalInternalGainMiscObject> peopleObjects;
303 771 : int numPeopleStatements = 0;
304 771 : setupIHGZonesAndSpaces(state, peopleModuleObject, peopleObjects, numPeopleStatements, state.dataHeatBal->TotPeople, ErrorsFound);
305 :
306 771 : if (state.dataHeatBal->TotPeople > 0) {
307 642 : state.dataHeatBal->People.allocate(state.dataHeatBal->TotPeople);
308 642 : int peopleNum = 0;
309 4466 : for (int peopleInputNum = 1; peopleInputNum <= numPeopleStatements; ++peopleInputNum) {
310 3824 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
311 : peopleModuleObject,
312 : peopleInputNum,
313 : IHGAlphas,
314 : IHGNumAlphas,
315 : IHGNumbers,
316 : IHGNumNumbers,
317 : IOStat,
318 : IHGNumericFieldBlanks,
319 : IHGAlphaFieldBlanks,
320 : IHGAlphaFieldNames,
321 : IHGNumericFieldNames);
322 :
323 : // Create one People instance for every space associated with this People input object
324 3824 : auto &thisPeopleInput = peopleObjects(peopleInputNum);
325 7694 : for (int Item1 = 1; Item1 <= thisPeopleInput.numOfSpaces; ++Item1) {
326 3870 : ++peopleNum;
327 3870 : auto &thisPeople = state.dataHeatBal->People(peopleNum);
328 3870 : int const spaceNum = thisPeopleInput.spaceNums(Item1);
329 3870 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
330 3870 : thisPeople.Name = thisPeopleInput.names(Item1);
331 3870 : thisPeople.spaceIndex = spaceNum;
332 3870 : thisPeople.ZonePtr = zoneNum;
333 :
334 3870 : thisPeople.NumberOfPeoplePtr = GetScheduleIndex(state, IHGAlphas(3));
335 3870 : SchMin = 0.0;
336 3870 : SchMax = 0.0;
337 3870 : if (thisPeople.NumberOfPeoplePtr == 0) {
338 0 : if (Item1 == 1) { // only show error on first one
339 0 : if (IHGAlphaFieldBlanks(3)) {
340 0 : ShowSevereError(state,
341 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
342 0 : IHGAlphaFieldNames(3) + " is required.");
343 : } else {
344 0 : ShowSevereError(state,
345 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
346 0 : IHGAlphaFieldNames(3) + " entered=" + IHGAlphas(3));
347 : }
348 0 : ErrorsFound = true;
349 : }
350 : } else { // check min/max on schedule
351 3870 : SchMin = GetScheduleMinValue(state, thisPeople.NumberOfPeoplePtr);
352 3870 : SchMax = GetScheduleMaxValue(state, thisPeople.NumberOfPeoplePtr);
353 3870 : if (SchMin < 0.0 || SchMax < 0.0) {
354 0 : if (Item1 == 1) {
355 0 : if (SchMin < 0.0) {
356 0 : ShowSevereError(state,
357 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
358 0 : IHGAlphaFieldNames(3) + ", minimum is < 0.0");
359 0 : ShowContinueError(state,
360 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMin));
361 0 : ErrorsFound = true;
362 : }
363 : }
364 0 : if (Item1 == 1) {
365 0 : if (SchMax < 0.0) {
366 0 : ShowSevereError(state,
367 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
368 0 : IHGAlphaFieldNames(3) + ", maximum is < 0.0");
369 0 : ShowContinueError(state,
370 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMax));
371 0 : ErrorsFound = true;
372 : }
373 : }
374 : }
375 : }
376 :
377 : // Number of people calculation method.
378 : {
379 7740 : auto const peopleMethod(IHGAlphas(4));
380 3870 : if (peopleMethod == "PEOPLE") {
381 : // Set space load fraction
382 2752 : Real64 spaceFrac = 1.0;
383 2752 : if (thisPeopleInput.numOfSpaces > 1) {
384 6 : Real64 const zoneArea = state.dataHeatBal->Zone(zoneNum).FloorArea;
385 6 : if (zoneArea > 0.0) {
386 6 : spaceFrac = state.dataHeatBal->space(spaceNum).floorArea / zoneArea;
387 : } else {
388 0 : ShowSevereError(state,
389 0 : std::string(RoutineName) + "Zone floor area is zero when allocating People loads to Spaces.");
390 0 : ShowContinueError(state,
391 0 : "Occurs for People object =" + thisPeopleInput.Name +
392 0 : " in Zone=" + state.dataHeatBal->Zone(zoneNum).Name);
393 0 : ErrorsFound = true;
394 : }
395 : }
396 2752 : thisPeople.NumberOfPeople = IHGNumbers(1) * spaceFrac;
397 2752 : if (IHGNumericFieldBlanks(1)) {
398 60 : ShowWarningError(state,
399 40 : std::string{RoutineName} + peopleModuleObject + "=\"" + thisPeople.Name + "\", specifies " +
400 60 : IHGNumericFieldNames(1) + ", but that field is blank. 0 People will result.");
401 : }
402 :
403 1118 : } else if (peopleMethod == "PEOPLE/AREA") {
404 125 : if (spaceNum != 0) {
405 125 : if (IHGNumbers(2) >= 0.0) {
406 125 : thisPeople.NumberOfPeople = IHGNumbers(2) * state.dataHeatBal->space(spaceNum).floorArea;
407 126 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) &&
408 1 : !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
409 0 : ShowWarningError(state,
410 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + thisPeople.Name + "\", specifies " +
411 0 : IHGNumericFieldNames(2) + ", but Space Floor Area = 0. 0 People will result.");
412 : }
413 : } else {
414 0 : ShowSevereError(state,
415 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
416 : RoutineName,
417 : peopleModuleObject,
418 : thisPeople.Name,
419 : IHGNumericFieldNames(2),
420 0 : IHGNumbers(2)));
421 0 : ErrorsFound = true;
422 : }
423 : }
424 125 : if (IHGNumericFieldBlanks(2)) {
425 0 : ShowWarningError(state,
426 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + thisPeople.Name + "\", specifies " +
427 0 : IHGNumericFieldNames(2) + ", but that field is blank. 0 People will result.");
428 : }
429 :
430 993 : } else if (peopleMethod == "AREA/PERSON") {
431 993 : if (spaceNum != 0) {
432 993 : if (IHGNumbers(3) > 0.0) {
433 993 : thisPeople.NumberOfPeople = state.dataHeatBal->space(spaceNum).floorArea / IHGNumbers(3);
434 993 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) &&
435 0 : !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
436 0 : ShowWarningError(state,
437 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + thisPeople.Name + "\", specifies " +
438 0 : IHGNumericFieldNames(3) + ", but Space Floor Area = 0. 0 People will result.");
439 : }
440 : } else {
441 0 : ShowSevereError(state,
442 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
443 : RoutineName,
444 : peopleModuleObject,
445 : thisPeople.Name,
446 : IHGNumericFieldNames(3),
447 0 : IHGNumbers(3)));
448 0 : ErrorsFound = true;
449 : }
450 : }
451 993 : if (IHGNumericFieldBlanks(3)) {
452 0 : ShowWarningError(state,
453 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + thisPeople.Name + "\", specifies " +
454 0 : IHGNumericFieldNames(3) + ", but that field is blank. 0 People will result.");
455 : }
456 :
457 : } else {
458 0 : if (Item1 == 1) {
459 0 : ShowSevereError(state,
460 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
461 0 : IHGAlphaFieldNames(4) + ", value =" + IHGAlphas(4));
462 0 : ShowContinueError(state, "...Valid values are \"People\", \"People/Area\", \"Area/Person\".");
463 0 : ErrorsFound = true;
464 : }
465 : }
466 : }
467 :
468 : // Calculate nominal min/max people
469 3870 : thisPeople.NomMinNumberPeople = thisPeople.NumberOfPeople * SchMin;
470 3870 : thisPeople.NomMaxNumberPeople = thisPeople.NumberOfPeople * SchMax;
471 :
472 3870 : if (zoneNum > 0) {
473 3870 : state.dataHeatBal->Zone(zoneNum).TotOccupants += thisPeople.NumberOfPeople;
474 : // Note that min/max occupants are non-coincident
475 3870 : state.dataHeatBal->Zone(zoneNum).minOccupants += thisPeople.NomMinNumberPeople;
476 3870 : state.dataHeatBal->Zone(zoneNum).maxOccupants += thisPeople.NomMaxNumberPeople;
477 : }
478 :
479 3870 : if (spaceNum > 0) {
480 3870 : state.dataHeatBal->space(spaceNum).totOccupants += thisPeople.NumberOfPeople;
481 : // Note that min/max occupants are non-coincident
482 3870 : state.dataHeatBal->space(spaceNum).minOccupants += thisPeople.NomMinNumberPeople;
483 3870 : state.dataHeatBal->space(spaceNum).maxOccupants += thisPeople.NomMaxNumberPeople;
484 : }
485 3870 : thisPeople.FractionRadiant = IHGNumbers(4);
486 3870 : thisPeople.FractionConvected = 1.0 - thisPeople.FractionRadiant;
487 3870 : if (Item1 == 1) {
488 3824 : if (thisPeople.FractionConvected < 0.0) {
489 0 : ShowSevereError(state,
490 0 : format("{}{}=\"{}\", {} < 0.0, value ={:.2R}",
491 : RoutineName,
492 : peopleModuleObject,
493 : IHGAlphas(1),
494 : IHGNumericFieldNames(4),
495 0 : IHGNumbers(4)));
496 0 : ErrorsFound = true;
497 : }
498 : }
499 :
500 3870 : if (IHGNumNumbers >= 5 && !IHGNumericFieldBlanks(5)) {
501 1959 : thisPeople.UserSpecSensFrac = IHGNumbers(5);
502 : } else {
503 1911 : thisPeople.UserSpecSensFrac = DataGlobalConstants::AutoCalculate;
504 : }
505 :
506 3870 : if (IHGNumNumbers >= 6 && !IHGNumericFieldBlanks(6)) {
507 1123 : thisPeople.CO2RateFactor = IHGNumbers(6);
508 : } else {
509 2747 : thisPeople.CO2RateFactor = 3.82e-8; // m3/s-W
510 : }
511 :
512 3870 : if (IHGNumNumbers >= 7 && !IHGNumericFieldBlanks(7)) {
513 6 : thisPeople.ColdStressTempThresh = IHGNumbers(7);
514 : } else {
515 3864 : thisPeople.ColdStressTempThresh = 15.56; // degree C
516 : }
517 :
518 3870 : if (IHGNumNumbers == 8 && !IHGNumericFieldBlanks(8)) {
519 6 : thisPeople.HeatStressTempThresh = IHGNumbers(8);
520 : } else {
521 3864 : thisPeople.HeatStressTempThresh = 30.0; // degree C
522 : }
523 :
524 3870 : if (thisPeople.CO2RateFactor < 0.0) {
525 0 : ShowSevereError(state,
526 0 : format("{}{}=\"{}\", {} < 0.0, value ={:.2R}",
527 : RoutineName,
528 : peopleModuleObject,
529 : IHGAlphas(1),
530 : IHGNumericFieldNames(6),
531 0 : IHGNumbers(6)));
532 0 : ErrorsFound = true;
533 : }
534 :
535 3870 : thisPeople.ActivityLevelPtr = GetScheduleIndex(state, IHGAlphas(5));
536 3870 : if (thisPeople.ActivityLevelPtr == 0) {
537 0 : if (Item1 == 1) {
538 0 : if (IHGAlphaFieldBlanks(5)) {
539 0 : ShowSevereError(state,
540 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
541 0 : IHGAlphaFieldNames(5) + " is required.");
542 : } else {
543 0 : ShowSevereError(state,
544 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
545 0 : IHGAlphaFieldNames(5) + " entered=" + IHGAlphas(5));
546 : }
547 0 : ErrorsFound = true;
548 : }
549 : } else { // Check values in Schedule
550 3870 : SchMin = GetScheduleMinValue(state, thisPeople.ActivityLevelPtr);
551 3870 : SchMax = GetScheduleMaxValue(state, thisPeople.ActivityLevelPtr);
552 3870 : if (SchMin < 0.0 || SchMax < 0.0) {
553 0 : if (Item1 == 1) {
554 0 : if (SchMin < 0.0) {
555 0 : ShowSevereError(state,
556 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
557 0 : IHGAlphaFieldNames(5) + " minimum is < 0.0");
558 0 : ShowContinueError(state,
559 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(5), SchMin));
560 0 : ErrorsFound = true;
561 : }
562 : }
563 0 : if (Item1 == 1) {
564 0 : if (SchMax < 0.0) {
565 0 : ShowSevereError(state,
566 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
567 0 : IHGAlphaFieldNames(5) + " maximum is < 0.0");
568 0 : ShowContinueError(state,
569 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(5), SchMax));
570 0 : ErrorsFound = true;
571 : }
572 : }
573 3870 : } else if (SchMin < 70.0 || SchMax > 1000.0) {
574 0 : if (Item1 == 1) {
575 0 : ShowWarningError(state,
576 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
577 0 : IHGAlphaFieldNames(5) + " values");
578 0 : ShowContinueError(state, "fall outside typical range [70,1000] W/person for Thermal Comfort Reporting.");
579 0 : ShowContinueError(state, "Odd comfort values may result; Schedule=\"" + IHGAlphas(5) + "\".");
580 0 : ShowContinueError(state, format("Entered min/max range=[{:.1R},] W/person.{:.1R}", SchMin, SchMax));
581 : }
582 : }
583 : }
584 :
585 : // Following is an optional parameter (ASHRAE 55 warnings
586 3870 : if (IHGNumAlphas >= 6) {
587 2576 : if (UtilityRoutines::SameString(IHGAlphas(6), "Yes")) {
588 0 : thisPeople.Show55Warning = true;
589 2576 : } else if (!UtilityRoutines::SameString(IHGAlphas(6), "No") && !IHGAlphaFieldBlanks(6)) {
590 0 : if (Item1 == 1) {
591 0 : ShowSevereError(state,
592 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
593 0 : IHGAlphaFieldNames(6) + " field should be Yes or No");
594 0 : ShowContinueError(state, "...Field value=\"" + IHGAlphas(6) + "\" is invalid.");
595 0 : ErrorsFound = true;
596 : }
597 : }
598 : }
599 :
600 3870 : if (IHGNumAlphas > 6) { // Optional parameters present--thermal comfort data follows...
601 2576 : int lastOption = 0;
602 2576 : state.dataInternalHeatGains->UsingThermalComfort = false;
603 2576 : if (IHGNumAlphas > 20) {
604 7 : lastOption = 20;
605 : } else {
606 2569 : lastOption = IHGNumAlphas;
607 : }
608 :
609 : // check to see if the user has specified schedules for air velocity, clothing insulation, and/or work efficiency
610 : // but have NOT made a selection for a thermal comfort model. If so, then the schedules are reported as unused
611 : // which could cause confusion. The solution is for the user to either remove those schedules or pick a thermal
612 : // comfort model.
613 2576 : int constexpr NumFirstTCModel = 14;
614 2576 : if (IHGNumAlphas < NumFirstTCModel) {
615 127 : bool NoTCModelSelectedWithSchedules = false;
616 127 : NoTCModelSelectedWithSchedules =
617 127 : CheckThermalComfortSchedules(IHGAlphaFieldBlanks(9), IHGAlphaFieldBlanks(12), IHGAlphaFieldBlanks(13));
618 127 : if (NoTCModelSelectedWithSchedules) {
619 102 : ShowWarningError(state,
620 68 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) +
621 : "\" has comfort related schedules but no thermal comfort model selected.");
622 34 : ShowContinueError(state,
623 : "If schedules are specified for air velocity, clothing insulation, and/or work efficiency but no "
624 : "thermal comfort");
625 34 : ShowContinueError(
626 : state, "thermal comfort model is selected, the schedules will be listed as unused schedules in the .err file.");
627 34 : ShowContinueError(
628 : state,
629 : "To avoid these errors, select a valid thermal comfort model or eliminate these schedules in the PEOPLE input.");
630 : }
631 : }
632 :
633 5079 : for (int OptionNum = NumFirstTCModel; OptionNum <= lastOption; ++OptionNum) {
634 :
635 : {
636 5006 : auto const thermalComfortType(IHGAlphas(OptionNum));
637 :
638 2503 : if (thermalComfortType == "FANGER") {
639 2438 : thisPeople.Fanger = true;
640 2438 : state.dataInternalHeatGains->UsingThermalComfort = true;
641 :
642 65 : } else if (thermalComfortType == "PIERCE") {
643 11 : thisPeople.Pierce = true;
644 11 : state.dataHeatBal->AnyThermalComfortPierceModel = true;
645 11 : state.dataInternalHeatGains->UsingThermalComfort = true;
646 :
647 54 : } else if (thermalComfortType == "KSU") {
648 6 : thisPeople.KSU = true;
649 6 : state.dataHeatBal->AnyThermalComfortKSUModel = true;
650 6 : state.dataInternalHeatGains->UsingThermalComfort = true;
651 :
652 48 : } else if (thermalComfortType == "ADAPTIVEASH55") {
653 6 : thisPeople.AdaptiveASH55 = true;
654 6 : state.dataHeatBal->AdaptiveComfortRequested_ASH55 = true;
655 6 : state.dataInternalHeatGains->UsingThermalComfort = true;
656 :
657 42 : } else if (thermalComfortType == "ADAPTIVECEN15251") {
658 1 : thisPeople.AdaptiveCEN15251 = true;
659 1 : state.dataHeatBal->AdaptiveComfortRequested_CEN15251 = true;
660 1 : state.dataInternalHeatGains->UsingThermalComfort = true;
661 :
662 41 : } else if (thermalComfortType == "COOLINGEFFECTASH55") {
663 1 : thisPeople.CoolingEffectASH55 = true;
664 1 : state.dataHeatBal->AnyThermalComfortCoolingEffectModel = true;
665 1 : state.dataInternalHeatGains->UsingThermalComfort = true;
666 :
667 40 : } else if (thermalComfortType == "ANKLEDRAFTASH55") {
668 1 : thisPeople.AnkleDraftASH55 = true;
669 1 : state.dataHeatBal->AnyThermalComfortAnkleDraftModel = true;
670 1 : state.dataInternalHeatGains->UsingThermalComfort = true;
671 :
672 39 : } else if (thermalComfortType == "") { // Blank input field--just ignore this
673 :
674 : } else { // An invalid keyword was entered--warn but ignore
675 0 : if (Item1 == 1) {
676 0 : ShowWarningError(state,
677 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
678 0 : IHGAlphaFieldNames(OptionNum) + " Option=" + IHGAlphas(OptionNum));
679 0 : ShowContinueError(state,
680 : "Valid Values are \"Fanger\", \"Pierce\", \"KSU\", \"AdaptiveASH55\", "
681 : "\"AdaptiveCEN15251\", \"CoolingEffectASH55\", \"AnkleDraftASH55\"");
682 : }
683 : }
684 : }
685 : }
686 :
687 2576 : if (state.dataInternalHeatGains->UsingThermalComfort) {
688 :
689 : // Set the default value of MRTCalcType as 'ZoneAveraged'
690 2449 : thisPeople.MRTCalcType = DataHeatBalance::CalcMRT::ZoneAveraged;
691 :
692 4913 : bool ModelWithAdditionalInputs = thisPeople.Fanger || thisPeople.Pierce || thisPeople.KSU ||
693 2457 : thisPeople.CoolingEffectASH55 || thisPeople.AnkleDraftASH55;
694 :
695 : // MRT Calculation Type and Surface Name
696 : {
697 4898 : auto const mrtType(IHGAlphas(7));
698 :
699 2449 : if (mrtType == "ZONEAVERAGED") {
700 2440 : thisPeople.MRTCalcType = DataHeatBalance::CalcMRT::ZoneAveraged;
701 :
702 9 : } else if (mrtType == "SURFACEWEIGHTED") {
703 6 : thisPeople.MRTCalcType = DataHeatBalance::CalcMRT::SurfaceWeighted;
704 6 : thisPeople.SurfacePtr = UtilityRoutines::FindItemInList(IHGAlphas(8), state.dataSurface->Surface);
705 6 : if (thisPeople.SurfacePtr == 0 && ModelWithAdditionalInputs) {
706 0 : if (Item1 == 1) {
707 0 : ShowSevereError(state,
708 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
709 0 : IHGAlphaFieldNames(7) + '=' + IHGAlphas(7) + " invalid Surface Name=" + IHGAlphas(8));
710 0 : ErrorsFound = true;
711 : }
712 6 : } else if (state.dataSurface->Surface(thisPeople.SurfacePtr).Zone != thisPeople.ZonePtr &&
713 : ModelWithAdditionalInputs) {
714 0 : ShowSevereError(state,
715 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) +
716 0 : "\", Surface referenced in " + IHGAlphaFieldNames(7) + '=' + IHGAlphas(7) +
717 : " in different zone.");
718 0 : ShowContinueError(state,
719 0 : "Surface is in Zone=" +
720 0 : state.dataHeatBal->Zone(state.dataSurface->Surface(thisPeople.SurfacePtr).Zone).Name +
721 0 : " and " + peopleModuleObject + " is in Zone=" + IHGAlphas(2));
722 0 : ErrorsFound = true;
723 : }
724 :
725 3 : } else if (mrtType == "ANGLEFACTOR") {
726 3 : thisPeople.MRTCalcType = DataHeatBalance::CalcMRT::AngleFactor;
727 3 : thisPeople.AngleFactorListName = IHGAlphas(8);
728 :
729 0 : } else if (mrtType == "") { // Blank input field--just ignore this
730 0 : if (Item1 == 1 && ModelWithAdditionalInputs)
731 0 : ShowWarningError(state,
732 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", blank " +
733 0 : IHGAlphaFieldNames(7));
734 :
735 : } else { // An invalid keyword was entered--warn but ignore
736 0 : if (Item1 == 1 && ModelWithAdditionalInputs) {
737 0 : ShowWarningError(state,
738 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
739 0 : IHGAlphaFieldNames(7) + '=' + IHGAlphas(7));
740 0 : ShowContinueError(state, "...Valid values are \"ZoneAveraged\", \"SurfaceWeighted\", \"AngleFactor\".");
741 : }
742 : }
743 : }
744 :
745 2449 : if (!IHGAlphaFieldBlanks(9)) {
746 2449 : thisPeople.WorkEffPtr = GetScheduleIndex(state, IHGAlphas(9));
747 2449 : if (thisPeople.WorkEffPtr == 0) {
748 0 : if (Item1 == 1) {
749 0 : ShowSevereError(state,
750 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
751 0 : IHGAlphaFieldNames(9) + " entered=" + IHGAlphas(9));
752 0 : ErrorsFound = true;
753 : }
754 : } else { // check min/max on schedule
755 2449 : SchMin = GetScheduleMinValue(state, thisPeople.WorkEffPtr);
756 2449 : SchMax = GetScheduleMaxValue(state, thisPeople.WorkEffPtr);
757 2449 : if (SchMin < 0.0 || SchMax < 0.0) {
758 0 : if (SchMin < 0.0) {
759 0 : if (Item1 == 1) {
760 0 : ShowSevereError(state,
761 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
762 0 : IHGAlphaFieldNames(9) + ", minimum is < 0.0");
763 0 : ShowContinueError(
764 : state,
765 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(9), SchMin));
766 0 : ErrorsFound = true;
767 : }
768 : }
769 0 : if (SchMax < 0.0) {
770 0 : if (Item1 == 1) {
771 0 : ShowSevereError(state,
772 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
773 0 : IHGAlphaFieldNames(9) + ", maximum is < 0.0");
774 0 : ShowContinueError(
775 : state,
776 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(9), SchMax));
777 0 : ErrorsFound = true;
778 : }
779 : }
780 : }
781 2449 : if (SchMax > 1.0) {
782 0 : if (Item1 == 1) {
783 0 : ShowWarningError(state,
784 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
785 0 : IHGAlphaFieldNames(9) + ", maximum is > 1.0");
786 0 : ShowContinueError(state,
787 0 : format("Schedule=\"{}\"; Entered min/max range=[{:.1R},{:.1R}] Work Efficiency.",
788 : IHGAlphas(9),
789 : SchMin,
790 0 : SchMax));
791 : }
792 : }
793 : }
794 0 : } else if (ModelWithAdditionalInputs) {
795 0 : if (Item1 == 1) {
796 0 : ShowSevereError(state,
797 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", blank " +
798 0 : IHGAlphaFieldNames(9) + ". " + IHGAlphaFieldNames(9) +
799 : " is required when Thermal Comfort Model Type is one of "
800 : "\"Fanger\", \"Pierce\", \"KSU\", \"CoolingEffectASH55\" or \"AnkleDraftASH55\"");
801 0 : ErrorsFound = true;
802 : }
803 : }
804 :
805 2449 : if (!IHGAlphaFieldBlanks(10) || !IHGAlphas(10).empty()) {
806 2449 : thisPeople.clothingType = static_cast<ClothingType>(getEnumerationValue(clothingTypeNamesUC, IHGAlphas(10)));
807 2449 : if (thisPeople.clothingType == ClothingType::Invalid) {
808 0 : ShowSevereError(state,
809 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + thisPeople.Name + "\", invalid " +
810 0 : IHGAlphaFieldNames(10) + ", value =" + IHGAlphas(10));
811 0 : ShowContinueError(state,
812 0 : format(R"(...Valid values are "{}", "{}", "{}")",
813 0 : clothingTypeNamesUC[0],
814 0 : clothingTypeNamesUC[1],
815 0 : clothingTypeNamesUC[2]));
816 0 : ErrorsFound = true;
817 : }
818 2449 : switch (thisPeople.clothingType) {
819 2446 : case ClothingType::InsulationSchedule:
820 2446 : thisPeople.clothingType = ClothingType::InsulationSchedule;
821 2446 : thisPeople.ClothingPtr = GetScheduleIndex(state, IHGAlphas(12));
822 2446 : if (thisPeople.ClothingPtr == 0 && ModelWithAdditionalInputs) {
823 0 : if (Item1 == 1) {
824 0 : ShowSevereError(state,
825 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
826 0 : IHGAlphaFieldNames(12) + " entered=\"" + IHGAlphas(12) + "\".");
827 0 : ErrorsFound = true;
828 : }
829 : } else { // check min/max on schedule
830 2446 : SchMin = GetScheduleMinValue(state, thisPeople.ClothingPtr);
831 2446 : SchMax = GetScheduleMaxValue(state, thisPeople.ClothingPtr);
832 2446 : if (SchMin < 0.0 || SchMax < 0.0) {
833 0 : if (SchMin < 0.0) {
834 0 : if (Item1 == 1) {
835 0 : ShowSevereError(state,
836 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
837 0 : IHGAlphaFieldNames(12) + ", minimum is < 0.0");
838 0 : ShowContinueError(state,
839 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.",
840 : IHGAlphas(12),
841 0 : SchMin));
842 0 : ErrorsFound = true;
843 : }
844 : }
845 0 : if (SchMax < 0.0) {
846 0 : if (Item1 == 1) {
847 0 : ShowSevereError(state,
848 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
849 0 : IHGAlphaFieldNames(12) + ", maximum is < 0.0");
850 0 : ShowContinueError(state,
851 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.",
852 : IHGAlphas(12),
853 0 : SchMax));
854 0 : ErrorsFound = true;
855 : }
856 : }
857 : }
858 2446 : if (SchMax > 2.0) {
859 0 : if (Item1 == 1) {
860 0 : ShowWarningError(state,
861 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
862 0 : IHGAlphaFieldNames(12) + ", maximum is > 2.0");
863 0 : ShowContinueError(state,
864 0 : format("Schedule=\"{}\"; Entered min/max range=[{:.1R},{:.1R}] Clothing.",
865 : IHGAlphas(12),
866 : SchMin,
867 0 : SchMax));
868 : }
869 : }
870 : }
871 2446 : break;
872 :
873 2 : case ClothingType::DynamicAshrae55:
874 2 : break; // nothing extra to do, at least for now
875 :
876 1 : case ClothingType::CalculationSchedule:
877 1 : thisPeople.ClothingMethodPtr = GetScheduleIndex(state, IHGAlphas(11));
878 1 : if (thisPeople.ClothingMethodPtr == 0) {
879 0 : if (Item1 == 1) {
880 0 : ShowSevereError(state,
881 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
882 0 : IHGAlphaFieldNames(11) + " entered=\"" + IHGAlphas(11) + "\".");
883 0 : ErrorsFound = true;
884 : }
885 : }
886 1 : if (CheckScheduleValue(state, thisPeople.ClothingMethodPtr, 1)) {
887 1 : thisPeople.ClothingPtr = GetScheduleIndex(state, IHGAlphas(12));
888 1 : if (thisPeople.ClothingPtr == 0) {
889 0 : if (Item1 == 1) {
890 0 : ShowSevereError(state,
891 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) +
892 0 : "\", invalid " + IHGAlphaFieldNames(12) + " entered=\"" + IHGAlphas(12) + "\".");
893 0 : ErrorsFound = true;
894 : }
895 : }
896 : }
897 1 : break;
898 0 : default:
899 0 : break; // nothing to do for the other cases
900 : }
901 : }
902 :
903 2449 : if (!IHGAlphaFieldBlanks(13)) {
904 2449 : thisPeople.AirVelocityPtr = GetScheduleIndex(state, IHGAlphas(13));
905 2449 : if (thisPeople.AirVelocityPtr == 0) {
906 0 : if (Item1 == 1) {
907 0 : ShowSevereError(state,
908 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
909 0 : IHGAlphaFieldNames(13) + " entered=\"" + IHGAlphas(13) + "\".");
910 0 : ErrorsFound = true;
911 : }
912 : } else { // check min/max on schedule
913 2449 : SchMin = GetScheduleMinValue(state, thisPeople.AirVelocityPtr);
914 2449 : SchMax = GetScheduleMaxValue(state, thisPeople.AirVelocityPtr);
915 2449 : if (SchMin < 0.0 || SchMax < 0.0) {
916 0 : if (SchMin < 0.0) {
917 0 : if (Item1 == 1) {
918 0 : ShowSevereError(state,
919 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
920 0 : IHGAlphaFieldNames(13) + ", minimum is < 0.0");
921 0 : ShowContinueError(
922 : state,
923 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(13), SchMin));
924 0 : ErrorsFound = true;
925 : }
926 : }
927 0 : if (SchMax < 0.0) {
928 0 : if (Item1 == 1) {
929 0 : ShowSevereError(state,
930 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", " +
931 0 : IHGAlphaFieldNames(13) + ", maximum is < 0.0");
932 0 : ShowContinueError(
933 : state,
934 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(13), SchMax));
935 0 : ErrorsFound = true;
936 : }
937 : }
938 : }
939 : }
940 0 : } else if (ModelWithAdditionalInputs) {
941 0 : if (Item1 == 1) {
942 0 : ShowSevereError(state,
943 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", blank " +
944 0 : IHGAlphaFieldNames(13) + ". " + IHGAlphaFieldNames(13) +
945 : " is required when Thermal Comfort Model Type is one of "
946 : "\"Fanger\", \"Pierce\", \"KSU\", \"CoolingEffectASH55\" or \"AnkleDraftASH55\"");
947 0 : ErrorsFound = true;
948 : }
949 : }
950 :
951 2449 : int indexAnkleAirVelPtr = 21;
952 2449 : if (!IHGAlphaFieldBlanks(indexAnkleAirVelPtr) || !IHGAlphas(indexAnkleAirVelPtr).empty()) {
953 1 : thisPeople.AnkleAirVelocityPtr = GetScheduleIndex(state, IHGAlphas(indexAnkleAirVelPtr));
954 1 : if (thisPeople.AnkleAirVelocityPtr == 0) {
955 0 : if (Item1 == 1) {
956 0 : ShowSevereError(state,
957 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
958 0 : IHGAlphaFieldNames(indexAnkleAirVelPtr) + " entered=\"" + IHGAlphas(indexAnkleAirVelPtr) +
959 : "\".");
960 0 : ErrorsFound = true;
961 : }
962 : }
963 2448 : } else if (thisPeople.AnkleDraftASH55) {
964 0 : if (Item1 == 1) {
965 0 : ShowSevereError(state,
966 0 : std::string{RoutineName} + peopleModuleObject + "=\"" + IHGAlphas(1) + "\", blank " +
967 0 : IHGAlphaFieldNames(indexAnkleAirVelPtr) + ". " + IHGAlphaFieldNames(indexAnkleAirVelPtr) +
968 : " is required when Thermal Comfort Model Type is one of "
969 : "\"Fanger\", \"Pierce\", \"KSU\", \"CoolingEffectASH55\" or \"AnkleDraftASH55\"");
970 0 : ErrorsFound = true;
971 : }
972 : }
973 :
974 : } // usingthermalcomfort block
975 :
976 : } // ...end of thermal comfort data IF-THEN block (IHGNumAlphass > 6)
977 :
978 3870 : if (thisPeople.ZonePtr <= 0) continue; // Error, will be caught and terminated later
979 : }
980 : }
981 :
982 4512 : for (int peopleNum = 1; peopleNum <= state.dataHeatBal->TotPeople; ++peopleNum) {
983 3870 : if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
984 3656 : SetupEMSActuator(state,
985 : "People",
986 914 : state.dataHeatBal->People(peopleNum).Name,
987 : "Number of People",
988 : "[each]",
989 914 : state.dataHeatBal->People(peopleNum).EMSPeopleOn,
990 2742 : state.dataHeatBal->People(peopleNum).EMSNumberOfPeople);
991 2742 : SetupEMSInternalVariable(state,
992 : "People Count Design Level",
993 914 : state.dataHeatBal->People(peopleNum).Name,
994 : "[each]",
995 2742 : state.dataHeatBal->People(peopleNum).NumberOfPeople);
996 : }
997 :
998 : // setup internal gains
999 3870 : if (!ErrorsFound) {
1000 23220 : SetupSpaceInternalGain(state,
1001 3870 : state.dataHeatBal->People(peopleNum).spaceIndex,
1002 : 1.0,
1003 3870 : state.dataHeatBal->People(peopleNum).Name,
1004 : DataHeatBalance::IntGainType::People,
1005 3870 : &state.dataHeatBal->People(peopleNum).ConGainRate,
1006 : nullptr,
1007 3870 : &state.dataHeatBal->People(peopleNum).RadGainRate,
1008 3870 : &state.dataHeatBal->People(peopleNum).LatGainRate,
1009 : nullptr,
1010 3870 : &state.dataHeatBal->People(peopleNum).CO2GainRate);
1011 : }
1012 : }
1013 :
1014 : // transfer the nominal number of people in a zone to the tabular reporting
1015 5217 : for (int Loop = 1; Loop <= state.dataGlobal->NumOfZones; ++Loop) {
1016 4575 : if (state.dataHeatBal->Zone(Loop).TotOccupants > 0.0) {
1017 7584 : if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0 &&
1018 3792 : state.dataHeatBal->Zone(Loop).FloorArea / state.dataHeatBal->Zone(Loop).TotOccupants < 0.1) {
1019 0 : ShowWarningError(state,
1020 0 : std::string{RoutineName} + "Zone=\"" + state.dataHeatBal->Zone(Loop).Name +
1021 : "\" occupant density is extremely high.");
1022 0 : if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0) {
1023 0 : ShowContinueError(state,
1024 0 : format("Occupant Density=[{:.0R}] person/m2.",
1025 0 : state.dataHeatBal->Zone(Loop).TotOccupants / state.dataHeatBal->Zone(Loop).FloorArea));
1026 : }
1027 0 : ShowContinueError(state,
1028 0 : format("Occupant Density=[{:.3R}] m2/person. Problems in Temperature Out of Bounds may result.",
1029 0 : state.dataHeatBal->Zone(Loop).FloorArea / state.dataHeatBal->Zone(Loop).TotOccupants));
1030 : }
1031 3792 : Real64 maxOccupLoad = 0.0;
1032 3792 : int OptionNum = 0;
1033 82561 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotPeople; ++Loop1) {
1034 78769 : if (state.dataHeatBal->People(Loop1).ZonePtr != Loop) continue;
1035 7622 : if (maxOccupLoad < GetScheduleMaxValue(state, state.dataHeatBal->People(Loop1).NumberOfPeoplePtr) *
1036 3811 : state.dataHeatBal->People(Loop1).NumberOfPeople) {
1037 7568 : maxOccupLoad = GetScheduleMaxValue(state, state.dataHeatBal->People(Loop1).NumberOfPeoplePtr) *
1038 3784 : state.dataHeatBal->People(Loop1).NumberOfPeople;
1039 3784 : OptionNum = Loop1;
1040 : }
1041 : }
1042 3792 : if (maxOccupLoad > state.dataHeatBal->Zone(Loop).TotOccupants) {
1043 0 : if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0 && state.dataHeatBal->Zone(Loop).FloorArea / maxOccupLoad < 0.1) {
1044 0 : ShowWarningError(state,
1045 0 : std::string{RoutineName} + "Zone=\"" + state.dataHeatBal->Zone(Loop).Name +
1046 : "\" occupant density at a maximum schedule value is extremely high.");
1047 0 : if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0) {
1048 0 : ShowContinueError(
1049 0 : state, format("Occupant Density=[{:.0R}] person/m2.", maxOccupLoad / state.dataHeatBal->Zone(Loop).FloorArea));
1050 : }
1051 0 : ShowContinueError(state,
1052 0 : format("Occupant Density=[{:.3R}] m2/person. Problems in Temperature Out of Bounds may result.",
1053 0 : state.dataHeatBal->Zone(Loop).FloorArea / maxOccupLoad));
1054 0 : ShowContinueError(state,
1055 0 : "Check values in People=" + state.dataHeatBal->People(OptionNum).Name + ", Number of People Schedule=" +
1056 0 : GetScheduleName(state, state.dataHeatBal->People(OptionNum).NumberOfPeoplePtr));
1057 : }
1058 : }
1059 : }
1060 :
1061 4575 : if (state.dataHeatBal->Zone(Loop).isNominalControlled) { // conditioned zones only
1062 3975 : if (state.dataHeatBal->Zone(Loop).TotOccupants > 0.0) {
1063 3713 : state.dataHeatBal->Zone(Loop).isNominalOccupied = true;
1064 14852 : PreDefTableEntry(state,
1065 3713 : state.dataOutRptPredefined->pdchOaoNomNumOcc1,
1066 3713 : state.dataHeatBal->Zone(Loop).Name,
1067 3713 : state.dataHeatBal->Zone(Loop).TotOccupants);
1068 14852 : PreDefTableEntry(state,
1069 3713 : state.dataOutRptPredefined->pdchOaoNomNumOcc2,
1070 3713 : state.dataHeatBal->Zone(Loop).Name,
1071 3713 : state.dataHeatBal->Zone(Loop).TotOccupants);
1072 : }
1073 : }
1074 : }
1075 : } // TotPeople > 0
1076 :
1077 : // Lights
1078 : // Declared in state because the lights inputs are needed for demand manager
1079 771 : int numLightsStatements = 0;
1080 1542 : setupIHGZonesAndSpaces(
1081 1542 : state, lightsModuleObject, state.dataInternalHeatGains->lightsObjects, numLightsStatements, state.dataHeatBal->TotLights, ErrorsFound);
1082 :
1083 771 : if (state.dataHeatBal->TotLights > 0) {
1084 641 : state.dataHeatBal->Lights.allocate(state.dataHeatBal->TotLights);
1085 641 : bool CheckSharedExhaustFlag = false;
1086 641 : int lightsNum = 0;
1087 4656 : for (int lightsInputNum = 1; lightsInputNum <= numLightsStatements; ++lightsInputNum) {
1088 :
1089 4015 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
1090 : lightsModuleObject,
1091 : lightsInputNum,
1092 : IHGAlphas,
1093 : IHGNumAlphas,
1094 : IHGNumbers,
1095 : IHGNumNumbers,
1096 : IOStat,
1097 : IHGNumericFieldBlanks,
1098 : IHGAlphaFieldBlanks,
1099 : IHGAlphaFieldNames,
1100 : IHGNumericFieldNames);
1101 :
1102 4015 : auto &thisLightsInput = state.dataInternalHeatGains->lightsObjects(lightsInputNum);
1103 : // Create one Lights instance for every space associated with this Lights input object
1104 8066 : for (int Item1 = 1; Item1 <= thisLightsInput.numOfSpaces; ++Item1) {
1105 4051 : ++lightsNum;
1106 4051 : auto &thisLights = state.dataHeatBal->Lights(lightsNum);
1107 4051 : int const spaceNum = thisLightsInput.spaceNums(Item1);
1108 4051 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
1109 4051 : thisLights.Name = thisLightsInput.names(Item1);
1110 4051 : thisLights.spaceIndex = spaceNum;
1111 4051 : thisLights.ZonePtr = zoneNum;
1112 :
1113 4051 : thisLights.SchedPtr = GetScheduleIndex(state, IHGAlphas(3));
1114 4051 : SchMin = 0.0;
1115 4051 : SchMax = 0.0;
1116 4051 : if (thisLights.SchedPtr == 0) {
1117 0 : if (Item1 == 1) {
1118 0 : if (IHGAlphaFieldBlanks(3)) {
1119 0 : ShowSevereError(state,
1120 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", " +
1121 0 : IHGAlphaFieldNames(3) + " is required.");
1122 : } else {
1123 0 : ShowSevereError(state,
1124 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
1125 0 : IHGAlphaFieldNames(3) + " entered=" + IHGAlphas(3));
1126 : }
1127 0 : ErrorsFound = true;
1128 : }
1129 : } else { // check min/max on schedule
1130 4051 : SchMin = GetScheduleMinValue(state, thisLights.SchedPtr);
1131 4051 : SchMax = GetScheduleMaxValue(state, thisLights.SchedPtr);
1132 4051 : if (SchMin < 0.0 || SchMax < 0.0) {
1133 0 : if (Item1 == 1) {
1134 0 : if (SchMin < 0.0) {
1135 0 : ShowSevereError(state,
1136 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", " +
1137 0 : IHGAlphaFieldNames(3) + ", minimum is < 0.0");
1138 0 : ShowContinueError(state,
1139 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMin));
1140 0 : ErrorsFound = true;
1141 : }
1142 : }
1143 0 : if (Item1 == 1) {
1144 0 : if (SchMax < 0.0) {
1145 0 : ShowSevereError(state,
1146 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", " +
1147 0 : IHGAlphaFieldNames(3) + ", maximum is < 0.0");
1148 0 : ShowContinueError(state,
1149 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMax));
1150 0 : ErrorsFound = true;
1151 : }
1152 : }
1153 : }
1154 : }
1155 :
1156 : // Lights Design Level calculation method.
1157 : {
1158 : // Set space load fraction
1159 8102 : auto const lightingLevel(IHGAlphas(4));
1160 4051 : if (lightingLevel == "LIGHTINGLEVEL") {
1161 2255 : Real64 spaceFrac = 1.0;
1162 2255 : if (thisLightsInput.numOfSpaces > 1) {
1163 3 : Real64 const zoneArea = state.dataHeatBal->Zone(zoneNum).FloorArea;
1164 3 : if (zoneArea > 0.0) {
1165 3 : spaceFrac = state.dataHeatBal->space(spaceNum).floorArea / zoneArea;
1166 : } else {
1167 0 : ShowSevereError(state,
1168 0 : std::string(RoutineName) + "Zone floor area is zero when allocating Lights loads to Spaces.");
1169 0 : ShowContinueError(
1170 0 : state, "Occurs for Lights object =" + IHGAlphas(1) + " in Zone=" + state.dataHeatBal->Zone(zoneNum).Name);
1171 0 : ErrorsFound = true;
1172 : }
1173 : }
1174 :
1175 2255 : thisLights.DesignLevel = IHGNumbers(1) * spaceFrac;
1176 2255 : if (IHGNumericFieldBlanks(1)) {
1177 0 : ShowWarningError(state,
1178 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
1179 0 : IHGNumericFieldNames(1) + ", but that field is blank. 0 Lights will result.");
1180 : }
1181 1796 : } else if (lightingLevel == "WATTS/AREA") {
1182 1794 : if (spaceNum != 0) {
1183 1794 : if (IHGNumbers(2) >= 0.0) {
1184 1794 : thisLights.DesignLevel = IHGNumbers(2) * state.dataHeatBal->space(spaceNum).floorArea;
1185 1794 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) &&
1186 0 : !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
1187 0 : ShowWarningError(state,
1188 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + thisLights.Name + "\", specifies " +
1189 0 : IHGNumericFieldNames(2) + ", but Space Floor Area = 0. 0 Lights will result.");
1190 : }
1191 : } else {
1192 0 : ShowSevereError(state,
1193 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
1194 : RoutineName,
1195 : lightsModuleObject,
1196 : thisLights.Name,
1197 : IHGNumericFieldNames(2),
1198 0 : IHGNumbers(2)));
1199 0 : ErrorsFound = true;
1200 : }
1201 : }
1202 1794 : if (IHGNumericFieldBlanks(2)) {
1203 3 : ShowWarningError(state,
1204 2 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
1205 3 : IHGNumericFieldNames(2) + ", but that field is blank. 0 Lights will result.");
1206 : }
1207 2 : } else if (lightingLevel == "WATTS/PERSON") {
1208 2 : if (spaceNum != 0) {
1209 2 : if (IHGNumbers(3) >= 0.0) {
1210 2 : thisLights.DesignLevel = IHGNumbers(3) * state.dataHeatBal->space(spaceNum).totOccupants;
1211 2 : if (state.dataHeatBal->space(spaceNum).totOccupants <= 0.0) {
1212 0 : ShowWarningError(state,
1213 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + thisLights.Name + "\", specifies " +
1214 0 : IHGNumericFieldNames(2) + ", but Total Occupants = 0. 0 Lights will result.");
1215 : }
1216 : } else {
1217 0 : ShowSevereError(state,
1218 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
1219 : RoutineName,
1220 : lightsModuleObject,
1221 : thisLights.Name,
1222 : IHGNumericFieldNames(3),
1223 0 : IHGNumbers(3)));
1224 0 : ErrorsFound = true;
1225 : }
1226 : }
1227 2 : if (IHGNumericFieldBlanks(3)) {
1228 0 : ShowWarningError(state,
1229 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
1230 0 : IHGNumericFieldNames(3) + ", but that field is blank. 0 Lights will result.");
1231 : }
1232 : } else {
1233 0 : if (Item1 == 1) {
1234 0 : ShowSevereError(state,
1235 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
1236 0 : IHGAlphaFieldNames(4) + ", value =" + IHGAlphas(4));
1237 0 : ShowContinueError(state, R"(...Valid values are "LightingLevel", "Watts/Area", "Watts/Person".)");
1238 0 : ErrorsFound = true;
1239 : }
1240 : }
1241 : }
1242 :
1243 : // Calculate nominal min/max lighting level
1244 4051 : thisLights.NomMinDesignLevel = thisLights.DesignLevel * SchMin;
1245 4051 : thisLights.NomMaxDesignLevel = thisLights.DesignLevel * SchMax;
1246 :
1247 4051 : thisLights.FractionReturnAir = IHGNumbers(4);
1248 4051 : thisLights.FractionRadiant = IHGNumbers(5);
1249 4051 : thisLights.FractionShortWave = IHGNumbers(6);
1250 4051 : thisLights.FractionReplaceable = IHGNumbers(7);
1251 4051 : thisLights.FractionReturnAirPlenTempCoeff1 = IHGNumbers(8);
1252 4051 : thisLights.FractionReturnAirPlenTempCoeff2 = IHGNumbers(9);
1253 :
1254 4051 : thisLights.FractionConvected = 1.0 - (thisLights.FractionReturnAir + thisLights.FractionRadiant + thisLights.FractionShortWave);
1255 4051 : if (std::abs(thisLights.FractionConvected) <= 0.001) thisLights.FractionConvected = 0.0;
1256 4051 : if (thisLights.FractionConvected < 0.0) {
1257 0 : if (Item1 == 1) {
1258 0 : ShowSevereError(state,
1259 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + thisLights.Name + "\", Sum of Fractions > 1.0");
1260 0 : ErrorsFound = true;
1261 : }
1262 : }
1263 :
1264 : // Note: if FractionReturnAirIsCalculated = Yes and there is a return-air plenum:
1265 : // (1) The input values of FractionReturnAir, FractionRadiant and FractionShortWave, and the
1266 : // value of FractionConvected calculated from these are used in the zone sizing calculations;
1267 : // (2) in the regular calculation, FractionReturnAir is calculated each time step in
1268 : // Subr. InitInternalHeatGains as a function of the zone's return plenum air temperature
1269 : // using FractionReturnAirPlenTempCoeff1 and FractionReturnAirPlenTempCoeff2; then
1270 : // FractionRadiant and FractionConvected are adjusted from their input values such that
1271 : // FractionReturnAir + FractionRadiant + FractionShortWave + FractionConvected = 1.0, assuming
1272 : // FractionShortWave is constant and equal to its input value.
1273 :
1274 4051 : if (IHGNumAlphas > 4) {
1275 4031 : thisLights.EndUseSubcategory = IHGAlphas(5);
1276 : } else {
1277 20 : thisLights.EndUseSubcategory = "General";
1278 : }
1279 :
1280 4051 : if (IHGAlphaFieldBlanks(6)) {
1281 1963 : thisLights.FractionReturnAirIsCalculated = false;
1282 2088 : } else if (IHGAlphas(6) != "YES" && IHGAlphas(6) != "NO") {
1283 0 : if (Item1 == 1) {
1284 0 : ShowWarningError(state,
1285 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + thisLightsInput.Name + "\", invalid " +
1286 0 : IHGAlphaFieldNames(6) + ", value =" + IHGAlphas(6));
1287 0 : ShowContinueError(state, ".. Return Air Fraction from Plenum will NOT be calculated.");
1288 : }
1289 0 : thisLights.FractionReturnAirIsCalculated = false;
1290 : } else {
1291 2088 : thisLights.FractionReturnAirIsCalculated = (IHGAlphas(6) == "YES");
1292 : }
1293 :
1294 : // Set return air node number
1295 4051 : thisLights.ZoneReturnNum = 0;
1296 4051 : thisLights.RetNodeName = "";
1297 4051 : if (!IHGAlphaFieldBlanks(7)) {
1298 1 : if (thisLightsInput.ZoneListActive) {
1299 0 : ShowSevereError(state,
1300 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + thisLightsInput.Name +
1301 0 : "\": " + IHGAlphaFieldNames(7) + " must be blank when using a ZoneList.");
1302 0 : ErrorsFound = true;
1303 : } else {
1304 1 : thisLights.RetNodeName = IHGAlphas(7);
1305 : }
1306 : }
1307 4051 : if (thisLights.ZonePtr > 0) {
1308 4051 : thisLights.ZoneReturnNum = DataZoneEquipment::GetReturnNumForZone(state, thisLights.ZonePtr, thisLights.RetNodeName);
1309 : }
1310 :
1311 4051 : if ((thisLights.ZoneReturnNum == 0) && (thisLights.FractionReturnAir > 0.0) && (!IHGAlphaFieldBlanks(7))) {
1312 0 : ShowSevereError(state,
1313 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
1314 0 : IHGAlphaFieldNames(7) + " =" + IHGAlphas(7));
1315 0 : ShowContinueError(state, "No matching Zone Return Air Node found.");
1316 0 : ErrorsFound = true;
1317 : }
1318 : // Set exhaust air node number
1319 4051 : thisLights.ZoneExhaustNodeNum = 0;
1320 4051 : if (!IHGAlphaFieldBlanks(8)) {
1321 1 : if (thisLightsInput.ZoneListActive) {
1322 0 : ShowSevereError(state,
1323 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + thisLightsInput.Name +
1324 0 : "\": " + IHGAlphaFieldNames(8) + " must be blank when using a ZoneList.");
1325 0 : ErrorsFound = true;
1326 : } else {
1327 1 : bool exhaustNodeError = false;
1328 2 : thisLights.ZoneExhaustNodeNum = GetOnlySingleNode(state,
1329 1 : IHGAlphas(8),
1330 : exhaustNodeError,
1331 : DataLoopNode::ConnectionObjectType::Lights,
1332 : thisLights.Name,
1333 : DataLoopNode::NodeFluidType::Air,
1334 : DataLoopNode::ConnectionType::ZoneExhaust,
1335 : NodeInputManager::CompFluidStream::Primary,
1336 1 : ObjectIsNotParent);
1337 1 : if (!exhaustNodeError) { // GetOnlySingleNode will throw error messages if this is a NodeList Name and for other issues
1338 1 : exhaustNodeError =
1339 1 : DataZoneEquipment::VerifyLightsExhaustNodeForZone(state, thisLights.ZonePtr, thisLights.ZoneExhaustNodeNum);
1340 : }
1341 1 : if (exhaustNodeError) {
1342 0 : ShowSevereError(state,
1343 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
1344 0 : IHGAlphaFieldNames(8) + " = " + IHGAlphas(8));
1345 0 : ShowContinueError(state, "No matching Zone Exhaust Air Node found.");
1346 0 : ErrorsFound = true;
1347 : } else {
1348 1 : if (thisLights.ZoneReturnNum > 0) {
1349 1 : state.dataZoneEquip->ZoneEquipConfig(thisLights.ZonePtr).ReturnNodeExhaustNodeNum(thisLights.ZoneReturnNum) =
1350 1 : thisLights.ZoneExhaustNodeNum;
1351 1 : CheckSharedExhaustFlag = true;
1352 : } else {
1353 0 : ShowSevereError(state,
1354 0 : std::string{RoutineName} + lightsModuleObject + "=\"" + IHGAlphas(1) + "\", " +
1355 0 : IHGAlphaFieldNames(8) + " =" + IHGAlphas(8) + " is not used");
1356 0 : ShowContinueError(
1357 : state, "No matching Zone Return Air Node found. The Exhaust Node requires Return Node to work together");
1358 0 : ErrorsFound = true;
1359 : }
1360 : }
1361 : }
1362 :
1363 1 : if (thisLights.ZonePtr <= 0) continue; // Error, will be caught and terminated later
1364 : }
1365 : }
1366 : }
1367 641 : if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
1368 1207 : for (int lightsNum = 1; lightsNum <= state.dataHeatBal->TotLights; ++lightsNum) {
1369 4560 : SetupEMSActuator(state,
1370 : "Lights",
1371 1140 : state.dataHeatBal->Lights(lightsNum).Name,
1372 : "Electricity Rate",
1373 : "[W]",
1374 1140 : state.dataHeatBal->Lights(lightsNum).EMSLightsOn,
1375 3420 : state.dataHeatBal->Lights(lightsNum).EMSLightingPower);
1376 3420 : SetupEMSInternalVariable(state,
1377 : "Lighting Power Design Level",
1378 1140 : state.dataHeatBal->Lights(lightsNum).Name,
1379 : "[W]",
1380 3420 : state.dataHeatBal->Lights(lightsNum).DesignLevel);
1381 : } // EMS
1382 : }
1383 4692 : for (int lightsNum = 1; lightsNum <= state.dataHeatBal->TotLights; ++lightsNum) {
1384 4051 : int spaceNum = state.dataHeatBal->Lights(lightsNum).spaceIndex;
1385 4051 : int zoneNum = state.dataHeatBal->Lights(lightsNum).ZonePtr;
1386 : // setup internal gains
1387 4051 : int returnNodeNum = 0;
1388 7971 : if ((state.dataHeatBal->Lights(lightsNum).ZoneReturnNum > 0) &&
1389 3920 : (state.dataHeatBal->Lights(lightsNum).ZoneReturnNum <= state.dataZoneEquip->ZoneEquipConfig(zoneNum).NumReturnNodes)) {
1390 3919 : returnNodeNum = state.dataZoneEquip->ZoneEquipConfig(zoneNum).ReturnNode(state.dataHeatBal->Lights(lightsNum).ZoneReturnNum);
1391 : }
1392 4051 : if (!ErrorsFound) {
1393 20255 : SetupSpaceInternalGain(state,
1394 4051 : state.dataHeatBal->Lights(lightsNum).spaceIndex,
1395 : 1.0,
1396 4051 : state.dataHeatBal->Lights(lightsNum).Name,
1397 : DataHeatBalance::IntGainType::Lights,
1398 4051 : &state.dataHeatBal->Lights(lightsNum).ConGainRate,
1399 4051 : &state.dataHeatBal->Lights(lightsNum).RetAirGainRate,
1400 4051 : &state.dataHeatBal->Lights(lightsNum).RadGainRate,
1401 : nullptr,
1402 : nullptr,
1403 : nullptr,
1404 : nullptr,
1405 : returnNodeNum);
1406 : }
1407 :
1408 4051 : if (state.dataHeatBal->Lights(lightsNum).FractionReturnAir > 0)
1409 1014 : state.dataHeatBal->Zone(state.dataHeatBal->Lights(lightsNum).ZonePtr).HasLtsRetAirGain = true;
1410 : // send values to predefined lighting summary report
1411 4051 : liteName = state.dataHeatBal->Lights(lightsNum).Name;
1412 4051 : Real64 mult = state.dataHeatBal->Zone(zoneNum).Multiplier * state.dataHeatBal->Zone(zoneNum).ListMultiplier;
1413 4051 : Real64 spaceArea = state.dataHeatBal->space(spaceNum).floorArea;
1414 4051 : state.dataInternalHeatGains->sumArea += spaceArea * mult;
1415 4051 : state.dataInternalHeatGains->sumPower += state.dataHeatBal->Lights(lightsNum).DesignLevel * mult;
1416 4051 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtZone, liteName, state.dataHeatBal->Zone(zoneNum).Name);
1417 4051 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtSpace, liteName, state.dataHeatBal->space(spaceNum).Name);
1418 4051 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtSpaceType, liteName, state.dataHeatBal->space(spaceNum).spaceType);
1419 4051 : if (spaceArea > 0.0) {
1420 12150 : PreDefTableEntry(
1421 8100 : state, state.dataOutRptPredefined->pdchInLtDens, liteName, state.dataHeatBal->Lights(lightsNum).DesignLevel / spaceArea, 4);
1422 : } else {
1423 1 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtDens, liteName, DataPrecisionGlobals::constant_zero, 4);
1424 : }
1425 4051 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtArea, liteName, spaceArea * mult);
1426 4051 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtPower, liteName, state.dataHeatBal->Lights(lightsNum).DesignLevel * mult);
1427 4051 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtEndUse, liteName, state.dataHeatBal->Lights(lightsNum).EndUseSubcategory);
1428 8102 : PreDefTableEntry(
1429 12153 : state, state.dataOutRptPredefined->pdchInLtSchd, liteName, GetScheduleName(state, state.dataHeatBal->Lights(lightsNum).SchedPtr));
1430 12153 : PreDefTableEntry(
1431 8102 : state, state.dataOutRptPredefined->pdchInLtRetAir, liteName, state.dataHeatBal->Lights(lightsNum).FractionReturnAir, 4);
1432 : } // Item1 - Number of Lights instances
1433 641 : if (CheckSharedExhaustFlag) {
1434 1 : DataZoneEquipment::CheckSharedExhaust(state);
1435 2 : Array1D_bool ReturnNodeShared; // zone supply air inlet nodes
1436 1 : ReturnNodeShared.allocate(state.dataHeatBal->TotLights);
1437 1 : ReturnNodeShared = false;
1438 6 : for (int Loop = 1; Loop <= state.dataHeatBal->TotLights; ++Loop) {
1439 5 : int ZoneNum = state.dataHeatBal->Lights(Loop).ZonePtr;
1440 5 : int ReturnNum = state.dataHeatBal->Lights(Loop).ZoneReturnNum;
1441 5 : int ExhaustNodeNum = state.dataHeatBal->Lights(Loop).ZoneExhaustNodeNum;
1442 5 : if (ReturnNum == 0 || ExhaustNodeNum == 0) continue;
1443 5 : for (int Loop1 = Loop + 1; Loop1 <= state.dataHeatBal->TotLights; ++Loop1) {
1444 4 : if (ZoneNum != state.dataHeatBal->Lights(Loop1).ZonePtr) continue;
1445 0 : if (ReturnNodeShared(Loop1)) continue;
1446 0 : if (ReturnNum == state.dataHeatBal->Lights(Loop1).ZoneReturnNum &&
1447 0 : ExhaustNodeNum != state.dataHeatBal->Lights(Loop1).ZoneExhaustNodeNum) {
1448 0 : ShowSevereError(state,
1449 0 : std::string{RoutineName} + lightsModuleObject +
1450 0 : ": Duplicated Return Air Node = " + state.dataHeatBal->Lights(Loop1).RetNodeName + " is found, ");
1451 0 : ShowContinueError(state,
1452 0 : " in both Lights objects = " + state.dataHeatBal->Lights(Loop).Name + " and " +
1453 0 : state.dataHeatBal->Lights(Loop1).Name + ".");
1454 0 : ErrorsFound = true;
1455 0 : ReturnNodeShared(Loop1) = true;
1456 : }
1457 : }
1458 : }
1459 1 : ReturnNodeShared.deallocate();
1460 : }
1461 : } // TotLights > 0 check
1462 : // add total line to lighting summary table
1463 771 : if (state.dataInternalHeatGains->sumArea > 0.0) {
1464 1923 : PreDefTableEntry(state,
1465 641 : state.dataOutRptPredefined->pdchInLtDens,
1466 : "Interior Lighting Total",
1467 641 : state.dataInternalHeatGains->sumPower / state.dataInternalHeatGains->sumArea,
1468 641 : 4); // line 792
1469 : } else {
1470 130 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtDens, "Interior Lighting Total", DataPrecisionGlobals::constant_zero, 4);
1471 : }
1472 771 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtArea, "Interior Lighting Total", state.dataInternalHeatGains->sumArea);
1473 771 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchInLtPower, "Interior Lighting Total", state.dataInternalHeatGains->sumPower);
1474 :
1475 : // ElectricEquipment
1476 : // Declared in state because the lights inputs are needed for demand manager
1477 771 : int numZoneElectricStatements = 0;
1478 1542 : setupIHGZonesAndSpaces(state,
1479 : elecEqModuleObject,
1480 771 : state.dataInternalHeatGains->zoneElectricObjects,
1481 : numZoneElectricStatements,
1482 771 : state.dataHeatBal->TotElecEquip,
1483 : ErrorsFound);
1484 :
1485 771 : if (state.dataHeatBal->TotElecEquip > 0) {
1486 629 : state.dataHeatBal->ZoneElectric.allocate(state.dataHeatBal->TotElecEquip);
1487 629 : int elecEqNum = 0;
1488 4762 : for (int elecEqInputNum = 1; elecEqInputNum <= numZoneElectricStatements; ++elecEqInputNum) {
1489 :
1490 4133 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
1491 : elecEqModuleObject,
1492 : elecEqInputNum,
1493 : IHGAlphas,
1494 : IHGNumAlphas,
1495 : IHGNumbers,
1496 : IHGNumNumbers,
1497 : IOStat,
1498 : IHGNumericFieldBlanks,
1499 : IHGAlphaFieldBlanks,
1500 : IHGAlphaFieldNames,
1501 : IHGNumericFieldNames);
1502 :
1503 4133 : auto &thisElecEqInput = state.dataInternalHeatGains->zoneElectricObjects(elecEqInputNum);
1504 8307 : for (int Item1 = 1; Item1 <= thisElecEqInput.numOfSpaces; ++Item1) {
1505 4174 : ++elecEqNum;
1506 4174 : auto &thisZoneElectric = state.dataHeatBal->ZoneElectric(elecEqNum);
1507 4174 : int const spaceNum = thisElecEqInput.spaceNums(Item1);
1508 4174 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
1509 4174 : thisZoneElectric.Name = thisElecEqInput.names(Item1);
1510 4174 : thisZoneElectric.spaceIndex = spaceNum;
1511 4174 : thisZoneElectric.ZonePtr = zoneNum;
1512 :
1513 4174 : thisZoneElectric.SchedPtr = GetScheduleIndex(state, IHGAlphas(3));
1514 4174 : SchMin = 0.0;
1515 4174 : SchMax = 0.0;
1516 4174 : if (thisZoneElectric.SchedPtr == 0) {
1517 0 : if (IHGAlphaFieldBlanks(3)) {
1518 0 : ShowSevereError(state,
1519 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + IHGAlphas(1) + "\", " + IHGAlphaFieldNames(3) +
1520 : " is required.");
1521 : } else {
1522 0 : ShowSevereError(state,
1523 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
1524 0 : IHGAlphaFieldNames(3) + " entered=" + IHGAlphas(3));
1525 : }
1526 0 : ErrorsFound = true;
1527 : } else { // check min/max on schedule
1528 4174 : SchMin = GetScheduleMinValue(state, thisZoneElectric.SchedPtr);
1529 4174 : SchMax = GetScheduleMaxValue(state, thisZoneElectric.SchedPtr);
1530 4174 : if (SchMin < 0.0 || SchMax < 0.0) {
1531 0 : if (SchMin < 0.0) {
1532 0 : ShowSevereError(state,
1533 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + IHGAlphas(1) + "\", " +
1534 0 : IHGAlphaFieldNames(3) + ", minimum is < 0.0");
1535 0 : ShowContinueError(state,
1536 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMin));
1537 0 : ErrorsFound = true;
1538 : }
1539 0 : if (SchMax < 0.0) {
1540 0 : ShowSevereError(state,
1541 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + IHGAlphas(1) + "\", " +
1542 0 : IHGAlphaFieldNames(3) + ", maximum is < 0.0");
1543 0 : ShowContinueError(state,
1544 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMax));
1545 0 : ErrorsFound = true;
1546 : }
1547 : }
1548 : }
1549 :
1550 : // Electric equipment design level calculation method.
1551 : {
1552 8348 : auto const equipmentLevel(IHGAlphas(4));
1553 4174 : if (equipmentLevel == "EQUIPMENTLEVEL") {
1554 3031 : Real64 spaceFrac = 1.0;
1555 3031 : if (thisElecEqInput.numOfSpaces > 1) {
1556 0 : Real64 const zoneArea = state.dataHeatBal->Zone(zoneNum).FloorArea;
1557 0 : if (zoneArea > 0.0) {
1558 0 : spaceFrac = state.dataHeatBal->space(spaceNum).floorArea / zoneArea;
1559 : } else {
1560 0 : ShowSevereError(state,
1561 0 : std::string(RoutineName) +
1562 : "Zone floor area is zero when allocating ElectricEquipment loads to Spaces.");
1563 0 : ShowContinueError(state,
1564 0 : "Occurs for ElectricEquipment object =" + thisElecEqInput.Name +
1565 0 : " in Zone=" + state.dataHeatBal->Zone(thisZoneElectric.ZonePtr).Name);
1566 0 : ErrorsFound = true;
1567 : }
1568 : }
1569 3031 : thisZoneElectric.DesignLevel = IHGNumbers(1) * spaceFrac;
1570 3031 : if (IHGNumericFieldBlanks(1)) {
1571 0 : ShowWarningError(state,
1572 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + thisElecEqInput.Name + "\", specifies " +
1573 0 : IHGNumericFieldNames(1) + ", but that field is blank. 0 Electric Equipment will result.");
1574 : }
1575 1143 : } else if (equipmentLevel == "WATTS/AREA") {
1576 1111 : if (spaceNum != 0) {
1577 1111 : if (IHGNumbers(2) >= 0.0) {
1578 1111 : thisZoneElectric.DesignLevel = IHGNumbers(2) * state.dataHeatBal->space(spaceNum).floorArea;
1579 1111 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) &&
1580 0 : !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
1581 0 : ShowWarningError(state,
1582 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + thisZoneElectric.Name +
1583 0 : "\", specifies " + IHGNumericFieldNames(2) +
1584 : ", but Space Floor Area = 0. 0 Electric Equipment will result.");
1585 : }
1586 : } else {
1587 0 : ShowSevereError(state,
1588 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
1589 : RoutineName,
1590 : elecEqModuleObject,
1591 : thisZoneElectric.Name,
1592 : IHGNumericFieldNames(2),
1593 0 : IHGNumbers(2)));
1594 0 : ErrorsFound = true;
1595 : }
1596 : }
1597 1111 : if (IHGNumericFieldBlanks(2)) {
1598 0 : ShowWarningError(state,
1599 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + thisElecEqInput.Name + "\", specifies " +
1600 0 : IHGNumericFieldNames(2) + ", but that field is blank. 0 Electric Equipment will result.");
1601 : }
1602 :
1603 32 : } else if (equipmentLevel == "WATTS/PERSON") {
1604 32 : if (spaceNum != 0) {
1605 32 : if (IHGNumbers(3) >= 0.0) {
1606 32 : thisZoneElectric.DesignLevel = IHGNumbers(3) * state.dataHeatBal->space(spaceNum).totOccupants;
1607 32 : if (state.dataHeatBal->space(spaceNum).totOccupants <= 0.0) {
1608 0 : ShowWarningError(state,
1609 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + thisZoneElectric.Name +
1610 0 : "\", specifies " + IHGNumericFieldNames(2) +
1611 : ", but Total Occupants = 0. 0 Electric Equipment will result.");
1612 : }
1613 : } else {
1614 0 : ShowSevereError(state,
1615 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
1616 : RoutineName,
1617 : elecEqModuleObject,
1618 : thisZoneElectric.Name,
1619 : IHGNumericFieldNames(3),
1620 0 : IHGNumbers(3)));
1621 0 : ErrorsFound = true;
1622 : }
1623 : }
1624 32 : if (IHGNumericFieldBlanks(3)) {
1625 0 : ShowWarningError(state,
1626 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + thisElecEqInput.Name + "\", specifies " +
1627 0 : IHGNumericFieldNames(3) + ", but that field is blank. 0 Electric Equipment will result.");
1628 : }
1629 :
1630 : } else {
1631 0 : if (Item1 == 1) {
1632 0 : ShowSevereError(state,
1633 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + thisElecEqInput.Name + "\", invalid " +
1634 0 : IHGAlphaFieldNames(4) + ", value =" + IHGAlphas(4));
1635 0 : ShowContinueError(state, "...Valid values are \"EquipmentLevel\", \"Watts/Area\", \"Watts/Person\".");
1636 0 : ErrorsFound = true;
1637 : }
1638 : }
1639 : }
1640 :
1641 : // Calculate nominal min/max equipment level
1642 4174 : thisZoneElectric.NomMinDesignLevel = thisZoneElectric.DesignLevel * SchMin;
1643 4174 : thisZoneElectric.NomMaxDesignLevel = thisZoneElectric.DesignLevel * SchMax;
1644 :
1645 4174 : thisZoneElectric.FractionLatent = IHGNumbers(4);
1646 4174 : thisZoneElectric.FractionRadiant = IHGNumbers(5);
1647 4174 : thisZoneElectric.FractionLost = IHGNumbers(6);
1648 : // FractionConvected is a calculated field
1649 4174 : thisZoneElectric.FractionConvected =
1650 4174 : 1.0 - (thisZoneElectric.FractionLatent + thisZoneElectric.FractionRadiant + thisZoneElectric.FractionLost);
1651 4174 : if (std::abs(thisZoneElectric.FractionConvected) <= 0.001) thisZoneElectric.FractionConvected = 0.0;
1652 4174 : if (thisZoneElectric.FractionConvected < 0.0) {
1653 0 : ShowSevereError(state,
1654 0 : std::string{RoutineName} + elecEqModuleObject + "=\"" + thisElecEqInput.Name + "\", Sum of Fractions > 1.0");
1655 0 : ErrorsFound = true;
1656 : }
1657 :
1658 4174 : if (IHGNumAlphas > 4) {
1659 2232 : thisZoneElectric.EndUseSubcategory = IHGAlphas(5);
1660 : } else {
1661 1942 : thisZoneElectric.EndUseSubcategory = "General";
1662 : }
1663 4174 : if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
1664 3195 : SetupEMSActuator(state,
1665 : "ElectricEquipment",
1666 : thisZoneElectric.Name,
1667 : "Electricity Rate",
1668 : "[W]",
1669 : thisZoneElectric.EMSZoneEquipOverrideOn,
1670 2130 : thisZoneElectric.EMSEquipPower);
1671 3195 : SetupEMSInternalVariable(
1672 2130 : state, "Plug and Process Power Design Level", thisZoneElectric.Name, "[W]", thisZoneElectric.DesignLevel);
1673 : } // EMS
1674 4174 : if (!ErrorsFound) {
1675 4174 : SetupSpaceInternalGain(state,
1676 : thisZoneElectric.spaceIndex,
1677 : 1.0,
1678 : thisZoneElectric.Name,
1679 : DataHeatBalance::IntGainType::ElectricEquipment,
1680 : &thisZoneElectric.ConGainRate,
1681 : nullptr,
1682 : &thisZoneElectric.RadGainRate,
1683 : &thisZoneElectric.LatGainRate);
1684 : }
1685 : } // for elecEqInputNum.NumOfSpaces
1686 : } // for elecEqInputNum
1687 : } // TotElecEquip > 0
1688 :
1689 : // GasEquipment
1690 1542 : EPVector<InternalHeatGains::GlobalInternalGainMiscObject> zoneGasObjects;
1691 771 : int numZoneGasStatements = 0;
1692 771 : setupIHGZonesAndSpaces(state, gasEqModuleObject, zoneGasObjects, numZoneGasStatements, state.dataHeatBal->TotGasEquip, ErrorsFound);
1693 :
1694 771 : if (state.dataHeatBal->TotGasEquip > 0) {
1695 36 : state.dataHeatBal->ZoneGas.allocate(state.dataHeatBal->TotGasEquip);
1696 36 : int gasEqNum = 0;
1697 112 : for (int gasEqInputNum = 1; gasEqInputNum <= numZoneGasStatements; ++gasEqInputNum) {
1698 :
1699 76 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
1700 : gasEqModuleObject,
1701 : gasEqInputNum,
1702 : IHGAlphas,
1703 : IHGNumAlphas,
1704 : IHGNumbers,
1705 : IHGNumNumbers,
1706 : IOStat,
1707 : IHGNumericFieldBlanks,
1708 : IHGAlphaFieldBlanks,
1709 : IHGAlphaFieldNames,
1710 : IHGNumericFieldNames);
1711 :
1712 76 : auto &thisGasEqInput = zoneGasObjects(gasEqInputNum);
1713 154 : for (int Item1 = 1; Item1 <= thisGasEqInput.numOfSpaces; ++Item1) {
1714 78 : ++gasEqNum;
1715 78 : auto &thisZoneGas = state.dataHeatBal->ZoneGas(gasEqNum);
1716 78 : int const spaceNum = thisGasEqInput.spaceNums(Item1);
1717 78 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
1718 78 : thisZoneGas.Name = thisGasEqInput.names(Item1);
1719 78 : thisZoneGas.spaceIndex = spaceNum;
1720 78 : thisZoneGas.ZonePtr = zoneNum;
1721 :
1722 78 : thisZoneGas.SchedPtr = GetScheduleIndex(state, IHGAlphas(3));
1723 78 : SchMin = 0.0;
1724 78 : SchMax = 0.0;
1725 78 : if (thisZoneGas.SchedPtr == 0) {
1726 0 : if (Item1 == 1) {
1727 0 : if (IHGAlphaFieldBlanks(3)) {
1728 0 : ShowSevereError(state,
1729 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", " +
1730 0 : IHGAlphaFieldNames(3) + " is required.");
1731 : } else {
1732 0 : ShowSevereError(state,
1733 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", invalid " +
1734 0 : IHGAlphaFieldNames(3) + " entered=" + IHGAlphas(3));
1735 : }
1736 0 : ErrorsFound = true;
1737 : }
1738 : } else { // check min/max on schedule
1739 78 : SchMin = GetScheduleMinValue(state, thisZoneGas.SchedPtr);
1740 78 : SchMax = GetScheduleMaxValue(state, thisZoneGas.SchedPtr);
1741 78 : if (SchMin < 0.0 || SchMax < 0.0) {
1742 0 : if (Item1 == 1) {
1743 0 : if (SchMin < 0.0) {
1744 0 : ShowSevereError(state,
1745 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", " +
1746 0 : IHGAlphaFieldNames(3) + ", minimum is < 0.0");
1747 0 : ShowContinueError(state,
1748 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMin));
1749 0 : ErrorsFound = true;
1750 : }
1751 : }
1752 0 : if (Item1 == 1) {
1753 0 : if (SchMax < 0.0) {
1754 0 : ShowSevereError(state,
1755 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", " +
1756 0 : IHGAlphaFieldNames(3) + ", maximum is < 0.0");
1757 0 : ShowContinueError(state,
1758 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMax));
1759 0 : ErrorsFound = true;
1760 : }
1761 : }
1762 : }
1763 : }
1764 :
1765 : // Gas equipment design level calculation method.
1766 : {
1767 156 : auto const equipmentLevel(IHGAlphas(4));
1768 78 : if (equipmentLevel == "EQUIPMENTLEVEL") {
1769 71 : Real64 spaceFrac = 1.0;
1770 71 : if (thisGasEqInput.numOfSpaces > 1) {
1771 0 : Real64 const zoneArea = state.dataHeatBal->Zone(zoneNum).FloorArea;
1772 0 : if (zoneArea > 0.0) {
1773 0 : spaceFrac = state.dataHeatBal->space(spaceNum).floorArea / zoneArea;
1774 : } else {
1775 0 : ShowSevereError(
1776 0 : state, std::string(RoutineName) + "Zone floor area is zero when allocating GasEquipment loads to Spaces.");
1777 0 : ShowContinueError(state,
1778 0 : "Occurs for GasEquipment object =" + thisGasEqInput.Name +
1779 0 : " in Zone=" + state.dataHeatBal->Zone(thisZoneGas.ZonePtr).Name);
1780 0 : ErrorsFound = true;
1781 : }
1782 : }
1783 71 : thisZoneGas.DesignLevel = IHGNumbers(1) * spaceFrac;
1784 71 : if (IHGNumericFieldBlanks(1)) {
1785 0 : ShowWarningError(state,
1786 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", specifies " +
1787 0 : IHGNumericFieldNames(1) + ", but that field is blank. 0 Gas Equipment will result.");
1788 : }
1789 7 : } else if (equipmentLevel == "WATTS/AREA" || equipmentLevel == "POWER/AREA") {
1790 7 : if (spaceNum != 0) {
1791 7 : if (IHGNumbers(2) >= 0.0) {
1792 7 : thisZoneGas.DesignLevel = IHGNumbers(2) * state.dataHeatBal->space(spaceNum).floorArea;
1793 7 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) &&
1794 0 : !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
1795 0 : ShowWarningError(state,
1796 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisZoneGas.Name + "\", specifies " +
1797 0 : IHGNumericFieldNames(2) + ", but Space Floor Area = 0. 0 Gas Equipment will result.");
1798 : }
1799 : } else {
1800 0 : ShowSevereError(state,
1801 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
1802 : RoutineName,
1803 : gasEqModuleObject,
1804 : thisGasEqInput.Name,
1805 : IHGNumericFieldNames(2),
1806 0 : IHGNumbers(2)));
1807 0 : ErrorsFound = true;
1808 : }
1809 : }
1810 7 : if (IHGNumericFieldBlanks(2)) {
1811 0 : ShowWarningError(state,
1812 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", specifies " +
1813 0 : IHGNumericFieldNames(2) + ", but that field is blank. 0 Gas Equipment will result.");
1814 : }
1815 :
1816 0 : } else if (equipmentLevel == "WATTS/PERSON" || equipmentLevel == "POWER/PERSON") {
1817 0 : if (spaceNum != 0) {
1818 0 : if (IHGNumbers(3) >= 0.0) {
1819 0 : thisZoneGas.DesignLevel = IHGNumbers(3) * state.dataHeatBal->space(spaceNum).totOccupants;
1820 0 : if (state.dataHeatBal->space(spaceNum).totOccupants <= 0.0) {
1821 0 : ShowWarningError(state,
1822 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisZoneGas.Name + "\", specifies " +
1823 0 : IHGNumericFieldNames(2) + ", but Total Occupants = 0. 0 Gas Equipment will result.");
1824 : }
1825 : } else {
1826 0 : ShowSevereError(state,
1827 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
1828 : RoutineName,
1829 : gasEqModuleObject,
1830 : thisGasEqInput.Name,
1831 : IHGNumericFieldNames(3),
1832 0 : IHGNumbers(3)));
1833 0 : ErrorsFound = true;
1834 : }
1835 : }
1836 0 : if (IHGNumericFieldBlanks(3)) {
1837 0 : ShowWarningError(state,
1838 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", specifies " +
1839 0 : IHGNumericFieldNames(3) + ", but that field is blank. 0 Gas Equipment will result.");
1840 : }
1841 :
1842 : } else {
1843 0 : if (Item1 == 1) {
1844 0 : ShowSevereError(state,
1845 0 : std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", invalid " +
1846 0 : IHGAlphaFieldNames(4) + ", value =" + IHGAlphas(4));
1847 0 : ShowContinueError(state, "...Valid values are \"EquipmentLevel\", \"Watts/Area\", \"Watts/Person\".");
1848 0 : ErrorsFound = true;
1849 : }
1850 : }
1851 : }
1852 :
1853 : // Calculate nominal min/max equipment level
1854 78 : thisZoneGas.NomMinDesignLevel = thisZoneGas.DesignLevel * SchMin;
1855 78 : thisZoneGas.NomMaxDesignLevel = thisZoneGas.DesignLevel * SchMax;
1856 :
1857 78 : thisZoneGas.FractionLatent = IHGNumbers(4);
1858 78 : thisZoneGas.FractionRadiant = IHGNumbers(5);
1859 78 : thisZoneGas.FractionLost = IHGNumbers(6);
1860 :
1861 78 : if ((IHGNumNumbers == 7) || (!IHGNumericFieldBlanks(7))) {
1862 70 : thisZoneGas.CO2RateFactor = IHGNumbers(7);
1863 : }
1864 78 : if (thisZoneGas.CO2RateFactor < 0.0) {
1865 0 : ShowSevereError(state,
1866 0 : format("{}{}=\"{}\", {} < 0.0, value ={:.2R}",
1867 : RoutineName,
1868 : gasEqModuleObject,
1869 : thisGasEqInput.Name,
1870 : IHGNumericFieldNames(7),
1871 0 : IHGNumbers(7)));
1872 0 : ErrorsFound = true;
1873 : }
1874 78 : if (thisZoneGas.CO2RateFactor > 4.0e-7) {
1875 0 : ShowSevereError(state,
1876 0 : format("{}{}=\"{}\", {} > 4.0E-7, value ={:.2R}",
1877 : RoutineName,
1878 : gasEqModuleObject,
1879 : thisGasEqInput.Name,
1880 : IHGNumericFieldNames(7),
1881 0 : IHGNumbers(7)));
1882 0 : ErrorsFound = true;
1883 : }
1884 : // FractionConvected is a calculated field
1885 78 : thisZoneGas.FractionConvected = 1.0 - (thisZoneGas.FractionLatent + thisZoneGas.FractionRadiant + thisZoneGas.FractionLost);
1886 78 : if (std::abs(thisZoneGas.FractionConvected) <= 0.001) thisZoneGas.FractionConvected = 0.0;
1887 78 : if (thisZoneGas.FractionConvected < 0.0) {
1888 0 : if (Item1 == 1) {
1889 0 : ShowSevereError(
1890 0 : state, std::string{RoutineName} + gasEqModuleObject + "=\"" + thisGasEqInput.Name + "\", Sum of Fractions > 1.0");
1891 0 : ErrorsFound = true;
1892 : }
1893 : }
1894 :
1895 78 : if (IHGNumAlphas > 4) {
1896 70 : thisZoneGas.EndUseSubcategory = IHGAlphas(5);
1897 : } else {
1898 8 : thisZoneGas.EndUseSubcategory = "General";
1899 : }
1900 :
1901 78 : if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
1902 48 : SetupEMSActuator(state,
1903 : "GasEquipment",
1904 : thisZoneGas.Name,
1905 : "NaturalGas Rate",
1906 : "[W]",
1907 : thisZoneGas.EMSZoneEquipOverrideOn,
1908 32 : thisZoneGas.EMSEquipPower);
1909 16 : SetupEMSInternalVariable(state, "Gas Process Power Design Level", thisZoneGas.Name, "[W]", thisZoneGas.DesignLevel);
1910 : } // EMS
1911 :
1912 78 : if (!ErrorsFound)
1913 78 : SetupSpaceInternalGain(state,
1914 : thisZoneGas.spaceIndex,
1915 : 1.0,
1916 : thisZoneGas.Name,
1917 : DataHeatBalance::IntGainType::GasEquipment,
1918 : &thisZoneGas.ConGainRate,
1919 : nullptr,
1920 : &thisZoneGas.RadGainRate,
1921 : &thisZoneGas.LatGainRate,
1922 : nullptr,
1923 : &thisZoneGas.CO2GainRate);
1924 :
1925 : } // for gasEqInputNum.NumOfSpaces
1926 : } // for gasEqInputNum
1927 : } // TotGasEquip > 0
1928 :
1929 : // HotWaterEquipment
1930 1542 : EPVector<InternalHeatGains::GlobalInternalGainMiscObject> hotWaterEqObjects;
1931 771 : int numHotWaterEqStatements = 0;
1932 771 : setupIHGZonesAndSpaces(state, hwEqModuleObject, hotWaterEqObjects, numHotWaterEqStatements, state.dataHeatBal->TotHWEquip, ErrorsFound);
1933 :
1934 771 : if (state.dataHeatBal->TotHWEquip > 0) {
1935 6 : state.dataHeatBal->ZoneHWEq.allocate(state.dataHeatBal->TotHWEquip);
1936 6 : int hwEqNum = 0;
1937 12 : for (int hwEqInputNum = 1; hwEqInputNum <= numHotWaterEqStatements; ++hwEqInputNum) {
1938 :
1939 6 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
1940 : hwEqModuleObject,
1941 : hwEqInputNum,
1942 : IHGAlphas,
1943 : IHGNumAlphas,
1944 : IHGNumbers,
1945 : IHGNumNumbers,
1946 : IOStat,
1947 : IHGNumericFieldBlanks,
1948 : IHGAlphaFieldBlanks,
1949 : IHGAlphaFieldNames,
1950 : IHGNumericFieldNames);
1951 :
1952 6 : auto &thisHWEqInput = hotWaterEqObjects(hwEqInputNum);
1953 20 : for (int Item1 = 1; Item1 <= thisHWEqInput.numOfSpaces; ++Item1) {
1954 14 : ++hwEqNum;
1955 14 : auto &thisZoneHWEq = state.dataHeatBal->ZoneHWEq(hwEqNum);
1956 14 : int const spaceNum = thisHWEqInput.spaceNums(Item1);
1957 14 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
1958 14 : thisZoneHWEq.Name = thisHWEqInput.names(Item1);
1959 14 : thisZoneHWEq.spaceIndex = spaceNum;
1960 14 : thisZoneHWEq.ZonePtr = zoneNum;
1961 :
1962 14 : thisZoneHWEq.SchedPtr = GetScheduleIndex(state, IHGAlphas(3));
1963 14 : SchMin = 0.0;
1964 14 : SchMax = 0.0;
1965 14 : if (thisZoneHWEq.SchedPtr == 0) {
1966 0 : if (IHGAlphaFieldBlanks(3)) {
1967 0 : ShowSevereError(state,
1968 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", " +
1969 0 : IHGAlphaFieldNames(3) + " is required.");
1970 : } else {
1971 0 : ShowSevereError(state,
1972 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", invalid " +
1973 0 : IHGAlphaFieldNames(3) + " entered=" + IHGAlphas(3));
1974 : }
1975 0 : ErrorsFound = true;
1976 : } else { // check min/max on schedule
1977 14 : SchMin = GetScheduleMinValue(state, thisZoneHWEq.SchedPtr);
1978 14 : SchMax = GetScheduleMaxValue(state, thisZoneHWEq.SchedPtr);
1979 14 : if (SchMin < 0.0 || SchMax < 0.0) {
1980 0 : if (SchMin < 0.0) {
1981 0 : ShowSevereError(state,
1982 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", " +
1983 0 : IHGAlphaFieldNames(3) + ", minimum is < 0.0");
1984 0 : ShowContinueError(state,
1985 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMin));
1986 0 : ErrorsFound = true;
1987 : }
1988 0 : if (SchMax < 0.0) {
1989 0 : ShowSevereError(state,
1990 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", " +
1991 0 : IHGAlphaFieldNames(3) + ", maximum is < 0.0");
1992 0 : ShowContinueError(state,
1993 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMax));
1994 0 : ErrorsFound = true;
1995 : }
1996 : }
1997 : }
1998 :
1999 : // Hot Water equipment design level calculation method.
2000 : {
2001 28 : auto const equipmentLevel(IHGAlphas(4));
2002 14 : if (equipmentLevel == "EQUIPMENTLEVEL") {
2003 5 : Real64 spaceFrac = 1.0;
2004 5 : if (thisHWEqInput.numOfSpaces > 1) {
2005 0 : Real64 const zoneArea = state.dataHeatBal->Zone(zoneNum).FloorArea;
2006 0 : if (zoneArea > 0.0) {
2007 0 : spaceFrac = state.dataHeatBal->space(spaceNum).floorArea / zoneArea;
2008 : } else {
2009 0 : ShowSevereError(state,
2010 0 : std::string(RoutineName) +
2011 : "Zone floor area is zero when allocating HotWaterEquipment loads to Spaces.");
2012 0 : ShowContinueError(state,
2013 0 : "Occurs for HotWaterEquipment object =" + thisHWEqInput.Name +
2014 0 : " in Zone=" + state.dataHeatBal->Zone(zoneNum).Name);
2015 0 : ErrorsFound = true;
2016 : }
2017 : }
2018 5 : thisZoneHWEq.DesignLevel = IHGNumbers(1) * spaceFrac;
2019 5 : if (IHGNumericFieldBlanks(1)) {
2020 0 : ShowWarningError(state,
2021 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", specifies " +
2022 0 : IHGNumericFieldNames(1) + ", but that field is blank. 0 Hot Water Equipment will result.");
2023 : }
2024 9 : } else if (equipmentLevel == "WATTS/AREA" || equipmentLevel == "POWER/AREA") {
2025 0 : if (spaceNum != 0) {
2026 0 : if (IHGNumbers(2) >= 0.0) {
2027 0 : thisZoneHWEq.DesignLevel = IHGNumbers(2) * state.dataHeatBal->space(spaceNum).floorArea;
2028 0 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) &&
2029 0 : !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
2030 0 : ShowWarningError(state,
2031 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisZoneHWEq.Name + "\", specifies " +
2032 0 : IHGNumericFieldNames(2) +
2033 : ", but Space Floor Area = 0. 0 Hot Water Equipment will result.");
2034 : }
2035 : } else {
2036 0 : ShowSevereError(state,
2037 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
2038 : RoutineName,
2039 : hwEqModuleObject,
2040 : thisHWEqInput.Name,
2041 : IHGNumericFieldNames(2),
2042 0 : IHGNumbers(2)));
2043 0 : ErrorsFound = true;
2044 : }
2045 : }
2046 0 : if (IHGNumericFieldBlanks(2)) {
2047 0 : ShowWarningError(state,
2048 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", specifies " +
2049 0 : IHGNumericFieldNames(2) + ", but that field is blank. 0 Hot Water Equipment will result.");
2050 : }
2051 :
2052 9 : } else if (equipmentLevel == "WATTS/PERSON" || equipmentLevel == "POWER/PERSON") {
2053 9 : if (spaceNum != 0) {
2054 9 : if (IHGNumbers(3) >= 0.0) {
2055 9 : thisZoneHWEq.DesignLevel = IHGNumbers(3) * state.dataHeatBal->space(spaceNum).totOccupants;
2056 9 : if (state.dataHeatBal->space(spaceNum).totOccupants <= 0.0) {
2057 0 : ShowWarningError(state,
2058 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisZoneHWEq.Name + "\", specifies " +
2059 0 : IHGNumericFieldNames(2) +
2060 : ", but Total Occupants = 0. 0 Hot Water Equipment will result.");
2061 : }
2062 : } else {
2063 0 : ShowSevereError(state,
2064 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
2065 : RoutineName,
2066 : hwEqModuleObject,
2067 : thisHWEqInput.Name,
2068 : IHGNumericFieldNames(3),
2069 0 : IHGNumbers(3)));
2070 0 : ErrorsFound = true;
2071 : }
2072 : }
2073 9 : if (IHGNumericFieldBlanks(3)) {
2074 0 : ShowWarningError(state,
2075 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", specifies " +
2076 0 : IHGNumericFieldNames(3) + ", but that field is blank. 0 Hot Water Equipment will result.");
2077 : }
2078 :
2079 : } else {
2080 0 : if (Item1 == 1) {
2081 0 : ShowSevereError(state,
2082 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", invalid " +
2083 0 : IHGAlphaFieldNames(4) + ", value =" + IHGAlphas(4));
2084 0 : ShowContinueError(state, "...Valid values are \"EquipmentLevel\", \"Watts/Area\", \"Watts/Person\".");
2085 0 : ErrorsFound = true;
2086 : }
2087 : }
2088 : }
2089 :
2090 : // Calculate nominal min/max equipment level
2091 14 : thisZoneHWEq.NomMinDesignLevel = thisZoneHWEq.DesignLevel * SchMin;
2092 14 : thisZoneHWEq.NomMaxDesignLevel = thisZoneHWEq.DesignLevel * SchMax;
2093 :
2094 14 : thisZoneHWEq.FractionLatent = IHGNumbers(4);
2095 14 : thisZoneHWEq.FractionRadiant = IHGNumbers(5);
2096 14 : thisZoneHWEq.FractionLost = IHGNumbers(6);
2097 : // FractionConvected is a calculated field
2098 14 : thisZoneHWEq.FractionConvected = 1.0 - (thisZoneHWEq.FractionLatent + thisZoneHWEq.FractionRadiant + thisZoneHWEq.FractionLost);
2099 14 : if (std::abs(thisZoneHWEq.FractionConvected) <= 0.001) thisZoneHWEq.FractionConvected = 0.0;
2100 14 : if (thisZoneHWEq.FractionConvected < 0.0) {
2101 0 : ShowSevereError(state,
2102 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisHWEqInput.Name + "\", Sum of Fractions > 1.0");
2103 0 : ErrorsFound = true;
2104 : }
2105 :
2106 14 : if (IHGNumAlphas > 4) {
2107 14 : thisZoneHWEq.EndUseSubcategory = IHGAlphas(5);
2108 : } else {
2109 0 : thisZoneHWEq.EndUseSubcategory = "General";
2110 : }
2111 :
2112 14 : if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
2113 0 : SetupEMSActuator(state,
2114 : "HotWaterEquipment",
2115 : thisZoneHWEq.Name,
2116 : "District Heating Power Level",
2117 : "[W]",
2118 : thisZoneHWEq.EMSZoneEquipOverrideOn,
2119 0 : thisZoneHWEq.EMSEquipPower);
2120 0 : SetupEMSInternalVariable(state, "Process District Heat Design Level", thisZoneHWEq.Name, "[W]", thisZoneHWEq.DesignLevel);
2121 : } // EMS
2122 :
2123 14 : if (!ErrorsFound)
2124 14 : SetupSpaceInternalGain(state,
2125 : thisZoneHWEq.spaceIndex,
2126 : 1.0,
2127 : thisZoneHWEq.Name,
2128 : DataHeatBalance::IntGainType::HotWaterEquipment,
2129 : &thisZoneHWEq.ConGainRate,
2130 : nullptr,
2131 : &thisZoneHWEq.RadGainRate,
2132 : &thisZoneHWEq.LatGainRate);
2133 :
2134 : } // for hwEqInputNum.NumOfSpaces
2135 : } // for hwEqInputNum
2136 : } // TotHWEquip > 0
2137 :
2138 : // SteamEquipment
2139 1542 : EPVector<InternalHeatGains::GlobalInternalGainMiscObject> steamEqObjects;
2140 771 : int numSteamEqStatements = 0;
2141 771 : setupIHGZonesAndSpaces(state, stmEqModuleObject, steamEqObjects, numSteamEqStatements, state.dataHeatBal->TotStmEquip, ErrorsFound);
2142 :
2143 771 : if (state.dataHeatBal->TotStmEquip > 0) {
2144 5 : state.dataHeatBal->ZoneSteamEq.allocate(state.dataHeatBal->TotStmEquip);
2145 5 : int stmEqNum = 0;
2146 10 : for (int stmEqInputNum = 1; stmEqInputNum <= numSteamEqStatements; ++stmEqInputNum) {
2147 5 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
2148 : stmEqModuleObject,
2149 : stmEqInputNum,
2150 : IHGAlphas,
2151 : IHGNumAlphas,
2152 : IHGNumbers,
2153 : IHGNumNumbers,
2154 : IOStat,
2155 : IHGNumericFieldBlanks,
2156 : IHGAlphaFieldBlanks,
2157 : IHGAlphaFieldNames,
2158 : IHGNumericFieldNames);
2159 :
2160 5 : auto &thisStmEqInput = steamEqObjects(stmEqInputNum);
2161 10 : for (int Item1 = 1; Item1 <= thisStmEqInput.numOfSpaces; ++Item1) {
2162 5 : ++stmEqNum;
2163 5 : auto &thisZoneStmEq = state.dataHeatBal->ZoneSteamEq(stmEqNum);
2164 5 : int const spaceNum = thisStmEqInput.spaceNums(Item1);
2165 5 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
2166 5 : thisZoneStmEq.Name = thisStmEqInput.names(Item1);
2167 5 : thisZoneStmEq.spaceIndex = spaceNum;
2168 5 : thisZoneStmEq.ZonePtr = zoneNum;
2169 :
2170 5 : thisZoneStmEq.SchedPtr = GetScheduleIndex(state, IHGAlphas(3));
2171 5 : SchMin = 0.0;
2172 5 : SchMax = 0.0;
2173 5 : if (thisZoneStmEq.SchedPtr == 0) {
2174 0 : if (IHGAlphaFieldBlanks(3)) {
2175 0 : ShowSevereError(state,
2176 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + thisStmEqInput.Name + "\", " +
2177 0 : IHGAlphaFieldNames(3) + " is required.");
2178 : } else {
2179 0 : ShowSevereError(state,
2180 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + thisStmEqInput.Name + "\", invalid " +
2181 0 : IHGAlphaFieldNames(3) + " entered=" + IHGAlphas(3));
2182 : }
2183 0 : ErrorsFound = true;
2184 : } else { // check min/max on schedule
2185 5 : SchMin = GetScheduleMinValue(state, thisZoneStmEq.SchedPtr);
2186 5 : SchMax = GetScheduleMaxValue(state, thisZoneStmEq.SchedPtr);
2187 5 : if (SchMin < 0.0 || SchMax < 0.0) {
2188 0 : if (SchMin < 0.0) {
2189 0 : ShowSevereError(state,
2190 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + thisStmEqInput.Name + "\", " +
2191 0 : IHGAlphaFieldNames(3) + ", minimum is < 0.0");
2192 0 : ShowContinueError(state,
2193 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMin));
2194 0 : ErrorsFound = true;
2195 : }
2196 0 : if (SchMax < 0.0) {
2197 0 : ShowSevereError(state,
2198 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + thisStmEqInput.Name + "\", " +
2199 0 : IHGAlphaFieldNames(3) + ", maximum is < 0.0");
2200 0 : ShowContinueError(state,
2201 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMax));
2202 0 : ErrorsFound = true;
2203 : }
2204 : }
2205 : }
2206 :
2207 : // Steam equipment design level calculation method.
2208 : {
2209 10 : auto const equipmentLevel(IHGAlphas(4));
2210 5 : if (equipmentLevel == "EQUIPMENTLEVEL") {
2211 5 : Real64 spaceFrac = 1.0;
2212 5 : if (thisStmEqInput.numOfSpaces > 1) {
2213 0 : Real64 const zoneArea = state.dataHeatBal->Zone(zoneNum).FloorArea;
2214 0 : if (zoneArea > 0.0) {
2215 0 : spaceFrac = state.dataHeatBal->space(spaceNum).floorArea / zoneArea;
2216 : } else {
2217 0 : ShowSevereError(
2218 0 : state, std::string(RoutineName) + "Zone floor area is zero when allocating SteamEquipment loads to Spaces.");
2219 0 : ShowContinueError(state,
2220 0 : "Occurs for SteamEquipment object =" + thisStmEqInput.Name +
2221 0 : " in Zone=" + state.dataHeatBal->Zone(zoneNum).Name);
2222 0 : ErrorsFound = true;
2223 : }
2224 : }
2225 5 : thisZoneStmEq.DesignLevel = IHGNumbers(1) * spaceFrac;
2226 5 : if (IHGNumericFieldBlanks(1)) {
2227 0 : ShowWarningError(state,
2228 0 : std::string{RoutineName} + hwEqModuleObject + "=\"" + thisStmEqInput.Name + "\", specifies " +
2229 0 : IHGNumericFieldNames(1) + ", but that field is blank. 0 Steam Equipment will result.");
2230 : }
2231 0 : } else if (equipmentLevel == "WATTS/AREA" || equipmentLevel == "POWER/AREA") {
2232 0 : if (spaceNum > 0) {
2233 0 : if (IHGNumbers(2) >= 0.0) {
2234 0 : thisZoneStmEq.DesignLevel = IHGNumbers(2) * state.dataHeatBal->space(spaceNum).floorArea;
2235 0 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) &&
2236 0 : !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
2237 0 : ShowWarningError(state,
2238 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + thisZoneStmEq.Name +
2239 0 : "\", specifies " + IHGNumericFieldNames(2) +
2240 : ", but Space Floor Area = 0. 0 Steam Equipment will result.");
2241 : }
2242 : } else {
2243 0 : ShowSevereError(state,
2244 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
2245 : RoutineName,
2246 : stmEqModuleObject,
2247 : IHGAlphas(1),
2248 : IHGNumericFieldNames(2),
2249 0 : IHGNumbers(2)));
2250 0 : ErrorsFound = true;
2251 : }
2252 : }
2253 0 : if (IHGNumericFieldBlanks(2)) {
2254 0 : ShowWarningError(state,
2255 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + thisStmEqInput.Name + "\", specifies " +
2256 0 : IHGNumericFieldNames(2) + ", but that field is blank. 0 Steam Equipment will result.");
2257 : }
2258 :
2259 0 : } else if (equipmentLevel == "WATTS/PERSON" || equipmentLevel == "POWER/PERSON") {
2260 0 : if (spaceNum != 0) {
2261 0 : if (IHGNumbers(3) >= 0.0) {
2262 0 : thisZoneStmEq.DesignLevel = IHGNumbers(3) * state.dataHeatBal->space(spaceNum).totOccupants;
2263 0 : if (state.dataHeatBal->space(spaceNum).totOccupants <= 0.0) {
2264 0 : ShowWarningError(state,
2265 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + thisZoneStmEq.Name +
2266 0 : "\", specifies " + IHGNumericFieldNames(2) +
2267 : ", but Total Occupants = 0. 0 Steam Equipment will result.");
2268 : }
2269 : } else {
2270 0 : ShowSevereError(state,
2271 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
2272 : RoutineName,
2273 : stmEqModuleObject,
2274 : IHGAlphas(1),
2275 : IHGNumericFieldNames(3),
2276 0 : IHGNumbers(3)));
2277 0 : ErrorsFound = true;
2278 : }
2279 : }
2280 0 : if (IHGNumericFieldBlanks(3)) {
2281 0 : ShowWarningError(state,
2282 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
2283 0 : IHGNumericFieldNames(3) + ", but that field is blank. 0 Steam Equipment will result.");
2284 : }
2285 :
2286 : } else {
2287 0 : if (Item1 == 1) {
2288 0 : ShowSevereError(state,
2289 0 : std::string{RoutineName} + stmEqModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
2290 0 : IHGAlphaFieldNames(4) + ", value =" + IHGAlphas(4));
2291 0 : ShowContinueError(state, "...Valid values are \"EquipmentLevel\", \"Watts/Area\", \"Watts/Person\".");
2292 0 : ErrorsFound = true;
2293 : }
2294 : }
2295 : }
2296 :
2297 : // Calculate nominal min/max equipment level
2298 5 : thisZoneStmEq.NomMinDesignLevel = thisZoneStmEq.DesignLevel * SchMin;
2299 5 : thisZoneStmEq.NomMaxDesignLevel = thisZoneStmEq.DesignLevel * SchMax;
2300 :
2301 5 : thisZoneStmEq.FractionLatent = IHGNumbers(4);
2302 5 : thisZoneStmEq.FractionRadiant = IHGNumbers(5);
2303 5 : thisZoneStmEq.FractionLost = IHGNumbers(6);
2304 : // FractionConvected is a calculated field
2305 5 : thisZoneStmEq.FractionConvected =
2306 5 : 1.0 - (thisZoneStmEq.FractionLatent + thisZoneStmEq.FractionRadiant + thisZoneStmEq.FractionLost);
2307 5 : if (std::abs(thisZoneStmEq.FractionConvected) <= 0.001) thisZoneStmEq.FractionConvected = 0.0;
2308 5 : if (thisZoneStmEq.FractionConvected < 0.0) {
2309 0 : ShowSevereError(state, std::string{RoutineName} + stmEqModuleObject + "=\"" + IHGAlphas(1) + "\", Sum of Fractions > 1.0");
2310 0 : ErrorsFound = true;
2311 : }
2312 :
2313 5 : if (IHGNumAlphas > 4) {
2314 5 : thisZoneStmEq.EndUseSubcategory = IHGAlphas(5);
2315 : } else {
2316 0 : thisZoneStmEq.EndUseSubcategory = "General";
2317 : }
2318 :
2319 5 : if (thisZoneStmEq.ZonePtr <= 0) continue; // Error, will be caught and terminated later
2320 :
2321 5 : if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
2322 0 : SetupEMSActuator(state,
2323 : "SteamEquipment",
2324 : thisZoneStmEq.Name,
2325 : "District Heating Power Level",
2326 : "[W]",
2327 : thisZoneStmEq.EMSZoneEquipOverrideOn,
2328 0 : thisZoneStmEq.EMSEquipPower);
2329 0 : SetupEMSInternalVariable(
2330 0 : state, "Process Steam District Heat Design Level", thisZoneStmEq.Name, "[W]", thisZoneStmEq.DesignLevel);
2331 : } // EMS
2332 :
2333 5 : if (!ErrorsFound)
2334 5 : SetupSpaceInternalGain(state,
2335 : thisZoneStmEq.spaceIndex,
2336 : 1.0,
2337 : thisZoneStmEq.Name,
2338 : DataHeatBalance::IntGainType::SteamEquipment,
2339 : &thisZoneStmEq.ConGainRate,
2340 : nullptr,
2341 : &thisZoneStmEq.RadGainRate,
2342 : &thisZoneStmEq.LatGainRate);
2343 :
2344 : } // for stmEqInputNum.NumOfSpaces
2345 : } // for stmEqInputNum
2346 : } // TotStmEquip > 0
2347 :
2348 : // OtherEquipment
2349 1542 : EPVector<InternalHeatGains::GlobalInternalGainMiscObject> otherEqObjects;
2350 771 : int numOtherEqStatements = 0;
2351 771 : setupIHGZonesAndSpaces(state, othEqModuleObject, otherEqObjects, numOtherEqStatements, state.dataHeatBal->TotOthEquip, ErrorsFound);
2352 :
2353 771 : if (state.dataHeatBal->TotOthEquip > 0) {
2354 28 : state.dataHeatBal->ZoneOtherEq.allocate(state.dataHeatBal->TotOthEquip);
2355 28 : int othEqNum = 0;
2356 92 : for (int othEqInputNum = 1; othEqInputNum <= numOtherEqStatements; ++othEqInputNum) {
2357 :
2358 64 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
2359 : othEqModuleObject,
2360 : othEqInputNum,
2361 : IHGAlphas,
2362 : IHGNumAlphas,
2363 : IHGNumbers,
2364 : IHGNumNumbers,
2365 : IOStat,
2366 : IHGNumericFieldBlanks,
2367 : IHGAlphaFieldBlanks,
2368 : IHGAlphaFieldNames,
2369 : IHGNumericFieldNames);
2370 :
2371 64 : auto &thisOthEqInput = otherEqObjects(othEqInputNum);
2372 128 : for (int Item1 = 1; Item1 <= thisOthEqInput.numOfSpaces; ++Item1) {
2373 64 : ++othEqNum;
2374 64 : auto &thisZoneOthEq = state.dataHeatBal->ZoneOtherEq(othEqNum);
2375 64 : int const spaceNum = thisOthEqInput.spaceNums(Item1);
2376 64 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
2377 64 : thisZoneOthEq.Name = thisOthEqInput.names(Item1);
2378 64 : thisZoneOthEq.spaceIndex = spaceNum;
2379 64 : thisZoneOthEq.ZonePtr = zoneNum;
2380 :
2381 128 : std::string FuelTypeString("");
2382 64 : if (IHGAlphas(2) == "NONE") {
2383 62 : thisZoneOthEq.OtherEquipFuelType = ExteriorEnergyUse::ExteriorFuelUsage::Invalid;
2384 62 : FuelTypeString = IHGAlphas(2);
2385 : } else {
2386 2 : ExteriorEnergyUse::ValidateFuelType(state,
2387 : thisZoneOthEq.OtherEquipFuelType,
2388 2 : IHGAlphas(2),
2389 : FuelTypeString,
2390 : othEqModuleObject,
2391 2 : IHGAlphaFieldNames(2),
2392 2 : IHGAlphas(2));
2393 4 : if (thisZoneOthEq.OtherEquipFuelType == ExteriorEnergyUse::ExteriorFuelUsage::Invalid ||
2394 2 : thisZoneOthEq.OtherEquipFuelType == ExteriorEnergyUse::ExteriorFuelUsage::WaterUse) {
2395 0 : ShowSevereError(state,
2396 0 : std::string{RoutineName} + othEqModuleObject + ": invalid " + IHGAlphaFieldNames(2) +
2397 0 : " entered=" + IHGAlphas(2) + " for " + IHGAlphaFieldNames(1) + '=' + thisOthEqInput.Name);
2398 0 : ErrorsFound = true;
2399 : }
2400 2 : thisZoneOthEq.otherEquipFuelTypeString = FuelTypeString; // Save for output variable setup later
2401 : // Build list of fuel types used in each zone and space (excluding None and Water)
2402 2 : bool found = false;
2403 2 : for (auto fuelType : state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNums) {
2404 0 : if (thisZoneOthEq.OtherEquipFuelType == fuelType) {
2405 0 : found = true;
2406 0 : break;
2407 : }
2408 : }
2409 2 : if (!found) {
2410 2 : state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNums.emplace_back(thisZoneOthEq.OtherEquipFuelType);
2411 2 : state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNames.emplace_back(FuelTypeString);
2412 : }
2413 2 : found = false;
2414 2 : for (auto fuelType : state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNums) {
2415 0 : if (thisZoneOthEq.OtherEquipFuelType == fuelType) {
2416 0 : found = true;
2417 0 : break;
2418 : }
2419 : }
2420 2 : if (!found) {
2421 2 : state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNums.emplace_back(thisZoneOthEq.OtherEquipFuelType);
2422 2 : state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNames.emplace_back(FuelTypeString);
2423 : }
2424 : }
2425 :
2426 64 : thisZoneOthEq.SchedPtr = GetScheduleIndex(state, IHGAlphas(4));
2427 64 : SchMin = 0.0;
2428 64 : SchMax = 0.0;
2429 64 : if (thisZoneOthEq.SchedPtr == 0) {
2430 0 : if (IHGAlphaFieldBlanks(4)) {
2431 0 : ShowSevereError(state,
2432 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisOthEqInput.Name + "\", " +
2433 0 : IHGAlphaFieldNames(4) + " is required.");
2434 : } else {
2435 0 : ShowSevereError(state,
2436 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisOthEqInput.Name + "\", invalid " +
2437 0 : IHGAlphaFieldNames(4) + " entered=" + IHGAlphas(4));
2438 : }
2439 0 : ErrorsFound = true;
2440 : } else { // check min/max on schedule
2441 64 : SchMin = GetScheduleMinValue(state, thisZoneOthEq.SchedPtr);
2442 64 : SchMax = GetScheduleMaxValue(state, thisZoneOthEq.SchedPtr);
2443 : }
2444 :
2445 : // equipment design level calculation method.
2446 : unsigned int DesignLevelFieldNumber;
2447 : {
2448 128 : auto const equipmentLevel(IHGAlphas(5));
2449 64 : if (equipmentLevel == "EQUIPMENTLEVEL") {
2450 64 : DesignLevelFieldNumber = 1;
2451 64 : Real64 spaceFrac = 1.0;
2452 64 : if (thisOthEqInput.numOfSpaces > 1) {
2453 0 : Real64 const zoneArea = state.dataHeatBal->Zone(zoneNum).FloorArea;
2454 0 : if (zoneArea > 0.0) {
2455 0 : spaceFrac = state.dataHeatBal->space(spaceNum).floorArea / zoneArea;
2456 : } else {
2457 0 : ShowSevereError(
2458 0 : state, std::string(RoutineName) + "Zone floor area is zero when allocating OtherEquipment loads to Spaces.");
2459 0 : ShowContinueError(state,
2460 0 : "Occurs for OtherEquipment object =" + thisOthEqInput.Name +
2461 0 : " in Zone=" + state.dataHeatBal->Zone(zoneNum).Name);
2462 0 : ErrorsFound = true;
2463 : }
2464 : }
2465 64 : thisZoneOthEq.DesignLevel = IHGNumbers(1) * spaceFrac;
2466 64 : if (IHGNumericFieldBlanks(DesignLevelFieldNumber)) {
2467 0 : ShowWarningError(state,
2468 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisOthEqInput.Name + "\", specifies " +
2469 0 : IHGNumericFieldNames(DesignLevelFieldNumber) +
2470 : ", but that field is blank. 0 Other Equipment will result.");
2471 : }
2472 :
2473 0 : } else if (equipmentLevel == "WATTS/AREA" || equipmentLevel == "POWER/AREA") {
2474 0 : DesignLevelFieldNumber = 2;
2475 0 : if (spaceNum > 0) {
2476 0 : thisZoneOthEq.DesignLevel = IHGNumbers(DesignLevelFieldNumber) * state.dataHeatBal->space(spaceNum).floorArea;
2477 0 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) && !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
2478 0 : ShowWarningError(state,
2479 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisZoneOthEq.Name + "\", specifies " +
2480 0 : IHGNumericFieldNames(DesignLevelFieldNumber) +
2481 : ", but Space Floor Area = 0. 0 Other Equipment will result.");
2482 : }
2483 : }
2484 0 : if (IHGNumericFieldBlanks(DesignLevelFieldNumber)) {
2485 0 : ShowWarningError(state,
2486 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
2487 0 : IHGNumericFieldNames(DesignLevelFieldNumber) +
2488 : ", but that field is blank. 0 Other Equipment will result.");
2489 : }
2490 :
2491 0 : } else if (equipmentLevel == "WATTS/PERSON" || equipmentLevel == "POWER/PERSON") {
2492 0 : DesignLevelFieldNumber = 3;
2493 0 : if (thisZoneOthEq.ZonePtr != 0) {
2494 0 : thisZoneOthEq.DesignLevel = IHGNumbers(3) * state.dataHeatBal->Zone(thisZoneOthEq.ZonePtr).TotOccupants;
2495 0 : if (state.dataHeatBal->Zone(thisZoneOthEq.ZonePtr).TotOccupants <= 0.0) {
2496 0 : ShowWarningError(state,
2497 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisZoneOthEq.Name + "\", specifies " +
2498 0 : IHGNumericFieldNames(DesignLevelFieldNumber) +
2499 : ", but Total Occupants = 0. 0 Other Equipment will result.");
2500 : }
2501 : }
2502 0 : if (IHGNumericFieldBlanks(DesignLevelFieldNumber)) {
2503 0 : ShowWarningError(state,
2504 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisOthEqInput.Name + "\", specifies " +
2505 0 : IHGNumericFieldNames(DesignLevelFieldNumber) +
2506 : ", but that field is blank. 0 Other Equipment will result.");
2507 : }
2508 :
2509 : } else {
2510 0 : if (Item1 == 1) {
2511 0 : ShowSevereError(state,
2512 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisOthEqInput.Name + "\", invalid " +
2513 0 : IHGAlphaFieldNames(5) + ", value =" + IHGAlphas(5));
2514 0 : ShowContinueError(state, "...Valid values are \"EquipmentLevel\", \"Watts/Area\", \"Watts/Person\".");
2515 0 : ErrorsFound = true;
2516 : }
2517 : }
2518 : }
2519 :
2520 : // Throw an error if the design level is negative and we have a fuel type
2521 64 : if (thisZoneOthEq.DesignLevel < 0.0 && thisZoneOthEq.OtherEquipFuelType != ExteriorEnergyUse::ExteriorFuelUsage::Invalid) {
2522 0 : ShowSevereError(state,
2523 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisOthEqInput.Name + "\", " +
2524 0 : IHGNumericFieldNames(DesignLevelFieldNumber) + " is not allowed to be negative");
2525 0 : ShowContinueError(state, "... when a fuel type of " + FuelTypeString + " is specified.");
2526 0 : ErrorsFound = true;
2527 : }
2528 :
2529 : // Calculate nominal min/max equipment level
2530 64 : thisZoneOthEq.NomMinDesignLevel = thisZoneOthEq.DesignLevel * SchMin;
2531 64 : thisZoneOthEq.NomMaxDesignLevel = thisZoneOthEq.DesignLevel * SchMax;
2532 :
2533 64 : thisZoneOthEq.FractionLatent = IHGNumbers(4);
2534 64 : thisZoneOthEq.FractionRadiant = IHGNumbers(5);
2535 64 : thisZoneOthEq.FractionLost = IHGNumbers(6);
2536 :
2537 64 : if ((IHGNumNumbers == 7) || (!IHGNumericFieldBlanks(7))) {
2538 15 : thisZoneOthEq.CO2RateFactor = IHGNumbers(7);
2539 : }
2540 64 : if (thisZoneOthEq.CO2RateFactor < 0.0) {
2541 0 : ShowSevereError(state,
2542 0 : format("{}{}=\"{}\", {} < 0.0, value ={:.2R}",
2543 : RoutineName,
2544 : othEqModuleObject,
2545 : thisOthEqInput.Name,
2546 : IHGNumericFieldNames(7),
2547 0 : IHGNumbers(7)));
2548 0 : ErrorsFound = true;
2549 : }
2550 64 : if (thisZoneOthEq.CO2RateFactor > 4.0e-7) {
2551 0 : ShowSevereError(state,
2552 0 : format("{}{}=\"{}\", {} > 4.0E-7, value ={:.2R}",
2553 : RoutineName,
2554 : othEqModuleObject,
2555 : thisOthEqInput.Name,
2556 : IHGNumericFieldNames(7),
2557 0 : IHGNumbers(7)));
2558 0 : ErrorsFound = true;
2559 : }
2560 :
2561 : // FractionConvected is a calculated field
2562 64 : thisZoneOthEq.FractionConvected =
2563 64 : 1.0 - (thisZoneOthEq.FractionLatent + thisZoneOthEq.FractionRadiant + thisZoneOthEq.FractionLost);
2564 64 : if (std::abs(thisZoneOthEq.FractionConvected) <= 0.001) thisZoneOthEq.FractionConvected = 0.0;
2565 64 : if (thisZoneOthEq.FractionConvected < 0.0) {
2566 0 : ShowSevereError(state,
2567 0 : std::string{RoutineName} + othEqModuleObject + "=\"" + thisOthEqInput.Name + "\", Sum of Fractions > 1.0");
2568 0 : ErrorsFound = true;
2569 : }
2570 :
2571 64 : if (IHGNumAlphas > 5) {
2572 15 : thisZoneOthEq.EndUseSubcategory = IHGAlphas(6);
2573 : } else {
2574 49 : thisZoneOthEq.EndUseSubcategory = "General";
2575 : }
2576 :
2577 64 : if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
2578 51 : SetupEMSActuator(state,
2579 : "OtherEquipment",
2580 : thisZoneOthEq.Name,
2581 : "Power Level",
2582 : "[W]",
2583 : thisZoneOthEq.EMSZoneEquipOverrideOn,
2584 34 : thisZoneOthEq.EMSEquipPower);
2585 17 : SetupEMSInternalVariable(state, "Other Equipment Design Level", thisZoneOthEq.Name, "[W]", thisZoneOthEq.DesignLevel);
2586 : } // EMS
2587 :
2588 64 : if (!ErrorsFound)
2589 64 : SetupSpaceInternalGain(state,
2590 : thisZoneOthEq.spaceIndex,
2591 : 1.0,
2592 : thisZoneOthEq.Name,
2593 : DataHeatBalance::IntGainType::OtherEquipment,
2594 : &thisZoneOthEq.ConGainRate,
2595 : nullptr,
2596 : &thisZoneOthEq.RadGainRate,
2597 : &thisZoneOthEq.LatGainRate);
2598 :
2599 : } // for othEqInputNum.NumOfSpaces
2600 : } // for othEqInputNum
2601 : } // TotOtherEquip > 0
2602 :
2603 : // ElectricEquipment:ITE:AirCooled
2604 1542 : EPVector<InternalHeatGains::GlobalInternalGainMiscObject> iTEqObjects;
2605 771 : int numZoneITEqStatements = 0;
2606 : // Note that this object type does not support ZoneList due to node names in input fields
2607 771 : bool zoneListNotAllowed = true;
2608 1542 : setupIHGZonesAndSpaces(
2609 771 : state, itEqModuleObject, iTEqObjects, numZoneITEqStatements, state.dataHeatBal->TotITEquip, ErrorsFound, zoneListNotAllowed);
2610 :
2611 771 : if (state.dataHeatBal->TotITEquip > 0) {
2612 5 : state.dataHeatBal->ZoneITEq.allocate(state.dataHeatBal->TotITEquip);
2613 5 : int itEqNum = 0;
2614 12 : for (int itEqInputNum = 1; itEqInputNum <= numZoneITEqStatements; ++itEqInputNum) {
2615 :
2616 7 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
2617 : itEqModuleObject,
2618 : itEqInputNum,
2619 : IHGAlphas,
2620 : IHGNumAlphas,
2621 : IHGNumbers,
2622 : IHGNumNumbers,
2623 : IOStat,
2624 : IHGNumericFieldBlanks,
2625 : IHGAlphaFieldBlanks,
2626 : IHGAlphaFieldNames,
2627 : IHGNumericFieldNames);
2628 :
2629 7 : auto &thisITEqInput = iTEqObjects(itEqInputNum);
2630 14 : for (int Item1 = 1; Item1 <= thisITEqInput.numOfSpaces; ++Item1) {
2631 7 : ++itEqNum;
2632 7 : auto &thisZoneITEq = state.dataHeatBal->ZoneITEq(itEqNum);
2633 7 : int const spaceNum = thisITEqInput.spaceNums(Item1);
2634 7 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
2635 7 : thisZoneITEq.Name = thisITEqInput.names(Item1);
2636 7 : thisZoneITEq.spaceIndex = spaceNum;
2637 7 : thisZoneITEq.ZonePtr = zoneNum;
2638 :
2639 : // IT equipment design level calculation method.
2640 7 : if (IHGAlphaFieldBlanks(3)) {
2641 0 : thisZoneITEq.FlowControlWithApproachTemps = false;
2642 : } else {
2643 7 : if (UtilityRoutines::SameString(IHGAlphas(3), "FlowFromSystem")) {
2644 3 : thisZoneITEq.FlowControlWithApproachTemps = false;
2645 4 : } else if (UtilityRoutines::SameString(IHGAlphas(3), "FlowControlWithApproachTemperatures")) {
2646 4 : thisZoneITEq.FlowControlWithApproachTemps = true;
2647 4 : state.dataHeatBal->Zone(thisZoneITEq.ZonePtr).HasAdjustedReturnTempByITE = true;
2648 4 : state.dataHeatBal->Zone(thisZoneITEq.ZonePtr).NoHeatToReturnAir = false;
2649 : } else {
2650 0 : ShowSevereError(state,
2651 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) +
2652 0 : "\": invalid calculation method: " + IHGAlphas(3));
2653 0 : ErrorsFound = true;
2654 : }
2655 : }
2656 :
2657 : {
2658 14 : auto const equipmentLevel(IHGAlphas(4));
2659 7 : if (equipmentLevel == "WATTS/UNIT") {
2660 3 : Real64 spaceFrac = 1.0;
2661 3 : if (thisITEqInput.numOfSpaces > 1) {
2662 0 : Real64 const zoneArea = state.dataHeatBal->Zone(zoneNum).FloorArea;
2663 0 : if (zoneArea > 0.0) {
2664 0 : spaceFrac = state.dataHeatBal->space(spaceNum).floorArea / zoneArea;
2665 : } else {
2666 0 : ShowSevereError(state,
2667 0 : std::string(RoutineName) +
2668 : "Zone floor area is zero when allocating ElectricEquipment:ITE:AirCooled loads to Spaces.");
2669 0 : ShowContinueError(state,
2670 0 : "Occurs for ElectricEquipment:ITE:AirCooled object =" + thisITEqInput.Name +
2671 0 : " in Zone=" + state.dataHeatBal->Zone(zoneNum).Name);
2672 0 : ErrorsFound = true;
2673 : }
2674 : }
2675 3 : thisZoneITEq.DesignTotalPower = IHGNumbers(1) * IHGNumbers(2) * spaceFrac;
2676 3 : if (IHGNumericFieldBlanks(1)) {
2677 0 : ShowWarningError(state,
2678 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
2679 0 : IHGNumericFieldNames(1) + ", but that field is blank. 0 IT Equipment will result.");
2680 : }
2681 3 : if (IHGNumericFieldBlanks(2)) {
2682 0 : ShowWarningError(state,
2683 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
2684 0 : IHGNumericFieldNames(2) + ", but that field is blank. 0 IT Equipment will result.");
2685 : }
2686 :
2687 4 : } else if (equipmentLevel == "WATTS/AREA") {
2688 4 : if (thisZoneITEq.ZonePtr != 0) {
2689 4 : if (IHGNumbers(3) >= 0.0) {
2690 4 : if (spaceNum > 0) {
2691 4 : thisZoneITEq.DesignTotalPower = IHGNumbers(3) * state.dataHeatBal->space(spaceNum).floorArea;
2692 4 : if ((state.dataHeatBal->space(spaceNum).floorArea <= 0.0) &&
2693 0 : !state.dataHeatBal->space(spaceNum).isRemainderSpace) {
2694 0 : ShowWarningError(state,
2695 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
2696 0 : IHGNumericFieldNames(3) +
2697 : ", but Space Floor Area = 0. 0 IT Equipment will result.");
2698 : }
2699 : } else {
2700 0 : ShowSevereError(state,
2701 0 : format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}",
2702 : RoutineName,
2703 : itEqModuleObject,
2704 : IHGAlphas(1),
2705 : IHGNumericFieldNames(3),
2706 0 : IHGNumbers(3)));
2707 0 : ErrorsFound = true;
2708 : }
2709 : }
2710 4 : if (IHGNumericFieldBlanks(3)) {
2711 0 : ShowWarningError(state,
2712 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", specifies " +
2713 0 : IHGNumericFieldNames(3) + ", but that field is blank. 0 IT Equipment will result.");
2714 : }
2715 :
2716 : } else {
2717 0 : ShowSevereError(state,
2718 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
2719 0 : IHGAlphaFieldNames(4) + ", value =" + IHGAlphas(4));
2720 0 : ShowContinueError(state, "...Valid values are \"Watts/Unit\" or \"Watts/Area\".");
2721 0 : ErrorsFound = true;
2722 : }
2723 : }
2724 :
2725 7 : if (IHGAlphaFieldBlanks(5)) {
2726 0 : thisZoneITEq.OperSchedPtr = DataGlobalConstants::ScheduleAlwaysOn;
2727 : } else {
2728 7 : thisZoneITEq.OperSchedPtr = GetScheduleIndex(state, IHGAlphas(5));
2729 : }
2730 7 : SchMin = 0.0;
2731 7 : SchMax = 0.0;
2732 7 : if (thisZoneITEq.OperSchedPtr == 0) {
2733 0 : ShowSevereError(state,
2734 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
2735 0 : IHGAlphaFieldNames(5) + " entered=" + IHGAlphas(5));
2736 0 : ErrorsFound = true;
2737 : } else { // check min/max on schedule
2738 7 : SchMin = GetScheduleMinValue(state, thisZoneITEq.OperSchedPtr);
2739 7 : SchMax = GetScheduleMaxValue(state, thisZoneITEq.OperSchedPtr);
2740 7 : if (SchMin < 0.0 || SchMax < 0.0) {
2741 0 : if (SchMin < 0.0) {
2742 0 : ShowSevereError(state,
2743 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", " +
2744 0 : IHGAlphaFieldNames(5) + ", minimum is < 0.0");
2745 0 : ShowContinueError(state,
2746 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(5), SchMin));
2747 0 : ErrorsFound = true;
2748 : }
2749 0 : if (SchMax < 0.0) {
2750 0 : ShowSevereError(state,
2751 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", " +
2752 0 : IHGAlphaFieldNames(5) + ", maximum is < 0.0");
2753 0 : ShowContinueError(state,
2754 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(5), SchMax));
2755 0 : ErrorsFound = true;
2756 : }
2757 : }
2758 : }
2759 :
2760 7 : if (IHGAlphaFieldBlanks(6)) {
2761 0 : thisZoneITEq.CPULoadSchedPtr = DataGlobalConstants::ScheduleAlwaysOn;
2762 : } else {
2763 7 : thisZoneITEq.CPULoadSchedPtr = GetScheduleIndex(state, IHGAlphas(6));
2764 : }
2765 7 : SchMin = 0.0;
2766 7 : SchMax = 0.0;
2767 7 : if (thisZoneITEq.CPULoadSchedPtr == 0) {
2768 0 : ShowSevereError(state,
2769 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
2770 0 : IHGAlphaFieldNames(6) + " entered=" + IHGAlphas(6));
2771 0 : ErrorsFound = true;
2772 : } else { // check min/max on schedule
2773 7 : SchMin = GetScheduleMinValue(state, thisZoneITEq.CPULoadSchedPtr);
2774 7 : SchMax = GetScheduleMaxValue(state, thisZoneITEq.CPULoadSchedPtr);
2775 7 : if (SchMin < 0.0 || SchMax < 0.0) {
2776 0 : if (SchMin < 0.0) {
2777 0 : ShowSevereError(state,
2778 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", " +
2779 0 : IHGAlphaFieldNames(6) + ", minimum is < 0.0");
2780 0 : ShowContinueError(state,
2781 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(6), SchMin));
2782 0 : ErrorsFound = true;
2783 : }
2784 0 : if (SchMax < 0.0) {
2785 0 : ShowSevereError(state,
2786 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", " +
2787 0 : IHGAlphaFieldNames(6) + ", maximum is < 0.0");
2788 0 : ShowContinueError(state,
2789 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(6), SchMax));
2790 0 : ErrorsFound = true;
2791 : }
2792 : }
2793 : }
2794 :
2795 : // Calculate nominal min/max equipment level
2796 7 : thisZoneITEq.NomMinDesignLevel = thisZoneITEq.DesignTotalPower * SchMin;
2797 7 : thisZoneITEq.NomMaxDesignLevel = thisZoneITEq.DesignTotalPower * SchMax;
2798 :
2799 7 : thisZoneITEq.DesignFanPowerFrac = IHGNumbers(4);
2800 7 : thisZoneITEq.DesignFanPower = thisZoneITEq.DesignFanPowerFrac * thisZoneITEq.DesignTotalPower;
2801 7 : thisZoneITEq.DesignCPUPower = (1.0 - thisZoneITEq.DesignFanPowerFrac) * thisZoneITEq.DesignTotalPower;
2802 7 : thisZoneITEq.DesignAirVolFlowRate = IHGNumbers(5) * thisZoneITEq.DesignTotalPower;
2803 7 : thisZoneITEq.DesignTAirIn = IHGNumbers(6);
2804 7 : thisZoneITEq.DesignRecircFrac = IHGNumbers(7);
2805 7 : thisZoneITEq.DesignUPSEfficiency = IHGNumbers(8);
2806 7 : thisZoneITEq.UPSLossToZoneFrac = IHGNumbers(9);
2807 7 : thisZoneITEq.SupplyApproachTemp = IHGNumbers(10);
2808 7 : thisZoneITEq.ReturnApproachTemp = IHGNumbers(11);
2809 :
2810 7 : bool hasSupplyApproachTemp = !IHGNumericFieldBlanks(10);
2811 7 : bool hasReturnApproachTemp = !IHGNumericFieldBlanks(11);
2812 :
2813 : // Performance curves
2814 7 : thisZoneITEq.CPUPowerFLTCurve = GetCurveIndex(state, IHGAlphas(7));
2815 7 : if (thisZoneITEq.CPUPowerFLTCurve == 0) {
2816 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + " \"" + IHGAlphas(1) + "\"");
2817 0 : ShowContinueError(state, "Invalid " + IHGAlphaFieldNames(7) + '=' + IHGAlphas(7));
2818 0 : ErrorsFound = true;
2819 : }
2820 :
2821 7 : thisZoneITEq.AirFlowFLTCurve = GetCurveIndex(state, IHGAlphas(8));
2822 7 : if (thisZoneITEq.AirFlowFLTCurve == 0) {
2823 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + " \"" + IHGAlphas(1) + "\"");
2824 0 : ShowContinueError(state, "Invalid " + IHGAlphaFieldNames(8) + '=' + IHGAlphas(8));
2825 0 : ErrorsFound = true;
2826 : }
2827 :
2828 7 : thisZoneITEq.FanPowerFFCurve = GetCurveIndex(state, IHGAlphas(9));
2829 7 : if (thisZoneITEq.FanPowerFFCurve == 0) {
2830 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + " \"" + IHGAlphas(1) + "\"");
2831 0 : ShowContinueError(state, "Invalid " + IHGAlphaFieldNames(9) + '=' + IHGAlphas(9));
2832 0 : ErrorsFound = true;
2833 : }
2834 :
2835 7 : if (!IHGAlphaFieldBlanks(15)) {
2836 : // If this field isn't blank, it must point to a valid curve
2837 7 : thisZoneITEq.RecircFLTCurve = GetCurveIndex(state, IHGAlphas(15));
2838 7 : if (thisZoneITEq.RecircFLTCurve == 0) {
2839 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + " \"" + IHGAlphas(1) + "\"");
2840 0 : ShowContinueError(state, "Invalid " + IHGAlphaFieldNames(15) + '=' + IHGAlphas(15));
2841 0 : ErrorsFound = true;
2842 : }
2843 : } else {
2844 : // If this curve is left blank, then the curve is assumed to always equal 1.0.
2845 0 : thisZoneITEq.RecircFLTCurve = 0;
2846 : }
2847 :
2848 7 : if (!IHGAlphaFieldBlanks(16)) {
2849 : // If this field isn't blank, it must point to a valid curve
2850 7 : thisZoneITEq.UPSEfficFPLRCurve = GetCurveIndex(state, IHGAlphas(16));
2851 7 : if (thisZoneITEq.UPSEfficFPLRCurve == 0) {
2852 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + " \"" + IHGAlphas(1) + "\"");
2853 0 : ShowContinueError(state, "Invalid " + IHGAlphaFieldNames(16) + '=' + IHGAlphas(16));
2854 0 : ErrorsFound = true;
2855 : }
2856 : } else {
2857 : // If this curve is left blank, then the curve is assumed to always equal 1.0.
2858 0 : thisZoneITEq.UPSEfficFPLRCurve = 0;
2859 : }
2860 :
2861 : // Environmental class
2862 7 : thisZoneITEq.Class =
2863 14 : static_cast<ITEClass>(getEnumerationValue(ITEClassNamesUC, UtilityRoutines::MakeUPPERCase(IHGAlphas(10))));
2864 7 : ErrorsFound = ErrorsFound || (thisZoneITEq.Class == ITEClass::Invalid);
2865 :
2866 : // Air and supply inlet connections
2867 7 : thisZoneITEq.AirConnectionType = static_cast<ITEInletConnection>(
2868 14 : getEnumerationValue(ITEInletConnectionNamesUC, UtilityRoutines::MakeUPPERCase(IHGAlphas(11))));
2869 7 : if (thisZoneITEq.AirConnectionType == ITEInletConnection::RoomAirModel) {
2870 : // ZoneITEq(Loop).AirConnectionType = ITEInletConnection::RoomAirModel;
2871 0 : ShowWarningError(state,
2872 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) +
2873 : "Air Inlet Connection Type = RoomAirModel is not implemented yet, using ZoneAirNode");
2874 0 : thisZoneITEq.AirConnectionType = ITEInletConnection::ZoneAirNode;
2875 : }
2876 7 : ErrorsFound = ErrorsFound || (thisZoneITEq.AirConnectionType == ITEInletConnection::Invalid);
2877 :
2878 7 : if (IHGAlphaFieldBlanks(14)) {
2879 0 : if (thisZoneITEq.AirConnectionType == ITEInletConnection::AdjustedSupply) {
2880 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + ": " + IHGAlphas(1));
2881 0 : ShowContinueError(state,
2882 0 : "For " + IHGAlphaFieldNames(11) + "= AdjustedSupply, " + IHGAlphaFieldNames(14) +
2883 : " is required, but this field is blank.");
2884 0 : ErrorsFound = true;
2885 0 : } else if (thisZoneITEq.FlowControlWithApproachTemps) {
2886 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + ": " + IHGAlphas(1));
2887 0 : ShowContinueError(state,
2888 0 : "For " + IHGAlphaFieldNames(3) + "= FlowControlWithApproachTemperatures, " +
2889 0 : IHGAlphaFieldNames(14) + " is required, but this field is blank.");
2890 0 : ErrorsFound = true;
2891 : }
2892 : } else {
2893 7 : thisZoneITEq.SupplyAirNodeNum = GetOnlySingleNode(state,
2894 7 : IHGAlphas(14),
2895 : ErrorsFound,
2896 : DataLoopNode::ConnectionObjectType::ElectricEquipmentITEAirCooled,
2897 7 : IHGAlphas(1),
2898 : DataLoopNode::NodeFluidType::Air,
2899 : DataLoopNode::ConnectionType::Sensor,
2900 : NodeInputManager::CompFluidStream::Primary,
2901 7 : ObjectIsNotParent);
2902 : }
2903 :
2904 : // check supply air node for matches with zone equipment supply air node
2905 7 : int zoneEqIndex = DataZoneEquipment::GetControlledZoneIndex(state, state.dataHeatBal->Zone(thisZoneITEq.ZonePtr).Name);
2906 7 : if (zoneEqIndex > 0) { // zoneEqIndex could be zero in the case of an uncontrolled zone
2907 7 : auto itStart = state.dataZoneEquip->ZoneEquipConfig(zoneEqIndex).InletNode.begin();
2908 7 : auto itEnd = state.dataZoneEquip->ZoneEquipConfig(zoneEqIndex).InletNode.end();
2909 7 : auto key = thisZoneITEq.SupplyAirNodeNum;
2910 7 : thisZoneITEq.inControlledZone = true;
2911 7 : bool supplyNodeFound = false;
2912 7 : if (std::find(itStart, itEnd, key) != itEnd) {
2913 7 : supplyNodeFound = true;
2914 : }
2915 :
2916 7 : if (thisZoneITEq.AirConnectionType == ITEInletConnection::AdjustedSupply && !supplyNodeFound) {
2917 : // supply air node must match zone equipment supply air node for these conditions
2918 0 : ShowSevereError(state, std::string{RoutineName} + ": ElectricEquipment:ITE:AirCooled " + thisZoneITEq.Name);
2919 0 : ShowContinueError(state, "Air Inlet Connection Type = AdjustedSupply but no Supply Air Node is specified.");
2920 0 : ErrorsFound = true;
2921 7 : } else if (thisZoneITEq.FlowControlWithApproachTemps && !supplyNodeFound) {
2922 : // supply air node must match zone equipment supply air node for these conditions
2923 0 : ShowSevereError(state, std::string{RoutineName} + ": ElectricEquipment:ITE:AirCooled " + thisZoneITEq.Name);
2924 0 : ShowContinueError(state, "Air Inlet Connection Type = AdjustedSupply but no Supply Air Node is specified.");
2925 0 : ErrorsFound = true;
2926 7 : } else if (thisZoneITEq.SupplyAirNodeNum != 0 && !supplyNodeFound) {
2927 : // the given supply air node does not match any zone equipment supply air nodes
2928 0 : ShowWarningError(state,
2929 0 : itEqModuleObject + "name: '" + IHGAlphas(1) + ". " + "Supply Air Node Name '" + IHGAlphas(14) +
2930 : "' does not match any ZoneHVAC:EquipmentConnections objects.");
2931 : }
2932 : } // end of if block for zoneEqIndex > 0
2933 :
2934 : // End-Use subcategories
2935 7 : if (IHGNumAlphas > 16) {
2936 7 : thisZoneITEq.EndUseSubcategoryCPU = IHGAlphas(17);
2937 : } else {
2938 0 : thisZoneITEq.EndUseSubcategoryCPU = "ITE-CPU";
2939 : }
2940 :
2941 7 : if (IHGNumAlphas > 17) {
2942 7 : thisZoneITEq.EndUseSubcategoryFan = IHGAlphas(18);
2943 : } else {
2944 0 : thisZoneITEq.EndUseSubcategoryFan = "ITE-Fans";
2945 : }
2946 7 : if (thisZoneITEq.ZonePtr <= 0) continue; // Error, will be caught and terminated later
2947 :
2948 7 : if (IHGNumAlphas > 18) {
2949 7 : thisZoneITEq.EndUseSubcategoryUPS = IHGAlphas(19);
2950 : } else {
2951 0 : thisZoneITEq.EndUseSubcategoryUPS = "ITE-UPS";
2952 : }
2953 7 : if (thisZoneITEq.FlowControlWithApproachTemps) {
2954 4 : if (!IHGAlphaFieldBlanks(20)) {
2955 0 : thisZoneITEq.SupplyApproachTempSch = GetScheduleIndex(state, IHGAlphas(20));
2956 0 : if (thisZoneITEq.SupplyApproachTempSch == 0) {
2957 0 : ShowSevereError(state,
2958 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
2959 0 : IHGAlphaFieldNames(20) + " entered=" + IHGAlphas(20));
2960 0 : ErrorsFound = true;
2961 : }
2962 : } else {
2963 4 : if (!hasSupplyApproachTemp) {
2964 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + " \"" + IHGAlphas(1) + "\"");
2965 0 : ShowContinueError(state,
2966 0 : "For " + IHGAlphaFieldNames(3) + "= FlowControlWithApproachTemperatures, either " +
2967 0 : IHGNumericFieldNames(10) + " or " + IHGAlphaFieldNames(20) +
2968 : " is required, but both are left blank.");
2969 0 : ErrorsFound = true;
2970 : }
2971 : }
2972 :
2973 4 : if (!IHGAlphaFieldBlanks(21)) {
2974 0 : thisZoneITEq.ReturnApproachTempSch = GetScheduleIndex(state, IHGAlphas(21));
2975 0 : if (thisZoneITEq.ReturnApproachTempSch == 0) {
2976 0 : ShowSevereError(state,
2977 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " +
2978 0 : IHGAlphaFieldNames(20) + " entered=" + IHGAlphas(20));
2979 0 : ErrorsFound = true;
2980 : }
2981 : } else {
2982 4 : if (!hasReturnApproachTemp) {
2983 0 : ShowSevereError(state, std::string{RoutineName} + itEqModuleObject + " \"" + IHGAlphas(1) + "\"");
2984 0 : ShowContinueError(state,
2985 0 : "For " + IHGAlphaFieldNames(3) + "= FlowControlWithApproachTemperatures, either " +
2986 0 : IHGNumericFieldNames(11) + " or " + IHGAlphaFieldNames(21) +
2987 : " is required, but both are left blank.");
2988 0 : ErrorsFound = true;
2989 : }
2990 : }
2991 : }
2992 :
2993 7 : if (thisZoneITEq.FlowControlWithApproachTemps) {
2994 4 : Real64 TAirInSizing = 0.0;
2995 : // Set the TAirInSizing to the maximun setpoint value to do sizing based on the maximum fan and cpu power of the ite
2996 : // object
2997 4 : SetPointManager::GetSetPointManagerInputData(state, ErrorsFound);
2998 8 : for (int SetPtMgrNum = 1; SetPtMgrNum <= state.dataSetPointManager->NumSZClSetPtMgrs; ++SetPtMgrNum) {
2999 4 : if (state.dataSetPointManager->SingZoneClSetPtMgr(SetPtMgrNum).ControlZoneNum == zoneNum) {
3000 2 : TAirInSizing = state.dataSetPointManager->SingZoneClSetPtMgr(SetPtMgrNum).MaxSetTemp;
3001 : }
3002 : }
3003 :
3004 4 : thisZoneITEq.SizingTAirIn = max(TAirInSizing, thisZoneITEq.DesignTAirIn);
3005 : }
3006 :
3007 : // MJW - EMS Not in place yet
3008 : // if ( AnyEnergyManagementSystemInModel ) {
3009 : // SetupEMSActuator( "ElectricEquipment", ZoneITEq( Loop ).Name, "Electric Power Level", "[W]", ZoneITEq( Loop
3010 : // ).EMSZoneEquipOverrideOn, ZoneITEq( Loop ).EMSEquipPower ); SetupEMSInternalVariable( "Plug and Process Power Design
3011 : // Level", ZoneITEq( Loop ).Name, "[W]", ZoneITEq( Loop ).DesignTotalPower ); } // EMS
3012 :
3013 7 : if (!ErrorsFound)
3014 7 : SetupSpaceInternalGain(state,
3015 : thisZoneITEq.spaceIndex,
3016 : 1.0,
3017 : thisZoneITEq.Name,
3018 : DataHeatBalance::IntGainType::ElectricEquipmentITEAirCooled,
3019 7 : &thisZoneITEq.PowerRpt[(int)PERptVars::ConGainToZone]);
3020 : }
3021 : } // for itEqInputNum.NumOfSpaces
3022 : } // for itEqInputNum
3023 12 : for (int Loop = 1; Loop <= state.dataHeatBal->TotITEquip; ++Loop) {
3024 11 : if (state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(Loop).ZonePtr).HasAdjustedReturnTempByITE &&
3025 4 : (!state.dataHeatBal->ZoneITEq(Loop).FlowControlWithApproachTemps)) {
3026 0 : ShowSevereError(state,
3027 0 : std::string{RoutineName} + itEqModuleObject + "=\"" + IHGAlphas(1) + "\": invalid calculation method " +
3028 0 : IHGAlphas(3) + " for Zone: " + IHGAlphas(2));
3029 0 : ShowContinueError(state, "...Multiple flow control methods apply to one zone. ");
3030 0 : ErrorsFound = true;
3031 : }
3032 : }
3033 : } // TotITEquip > 0
3034 :
3035 : // ZoneBaseboard:OutdoorTemperatureControlled
3036 1542 : EPVector<InternalHeatGains::GlobalInternalGainMiscObject> zoneBBHeatObjects;
3037 771 : int numZoneBBHeatStatements = 0;
3038 771 : setupIHGZonesAndSpaces(state, bbModuleObject, zoneBBHeatObjects, numZoneBBHeatStatements, state.dataHeatBal->TotBBHeat, ErrorsFound);
3039 :
3040 771 : if (state.dataHeatBal->TotBBHeat > 0) {
3041 3 : state.dataHeatBal->ZoneBBHeat.allocate(state.dataHeatBal->TotBBHeat);
3042 3 : int bbHeatNum = 0;
3043 6 : for (int bbHeatInputNum = 1; bbHeatInputNum <= numZoneBBHeatStatements; ++bbHeatInputNum) {
3044 3 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
3045 : bbModuleObject,
3046 : bbHeatInputNum,
3047 : IHGAlphas,
3048 : IHGNumAlphas,
3049 : IHGNumbers,
3050 : IHGNumNumbers,
3051 : IOStat,
3052 : IHGNumericFieldBlanks,
3053 : IHGAlphaFieldBlanks,
3054 : IHGAlphaFieldNames,
3055 : IHGNumericFieldNames);
3056 :
3057 3 : auto &thisBBHeatInput = zoneBBHeatObjects(bbHeatInputNum);
3058 6 : for (int Item1 = 1; Item1 <= thisBBHeatInput.numOfSpaces; ++Item1) {
3059 3 : ++bbHeatNum;
3060 3 : auto &thisZoneBBHeat = state.dataHeatBal->ZoneBBHeat(bbHeatNum);
3061 3 : int const spaceNum = thisBBHeatInput.spaceNums(Item1);
3062 3 : int const zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
3063 3 : thisZoneBBHeat.Name = thisBBHeatInput.names(Item1);
3064 3 : thisZoneBBHeat.spaceIndex = spaceNum;
3065 3 : thisZoneBBHeat.ZonePtr = zoneNum;
3066 :
3067 3 : thisZoneBBHeat.SchedPtr = GetScheduleIndex(state, IHGAlphas(3));
3068 3 : if (thisZoneBBHeat.SchedPtr == 0) {
3069 0 : if (IHGAlphaFieldBlanks(3)) {
3070 0 : ShowSevereError(state,
3071 0 : std::string{RoutineName} + bbModuleObject + "=\"" + thisBBHeatInput.Name + "\", " +
3072 0 : IHGAlphaFieldNames(3) + " is required.");
3073 : } else {
3074 0 : ShowSevereError(state,
3075 0 : std::string{RoutineName} + bbModuleObject + "=\"" + thisBBHeatInput.Name + "\", invalid " +
3076 0 : IHGAlphaFieldNames(3) + " entered=" + IHGAlphas(3));
3077 : }
3078 0 : ErrorsFound = true;
3079 : } else { // check min/max on schedule
3080 3 : SchMin = GetScheduleMinValue(state, thisZoneBBHeat.SchedPtr);
3081 3 : SchMax = GetScheduleMaxValue(state, thisZoneBBHeat.SchedPtr);
3082 3 : if (SchMin < 0.0 || SchMax < 0.0) {
3083 0 : if (SchMin < 0.0) {
3084 0 : ShowSevereError(state,
3085 0 : std::string{RoutineName} + bbModuleObject + "=\"" + thisBBHeatInput.Name + "\", " +
3086 0 : IHGAlphaFieldNames(3) + ", minimum is < 0.0");
3087 0 : ShowContinueError(state,
3088 0 : format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMin));
3089 0 : ErrorsFound = true;
3090 : }
3091 0 : if (SchMax < 0.0) {
3092 0 : ShowSevereError(state,
3093 0 : std::string{RoutineName} + bbModuleObject + "=\"" + thisBBHeatInput.Name + "\", " +
3094 0 : IHGAlphaFieldNames(3) + ", maximum is < 0.0");
3095 0 : ShowContinueError(state,
3096 0 : format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMax));
3097 0 : ErrorsFound = true;
3098 : }
3099 : }
3100 : }
3101 :
3102 3 : if (IHGNumAlphas > 3) {
3103 3 : thisZoneBBHeat.EndUseSubcategory = IHGAlphas(4);
3104 : } else {
3105 0 : thisZoneBBHeat.EndUseSubcategory = "General";
3106 : }
3107 :
3108 3 : thisZoneBBHeat.CapatLowTemperature = IHGNumbers(1);
3109 3 : thisZoneBBHeat.LowTemperature = IHGNumbers(2);
3110 3 : thisZoneBBHeat.CapatHighTemperature = IHGNumbers(3);
3111 3 : thisZoneBBHeat.HighTemperature = IHGNumbers(4);
3112 3 : thisZoneBBHeat.FractionRadiant = IHGNumbers(5);
3113 3 : thisZoneBBHeat.FractionConvected = 1.0 - thisZoneBBHeat.FractionRadiant;
3114 3 : if (thisZoneBBHeat.FractionConvected < 0.0) {
3115 0 : ShowSevereError(state,
3116 0 : std::string{RoutineName} + bbModuleObject + "=\"" + thisBBHeatInput.Name + "\", Sum of Fractions > 1.0");
3117 0 : ErrorsFound = true;
3118 : }
3119 :
3120 3 : if (thisZoneBBHeat.ZonePtr <= 0) continue; // Error, will be caught and terminated later
3121 :
3122 3 : if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
3123 0 : SetupEMSActuator(state,
3124 : "ZoneBaseboard:OutdoorTemperatureControlled",
3125 : thisZoneBBHeat.Name,
3126 : "Power Level",
3127 : "[W]",
3128 : thisZoneBBHeat.EMSZoneBaseboardOverrideOn,
3129 0 : thisZoneBBHeat.EMSZoneBaseboardPower);
3130 0 : SetupEMSInternalVariable(state,
3131 : "Simple Zone Baseboard Capacity At Low Temperature",
3132 : thisZoneBBHeat.Name,
3133 : "[W]",
3134 0 : thisZoneBBHeat.CapatLowTemperature);
3135 0 : SetupEMSInternalVariable(state,
3136 : "Simple Zone Baseboard Capacity At High Temperature",
3137 : thisZoneBBHeat.Name,
3138 : "[W]",
3139 0 : thisZoneBBHeat.CapatHighTemperature);
3140 : } // EMS
3141 :
3142 3 : SetupSpaceInternalGain(state,
3143 : thisZoneBBHeat.spaceIndex,
3144 : 1.0,
3145 : thisZoneBBHeat.Name,
3146 : DataHeatBalance::IntGainType::ZoneBaseboardOutdoorTemperatureControlled,
3147 : &thisZoneBBHeat.ConGainRate,
3148 : nullptr,
3149 : &thisZoneBBHeat.RadGainRate);
3150 : } // for bbHeatInputNum.NumOfSpaces
3151 : } // for bbHeatInputNum
3152 : } // TotBBHeat > 0
3153 :
3154 771 : state.dataHeatBal->TotCO2Gen = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, contamSSModuleObject);
3155 771 : state.dataHeatBal->ZoneCO2Gen.allocate(state.dataHeatBal->TotCO2Gen);
3156 :
3157 775 : for (int Loop = 1; Loop <= state.dataHeatBal->TotCO2Gen; ++Loop) {
3158 4 : IHGAlphas = "";
3159 4 : IHGNumbers = 0.0;
3160 4 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
3161 : contamSSModuleObject,
3162 : Loop,
3163 : IHGAlphas,
3164 : IHGNumAlphas,
3165 : IHGNumbers,
3166 : IHGNumNumbers,
3167 : IOStat,
3168 : IHGNumericFieldBlanks,
3169 : IHGAlphaFieldBlanks,
3170 : IHGAlphaFieldNames,
3171 : IHGNumericFieldNames);
3172 4 : UtilityRoutines::IsNameEmpty(state, IHGAlphas(1), contamSSModuleObject, ErrorsFound);
3173 :
3174 4 : state.dataHeatBal->ZoneCO2Gen(Loop).Name = IHGAlphas(1);
3175 :
3176 4 : state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr = UtilityRoutines::FindItemInList(IHGAlphas(2), state.dataHeatBal->Zone);
3177 4 : if (state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr == 0) {
3178 0 : ShowSevereError(state,
3179 0 : std::string{RoutineName} + contamSSModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " + IHGAlphaFieldNames(2) +
3180 0 : " entered=" + IHGAlphas(2));
3181 0 : ErrorsFound = true;
3182 : }
3183 :
3184 4 : state.dataHeatBal->ZoneCO2Gen(Loop).SchedPtr = GetScheduleIndex(state, IHGAlphas(3));
3185 4 : if (state.dataHeatBal->ZoneCO2Gen(Loop).SchedPtr == 0) {
3186 0 : if (IHGAlphaFieldBlanks(3)) {
3187 0 : ShowSevereError(state,
3188 0 : std::string{RoutineName} + contamSSModuleObject + "=\"" + IHGAlphas(1) + "\", " + IHGAlphaFieldNames(3) +
3189 : " is required.");
3190 : } else {
3191 0 : ShowSevereError(state,
3192 0 : std::string{RoutineName} + contamSSModuleObject + "=\"" + IHGAlphas(1) + "\", invalid " + IHGAlphaFieldNames(3) +
3193 0 : " entered=" + IHGAlphas(3));
3194 : }
3195 0 : ErrorsFound = true;
3196 : } else { // check min/max on schedule
3197 4 : SchMin = GetScheduleMinValue(state, state.dataHeatBal->ZoneCO2Gen(Loop).SchedPtr);
3198 4 : SchMax = GetScheduleMaxValue(state, state.dataHeatBal->ZoneCO2Gen(Loop).SchedPtr);
3199 4 : if (SchMin < 0.0 || SchMax < 0.0) {
3200 0 : if (SchMin < 0.0) {
3201 0 : ShowSevereError(state,
3202 0 : std::string{RoutineName} + contamSSModuleObject + "=\"" + IHGAlphas(1) + "\", " + IHGAlphaFieldNames(3) +
3203 : ", minimum is < 0.0");
3204 0 : ShowContinueError(state, format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMin));
3205 0 : ErrorsFound = true;
3206 : }
3207 0 : if (SchMax < 0.0) {
3208 0 : ShowSevereError(state,
3209 0 : std::string{RoutineName} + contamSSModuleObject + "=\"" + IHGAlphas(1) + "\", " + IHGAlphaFieldNames(3) +
3210 : ", maximum is < 0.0");
3211 0 : ShowContinueError(state, format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", IHGAlphas(3), SchMax));
3212 0 : ErrorsFound = true;
3213 : }
3214 : }
3215 : }
3216 :
3217 4 : state.dataHeatBal->ZoneCO2Gen(Loop).CO2DesignRate = IHGNumbers(1);
3218 :
3219 4 : if (state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr <= 0) continue; // Error, will be caught and terminated later
3220 :
3221 : // Object report variables
3222 16 : SetupOutputVariable(state,
3223 : "Contaminant Source or Sink CO2 Gain Volume Flow Rate",
3224 : OutputProcessor::Unit::m3_s,
3225 4 : state.dataHeatBal->ZoneCO2Gen(Loop).CO2GainRate,
3226 : OutputProcessor::SOVTimeStepType::Zone,
3227 : OutputProcessor::SOVStoreType::Average,
3228 8 : state.dataHeatBal->ZoneCO2Gen(Loop).Name);
3229 :
3230 : // Zone total report variables
3231 4 : if (RepVarSet(state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr)) {
3232 4 : RepVarSet(state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr) = false;
3233 :
3234 16 : SetupOutputVariable(state,
3235 : "Zone Contaminant Source or Sink CO2 Gain Volume Flow Rate",
3236 : OutputProcessor::Unit::m3_s,
3237 4 : state.dataHeatBal->ZoneRpt(state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr).CO2Rate,
3238 : OutputProcessor::SOVTimeStepType::Zone,
3239 : OutputProcessor::SOVStoreType::Average,
3240 8 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr).Name);
3241 : }
3242 :
3243 12 : SetupZoneInternalGain(state,
3244 4 : state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr,
3245 4 : state.dataHeatBal->ZoneCO2Gen(Loop).Name,
3246 : DataHeatBalance::IntGainType::ZoneContaminantSourceAndSinkCarbonDioxide,
3247 : nullptr,
3248 : nullptr,
3249 : nullptr,
3250 : nullptr,
3251 : nullptr,
3252 4 : &state.dataHeatBal->ZoneCO2Gen(Loop).CO2GainRate);
3253 : }
3254 :
3255 771 : RepVarSet.deallocate();
3256 :
3257 771 : if (ErrorsFound) {
3258 0 : ShowFatalError(state, std::string{RoutineName} + "Errors found in Getting Internal Gains Input, Program Stopped");
3259 : }
3260 :
3261 771 : setupIHGOutputs(state);
3262 :
3263 : static constexpr std::string_view Format_721(
3264 : "! <Zone Internal Gains Nominal>,Zone Name, Floor Area {{m2}},# Occupants,Area per Occupant "
3265 : "{{m2/person}},Occupant per Area {{person/m2}},Interior Lighting {{W/m2}},Electric Load {{W/m2}},Gas Load {{W/m2}},Other "
3266 : "Load {{W/m2}},Hot Water Eq {{W/m2}},Steam Equipment {{W/m2}},Sum Loads per Area {{W/m2}},Outdoor Controlled Baseboard "
3267 : "Heat\n");
3268 :
3269 771 : print(state.files.eio, Format_721);
3270 5585 : for (int Loop = 1; Loop <= state.dataGlobal->NumOfZones; ++Loop) {
3271 4814 : LightTot = 0.0;
3272 4814 : ElecTot = 0.0;
3273 4814 : GasTot = 0.0;
3274 4814 : OthTot = 0.0;
3275 4814 : HWETot = 0.0;
3276 4814 : StmTot = 0.0;
3277 4814 : BBHeatInd = "No";
3278 135570 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotLights; ++Loop1) {
3279 130756 : if (state.dataHeatBal->Lights(Loop1).ZonePtr != Loop) continue;
3280 4051 : LightTot += state.dataHeatBal->Lights(Loop1).DesignLevel;
3281 : }
3282 129628 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotElecEquip; ++Loop1) {
3283 124814 : if (state.dataHeatBal->ZoneElectric(Loop1).ZonePtr != Loop) continue;
3284 4174 : ElecTot += state.dataHeatBal->ZoneElectric(Loop1).DesignLevel;
3285 : }
3286 4833 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotITEquip; ++Loop1) {
3287 19 : if (state.dataHeatBal->ZoneITEq(Loop1).ZonePtr != Loop) continue;
3288 7 : ElecTot += state.dataHeatBal->ZoneITEq(Loop1).DesignTotalPower;
3289 : }
3290 7395 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotGasEquip; ++Loop1) {
3291 2581 : if (state.dataHeatBal->ZoneGas(Loop1).ZonePtr != Loop) continue;
3292 78 : GasTot += state.dataHeatBal->ZoneGas(Loop1).DesignLevel;
3293 : }
3294 4979 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotOthEquip; ++Loop1) {
3295 165 : if (state.dataHeatBal->ZoneOtherEq(Loop1).ZonePtr != Loop) continue;
3296 64 : OthTot += state.dataHeatBal->ZoneOtherEq(Loop1).DesignLevel;
3297 : }
3298 4844 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotStmEquip; ++Loop1) {
3299 30 : if (state.dataHeatBal->ZoneSteamEq(Loop1).ZonePtr != Loop) continue;
3300 5 : StmTot += state.dataHeatBal->ZoneSteamEq(Loop1).DesignLevel;
3301 : }
3302 4925 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotHWEquip; ++Loop1) {
3303 111 : if (state.dataHeatBal->ZoneHWEq(Loop1).ZonePtr != Loop) continue;
3304 14 : HWETot += state.dataHeatBal->ZoneHWEq(Loop1).DesignLevel;
3305 : }
3306 4832 : for (int Loop1 = 1; Loop1 <= state.dataHeatBal->TotBBHeat; ++Loop1) {
3307 18 : if (state.dataHeatBal->ZoneBBHeat(Loop1).ZonePtr != Loop) continue;
3308 3 : BBHeatInd = "Yes";
3309 : }
3310 4814 : state.dataHeatBal->Zone(Loop).InternalHeatGains = LightTot + ElecTot + GasTot + OthTot + HWETot + StmTot;
3311 4814 : if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0) {
3312 14436 : print(state.files.eio,
3313 : Format_720,
3314 4812 : state.dataHeatBal->Zone(Loop).Name,
3315 4812 : state.dataHeatBal->Zone(Loop).FloorArea,
3316 4812 : state.dataHeatBal->Zone(Loop).TotOccupants);
3317 4812 : print_and_divide_if_greater_than_zero(state.dataHeatBal->Zone(Loop).FloorArea, state.dataHeatBal->Zone(Loop).TotOccupants);
3318 4812 : print(state.files.eio, "{:.3R},", state.dataHeatBal->Zone(Loop).TotOccupants / state.dataHeatBal->Zone(Loop).FloorArea);
3319 4812 : print(state.files.eio, "{:.3R},", LightTot / state.dataHeatBal->Zone(Loop).FloorArea);
3320 4812 : print(state.files.eio, "{:.3R},", ElecTot / state.dataHeatBal->Zone(Loop).FloorArea);
3321 4812 : print(state.files.eio, "{:.3R},", GasTot / state.dataHeatBal->Zone(Loop).FloorArea);
3322 4812 : print(state.files.eio, "{:.3R},", OthTot / state.dataHeatBal->Zone(Loop).FloorArea);
3323 4812 : print(state.files.eio, "{:.3R},", HWETot / state.dataHeatBal->Zone(Loop).FloorArea);
3324 4812 : print(state.files.eio, "{:.3R},", StmTot / state.dataHeatBal->Zone(Loop).FloorArea);
3325 4812 : print(state.files.eio,
3326 : "{:.3R},{}\n",
3327 9624 : state.dataHeatBal->Zone(Loop).InternalHeatGains / state.dataHeatBal->Zone(Loop).FloorArea,
3328 4812 : BBHeatInd);
3329 : } else {
3330 6 : print(state.files.eio,
3331 : Format_720,
3332 2 : state.dataHeatBal->Zone(Loop).Name,
3333 2 : state.dataHeatBal->Zone(Loop).FloorArea,
3334 2 : state.dataHeatBal->Zone(Loop).TotOccupants);
3335 2 : print(state.files.eio, "0.0,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,{}\n", BBHeatInd);
3336 : }
3337 : }
3338 4641 : for (int Loop = 1; Loop <= state.dataHeatBal->TotPeople; ++Loop) {
3339 3870 : if (Loop == 1) {
3340 642 : print(state.files.eio,
3341 : Format_723,
3342 : "People",
3343 : "Number of People {},People/Floor Area {person/m2},Floor Area per person {m2/person},Fraction Radiant,Fraction "
3344 : "Convected,Sensible Fraction Calculation,Activity level,ASHRAE 55 Warnings,Carbon Dioxide Generation Rate,Nominal Minimum "
3345 : "Number of People,Nominal Maximum Number of People");
3346 1831 : if (state.dataHeatBal->People(Loop).Fanger || state.dataHeatBal->People(Loop).Pierce || state.dataHeatBal->People(Loop).KSU ||
3347 1184 : state.dataHeatBal->People(Loop).CoolingEffectASH55 || state.dataHeatBal->People(Loop).AnkleDraftASH55) {
3348 371 : print(state.files.eio,
3349 : ",MRT Calculation Type,Work Efficiency, Clothing Insulation Calculation Method,Clothing "
3350 : "Insulation Calculation Method Schedule,Clothing,Air Velocity,Fanger Calculation,Pierce "
3351 371 : "Calculation,KSU Calculation,Cooling Effect Calculation,Ankle Draft Calculation\n");
3352 : } else {
3353 271 : print(state.files.eio, "\n");
3354 : }
3355 : }
3356 :
3357 3870 : int ZoneNum = state.dataHeatBal->People(Loop).ZonePtr;
3358 :
3359 3870 : if (ZoneNum == 0) {
3360 0 : print(state.files.eio, Format_724, "People-Illegal Zone specified", state.dataHeatBal->People(Loop).Name);
3361 0 : continue;
3362 : }
3363 :
3364 15480 : print(state.files.eio,
3365 : Format_722,
3366 : "People",
3367 3870 : state.dataHeatBal->People(Loop).Name,
3368 7740 : GetScheduleName(state, state.dataHeatBal->People(Loop).NumberOfPeoplePtr),
3369 3870 : state.dataHeatBal->Zone(ZoneNum).Name,
3370 3870 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3371 3870 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3372 :
3373 3870 : print(state.files.eio, "{:.1R},", state.dataHeatBal->People(Loop).NumberOfPeople);
3374 :
3375 3870 : print_and_divide_if_greater_than_zero(state.dataHeatBal->People(Loop).NumberOfPeople, state.dataHeatBal->Zone(ZoneNum).FloorArea);
3376 :
3377 3870 : if (state.dataHeatBal->People(Loop).NumberOfPeople > 0.0) {
3378 3809 : print_and_divide_if_greater_than_zero(state.dataHeatBal->Zone(ZoneNum).FloorArea, state.dataHeatBal->People(Loop).NumberOfPeople);
3379 : } else {
3380 61 : print(state.files.eio, "N/A,");
3381 : }
3382 :
3383 3870 : print(state.files.eio, "{:.3R},", state.dataHeatBal->People(Loop).FractionRadiant);
3384 3870 : print(state.files.eio, "{:.3R},", state.dataHeatBal->People(Loop).FractionConvected);
3385 3870 : if (state.dataHeatBal->People(Loop).UserSpecSensFrac == DataGlobalConstants::AutoCalculate) {
3386 3827 : print(state.files.eio, "AutoCalculate,");
3387 : } else {
3388 43 : print(state.files.eio, "{:.3R},", state.dataHeatBal->People(Loop).UserSpecSensFrac);
3389 : }
3390 3870 : print(state.files.eio, "{},", GetScheduleName(state, state.dataHeatBal->People(Loop).ActivityLevelPtr));
3391 :
3392 3870 : if (state.dataHeatBal->People(Loop).Show55Warning) {
3393 0 : print(state.files.eio, "Yes,");
3394 : } else {
3395 3870 : print(state.files.eio, "No,");
3396 : }
3397 3870 : print(state.files.eio, "{:.4R},", state.dataHeatBal->People(Loop).CO2RateFactor);
3398 3870 : print(state.files.eio, "{:.0R},", state.dataHeatBal->People(Loop).NomMinNumberPeople);
3399 :
3400 10597 : if (state.dataHeatBal->People(Loop).Fanger || state.dataHeatBal->People(Loop).Pierce || state.dataHeatBal->People(Loop).KSU ||
3401 6720 : state.dataHeatBal->People(Loop).CoolingEffectASH55 || state.dataHeatBal->People(Loop).AnkleDraftASH55) {
3402 2445 : print(state.files.eio, "{:.0R},", state.dataHeatBal->People(Loop).NomMaxNumberPeople);
3403 :
3404 2445 : if (state.dataHeatBal->People(Loop).MRTCalcType == DataHeatBalance::CalcMRT::ZoneAveraged) {
3405 2436 : print(state.files.eio, "Zone Averaged,");
3406 9 : } else if (state.dataHeatBal->People(Loop).MRTCalcType == DataHeatBalance::CalcMRT::SurfaceWeighted) {
3407 6 : print(state.files.eio, "Surface Weighted,");
3408 3 : } else if (state.dataHeatBal->People(Loop).MRTCalcType == DataHeatBalance::CalcMRT::AngleFactor) {
3409 3 : print(state.files.eio, "Angle Factor,");
3410 : } else {
3411 0 : print(state.files.eio, "N/A,");
3412 : }
3413 2445 : print(state.files.eio, "{},", GetScheduleName(state, state.dataHeatBal->People(Loop).WorkEffPtr));
3414 :
3415 2445 : print(state.files.eio, clothingTypeEIOStrings[static_cast<int>(state.dataHeatBal->People(Loop).clothingType)]);
3416 :
3417 2445 : if (state.dataHeatBal->People(Loop).clothingType == ClothingType::CalculationSchedule) {
3418 1 : print(state.files.eio, "{},", GetScheduleName(state, state.dataHeatBal->People(Loop).ClothingMethodPtr));
3419 : } else {
3420 2444 : print(state.files.eio, "N/A,");
3421 : }
3422 :
3423 2445 : print(state.files.eio, "{},", GetScheduleName(state, state.dataHeatBal->People(Loop).ClothingPtr));
3424 2445 : print(state.files.eio, "{},", GetScheduleName(state, state.dataHeatBal->People(Loop).AirVelocityPtr));
3425 :
3426 2445 : if (state.dataHeatBal->People(Loop).Fanger) {
3427 2438 : print(state.files.eio, "Yes,");
3428 : } else {
3429 7 : print(state.files.eio, "No,");
3430 : }
3431 2445 : if (state.dataHeatBal->People(Loop).Pierce) {
3432 11 : print(state.files.eio, "Yes,");
3433 : } else {
3434 2434 : print(state.files.eio, "No,");
3435 : }
3436 2445 : if (state.dataHeatBal->People(Loop).KSU) {
3437 6 : print(state.files.eio, "Yes,");
3438 : } else {
3439 2439 : print(state.files.eio, "No,");
3440 : }
3441 2445 : if (state.dataHeatBal->People(Loop).CoolingEffectASH55) {
3442 1 : print(state.files.eio, "Yes,");
3443 : } else {
3444 2444 : print(state.files.eio, "No,");
3445 : }
3446 2445 : if (state.dataHeatBal->People(Loop).AnkleDraftASH55) {
3447 1 : print(state.files.eio, "Yes\n");
3448 : } else {
3449 2444 : print(state.files.eio, "No\n");
3450 : }
3451 : } else {
3452 1425 : print(state.files.eio, "{:.0R}\n", state.dataHeatBal->People(Loop).NomMaxNumberPeople);
3453 : }
3454 : }
3455 4822 : for (int Loop = 1; Loop <= state.dataHeatBal->TotLights; ++Loop) {
3456 4051 : if (Loop == 1) {
3457 641 : print(state.files.eio,
3458 : Format_723,
3459 : "Lights",
3460 : "Lighting Level {W},Lights/Floor Area {W/m2},Lights per person {W/person},Fraction Return "
3461 : "Air,Fraction Radiant,Fraction Short Wave,Fraction Convected,Fraction Replaceable,End-Use "
3462 : "Category,Nominal Minimum Lighting Level {W},Nominal Maximum Lighting Level {W}\n");
3463 : }
3464 :
3465 4051 : int ZoneNum = state.dataHeatBal->Lights(Loop).ZonePtr;
3466 :
3467 4051 : if (ZoneNum == 0) {
3468 0 : print(state.files.eio, "Lights-Illegal Zone specified", state.dataHeatBal->Lights(Loop).Name);
3469 0 : continue;
3470 : }
3471 16204 : print(state.files.eio,
3472 : Format_722,
3473 : "Lights",
3474 4051 : state.dataHeatBal->Lights(Loop).Name,
3475 8102 : GetScheduleName(state, state.dataHeatBal->Lights(Loop).SchedPtr),
3476 4051 : state.dataHeatBal->Zone(ZoneNum).Name,
3477 4051 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3478 4051 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3479 :
3480 4051 : print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).DesignLevel);
3481 :
3482 4051 : print_and_divide_if_greater_than_zero(state.dataHeatBal->Lights(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).FloorArea);
3483 4051 : print_and_divide_if_greater_than_zero(state.dataHeatBal->Lights(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3484 :
3485 4051 : print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).FractionReturnAir);
3486 4051 : print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).FractionRadiant);
3487 4051 : print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).FractionShortWave);
3488 4051 : print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).FractionConvected);
3489 4051 : print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).FractionReplaceable);
3490 4051 : print(state.files.eio, "{},", state.dataHeatBal->Lights(Loop).EndUseSubcategory);
3491 4051 : print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).NomMinDesignLevel);
3492 4051 : print(state.files.eio, "{:.3R}\n", state.dataHeatBal->Lights(Loop).NomMaxDesignLevel);
3493 : }
3494 4945 : for (int Loop = 1; Loop <= state.dataHeatBal->TotElecEquip; ++Loop) {
3495 4174 : if (Loop == 1) {
3496 629 : print(state.files.eio,
3497 : Format_723,
3498 : "ElectricEquipment",
3499 : "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction "
3500 : "Lost,Fraction Convected,End-Use SubCategory,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n");
3501 : }
3502 :
3503 4174 : int ZoneNum = state.dataHeatBal->ZoneElectric(Loop).ZonePtr;
3504 :
3505 4174 : if (ZoneNum == 0) {
3506 0 : print(state.files.eio, Format_724, "Electric Equipment-Illegal Zone specified", state.dataHeatBal->ZoneElectric(Loop).Name);
3507 0 : continue;
3508 : }
3509 16696 : print(state.files.eio,
3510 : Format_722,
3511 : "ElectricEquipment",
3512 4174 : state.dataHeatBal->ZoneElectric(Loop).Name,
3513 8348 : GetScheduleName(state, state.dataHeatBal->ZoneElectric(Loop).SchedPtr),
3514 4174 : state.dataHeatBal->Zone(ZoneNum).Name,
3515 4174 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3516 4174 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3517 :
3518 4174 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).DesignLevel);
3519 :
3520 4174 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneElectric(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).FloorArea);
3521 4174 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneElectric(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3522 :
3523 4174 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).FractionLatent);
3524 4174 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).FractionRadiant);
3525 4174 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).FractionLost);
3526 4174 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).FractionConvected);
3527 4174 : print(state.files.eio, "{},", state.dataHeatBal->ZoneElectric(Loop).EndUseSubcategory);
3528 4174 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).NomMinDesignLevel);
3529 4174 : print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneElectric(Loop).NomMaxDesignLevel);
3530 : }
3531 849 : for (int Loop = 1; Loop <= state.dataHeatBal->TotGasEquip; ++Loop) {
3532 78 : if (Loop == 1) {
3533 36 : print(state.files.eio,
3534 : Format_723,
3535 : "GasEquipment",
3536 : "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction "
3537 : "Lost,Fraction Convected,End-Use SubCategory,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n");
3538 : }
3539 :
3540 78 : int ZoneNum = state.dataHeatBal->ZoneGas(Loop).ZonePtr;
3541 :
3542 78 : if (ZoneNum == 0) {
3543 0 : print(state.files.eio, Format_724, "Gas Equipment-Illegal Zone specified", state.dataHeatBal->ZoneGas(Loop).Name);
3544 0 : continue;
3545 : }
3546 :
3547 312 : print(state.files.eio,
3548 : Format_722,
3549 : "GasEquipment",
3550 78 : state.dataHeatBal->ZoneGas(Loop).Name,
3551 156 : GetScheduleName(state, state.dataHeatBal->ZoneGas(Loop).SchedPtr),
3552 78 : state.dataHeatBal->Zone(ZoneNum).Name,
3553 78 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3554 78 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3555 :
3556 78 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).DesignLevel);
3557 :
3558 78 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneGas(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).FloorArea);
3559 78 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneGas(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3560 :
3561 78 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).FractionLatent);
3562 78 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).FractionRadiant);
3563 78 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).FractionLost);
3564 78 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).FractionConvected);
3565 78 : print(state.files.eio, "{},", state.dataHeatBal->ZoneGas(Loop).EndUseSubcategory);
3566 78 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).NomMinDesignLevel);
3567 78 : print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneGas(Loop).NomMaxDesignLevel);
3568 : }
3569 :
3570 785 : for (int Loop = 1; Loop <= state.dataHeatBal->TotHWEquip; ++Loop) {
3571 14 : if (Loop == 1) {
3572 6 : print(state.files.eio,
3573 : Format_723,
3574 : "HotWaterEquipment",
3575 : "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction "
3576 : "Lost,Fraction Convected,End-Use SubCategory,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n");
3577 : }
3578 :
3579 14 : int ZoneNum = state.dataHeatBal->ZoneHWEq(Loop).ZonePtr;
3580 :
3581 14 : if (ZoneNum == 0) {
3582 0 : print(state.files.eio, Format_724, "Hot Water Equipment-Illegal Zone specified", state.dataHeatBal->ZoneHWEq(Loop).Name);
3583 0 : continue;
3584 : }
3585 :
3586 56 : print(state.files.eio,
3587 : Format_722,
3588 : "HotWaterEquipment",
3589 14 : state.dataHeatBal->ZoneHWEq(Loop).Name,
3590 28 : GetScheduleName(state, state.dataHeatBal->ZoneHWEq(Loop).SchedPtr),
3591 14 : state.dataHeatBal->Zone(ZoneNum).Name,
3592 14 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3593 14 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3594 :
3595 14 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).DesignLevel);
3596 :
3597 14 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneHWEq(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).FloorArea);
3598 14 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneHWEq(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3599 :
3600 14 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).FractionLatent);
3601 14 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).FractionRadiant);
3602 14 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).FractionLost);
3603 14 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).FractionConvected);
3604 14 : print(state.files.eio, "{},", state.dataHeatBal->ZoneHWEq(Loop).EndUseSubcategory);
3605 14 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).NomMinDesignLevel);
3606 14 : print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneHWEq(Loop).NomMaxDesignLevel);
3607 : }
3608 :
3609 776 : for (int Loop = 1; Loop <= state.dataHeatBal->TotStmEquip; ++Loop) {
3610 5 : if (Loop == 1) {
3611 5 : print(state.files.eio,
3612 : Format_723,
3613 : "SteamEquipment",
3614 : "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction "
3615 : "Lost,Fraction Convected,End-Use SubCategory,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n");
3616 : }
3617 :
3618 5 : int ZoneNum = state.dataHeatBal->ZoneSteamEq(Loop).ZonePtr;
3619 :
3620 5 : if (ZoneNum == 0) {
3621 0 : print(state.files.eio, Format_724, "Steam Equipment-Illegal Zone specified", state.dataHeatBal->ZoneSteamEq(Loop).Name);
3622 0 : continue;
3623 : }
3624 :
3625 20 : print(state.files.eio,
3626 : Format_722,
3627 : "SteamEquipment",
3628 5 : state.dataHeatBal->ZoneSteamEq(Loop).Name,
3629 10 : GetScheduleName(state, state.dataHeatBal->ZoneSteamEq(Loop).SchedPtr),
3630 5 : state.dataHeatBal->Zone(ZoneNum).Name,
3631 5 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3632 5 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3633 :
3634 5 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).DesignLevel);
3635 :
3636 5 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneSteamEq(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).FloorArea);
3637 5 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneSteamEq(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3638 :
3639 5 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).FractionLatent);
3640 5 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).FractionRadiant);
3641 5 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).FractionLost);
3642 5 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).FractionConvected);
3643 5 : print(state.files.eio, "{},", state.dataHeatBal->ZoneSteamEq(Loop).EndUseSubcategory);
3644 5 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).NomMinDesignLevel);
3645 5 : print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneSteamEq(Loop).NomMaxDesignLevel);
3646 : }
3647 :
3648 835 : for (int Loop = 1; Loop <= state.dataHeatBal->TotOthEquip; ++Loop) {
3649 64 : if (Loop == 1) {
3650 28 : print(state.files.eio,
3651 : Format_723,
3652 : "OtherEquipment",
3653 : "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction "
3654 : "Lost,Fraction Convected,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n");
3655 : }
3656 :
3657 64 : int ZoneNum = state.dataHeatBal->ZoneOtherEq(Loop).ZonePtr;
3658 :
3659 64 : if (ZoneNum == 0) {
3660 0 : print(state.files.eio, Format_724, "Other Equipment-Illegal Zone specified", state.dataHeatBal->ZoneOtherEq(Loop).Name);
3661 0 : continue;
3662 : }
3663 :
3664 256 : print(state.files.eio,
3665 : Format_722,
3666 : "OtherEquipment",
3667 64 : state.dataHeatBal->ZoneOtherEq(Loop).Name,
3668 128 : GetScheduleName(state, state.dataHeatBal->ZoneOtherEq(Loop).SchedPtr),
3669 64 : state.dataHeatBal->Zone(ZoneNum).Name,
3670 64 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3671 64 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3672 :
3673 64 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).DesignLevel);
3674 :
3675 64 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneOtherEq(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).FloorArea);
3676 64 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneOtherEq(Loop).DesignLevel, state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3677 :
3678 64 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).FractionLatent);
3679 64 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).FractionRadiant);
3680 64 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).FractionLost);
3681 64 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).FractionConvected);
3682 64 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).NomMinDesignLevel);
3683 64 : print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneOtherEq(Loop).NomMaxDesignLevel);
3684 : }
3685 :
3686 778 : for (int Loop = 1; Loop <= state.dataHeatBal->TotITEquip; ++Loop) {
3687 7 : if (Loop == 1) {
3688 5 : print(state.files.eio,
3689 : Format_723,
3690 : "ElectricEquipment:ITE:AirCooled",
3691 : "Equipment Level {W},"
3692 : "Equipment/Floor Area {W/m2},Equipment per person {W/person},"
3693 : "Fraction Convected,CPU End-Use SubCategory,Fan End-Use SubCategory,UPS End-Use SubCategory,"
3694 : "Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}, Design Air Volume Flow Rate {m3/s}\n");
3695 : }
3696 :
3697 7 : int ZoneNum = state.dataHeatBal->ZoneITEq(Loop).ZonePtr;
3698 :
3699 7 : if (ZoneNum == 0) {
3700 0 : print(state.files.eio, Format_724, "ElectricEquipment:ITE:AirCooled-Illegal Zone specified", state.dataHeatBal->ZoneITEq(Loop).Name);
3701 0 : continue;
3702 : }
3703 28 : print(state.files.eio,
3704 : Format_722,
3705 : "ElectricEquipment:ITE:AirCooled",
3706 7 : state.dataHeatBal->ZoneITEq(Loop).Name,
3707 14 : GetScheduleName(state, state.dataHeatBal->ZoneITEq(Loop).OperSchedPtr),
3708 7 : state.dataHeatBal->Zone(ZoneNum).Name,
3709 7 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3710 7 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3711 :
3712 7 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneITEq(Loop).DesignTotalPower);
3713 :
3714 7 : print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneITEq(Loop).DesignTotalPower, state.dataHeatBal->Zone(ZoneNum).FloorArea);
3715 :
3716 : // ElectricEquipment:ITE:AirCooled is 100% convective
3717 7 : print(state.files.eio, "1.0,");
3718 :
3719 7 : print(state.files.eio, "{},", state.dataHeatBal->ZoneITEq(Loop).EndUseSubcategoryCPU);
3720 7 : print(state.files.eio, "{},", state.dataHeatBal->ZoneITEq(Loop).EndUseSubcategoryFan);
3721 7 : print(state.files.eio, "{},", state.dataHeatBal->ZoneITEq(Loop).EndUseSubcategoryUPS);
3722 7 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneITEq(Loop).NomMinDesignLevel);
3723 7 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneITEq(Loop).NomMaxDesignLevel);
3724 7 : print(state.files.eio, "{:.10R}\n", state.dataHeatBal->ZoneITEq(Loop).DesignAirVolFlowRate);
3725 : }
3726 :
3727 774 : for (int Loop = 1; Loop <= state.dataHeatBal->TotBBHeat; ++Loop) {
3728 3 : if (Loop == 1) {
3729 3 : print(state.files.eio,
3730 : Format_723,
3731 : "Outdoor Controlled Baseboard Heat",
3732 : "Capacity at Low Temperature {W},Low Temperature {C},Capacity at High Temperature "
3733 : "{W},High Temperature {C},Fraction Radiant,Fraction Convected,End-Use Subcategory\n");
3734 : }
3735 :
3736 3 : int ZoneNum = state.dataHeatBal->ZoneBBHeat(Loop).ZonePtr;
3737 :
3738 3 : if (ZoneNum == 0) {
3739 0 : print(state.files.eio,
3740 : Format_724,
3741 : "Outdoor Controlled Baseboard Heat-Illegal Zone specified",
3742 0 : state.dataHeatBal->ZoneBBHeat(Loop).Name);
3743 0 : continue;
3744 : }
3745 12 : print(state.files.eio,
3746 : Format_722,
3747 : "Outdoor Controlled Baseboard Heat",
3748 3 : state.dataHeatBal->ZoneBBHeat(Loop).Name,
3749 6 : GetScheduleName(state, state.dataHeatBal->ZoneBBHeat(Loop).SchedPtr),
3750 3 : state.dataHeatBal->Zone(ZoneNum).Name,
3751 3 : state.dataHeatBal->Zone(ZoneNum).FloorArea,
3752 3 : state.dataHeatBal->Zone(ZoneNum).TotOccupants);
3753 :
3754 3 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneBBHeat(Loop).CapatLowTemperature);
3755 3 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneBBHeat(Loop).LowTemperature);
3756 3 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneBBHeat(Loop).CapatHighTemperature);
3757 3 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneBBHeat(Loop).HighTemperature);
3758 3 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneBBHeat(Loop).FractionRadiant);
3759 3 : print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneBBHeat(Loop).FractionConvected);
3760 3 : print(state.files.eio, "{}\n", state.dataHeatBal->ZoneBBHeat(Loop).EndUseSubcategory);
3761 : }
3762 771 : }
3763 :
3764 12336 : void setupIHGZonesAndSpaces(EnergyPlusData &state,
3765 : const std::string objectType,
3766 : EPVector<InternalHeatGains::GlobalInternalGainMiscObject> &inputObjects,
3767 : int &numInputObjects,
3768 : int &numGainInstances,
3769 : bool &errors,
3770 : const bool zoneListNotAllowed)
3771 : {
3772 : // This function pre-processes the input objects for objectType and determines the ultimate number
3773 : // of simulation instances for each input object after expansion for SpaceList, Zone, or ZoneList.
3774 : // inputObjects is allocated here and filled with data for further input processing.
3775 :
3776 12336 : constexpr std::string_view routineName = "setupIHGZonesAndSpaces: ";
3777 12336 : bool localErrFlag = false;
3778 :
3779 12336 : auto &ip = state.dataInputProcessing->inputProcessor;
3780 24672 : auto const instances = ip->epJSON.find(objectType);
3781 12336 : if (instances != ip->epJSON.end()) {
3782 12336 : auto const &objectSchemaProps = ip->getObjectSchemaProps(state, objectType);
3783 12336 : auto &instancesValue = instances.value();
3784 12336 : numInputObjects = int(instancesValue.size());
3785 12336 : inputObjects.allocate(numInputObjects);
3786 :
3787 12336 : numGainInstances = 0;
3788 12336 : int counter = 0;
3789 28010 : for (auto instance = instancesValue.begin(); instance != instancesValue.end(); ++instance) {
3790 15674 : auto const &objectFields = instance.value();
3791 15674 : auto const &thisObjectName = UtilityRoutines::MakeUPPERCase(instance.key());
3792 15674 : ip->markObjectAsUsed(objectType, instance.key());
3793 :
3794 : // For incoming idf, maintain object order
3795 15674 : ++counter;
3796 15674 : int objNum = ip->getIDFObjNum(state, objectType, counter);
3797 15674 : inputObjects(objNum).Name = thisObjectName;
3798 15674 : std::string areaFieldName;
3799 15674 : if (zoneListNotAllowed) {
3800 205 : areaFieldName = "zone_or_space_name";
3801 : } else {
3802 15469 : areaFieldName = "zone_or_zonelist_or_space_or_spacelist_name";
3803 : }
3804 15674 : std::string areaName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, areaFieldName);
3805 :
3806 15674 : int zoneNum = UtilityRoutines::FindItemInList(areaName, state.dataHeatBal->Zone);
3807 15674 : if (zoneNum > 0) {
3808 15639 : inputObjects(objNum).spaceStartPtr = numGainInstances + 1;
3809 15639 : int numSpaces = state.dataHeatBal->Zone(zoneNum).numSpaces;
3810 15639 : numGainInstances += numSpaces;
3811 15639 : inputObjects(objNum).numOfSpaces = numSpaces;
3812 15639 : inputObjects(objNum).ZoneListActive = false;
3813 15639 : if (numSpaces == 1) {
3814 15634 : inputObjects(objNum).spaceNums.emplace_back(state.dataHeatBal->Zone(zoneNum).spaceIndexes(1));
3815 15634 : inputObjects(objNum).names.emplace_back(inputObjects(objNum).Name);
3816 : } else {
3817 20 : for (int const spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) {
3818 15 : inputObjects(objNum).spaceNums.emplace_back(spaceNum);
3819 15 : inputObjects(objNum).names.emplace_back(state.dataHeatBal->space(spaceNum).Name + ' ' + inputObjects(objNum).Name);
3820 : }
3821 : }
3822 15639 : continue;
3823 : }
3824 35 : int spaceNum = UtilityRoutines::FindItemInList(areaName, state.dataHeatBal->space);
3825 38 : if (spaceNum > 0) {
3826 3 : inputObjects(objNum).spaceStartPtr = numGainInstances + 1;
3827 3 : ++numGainInstances;
3828 3 : inputObjects(objNum).numOfSpaces = 1;
3829 3 : inputObjects(objNum).spaceListActive = false;
3830 3 : inputObjects(objNum).spaceOrSpaceListPtr = spaceNum;
3831 3 : inputObjects(objNum).spaceNums.emplace_back(spaceNum);
3832 3 : inputObjects(objNum).names.emplace_back(inputObjects(objNum).Name);
3833 3 : continue;
3834 : }
3835 32 : int zoneListNum = UtilityRoutines::FindItemInList(areaName, state.dataHeatBal->ZoneList);
3836 32 : if (zoneListNum > 0) {
3837 30 : if (zoneListNotAllowed) {
3838 0 : ShowSevereError(
3839 0 : state, objectType + "=\"" + thisObjectName + "\" ZoneList Name=\"" + areaName + "\" not allowed for " + objectType + ".");
3840 0 : errors = true;
3841 0 : localErrFlag = true;
3842 : } else {
3843 :
3844 30 : inputObjects(objNum).spaceStartPtr = numGainInstances + 1;
3845 30 : int numSpaces = 0;
3846 180 : for (int const listZoneIdx : state.dataHeatBal->ZoneList(zoneListNum).Zone) {
3847 150 : numSpaces += state.dataHeatBal->Zone(listZoneIdx).numSpaces;
3848 304 : for (int const spaceNum : state.dataHeatBal->Zone(listZoneIdx).spaceIndexes) {
3849 154 : inputObjects(objNum).spaceNums.emplace_back(spaceNum);
3850 154 : inputObjects(objNum).names.emplace_back(state.dataHeatBal->space(spaceNum).Name + ' ' + inputObjects(objNum).Name);
3851 : }
3852 : }
3853 30 : numGainInstances += numSpaces;
3854 30 : inputObjects(objNum).numOfSpaces = numSpaces;
3855 30 : inputObjects(objNum).ZoneListActive = true;
3856 : }
3857 30 : continue;
3858 : }
3859 2 : int spaceListNum = UtilityRoutines::FindItemInList(areaName, state.dataHeatBal->spaceList);
3860 2 : if (spaceListNum > 0) {
3861 2 : if (zoneListNotAllowed) {
3862 0 : ShowSevereError(state,
3863 0 : objectType + "=\"" + thisObjectName + "\" SpaceList Name=\"" + areaName + "\" not allowed for " + objectType +
3864 : ".");
3865 0 : errors = true;
3866 0 : localErrFlag = true;
3867 : } else {
3868 2 : inputObjects(objNum).spaceStartPtr = numGainInstances + 1;
3869 2 : int numSpaces = state.dataHeatBal->spaceList(spaceListNum).numListSpaces;
3870 2 : numGainInstances += numSpaces;
3871 2 : inputObjects(objNum).numOfSpaces = numSpaces;
3872 2 : inputObjects(objNum).spaceListActive = true;
3873 2 : inputObjects(objNum).spaceOrSpaceListPtr = spaceListNum;
3874 11 : for (int const spaceNum : state.dataHeatBal->spaceList(spaceListNum).spaces) {
3875 9 : inputObjects(objNum).spaceNums.emplace_back(spaceNum);
3876 9 : inputObjects(objNum).names.emplace_back(state.dataHeatBal->space(spaceNum).Name + ' ' + inputObjects(objNum).Name);
3877 : }
3878 : }
3879 2 : continue;
3880 : }
3881 0 : ShowSevereError(state, objectType + "=\"" + thisObjectName + "\" invalid " + areaFieldName + "=\"" + areaName + "\" not found.");
3882 0 : errors = true;
3883 0 : localErrFlag = true;
3884 : }
3885 12336 : if (localErrFlag) {
3886 0 : ShowSevereError(state, std::string{routineName} + "Errors with invalid names in " + objectType + " objects.");
3887 0 : ShowContinueError(state, "...These will not be read in. Other errors may occur.");
3888 0 : numGainInstances = 0;
3889 : }
3890 : }
3891 12336 : }
3892 :
3893 771 : void setupIHGOutputs(EnergyPlusData &state)
3894 : {
3895 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
3896 : // Overall Zone Variables
3897 19256 : SetupOutputVariable(state,
3898 : "Zone Total Internal Radiant Heating Energy",
3899 : OutputProcessor::Unit::J,
3900 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotRadiantGain,
3901 : OutputProcessor::SOVTimeStepType::Zone,
3902 : OutputProcessor::SOVStoreType::Summed,
3903 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3904 19256 : SetupOutputVariable(state,
3905 : "Zone Total Internal Radiant Heating Rate",
3906 : OutputProcessor::Unit::W,
3907 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotRadiantGainRate,
3908 : OutputProcessor::SOVTimeStepType::Zone,
3909 : OutputProcessor::SOVStoreType::Average,
3910 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3911 19256 : SetupOutputVariable(state,
3912 : "Zone Total Internal Visible Radiation Heating Energy",
3913 : OutputProcessor::Unit::J,
3914 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotVisHeatGain,
3915 : OutputProcessor::SOVTimeStepType::Zone,
3916 : OutputProcessor::SOVStoreType::Summed,
3917 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3918 19256 : SetupOutputVariable(state,
3919 : "Zone Total Internal Visible Radiation Heating Rate",
3920 : OutputProcessor::Unit::W,
3921 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotVisHeatGainRate,
3922 : OutputProcessor::SOVTimeStepType::Zone,
3923 : OutputProcessor::SOVStoreType::Average,
3924 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3925 19256 : SetupOutputVariable(state,
3926 : "Zone Total Internal Convective Heating Energy",
3927 : OutputProcessor::Unit::J,
3928 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotConvectiveGain,
3929 : OutputProcessor::SOVTimeStepType::Zone,
3930 : OutputProcessor::SOVStoreType::Summed,
3931 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3932 19256 : SetupOutputVariable(state,
3933 : "Zone Total Internal Convective Heating Rate",
3934 : OutputProcessor::Unit::W,
3935 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotConvectiveGainRate,
3936 : OutputProcessor::SOVTimeStepType::Zone,
3937 : OutputProcessor::SOVStoreType::Average,
3938 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3939 19256 : SetupOutputVariable(state,
3940 : "Zone Total Internal Latent Gain Energy",
3941 : OutputProcessor::Unit::J,
3942 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotLatentGain,
3943 : OutputProcessor::SOVTimeStepType::Zone,
3944 : OutputProcessor::SOVStoreType::Summed,
3945 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3946 19256 : SetupOutputVariable(state,
3947 : "Zone Total Internal Latent Gain Rate",
3948 : OutputProcessor::Unit::W,
3949 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotLatentGainRate,
3950 : OutputProcessor::SOVTimeStepType::Zone,
3951 : OutputProcessor::SOVStoreType::Average,
3952 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3953 19256 : SetupOutputVariable(state,
3954 : "Zone Total Internal Total Heating Energy",
3955 : OutputProcessor::Unit::J,
3956 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotTotalHeatGain,
3957 : OutputProcessor::SOVTimeStepType::Zone,
3958 : OutputProcessor::SOVStoreType::Summed,
3959 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3960 19256 : SetupOutputVariable(state,
3961 : "Zone Total Internal Total Heating Rate",
3962 : OutputProcessor::Unit::W,
3963 4814 : state.dataHeatBal->ZoneRpt(zoneNum).TotTotalHeatGainRate,
3964 : OutputProcessor::SOVTimeStepType::Zone,
3965 : OutputProcessor::SOVStoreType::Average,
3966 9628 : state.dataHeatBal->Zone(zoneNum).Name);
3967 : }
3968 :
3969 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
3970 : // Overall Space Variables
3971 19272 : SetupOutputVariable(state,
3972 : "Space Total Internal Radiant Heating Energy",
3973 : OutputProcessor::Unit::J,
3974 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotRadiantGain,
3975 : OutputProcessor::SOVTimeStepType::Zone,
3976 : OutputProcessor::SOVStoreType::Summed,
3977 9636 : state.dataHeatBal->space(spaceNum).Name);
3978 19272 : SetupOutputVariable(state,
3979 : "Space Total Internal Radiant Heating Rate",
3980 : OutputProcessor::Unit::W,
3981 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotRadiantGainRate,
3982 : OutputProcessor::SOVTimeStepType::Zone,
3983 : OutputProcessor::SOVStoreType::Average,
3984 9636 : state.dataHeatBal->space(spaceNum).Name);
3985 19272 : SetupOutputVariable(state,
3986 : "Space Total Internal Visible Radiation Heating Energy",
3987 : OutputProcessor::Unit::J,
3988 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotVisHeatGain,
3989 : OutputProcessor::SOVTimeStepType::Zone,
3990 : OutputProcessor::SOVStoreType::Summed,
3991 9636 : state.dataHeatBal->space(spaceNum).Name);
3992 19272 : SetupOutputVariable(state,
3993 : "Space Total Internal Visible Radiation Heating Rate",
3994 : OutputProcessor::Unit::W,
3995 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotVisHeatGainRate,
3996 : OutputProcessor::SOVTimeStepType::Zone,
3997 : OutputProcessor::SOVStoreType::Average,
3998 9636 : state.dataHeatBal->space(spaceNum).Name);
3999 19272 : SetupOutputVariable(state,
4000 : "Space Total Internal Convective Heating Energy",
4001 : OutputProcessor::Unit::J,
4002 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotConvectiveGain,
4003 : OutputProcessor::SOVTimeStepType::Zone,
4004 : OutputProcessor::SOVStoreType::Summed,
4005 9636 : state.dataHeatBal->space(spaceNum).Name);
4006 19272 : SetupOutputVariable(state,
4007 : "Space Total Internal Convective Heating Rate",
4008 : OutputProcessor::Unit::W,
4009 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotConvectiveGainRate,
4010 : OutputProcessor::SOVTimeStepType::Zone,
4011 : OutputProcessor::SOVStoreType::Average,
4012 9636 : state.dataHeatBal->space(spaceNum).Name);
4013 19272 : SetupOutputVariable(state,
4014 : "Space Total Internal Latent Gain Energy",
4015 : OutputProcessor::Unit::J,
4016 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotLatentGain,
4017 : OutputProcessor::SOVTimeStepType::Zone,
4018 : OutputProcessor::SOVStoreType::Summed,
4019 9636 : state.dataHeatBal->space(spaceNum).Name);
4020 19272 : SetupOutputVariable(state,
4021 : "Space Total Internal Latent Gain Rate",
4022 : OutputProcessor::Unit::W,
4023 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotLatentGainRate,
4024 : OutputProcessor::SOVTimeStepType::Zone,
4025 : OutputProcessor::SOVStoreType::Average,
4026 9636 : state.dataHeatBal->space(spaceNum).Name);
4027 19272 : SetupOutputVariable(state,
4028 : "Space Total Internal Total Heating Energy",
4029 : OutputProcessor::Unit::J,
4030 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotTotalHeatGain,
4031 : OutputProcessor::SOVTimeStepType::Zone,
4032 : OutputProcessor::SOVStoreType::Summed,
4033 9636 : state.dataHeatBal->space(spaceNum).Name);
4034 19272 : SetupOutputVariable(state,
4035 : "Space Total Internal Total Heating Rate",
4036 : OutputProcessor::Unit::W,
4037 4818 : state.dataHeatBal->spaceRpt(spaceNum).TotTotalHeatGainRate,
4038 : OutputProcessor::SOVTimeStepType::Zone,
4039 : OutputProcessor::SOVStoreType::Average,
4040 9636 : state.dataHeatBal->space(spaceNum).Name);
4041 : }
4042 :
4043 : // Add zone and space outputs only where the particular type of equipment is actually present
4044 1542 : Array1D_bool addZoneOutputs;
4045 771 : addZoneOutputs.dimension(state.dataGlobal->NumOfZones, false);
4046 1542 : Array1D_bool addSpaceOutputs;
4047 771 : addSpaceOutputs.dimension(state.dataGlobal->numSpaces, false);
4048 :
4049 4641 : for (int peopleNum = 1; peopleNum <= state.dataHeatBal->TotPeople; ++peopleNum) {
4050 : // Set flags for zone and space total report variables
4051 3870 : addZoneOutputs(state.dataHeatBal->People(peopleNum).ZonePtr) = true;
4052 3870 : addSpaceOutputs(state.dataHeatBal->People(peopleNum).spaceIndex) = true;
4053 : // Object report variables
4054 15480 : SetupOutputVariable(state,
4055 : "People Occupant Count",
4056 : OutputProcessor::Unit::None,
4057 3870 : state.dataHeatBal->People(peopleNum).NumOcc,
4058 : OutputProcessor::SOVTimeStepType::Zone,
4059 : OutputProcessor::SOVStoreType::Average,
4060 7740 : state.dataHeatBal->People(peopleNum).Name);
4061 15480 : SetupOutputVariable(state,
4062 : "People Radiant Heating Energy",
4063 : OutputProcessor::Unit::J,
4064 3870 : state.dataHeatBal->People(peopleNum).RadGainEnergy,
4065 : OutputProcessor::SOVTimeStepType::Zone,
4066 : OutputProcessor::SOVStoreType::Summed,
4067 7740 : state.dataHeatBal->People(peopleNum).Name);
4068 15480 : SetupOutputVariable(state,
4069 : "People Radiant Heating Rate",
4070 : OutputProcessor::Unit::W,
4071 3870 : state.dataHeatBal->People(peopleNum).RadGainRate,
4072 : OutputProcessor::SOVTimeStepType::Zone,
4073 : OutputProcessor::SOVStoreType::Average,
4074 7740 : state.dataHeatBal->People(peopleNum).Name);
4075 15480 : SetupOutputVariable(state,
4076 : "People Convective Heating Energy",
4077 : OutputProcessor::Unit::J,
4078 3870 : state.dataHeatBal->People(peopleNum).ConGainEnergy,
4079 : OutputProcessor::SOVTimeStepType::Zone,
4080 : OutputProcessor::SOVStoreType::Summed,
4081 7740 : state.dataHeatBal->People(peopleNum).Name);
4082 15480 : SetupOutputVariable(state,
4083 : "People Convective Heating Rate",
4084 : OutputProcessor::Unit::W,
4085 3870 : state.dataHeatBal->People(peopleNum).ConGainRate,
4086 : OutputProcessor::SOVTimeStepType::Zone,
4087 : OutputProcessor::SOVStoreType::Average,
4088 7740 : state.dataHeatBal->People(peopleNum).Name);
4089 15480 : SetupOutputVariable(state,
4090 : "People Sensible Heating Energy",
4091 : OutputProcessor::Unit::J,
4092 3870 : state.dataHeatBal->People(peopleNum).SenGainEnergy,
4093 : OutputProcessor::SOVTimeStepType::Zone,
4094 : OutputProcessor::SOVStoreType::Summed,
4095 7740 : state.dataHeatBal->People(peopleNum).Name);
4096 15480 : SetupOutputVariable(state,
4097 : "People Sensible Heating Rate",
4098 : OutputProcessor::Unit::W,
4099 3870 : state.dataHeatBal->People(peopleNum).SenGainRate,
4100 : OutputProcessor::SOVTimeStepType::Zone,
4101 : OutputProcessor::SOVStoreType::Average,
4102 7740 : state.dataHeatBal->People(peopleNum).Name);
4103 15480 : SetupOutputVariable(state,
4104 : "People Latent Gain Energy",
4105 : OutputProcessor::Unit::J,
4106 3870 : state.dataHeatBal->People(peopleNum).LatGainEnergy,
4107 : OutputProcessor::SOVTimeStepType::Zone,
4108 : OutputProcessor::SOVStoreType::Summed,
4109 7740 : state.dataHeatBal->People(peopleNum).Name);
4110 15480 : SetupOutputVariable(state,
4111 : "People Latent Gain Rate",
4112 : OutputProcessor::Unit::W,
4113 3870 : state.dataHeatBal->People(peopleNum).LatGainRate,
4114 : OutputProcessor::SOVTimeStepType::Zone,
4115 : OutputProcessor::SOVStoreType::Average,
4116 7740 : state.dataHeatBal->People(peopleNum).Name);
4117 15480 : SetupOutputVariable(state,
4118 : "People Total Heating Energy",
4119 : OutputProcessor::Unit::J,
4120 3870 : state.dataHeatBal->People(peopleNum).TotGainEnergy,
4121 : OutputProcessor::SOVTimeStepType::Zone,
4122 : OutputProcessor::SOVStoreType::Summed,
4123 7740 : state.dataHeatBal->People(peopleNum).Name);
4124 15480 : SetupOutputVariable(state,
4125 : "People Total Heating Rate",
4126 : OutputProcessor::Unit::W,
4127 3870 : state.dataHeatBal->People(peopleNum).TotGainRate,
4128 : OutputProcessor::SOVTimeStepType::Zone,
4129 : OutputProcessor::SOVStoreType::Average,
4130 7740 : state.dataHeatBal->People(peopleNum).Name);
4131 15480 : SetupOutputVariable(state,
4132 : "People Air Temperature",
4133 : OutputProcessor::Unit::C,
4134 3870 : state.dataHeatBal->People(peopleNum).TemperatureInZone,
4135 : OutputProcessor::SOVTimeStepType::Zone,
4136 : OutputProcessor::SOVStoreType::Average,
4137 7740 : state.dataHeatBal->People(peopleNum).Name);
4138 15480 : SetupOutputVariable(state,
4139 : "People Air Relative Humidity",
4140 : OutputProcessor::Unit::Perc,
4141 3870 : state.dataHeatBal->People(peopleNum).RelativeHumidityInZone,
4142 : OutputProcessor::SOVTimeStepType::Zone,
4143 : OutputProcessor::SOVStoreType::Average,
4144 7740 : state.dataHeatBal->People(peopleNum).Name);
4145 : }
4146 :
4147 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
4148 4814 : if (addZoneOutputs(zoneNum)) {
4149 : // Zone total report variables
4150 15404 : SetupOutputVariable(state,
4151 : "Zone People Occupant Count",
4152 : OutputProcessor::Unit::None,
4153 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleNumOcc,
4154 : OutputProcessor::SOVTimeStepType::Zone,
4155 : OutputProcessor::SOVStoreType::Average,
4156 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4157 15404 : SetupOutputVariable(state,
4158 : "Zone People Radiant Heating Energy",
4159 : OutputProcessor::Unit::J,
4160 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleRadGain,
4161 : OutputProcessor::SOVTimeStepType::Zone,
4162 : OutputProcessor::SOVStoreType::Summed,
4163 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4164 15404 : SetupOutputVariable(state,
4165 : "Zone People Radiant Heating Rate",
4166 : OutputProcessor::Unit::W,
4167 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleRadGainRate,
4168 : OutputProcessor::SOVTimeStepType::Zone,
4169 : OutputProcessor::SOVStoreType::Average,
4170 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4171 15404 : SetupOutputVariable(state,
4172 : "Zone People Convective Heating Energy",
4173 : OutputProcessor::Unit::J,
4174 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleConGain,
4175 : OutputProcessor::SOVTimeStepType::Zone,
4176 : OutputProcessor::SOVStoreType::Summed,
4177 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4178 15404 : SetupOutputVariable(state,
4179 : "Zone People Convective Heating Rate",
4180 : OutputProcessor::Unit::W,
4181 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleConGainRate,
4182 : OutputProcessor::SOVTimeStepType::Zone,
4183 : OutputProcessor::SOVStoreType::Average,
4184 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4185 15404 : SetupOutputVariable(state,
4186 : "Zone People Sensible Heating Energy",
4187 : OutputProcessor::Unit::J,
4188 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleSenGain,
4189 : OutputProcessor::SOVTimeStepType::Zone,
4190 : OutputProcessor::SOVStoreType::Summed,
4191 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4192 15404 : SetupOutputVariable(state,
4193 : "Zone People Sensible Heating Rate",
4194 : OutputProcessor::Unit::W,
4195 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleSenGainRate,
4196 : OutputProcessor::SOVTimeStepType::Zone,
4197 : OutputProcessor::SOVStoreType::Average,
4198 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4199 15404 : SetupOutputVariable(state,
4200 : "Zone People Latent Gain Energy",
4201 : OutputProcessor::Unit::J,
4202 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleLatGain,
4203 : OutputProcessor::SOVTimeStepType::Zone,
4204 : OutputProcessor::SOVStoreType::Summed,
4205 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4206 15404 : SetupOutputVariable(state,
4207 : "Zone People Latent Gain Rate",
4208 : OutputProcessor::Unit::W,
4209 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleLatGainRate,
4210 : OutputProcessor::SOVTimeStepType::Zone,
4211 : OutputProcessor::SOVStoreType::Average,
4212 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4213 15404 : SetupOutputVariable(state,
4214 : "Zone People Total Heating Energy",
4215 : OutputProcessor::Unit::J,
4216 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleTotGain,
4217 : OutputProcessor::SOVTimeStepType::Zone,
4218 : OutputProcessor::SOVStoreType::Summed,
4219 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4220 15404 : SetupOutputVariable(state,
4221 : "Zone People Total Heating Rate",
4222 : OutputProcessor::Unit::W,
4223 3851 : state.dataHeatBal->ZoneRpt(zoneNum).PeopleTotGainRate,
4224 : OutputProcessor::SOVTimeStepType::Zone,
4225 : OutputProcessor::SOVStoreType::Average,
4226 7702 : state.dataHeatBal->Zone(zoneNum).Name);
4227 : }
4228 : // Reset zone output flag
4229 4814 : addZoneOutputs(zoneNum) = false;
4230 : }
4231 :
4232 : // Space total report variables
4233 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
4234 4818 : if (addSpaceOutputs(spaceNum)) {
4235 15420 : SetupOutputVariable(state,
4236 : "Space People Occupant Count",
4237 : OutputProcessor::Unit::None,
4238 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleNumOcc,
4239 : OutputProcessor::SOVTimeStepType::Zone,
4240 : OutputProcessor::SOVStoreType::Average,
4241 7710 : state.dataHeatBal->space(spaceNum).Name);
4242 15420 : SetupOutputVariable(state,
4243 : "Space People Radiant Heating Energy",
4244 : OutputProcessor::Unit::J,
4245 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleRadGain,
4246 : OutputProcessor::SOVTimeStepType::Zone,
4247 : OutputProcessor::SOVStoreType::Summed,
4248 7710 : state.dataHeatBal->space(spaceNum).Name);
4249 15420 : SetupOutputVariable(state,
4250 : "Space People Radiant Heating Rate",
4251 : OutputProcessor::Unit::W,
4252 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleRadGainRate,
4253 : OutputProcessor::SOVTimeStepType::Zone,
4254 : OutputProcessor::SOVStoreType::Average,
4255 7710 : state.dataHeatBal->space(spaceNum).Name);
4256 15420 : SetupOutputVariable(state,
4257 : "Space People Convective Heating Energy",
4258 : OutputProcessor::Unit::J,
4259 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleConGain,
4260 : OutputProcessor::SOVTimeStepType::Zone,
4261 : OutputProcessor::SOVStoreType::Summed,
4262 7710 : state.dataHeatBal->space(spaceNum).Name);
4263 15420 : SetupOutputVariable(state,
4264 : "Space People Convective Heating Rate",
4265 : OutputProcessor::Unit::W,
4266 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleConGainRate,
4267 : OutputProcessor::SOVTimeStepType::Zone,
4268 : OutputProcessor::SOVStoreType::Average,
4269 7710 : state.dataHeatBal->space(spaceNum).Name);
4270 15420 : SetupOutputVariable(state,
4271 : "Space People Sensible Heating Energy",
4272 : OutputProcessor::Unit::J,
4273 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleSenGain,
4274 : OutputProcessor::SOVTimeStepType::Zone,
4275 : OutputProcessor::SOVStoreType::Summed,
4276 7710 : state.dataHeatBal->space(spaceNum).Name);
4277 15420 : SetupOutputVariable(state,
4278 : "Space People Sensible Heating Rate",
4279 : OutputProcessor::Unit::W,
4280 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleSenGainRate,
4281 : OutputProcessor::SOVTimeStepType::Zone,
4282 : OutputProcessor::SOVStoreType::Average,
4283 7710 : state.dataHeatBal->space(spaceNum).Name);
4284 15420 : SetupOutputVariable(state,
4285 : "Space People Latent Gain Energy",
4286 : OutputProcessor::Unit::J,
4287 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleLatGain,
4288 : OutputProcessor::SOVTimeStepType::Zone,
4289 : OutputProcessor::SOVStoreType::Summed,
4290 7710 : state.dataHeatBal->space(spaceNum).Name);
4291 15420 : SetupOutputVariable(state,
4292 : "Space People Latent Gain Rate",
4293 : OutputProcessor::Unit::W,
4294 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleLatGainRate,
4295 : OutputProcessor::SOVTimeStepType::Zone,
4296 : OutputProcessor::SOVStoreType::Average,
4297 7710 : state.dataHeatBal->space(spaceNum).Name);
4298 15420 : SetupOutputVariable(state,
4299 : "Space People Total Heating Energy",
4300 : OutputProcessor::Unit::J,
4301 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleTotGain,
4302 : OutputProcessor::SOVTimeStepType::Zone,
4303 : OutputProcessor::SOVStoreType::Summed,
4304 7710 : state.dataHeatBal->space(spaceNum).Name);
4305 15420 : SetupOutputVariable(state,
4306 : "Space People Total Heating Rate",
4307 : OutputProcessor::Unit::W,
4308 3855 : state.dataHeatBal->spaceRpt(spaceNum).PeopleTotGainRate,
4309 : OutputProcessor::SOVTimeStepType::Zone,
4310 : OutputProcessor::SOVStoreType::Average,
4311 7710 : state.dataHeatBal->space(spaceNum).Name);
4312 : }
4313 : // Reset space output flag
4314 4818 : addSpaceOutputs(spaceNum) = false;
4315 : }
4316 :
4317 4822 : for (int lightsNum = 1; lightsNum <= state.dataHeatBal->TotLights; ++lightsNum) {
4318 : // Set flags for zone and space total report variables
4319 4051 : addZoneOutputs(state.dataHeatBal->Lights(lightsNum).ZonePtr) = true;
4320 4051 : addSpaceOutputs(state.dataHeatBal->Lights(lightsNum).spaceIndex) = true;
4321 : // Object report variables
4322 16204 : SetupOutputVariable(state,
4323 : "Lights Electricity Rate",
4324 : OutputProcessor::Unit::W,
4325 4051 : state.dataHeatBal->Lights(lightsNum).Power,
4326 : OutputProcessor::SOVTimeStepType::Zone,
4327 : OutputProcessor::SOVStoreType::Average,
4328 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4329 :
4330 16204 : SetupOutputVariable(state,
4331 : "Lights Radiant Heating Energy",
4332 : OutputProcessor::Unit::J,
4333 4051 : state.dataHeatBal->Lights(lightsNum).RadGainEnergy,
4334 : OutputProcessor::SOVTimeStepType::Zone,
4335 : OutputProcessor::SOVStoreType::Summed,
4336 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4337 16204 : SetupOutputVariable(state,
4338 : "Lights Radiant Heating Rate",
4339 : OutputProcessor::Unit::W,
4340 4051 : state.dataHeatBal->Lights(lightsNum).RadGainRate,
4341 : OutputProcessor::SOVTimeStepType::Zone,
4342 : OutputProcessor::SOVStoreType::Average,
4343 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4344 16204 : SetupOutputVariable(state,
4345 : "Lights Visible Radiation Heating Energy",
4346 : OutputProcessor::Unit::J,
4347 4051 : state.dataHeatBal->Lights(lightsNum).VisGainEnergy,
4348 : OutputProcessor::SOVTimeStepType::Zone,
4349 : OutputProcessor::SOVStoreType::Summed,
4350 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4351 :
4352 16204 : SetupOutputVariable(state,
4353 : "Lights Visible Radiation Heating Rate",
4354 : OutputProcessor::Unit::W,
4355 4051 : state.dataHeatBal->Lights(lightsNum).VisGainRate,
4356 : OutputProcessor::SOVTimeStepType::Zone,
4357 : OutputProcessor::SOVStoreType::Average,
4358 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4359 16204 : SetupOutputVariable(state,
4360 : "Lights Convective Heating Energy",
4361 : OutputProcessor::Unit::J,
4362 4051 : state.dataHeatBal->Lights(lightsNum).ConGainEnergy,
4363 : OutputProcessor::SOVTimeStepType::Zone,
4364 : OutputProcessor::SOVStoreType::Summed,
4365 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4366 16204 : SetupOutputVariable(state,
4367 : "Lights Convective Heating Rate",
4368 : OutputProcessor::Unit::W,
4369 4051 : state.dataHeatBal->Lights(lightsNum).ConGainRate,
4370 : OutputProcessor::SOVTimeStepType::Zone,
4371 : OutputProcessor::SOVStoreType::Average,
4372 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4373 16204 : SetupOutputVariable(state,
4374 : "Lights Return Air Heating Energy",
4375 : OutputProcessor::Unit::J,
4376 4051 : state.dataHeatBal->Lights(lightsNum).RetAirGainEnergy,
4377 : OutputProcessor::SOVTimeStepType::Zone,
4378 : OutputProcessor::SOVStoreType::Summed,
4379 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4380 16204 : SetupOutputVariable(state,
4381 : "Lights Return Air Heating Rate",
4382 : OutputProcessor::Unit::W,
4383 4051 : state.dataHeatBal->Lights(lightsNum).RetAirGainRate,
4384 : OutputProcessor::SOVTimeStepType::Zone,
4385 : OutputProcessor::SOVStoreType::Average,
4386 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4387 16204 : SetupOutputVariable(state,
4388 : "Lights Total Heating Energy",
4389 : OutputProcessor::Unit::J,
4390 4051 : state.dataHeatBal->Lights(lightsNum).TotGainEnergy,
4391 : OutputProcessor::SOVTimeStepType::Zone,
4392 : OutputProcessor::SOVStoreType::Summed,
4393 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4394 16204 : SetupOutputVariable(state,
4395 : "Lights Total Heating Rate",
4396 : OutputProcessor::Unit::W,
4397 4051 : state.dataHeatBal->Lights(lightsNum).TotGainRate,
4398 : OutputProcessor::SOVTimeStepType::Zone,
4399 : OutputProcessor::SOVStoreType::Average,
4400 8102 : state.dataHeatBal->Lights(lightsNum).Name);
4401 32408 : SetupOutputVariable(state,
4402 : "Lights Electricity Energy",
4403 : OutputProcessor::Unit::J,
4404 4051 : state.dataHeatBal->Lights(lightsNum).Consumption,
4405 : OutputProcessor::SOVTimeStepType::Zone,
4406 : OutputProcessor::SOVStoreType::Summed,
4407 4051 : state.dataHeatBal->Lights(lightsNum).Name,
4408 : _,
4409 : "Electricity",
4410 : "InteriorLights",
4411 4051 : state.dataHeatBal->Lights(lightsNum).EndUseSubcategory,
4412 : "Building",
4413 4051 : state.dataHeatBal->Zone(state.dataHeatBal->Lights(lightsNum).ZonePtr).Name,
4414 4051 : state.dataHeatBal->Zone(state.dataHeatBal->Lights(lightsNum).ZonePtr).Multiplier,
4415 4051 : state.dataHeatBal->Zone(state.dataHeatBal->Lights(lightsNum).ZonePtr).ListMultiplier,
4416 : _,
4417 : _,
4418 8102 : state.dataHeatBal->space(state.dataHeatBal->Lights(lightsNum).spaceIndex).spaceType);
4419 : }
4420 :
4421 : // Zone total report variables
4422 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
4423 4814 : if (addZoneOutputs(zoneNum)) {
4424 15628 : SetupOutputVariable(state,
4425 : "Zone Lights Electricity Rate",
4426 : OutputProcessor::Unit::W,
4427 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsPower,
4428 : OutputProcessor::SOVTimeStepType::Zone,
4429 : OutputProcessor::SOVStoreType::Average,
4430 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4431 15628 : SetupOutputVariable(state,
4432 : "Zone Lights Electricity Energy",
4433 : OutputProcessor::Unit::J,
4434 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsElecConsump,
4435 : OutputProcessor::SOVTimeStepType::Zone,
4436 : OutputProcessor::SOVStoreType::Summed,
4437 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4438 15628 : SetupOutputVariable(state,
4439 : "Zone Lights Radiant Heating Energy",
4440 : OutputProcessor::Unit::J,
4441 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsRadGain,
4442 : OutputProcessor::SOVTimeStepType::Zone,
4443 : OutputProcessor::SOVStoreType::Summed,
4444 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4445 15628 : SetupOutputVariable(state,
4446 : "Zone Lights Radiant Heating Rate",
4447 : OutputProcessor::Unit::W,
4448 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsRadGainRate,
4449 : OutputProcessor::SOVTimeStepType::Zone,
4450 : OutputProcessor::SOVStoreType::Average,
4451 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4452 15628 : SetupOutputVariable(state,
4453 : "Zone Lights Visible Radiation Heating Energy",
4454 : OutputProcessor::Unit::J,
4455 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsVisGain,
4456 : OutputProcessor::SOVTimeStepType::Zone,
4457 : OutputProcessor::SOVStoreType::Summed,
4458 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4459 15628 : SetupOutputVariable(state,
4460 : "Zone Lights Visible Radiation Heating Rate",
4461 : OutputProcessor::Unit::W,
4462 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsVisGainRate,
4463 : OutputProcessor::SOVTimeStepType::Zone,
4464 : OutputProcessor::SOVStoreType::Average,
4465 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4466 15628 : SetupOutputVariable(state,
4467 : "Zone Lights Convective Heating Energy",
4468 : OutputProcessor::Unit::J,
4469 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsConGain,
4470 : OutputProcessor::SOVTimeStepType::Zone,
4471 : OutputProcessor::SOVStoreType::Summed,
4472 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4473 15628 : SetupOutputVariable(state,
4474 : "Zone Lights Convective Heating Rate",
4475 : OutputProcessor::Unit::W,
4476 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsConGainRate,
4477 : OutputProcessor::SOVTimeStepType::Zone,
4478 : OutputProcessor::SOVStoreType::Average,
4479 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4480 15628 : SetupOutputVariable(state,
4481 : "Zone Lights Return Air Heating Energy",
4482 : OutputProcessor::Unit::J,
4483 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsRetAirGain,
4484 : OutputProcessor::SOVTimeStepType::Zone,
4485 : OutputProcessor::SOVStoreType::Summed,
4486 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4487 15628 : SetupOutputVariable(state,
4488 : "Zone Lights Return Air Heating Rate",
4489 : OutputProcessor::Unit::W,
4490 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsRetAirGainRate,
4491 : OutputProcessor::SOVTimeStepType::Zone,
4492 : OutputProcessor::SOVStoreType::Average,
4493 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4494 15628 : SetupOutputVariable(state,
4495 : "Zone Lights Total Heating Energy",
4496 : OutputProcessor::Unit::J,
4497 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsTotGain,
4498 : OutputProcessor::SOVTimeStepType::Zone,
4499 : OutputProcessor::SOVStoreType::Summed,
4500 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4501 15628 : SetupOutputVariable(state,
4502 : "Zone Lights Total Heating Rate",
4503 : OutputProcessor::Unit::W,
4504 3907 : state.dataHeatBal->ZoneRpt(zoneNum).LtsTotGainRate,
4505 : OutputProcessor::SOVTimeStepType::Zone,
4506 : OutputProcessor::SOVStoreType::Average,
4507 7814 : state.dataHeatBal->Zone(zoneNum).Name);
4508 : }
4509 : // Reset zone output flag
4510 4814 : addZoneOutputs(zoneNum) = false;
4511 : }
4512 :
4513 : // Space total report variables
4514 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
4515 4818 : if (addSpaceOutputs(spaceNum)) {
4516 15644 : SetupOutputVariable(state,
4517 : "Space Lights Electricity Rate",
4518 : OutputProcessor::Unit::W,
4519 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsPower,
4520 : OutputProcessor::SOVTimeStepType::Zone,
4521 : OutputProcessor::SOVStoreType::Average,
4522 7822 : state.dataHeatBal->space(spaceNum).Name);
4523 15644 : SetupOutputVariable(state,
4524 : "Space Lights Electricity Energy",
4525 : OutputProcessor::Unit::J,
4526 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsElecConsump,
4527 : OutputProcessor::SOVTimeStepType::Zone,
4528 : OutputProcessor::SOVStoreType::Summed,
4529 7822 : state.dataHeatBal->space(spaceNum).Name);
4530 15644 : SetupOutputVariable(state,
4531 : "Space Lights Radiant Heating Energy",
4532 : OutputProcessor::Unit::J,
4533 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsRadGain,
4534 : OutputProcessor::SOVTimeStepType::Zone,
4535 : OutputProcessor::SOVStoreType::Summed,
4536 7822 : state.dataHeatBal->space(spaceNum).Name);
4537 15644 : SetupOutputVariable(state,
4538 : "Space Lights Radiant Heating Rate",
4539 : OutputProcessor::Unit::W,
4540 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsRadGainRate,
4541 : OutputProcessor::SOVTimeStepType::Zone,
4542 : OutputProcessor::SOVStoreType::Average,
4543 7822 : state.dataHeatBal->space(spaceNum).Name);
4544 15644 : SetupOutputVariable(state,
4545 : "Space Lights Visible Radiation Heating Energy",
4546 : OutputProcessor::Unit::J,
4547 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsVisGain,
4548 : OutputProcessor::SOVTimeStepType::Zone,
4549 : OutputProcessor::SOVStoreType::Summed,
4550 7822 : state.dataHeatBal->space(spaceNum).Name);
4551 15644 : SetupOutputVariable(state,
4552 : "Space Lights Visible Radiation Heating Rate",
4553 : OutputProcessor::Unit::W,
4554 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsVisGainRate,
4555 : OutputProcessor::SOVTimeStepType::Zone,
4556 : OutputProcessor::SOVStoreType::Average,
4557 7822 : state.dataHeatBal->space(spaceNum).Name);
4558 15644 : SetupOutputVariable(state,
4559 : "Space Lights Convective Heating Energy",
4560 : OutputProcessor::Unit::J,
4561 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsConGain,
4562 : OutputProcessor::SOVTimeStepType::Zone,
4563 : OutputProcessor::SOVStoreType::Summed,
4564 7822 : state.dataHeatBal->space(spaceNum).Name);
4565 15644 : SetupOutputVariable(state,
4566 : "Space Lights Convective Heating Rate",
4567 : OutputProcessor::Unit::W,
4568 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsConGainRate,
4569 : OutputProcessor::SOVTimeStepType::Zone,
4570 : OutputProcessor::SOVStoreType::Average,
4571 7822 : state.dataHeatBal->space(spaceNum).Name);
4572 15644 : SetupOutputVariable(state,
4573 : "Space Lights Return Air Heating Energy",
4574 : OutputProcessor::Unit::J,
4575 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsRetAirGain,
4576 : OutputProcessor::SOVTimeStepType::Zone,
4577 : OutputProcessor::SOVStoreType::Summed,
4578 7822 : state.dataHeatBal->space(spaceNum).Name);
4579 15644 : SetupOutputVariable(state,
4580 : "Space Lights Return Air Heating Rate",
4581 : OutputProcessor::Unit::W,
4582 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsRetAirGainRate,
4583 : OutputProcessor::SOVTimeStepType::Zone,
4584 : OutputProcessor::SOVStoreType::Average,
4585 7822 : state.dataHeatBal->space(spaceNum).Name);
4586 15644 : SetupOutputVariable(state,
4587 : "Space Lights Total Heating Energy",
4588 : OutputProcessor::Unit::J,
4589 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsTotGain,
4590 : OutputProcessor::SOVTimeStepType::Zone,
4591 : OutputProcessor::SOVStoreType::Summed,
4592 7822 : state.dataHeatBal->space(spaceNum).Name);
4593 15644 : SetupOutputVariable(state,
4594 : "Space Lights Total Heating Rate",
4595 : OutputProcessor::Unit::W,
4596 3911 : state.dataHeatBal->spaceRpt(spaceNum).LtsTotGainRate,
4597 : OutputProcessor::SOVTimeStepType::Zone,
4598 : OutputProcessor::SOVStoreType::Average,
4599 7822 : state.dataHeatBal->space(spaceNum).Name);
4600 : }
4601 : // Reset space output flag
4602 4818 : addSpaceOutputs(spaceNum) = false;
4603 : }
4604 4945 : for (int elecEqNum = 1; elecEqNum <= state.dataHeatBal->TotElecEquip; ++elecEqNum) {
4605 : // Set flags for zone and space total report variables
4606 4174 : addZoneOutputs(state.dataHeatBal->ZoneElectric(elecEqNum).ZonePtr) = true;
4607 4174 : addSpaceOutputs(state.dataHeatBal->ZoneElectric(elecEqNum).spaceIndex) = true;
4608 : // Object report variables
4609 16696 : SetupOutputVariable(state,
4610 : "Electric Equipment Electricity Rate",
4611 : OutputProcessor::Unit::W,
4612 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).Power,
4613 : OutputProcessor::SOVTimeStepType::Zone,
4614 : OutputProcessor::SOVStoreType::Average,
4615 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4616 33392 : SetupOutputVariable(state,
4617 : "Electric Equipment Electricity Energy",
4618 : OutputProcessor::Unit::J,
4619 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).Consumption,
4620 : OutputProcessor::SOVTimeStepType::Zone,
4621 : OutputProcessor::SOVStoreType::Summed,
4622 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).Name,
4623 : _,
4624 : "Electricity",
4625 : "InteriorEquipment",
4626 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).EndUseSubcategory,
4627 : "Building",
4628 4174 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneElectric(elecEqNum).ZonePtr).Name,
4629 4174 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneElectric(elecEqNum).ZonePtr).Multiplier,
4630 4174 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneElectric(elecEqNum).ZonePtr).ListMultiplier,
4631 : _,
4632 : _,
4633 8348 : state.dataHeatBal->space(state.dataHeatBal->ZoneElectric(elecEqNum).spaceIndex).spaceType);
4634 :
4635 16696 : SetupOutputVariable(state,
4636 : "Electric Equipment Radiant Heating Energy",
4637 : OutputProcessor::Unit::J,
4638 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).RadGainEnergy,
4639 : OutputProcessor::SOVTimeStepType::Zone,
4640 : OutputProcessor::SOVStoreType::Summed,
4641 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4642 16696 : SetupOutputVariable(state,
4643 : "Electric Equipment Radiant Heating Rate",
4644 : OutputProcessor::Unit::W,
4645 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).RadGainRate,
4646 : OutputProcessor::SOVTimeStepType::Zone,
4647 : OutputProcessor::SOVStoreType::Average,
4648 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4649 16696 : SetupOutputVariable(state,
4650 : "Electric Equipment Convective Heating Energy",
4651 : OutputProcessor::Unit::J,
4652 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).ConGainEnergy,
4653 : OutputProcessor::SOVTimeStepType::Zone,
4654 : OutputProcessor::SOVStoreType::Summed,
4655 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4656 16696 : SetupOutputVariable(state,
4657 : "Electric Equipment Convective Heating Rate",
4658 : OutputProcessor::Unit::W,
4659 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).ConGainRate,
4660 : OutputProcessor::SOVTimeStepType::Zone,
4661 : OutputProcessor::SOVStoreType::Average,
4662 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4663 16696 : SetupOutputVariable(state,
4664 : "Electric Equipment Latent Gain Energy",
4665 : OutputProcessor::Unit::J,
4666 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).LatGainEnergy,
4667 : OutputProcessor::SOVTimeStepType::Zone,
4668 : OutputProcessor::SOVStoreType::Summed,
4669 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4670 16696 : SetupOutputVariable(state,
4671 : "Electric Equipment Latent Gain Rate",
4672 : OutputProcessor::Unit::W,
4673 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).LatGainRate,
4674 : OutputProcessor::SOVTimeStepType::Zone,
4675 : OutputProcessor::SOVStoreType::Average,
4676 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4677 16696 : SetupOutputVariable(state,
4678 : "Electric Equipment Lost Heat Energy",
4679 : OutputProcessor::Unit::J,
4680 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).LostEnergy,
4681 : OutputProcessor::SOVTimeStepType::Zone,
4682 : OutputProcessor::SOVStoreType::Summed,
4683 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4684 16696 : SetupOutputVariable(state,
4685 : "Electric Equipment Lost Heat Rate",
4686 : OutputProcessor::Unit::W,
4687 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).LostRate,
4688 : OutputProcessor::SOVTimeStepType::Zone,
4689 : OutputProcessor::SOVStoreType::Average,
4690 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4691 16696 : SetupOutputVariable(state,
4692 : "Electric Equipment Total Heating Energy",
4693 : OutputProcessor::Unit::J,
4694 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).TotGainEnergy,
4695 : OutputProcessor::SOVTimeStepType::Zone,
4696 : OutputProcessor::SOVStoreType::Summed,
4697 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4698 16696 : SetupOutputVariable(state,
4699 : "Electric Equipment Total Heating Rate",
4700 : OutputProcessor::Unit::W,
4701 4174 : state.dataHeatBal->ZoneElectric(elecEqNum).TotGainRate,
4702 : OutputProcessor::SOVTimeStepType::Zone,
4703 : OutputProcessor::SOVStoreType::Average,
4704 8348 : state.dataHeatBal->ZoneElectric(elecEqNum).Name);
4705 : }
4706 :
4707 : // Zone total report variables
4708 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
4709 4814 : if (addZoneOutputs(zoneNum)) {
4710 15892 : SetupOutputVariable(state,
4711 : "Zone Electric Equipment Electricity Rate",
4712 : OutputProcessor::Unit::W,
4713 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecPower,
4714 : OutputProcessor::SOVTimeStepType::Zone,
4715 : OutputProcessor::SOVStoreType::Average,
4716 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4717 15892 : SetupOutputVariable(state,
4718 : "Zone Electric Equipment Electricity Energy",
4719 : OutputProcessor::Unit::J,
4720 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecConsump,
4721 : OutputProcessor::SOVTimeStepType::Zone,
4722 : OutputProcessor::SOVStoreType::Summed,
4723 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4724 :
4725 15892 : SetupOutputVariable(state,
4726 : "Zone Electric Equipment Radiant Heating Energy",
4727 : OutputProcessor::Unit::J,
4728 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecRadGain,
4729 : OutputProcessor::SOVTimeStepType::Zone,
4730 : OutputProcessor::SOVStoreType::Summed,
4731 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4732 15892 : SetupOutputVariable(state,
4733 : "Zone Electric Equipment Radiant Heating Rate",
4734 : OutputProcessor::Unit::W,
4735 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecRadGainRate,
4736 : OutputProcessor::SOVTimeStepType::Zone,
4737 : OutputProcessor::SOVStoreType::Average,
4738 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4739 15892 : SetupOutputVariable(state,
4740 : "Zone Electric Equipment Convective Heating Energy",
4741 : OutputProcessor::Unit::J,
4742 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecConGain,
4743 : OutputProcessor::SOVTimeStepType::Zone,
4744 : OutputProcessor::SOVStoreType::Summed,
4745 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4746 15892 : SetupOutputVariable(state,
4747 : "Zone Electric Equipment Convective Heating Rate",
4748 : OutputProcessor::Unit::W,
4749 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecConGainRate,
4750 : OutputProcessor::SOVTimeStepType::Zone,
4751 : OutputProcessor::SOVStoreType::Average,
4752 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4753 15892 : SetupOutputVariable(state,
4754 : "Zone Electric Equipment Latent Gain Energy",
4755 : OutputProcessor::Unit::J,
4756 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecLatGain,
4757 : OutputProcessor::SOVTimeStepType::Zone,
4758 : OutputProcessor::SOVStoreType::Summed,
4759 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4760 15892 : SetupOutputVariable(state,
4761 : "Zone Electric Equipment Latent Gain Rate",
4762 : OutputProcessor::Unit::W,
4763 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecLatGainRate,
4764 : OutputProcessor::SOVTimeStepType::Zone,
4765 : OutputProcessor::SOVStoreType::Average,
4766 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4767 15892 : SetupOutputVariable(state,
4768 : "Zone Electric Equipment Lost Heat Energy",
4769 : OutputProcessor::Unit::J,
4770 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecLost,
4771 : OutputProcessor::SOVTimeStepType::Zone,
4772 : OutputProcessor::SOVStoreType::Summed,
4773 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4774 15892 : SetupOutputVariable(state,
4775 : "Zone Electric Equipment Lost Heat Rate",
4776 : OutputProcessor::Unit::W,
4777 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecLostRate,
4778 : OutputProcessor::SOVTimeStepType::Zone,
4779 : OutputProcessor::SOVStoreType::Average,
4780 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4781 15892 : SetupOutputVariable(state,
4782 : "Zone Electric Equipment Total Heating Energy",
4783 : OutputProcessor::Unit::J,
4784 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecTotGain,
4785 : OutputProcessor::SOVTimeStepType::Zone,
4786 : OutputProcessor::SOVStoreType::Summed,
4787 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4788 15892 : SetupOutputVariable(state,
4789 : "Zone Electric Equipment Total Heating Rate",
4790 : OutputProcessor::Unit::W,
4791 3973 : state.dataHeatBal->ZoneRpt(zoneNum).ElecTotGainRate,
4792 : OutputProcessor::SOVTimeStepType::Zone,
4793 : OutputProcessor::SOVStoreType::Average,
4794 7946 : state.dataHeatBal->Zone(zoneNum).Name);
4795 : }
4796 : // Reset zone output flag
4797 4814 : addZoneOutputs(zoneNum) = false;
4798 : }
4799 :
4800 : // space total report variables
4801 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
4802 4818 : if (addSpaceOutputs(spaceNum)) {
4803 15904 : SetupOutputVariable(state,
4804 : "Space Electric Equipment Electricity Rate",
4805 : OutputProcessor::Unit::W,
4806 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecPower,
4807 : OutputProcessor::SOVTimeStepType::Zone,
4808 : OutputProcessor::SOVStoreType::Average,
4809 7952 : state.dataHeatBal->space(spaceNum).Name);
4810 15904 : SetupOutputVariable(state,
4811 : "Space Electric Equipment Electricity Energy",
4812 : OutputProcessor::Unit::J,
4813 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecConsump,
4814 : OutputProcessor::SOVTimeStepType::Zone,
4815 : OutputProcessor::SOVStoreType::Summed,
4816 7952 : state.dataHeatBal->space(spaceNum).Name);
4817 :
4818 15904 : SetupOutputVariable(state,
4819 : "Space Electric Equipment Radiant Heating Energy",
4820 : OutputProcessor::Unit::J,
4821 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecRadGain,
4822 : OutputProcessor::SOVTimeStepType::Zone,
4823 : OutputProcessor::SOVStoreType::Summed,
4824 7952 : state.dataHeatBal->space(spaceNum).Name);
4825 15904 : SetupOutputVariable(state,
4826 : "Space Electric Equipment Radiant Heating Rate",
4827 : OutputProcessor::Unit::W,
4828 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecRadGainRate,
4829 : OutputProcessor::SOVTimeStepType::Zone,
4830 : OutputProcessor::SOVStoreType::Average,
4831 7952 : state.dataHeatBal->space(spaceNum).Name);
4832 15904 : SetupOutputVariable(state,
4833 : "Space Electric Equipment Convective Heating Energy",
4834 : OutputProcessor::Unit::J,
4835 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecConGain,
4836 : OutputProcessor::SOVTimeStepType::Zone,
4837 : OutputProcessor::SOVStoreType::Summed,
4838 7952 : state.dataHeatBal->space(spaceNum).Name);
4839 15904 : SetupOutputVariable(state,
4840 : "Space Electric Equipment Convective Heating Rate",
4841 : OutputProcessor::Unit::W,
4842 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecConGainRate,
4843 : OutputProcessor::SOVTimeStepType::Zone,
4844 : OutputProcessor::SOVStoreType::Average,
4845 7952 : state.dataHeatBal->space(spaceNum).Name);
4846 15904 : SetupOutputVariable(state,
4847 : "Space Electric Equipment Latent Gain Energy",
4848 : OutputProcessor::Unit::J,
4849 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecLatGain,
4850 : OutputProcessor::SOVTimeStepType::Zone,
4851 : OutputProcessor::SOVStoreType::Summed,
4852 7952 : state.dataHeatBal->space(spaceNum).Name);
4853 15904 : SetupOutputVariable(state,
4854 : "Space Electric Equipment Latent Gain Rate",
4855 : OutputProcessor::Unit::W,
4856 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecLatGainRate,
4857 : OutputProcessor::SOVTimeStepType::Zone,
4858 : OutputProcessor::SOVStoreType::Average,
4859 7952 : state.dataHeatBal->space(spaceNum).Name);
4860 15904 : SetupOutputVariable(state,
4861 : "Space Electric Equipment Lost Heat Energy",
4862 : OutputProcessor::Unit::J,
4863 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecLost,
4864 : OutputProcessor::SOVTimeStepType::Zone,
4865 : OutputProcessor::SOVStoreType::Summed,
4866 7952 : state.dataHeatBal->space(spaceNum).Name);
4867 15904 : SetupOutputVariable(state,
4868 : "Space Electric Equipment Lost Heat Rate",
4869 : OutputProcessor::Unit::W,
4870 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecLostRate,
4871 : OutputProcessor::SOVTimeStepType::Zone,
4872 : OutputProcessor::SOVStoreType::Average,
4873 7952 : state.dataHeatBal->space(spaceNum).Name);
4874 15904 : SetupOutputVariable(state,
4875 : "Space Electric Equipment Total Heating Energy",
4876 : OutputProcessor::Unit::J,
4877 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecTotGain,
4878 : OutputProcessor::SOVTimeStepType::Zone,
4879 : OutputProcessor::SOVStoreType::Summed,
4880 7952 : state.dataHeatBal->space(spaceNum).Name);
4881 15904 : SetupOutputVariable(state,
4882 : "Space Electric Equipment Total Heating Rate",
4883 : OutputProcessor::Unit::W,
4884 3976 : state.dataHeatBal->spaceRpt(spaceNum).ElecTotGainRate,
4885 : OutputProcessor::SOVTimeStepType::Zone,
4886 : OutputProcessor::SOVStoreType::Average,
4887 7952 : state.dataHeatBal->space(spaceNum).Name);
4888 : }
4889 : // Reset space output flag
4890 4818 : addSpaceOutputs(spaceNum) = false;
4891 : }
4892 : // Object report variables
4893 849 : for (int gasEqNum = 1; gasEqNum <= state.dataHeatBal->TotGasEquip; ++gasEqNum) {
4894 : // Set flags for zone and space total report variables
4895 78 : addZoneOutputs(state.dataHeatBal->ZoneGas(gasEqNum).ZonePtr) = true;
4896 78 : addSpaceOutputs(state.dataHeatBal->ZoneGas(gasEqNum).spaceIndex) = true;
4897 312 : SetupOutputVariable(state,
4898 : "Gas Equipment NaturalGas Rate",
4899 : OutputProcessor::Unit::W,
4900 78 : state.dataHeatBal->ZoneGas(gasEqNum).Power,
4901 : OutputProcessor::SOVTimeStepType::Zone,
4902 : OutputProcessor::SOVStoreType::Average,
4903 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4904 624 : SetupOutputVariable(state,
4905 : "Gas Equipment NaturalGas Energy",
4906 : OutputProcessor::Unit::J,
4907 78 : state.dataHeatBal->ZoneGas(gasEqNum).Consumption,
4908 : OutputProcessor::SOVTimeStepType::Zone,
4909 : OutputProcessor::SOVStoreType::Summed,
4910 78 : state.dataHeatBal->ZoneGas(gasEqNum).Name,
4911 : _,
4912 : "NaturalGas",
4913 : "InteriorEquipment",
4914 78 : state.dataHeatBal->ZoneGas(gasEqNum).EndUseSubcategory,
4915 : "Building",
4916 78 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneGas(gasEqNum).ZonePtr).Name,
4917 78 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneGas(gasEqNum).ZonePtr).Multiplier,
4918 78 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneGas(gasEqNum).ZonePtr).ListMultiplier,
4919 : _,
4920 : _,
4921 156 : state.dataHeatBal->space(state.dataHeatBal->ZoneGas(gasEqNum).spaceIndex).spaceType);
4922 :
4923 312 : SetupOutputVariable(state,
4924 : "Gas Equipment Radiant Heating Energy",
4925 : OutputProcessor::Unit::J,
4926 78 : state.dataHeatBal->ZoneGas(gasEqNum).RadGainEnergy,
4927 : OutputProcessor::SOVTimeStepType::Zone,
4928 : OutputProcessor::SOVStoreType::Summed,
4929 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4930 312 : SetupOutputVariable(state,
4931 : "Gas Equipment Convective Heating Energy",
4932 : OutputProcessor::Unit::J,
4933 78 : state.dataHeatBal->ZoneGas(gasEqNum).ConGainEnergy,
4934 : OutputProcessor::SOVTimeStepType::Zone,
4935 : OutputProcessor::SOVStoreType::Summed,
4936 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4937 312 : SetupOutputVariable(state,
4938 : "Gas Equipment Latent Gain Energy",
4939 : OutputProcessor::Unit::J,
4940 78 : state.dataHeatBal->ZoneGas(gasEqNum).LatGainEnergy,
4941 : OutputProcessor::SOVTimeStepType::Zone,
4942 : OutputProcessor::SOVStoreType::Summed,
4943 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4944 312 : SetupOutputVariable(state,
4945 : "Gas Equipment Lost Heat Energy",
4946 : OutputProcessor::Unit::J,
4947 78 : state.dataHeatBal->ZoneGas(gasEqNum).LostEnergy,
4948 : OutputProcessor::SOVTimeStepType::Zone,
4949 : OutputProcessor::SOVStoreType::Summed,
4950 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4951 312 : SetupOutputVariable(state,
4952 : "Gas Equipment Total Heating Energy",
4953 : OutputProcessor::Unit::J,
4954 78 : state.dataHeatBal->ZoneGas(gasEqNum).TotGainEnergy,
4955 : OutputProcessor::SOVTimeStepType::Zone,
4956 : OutputProcessor::SOVStoreType::Summed,
4957 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4958 312 : SetupOutputVariable(state,
4959 : "Gas Equipment Radiant Heating Rate",
4960 : OutputProcessor::Unit::W,
4961 78 : state.dataHeatBal->ZoneGas(gasEqNum).RadGainRate,
4962 : OutputProcessor::SOVTimeStepType::Zone,
4963 : OutputProcessor::SOVStoreType::Average,
4964 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4965 312 : SetupOutputVariable(state,
4966 : "Gas Equipment Convective Heating Rate",
4967 : OutputProcessor::Unit::W,
4968 78 : state.dataHeatBal->ZoneGas(gasEqNum).ConGainRate,
4969 : OutputProcessor::SOVTimeStepType::Zone,
4970 : OutputProcessor::SOVStoreType::Average,
4971 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4972 312 : SetupOutputVariable(state,
4973 : "Gas Equipment Latent Gain Rate",
4974 : OutputProcessor::Unit::W,
4975 78 : state.dataHeatBal->ZoneGas(gasEqNum).LatGainRate,
4976 : OutputProcessor::SOVTimeStepType::Zone,
4977 : OutputProcessor::SOVStoreType::Average,
4978 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4979 312 : SetupOutputVariable(state,
4980 : "Gas Equipment Lost Heat Rate",
4981 : OutputProcessor::Unit::W,
4982 78 : state.dataHeatBal->ZoneGas(gasEqNum).LostRate,
4983 : OutputProcessor::SOVTimeStepType::Zone,
4984 : OutputProcessor::SOVStoreType::Average,
4985 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4986 312 : SetupOutputVariable(state,
4987 : "Gas Equipment Total Heating Rate",
4988 : OutputProcessor::Unit::W,
4989 78 : state.dataHeatBal->ZoneGas(gasEqNum).TotGainRate,
4990 : OutputProcessor::SOVTimeStepType::Zone,
4991 : OutputProcessor::SOVStoreType::Average,
4992 156 : state.dataHeatBal->ZoneGas(gasEqNum).Name);
4993 : }
4994 :
4995 : // Zone total report variables
4996 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
4997 4814 : if (addZoneOutputs(zoneNum)) {
4998 :
4999 312 : SetupOutputVariable(state,
5000 : "Zone Gas Equipment NaturalGas Rate",
5001 : OutputProcessor::Unit::W,
5002 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasPower,
5003 : OutputProcessor::SOVTimeStepType::Zone,
5004 : OutputProcessor::SOVStoreType::Average,
5005 156 : state.dataHeatBal->Zone(zoneNum).Name);
5006 312 : SetupOutputVariable(state,
5007 : "Zone Gas Equipment NaturalGas Energy",
5008 : OutputProcessor::Unit::J,
5009 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasConsump,
5010 : OutputProcessor::SOVTimeStepType::Zone,
5011 : OutputProcessor::SOVStoreType::Summed,
5012 156 : state.dataHeatBal->Zone(zoneNum).Name);
5013 :
5014 312 : SetupOutputVariable(state,
5015 : "Zone Gas Equipment Radiant Heating Energy",
5016 : OutputProcessor::Unit::J,
5017 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasRadGain,
5018 : OutputProcessor::SOVTimeStepType::Zone,
5019 : OutputProcessor::SOVStoreType::Summed,
5020 156 : state.dataHeatBal->Zone(zoneNum).Name);
5021 312 : SetupOutputVariable(state,
5022 : "Zone Gas Equipment Radiant Heating Rate",
5023 : OutputProcessor::Unit::W,
5024 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasRadGainRate,
5025 : OutputProcessor::SOVTimeStepType::Zone,
5026 : OutputProcessor::SOVStoreType::Average,
5027 156 : state.dataHeatBal->Zone(zoneNum).Name);
5028 312 : SetupOutputVariable(state,
5029 : "Zone Gas Equipment Convective Heating Energy",
5030 : OutputProcessor::Unit::J,
5031 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasConGain,
5032 : OutputProcessor::SOVTimeStepType::Zone,
5033 : OutputProcessor::SOVStoreType::Summed,
5034 156 : state.dataHeatBal->Zone(zoneNum).Name);
5035 312 : SetupOutputVariable(state,
5036 : "Zone Gas Equipment Convective Heating Rate",
5037 : OutputProcessor::Unit::W,
5038 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasConGainRate,
5039 : OutputProcessor::SOVTimeStepType::Zone,
5040 : OutputProcessor::SOVStoreType::Average,
5041 156 : state.dataHeatBal->Zone(zoneNum).Name);
5042 312 : SetupOutputVariable(state,
5043 : "Zone Gas Equipment Latent Gain Energy",
5044 : OutputProcessor::Unit::J,
5045 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasLatGain,
5046 : OutputProcessor::SOVTimeStepType::Zone,
5047 : OutputProcessor::SOVStoreType::Summed,
5048 156 : state.dataHeatBal->Zone(zoneNum).Name);
5049 312 : SetupOutputVariable(state,
5050 : "Zone Gas Equipment Latent Gain Rate",
5051 : OutputProcessor::Unit::W,
5052 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasLatGainRate,
5053 : OutputProcessor::SOVTimeStepType::Zone,
5054 : OutputProcessor::SOVStoreType::Average,
5055 156 : state.dataHeatBal->Zone(zoneNum).Name);
5056 312 : SetupOutputVariable(state,
5057 : "Zone Gas Equipment Lost Heat Energy",
5058 : OutputProcessor::Unit::J,
5059 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasLost,
5060 : OutputProcessor::SOVTimeStepType::Zone,
5061 : OutputProcessor::SOVStoreType::Summed,
5062 156 : state.dataHeatBal->Zone(zoneNum).Name);
5063 312 : SetupOutputVariable(state,
5064 : "Zone Gas Equipment Lost Heat Rate",
5065 : OutputProcessor::Unit::W,
5066 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasLostRate,
5067 : OutputProcessor::SOVTimeStepType::Zone,
5068 : OutputProcessor::SOVStoreType::Average,
5069 156 : state.dataHeatBal->Zone(zoneNum).Name);
5070 312 : SetupOutputVariable(state,
5071 : "Zone Gas Equipment Total Heating Energy",
5072 : OutputProcessor::Unit::J,
5073 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasTotGain,
5074 : OutputProcessor::SOVTimeStepType::Zone,
5075 : OutputProcessor::SOVStoreType::Summed,
5076 156 : state.dataHeatBal->Zone(zoneNum).Name);
5077 312 : SetupOutputVariable(state,
5078 : "Zone Gas Equipment Total Heating Rate",
5079 : OutputProcessor::Unit::W,
5080 78 : state.dataHeatBal->ZoneRpt(zoneNum).GasTotGainRate,
5081 : OutputProcessor::SOVTimeStepType::Zone,
5082 : OutputProcessor::SOVStoreType::Average,
5083 156 : state.dataHeatBal->Zone(zoneNum).Name);
5084 : }
5085 : // Reset zone output flag
5086 4814 : addZoneOutputs(zoneNum) = false;
5087 : }
5088 :
5089 : // Space total report variables
5090 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
5091 4818 : if (addSpaceOutputs(spaceNum)) {
5092 :
5093 312 : SetupOutputVariable(state,
5094 : "Space Gas Equipment NaturalGas Rate",
5095 : OutputProcessor::Unit::W,
5096 78 : state.dataHeatBal->spaceRpt(spaceNum).GasPower,
5097 : OutputProcessor::SOVTimeStepType::Zone,
5098 : OutputProcessor::SOVStoreType::Average,
5099 156 : state.dataHeatBal->space(spaceNum).Name);
5100 312 : SetupOutputVariable(state,
5101 : "Space Gas Equipment NaturalGas Energy",
5102 : OutputProcessor::Unit::J,
5103 78 : state.dataHeatBal->spaceRpt(spaceNum).GasConsump,
5104 : OutputProcessor::SOVTimeStepType::Zone,
5105 : OutputProcessor::SOVStoreType::Summed,
5106 156 : state.dataHeatBal->space(spaceNum).Name);
5107 :
5108 312 : SetupOutputVariable(state,
5109 : "Space Gas Equipment Radiant Heating Energy",
5110 : OutputProcessor::Unit::J,
5111 78 : state.dataHeatBal->spaceRpt(spaceNum).GasRadGain,
5112 : OutputProcessor::SOVTimeStepType::Zone,
5113 : OutputProcessor::SOVStoreType::Summed,
5114 156 : state.dataHeatBal->space(spaceNum).Name);
5115 312 : SetupOutputVariable(state,
5116 : "Space Gas Equipment Radiant Heating Rate",
5117 : OutputProcessor::Unit::W,
5118 78 : state.dataHeatBal->spaceRpt(spaceNum).GasRadGainRate,
5119 : OutputProcessor::SOVTimeStepType::Zone,
5120 : OutputProcessor::SOVStoreType::Average,
5121 156 : state.dataHeatBal->space(spaceNum).Name);
5122 312 : SetupOutputVariable(state,
5123 : "Space Gas Equipment Convective Heating Energy",
5124 : OutputProcessor::Unit::J,
5125 78 : state.dataHeatBal->spaceRpt(spaceNum).GasConGain,
5126 : OutputProcessor::SOVTimeStepType::Zone,
5127 : OutputProcessor::SOVStoreType::Summed,
5128 156 : state.dataHeatBal->space(spaceNum).Name);
5129 312 : SetupOutputVariable(state,
5130 : "Space Gas Equipment Convective Heating Rate",
5131 : OutputProcessor::Unit::W,
5132 78 : state.dataHeatBal->spaceRpt(spaceNum).GasConGainRate,
5133 : OutputProcessor::SOVTimeStepType::Zone,
5134 : OutputProcessor::SOVStoreType::Average,
5135 156 : state.dataHeatBal->space(spaceNum).Name);
5136 312 : SetupOutputVariable(state,
5137 : "Space Gas Equipment Latent Gain Energy",
5138 : OutputProcessor::Unit::J,
5139 78 : state.dataHeatBal->spaceRpt(spaceNum).GasLatGain,
5140 : OutputProcessor::SOVTimeStepType::Zone,
5141 : OutputProcessor::SOVStoreType::Summed,
5142 156 : state.dataHeatBal->space(spaceNum).Name);
5143 312 : SetupOutputVariable(state,
5144 : "Space Gas Equipment Latent Gain Rate",
5145 : OutputProcessor::Unit::W,
5146 78 : state.dataHeatBal->spaceRpt(spaceNum).GasLatGainRate,
5147 : OutputProcessor::SOVTimeStepType::Zone,
5148 : OutputProcessor::SOVStoreType::Average,
5149 156 : state.dataHeatBal->space(spaceNum).Name);
5150 312 : SetupOutputVariable(state,
5151 : "Space Gas Equipment Lost Heat Energy",
5152 : OutputProcessor::Unit::J,
5153 78 : state.dataHeatBal->spaceRpt(spaceNum).GasLost,
5154 : OutputProcessor::SOVTimeStepType::Zone,
5155 : OutputProcessor::SOVStoreType::Summed,
5156 156 : state.dataHeatBal->space(spaceNum).Name);
5157 312 : SetupOutputVariable(state,
5158 : "Space Gas Equipment Lost Heat Rate",
5159 : OutputProcessor::Unit::W,
5160 78 : state.dataHeatBal->spaceRpt(spaceNum).GasLostRate,
5161 : OutputProcessor::SOVTimeStepType::Zone,
5162 : OutputProcessor::SOVStoreType::Average,
5163 156 : state.dataHeatBal->space(spaceNum).Name);
5164 312 : SetupOutputVariable(state,
5165 : "Space Gas Equipment Total Heating Energy",
5166 : OutputProcessor::Unit::J,
5167 78 : state.dataHeatBal->spaceRpt(spaceNum).GasTotGain,
5168 : OutputProcessor::SOVTimeStepType::Zone,
5169 : OutputProcessor::SOVStoreType::Summed,
5170 156 : state.dataHeatBal->space(spaceNum).Name);
5171 312 : SetupOutputVariable(state,
5172 : "Space Gas Equipment Total Heating Rate",
5173 : OutputProcessor::Unit::W,
5174 78 : state.dataHeatBal->spaceRpt(spaceNum).GasTotGainRate,
5175 : OutputProcessor::SOVTimeStepType::Zone,
5176 : OutputProcessor::SOVStoreType::Average,
5177 156 : state.dataHeatBal->space(spaceNum).Name);
5178 : }
5179 : // Reset space output flag
5180 4818 : addSpaceOutputs(spaceNum) = false;
5181 : }
5182 :
5183 : // Object report variables
5184 785 : for (int hwEqNum = 1; hwEqNum <= state.dataHeatBal->TotHWEquip; ++hwEqNum) {
5185 : // Set flags for zone and space total report variables
5186 14 : addZoneOutputs(state.dataHeatBal->ZoneHWEq(hwEqNum).ZonePtr) = true;
5187 14 : addSpaceOutputs(state.dataHeatBal->ZoneHWEq(hwEqNum).spaceIndex) = true;
5188 56 : SetupOutputVariable(state,
5189 : "Hot Water Equipment District Heating Rate",
5190 : OutputProcessor::Unit::W,
5191 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).Power,
5192 : OutputProcessor::SOVTimeStepType::Zone,
5193 : OutputProcessor::SOVStoreType::Average,
5194 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5195 112 : SetupOutputVariable(state,
5196 : "Hot Water Equipment District Heating Energy",
5197 : OutputProcessor::Unit::J,
5198 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).Consumption,
5199 : OutputProcessor::SOVTimeStepType::Zone,
5200 : OutputProcessor::SOVStoreType::Summed,
5201 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name,
5202 : _,
5203 : "DistrictHeating",
5204 : "InteriorEquipment",
5205 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).EndUseSubcategory,
5206 : "Building",
5207 14 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneHWEq(hwEqNum).ZonePtr).Name,
5208 14 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneHWEq(hwEqNum).ZonePtr).Multiplier,
5209 14 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneHWEq(hwEqNum).ZonePtr).ListMultiplier,
5210 : _,
5211 : _,
5212 28 : state.dataHeatBal->space(state.dataHeatBal->ZoneHWEq(hwEqNum).spaceIndex).spaceType);
5213 :
5214 56 : SetupOutputVariable(state,
5215 : "Hot Water Equipment Radiant Heating Energy",
5216 : OutputProcessor::Unit::J,
5217 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).RadGainEnergy,
5218 : OutputProcessor::SOVTimeStepType::Zone,
5219 : OutputProcessor::SOVStoreType::Summed,
5220 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5221 56 : SetupOutputVariable(state,
5222 : "Hot Water Equipment Radiant Heating Rate",
5223 : OutputProcessor::Unit::W,
5224 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).RadGainRate,
5225 : OutputProcessor::SOVTimeStepType::Zone,
5226 : OutputProcessor::SOVStoreType::Average,
5227 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5228 56 : SetupOutputVariable(state,
5229 : "Hot Water Equipment Convective Heating Energy",
5230 : OutputProcessor::Unit::J,
5231 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).ConGainEnergy,
5232 : OutputProcessor::SOVTimeStepType::Zone,
5233 : OutputProcessor::SOVStoreType::Summed,
5234 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5235 56 : SetupOutputVariable(state,
5236 : "Hot Water Equipment Convective Heating Rate",
5237 : OutputProcessor::Unit::W,
5238 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).ConGainRate,
5239 : OutputProcessor::SOVTimeStepType::Zone,
5240 : OutputProcessor::SOVStoreType::Average,
5241 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5242 56 : SetupOutputVariable(state,
5243 : "Hot Water Equipment Latent Gain Energy",
5244 : OutputProcessor::Unit::J,
5245 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).LatGainEnergy,
5246 : OutputProcessor::SOVTimeStepType::Zone,
5247 : OutputProcessor::SOVStoreType::Summed,
5248 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5249 56 : SetupOutputVariable(state,
5250 : "Hot Water Equipment Latent Gain Rate",
5251 : OutputProcessor::Unit::W,
5252 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).LatGainRate,
5253 : OutputProcessor::SOVTimeStepType::Zone,
5254 : OutputProcessor::SOVStoreType::Average,
5255 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5256 56 : SetupOutputVariable(state,
5257 : "Hot Water Equipment Lost Heat Energy",
5258 : OutputProcessor::Unit::J,
5259 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).LostEnergy,
5260 : OutputProcessor::SOVTimeStepType::Zone,
5261 : OutputProcessor::SOVStoreType::Summed,
5262 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5263 56 : SetupOutputVariable(state,
5264 : "Hot Water Equipment Lost Heat Rate",
5265 : OutputProcessor::Unit::W,
5266 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).LostRate,
5267 : OutputProcessor::SOVTimeStepType::Zone,
5268 : OutputProcessor::SOVStoreType::Average,
5269 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5270 56 : SetupOutputVariable(state,
5271 : "Hot Water Equipment Total Heating Energy",
5272 : OutputProcessor::Unit::J,
5273 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).TotGainEnergy,
5274 : OutputProcessor::SOVTimeStepType::Zone,
5275 : OutputProcessor::SOVStoreType::Summed,
5276 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5277 56 : SetupOutputVariable(state,
5278 : "Hot Water Equipment Total Heating Rate",
5279 : OutputProcessor::Unit::W,
5280 14 : state.dataHeatBal->ZoneHWEq(hwEqNum).TotGainRate,
5281 : OutputProcessor::SOVTimeStepType::Zone,
5282 : OutputProcessor::SOVStoreType::Average,
5283 28 : state.dataHeatBal->ZoneHWEq(hwEqNum).Name);
5284 : }
5285 :
5286 : // Zone total report variables
5287 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
5288 4814 : if (addZoneOutputs(zoneNum)) {
5289 56 : SetupOutputVariable(state,
5290 : "Zone Hot Water Equipment District Heating Rate",
5291 : OutputProcessor::Unit::W,
5292 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWPower,
5293 : OutputProcessor::SOVTimeStepType::Zone,
5294 : OutputProcessor::SOVStoreType::Average,
5295 28 : state.dataHeatBal->Zone(zoneNum).Name);
5296 56 : SetupOutputVariable(state,
5297 : "Zone Hot Water Equipment District Heating Energy",
5298 : OutputProcessor::Unit::J,
5299 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWConsump,
5300 : OutputProcessor::SOVTimeStepType::Zone,
5301 : OutputProcessor::SOVStoreType::Summed,
5302 28 : state.dataHeatBal->Zone(zoneNum).Name);
5303 :
5304 56 : SetupOutputVariable(state,
5305 : "Zone Hot Water Equipment Radiant Heating Energy",
5306 : OutputProcessor::Unit::J,
5307 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWRadGain,
5308 : OutputProcessor::SOVTimeStepType::Zone,
5309 : OutputProcessor::SOVStoreType::Summed,
5310 28 : state.dataHeatBal->Zone(zoneNum).Name);
5311 56 : SetupOutputVariable(state,
5312 : "Zone Hot Water Equipment Radiant Heating Rate",
5313 : OutputProcessor::Unit::W,
5314 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWRadGainRate,
5315 : OutputProcessor::SOVTimeStepType::Zone,
5316 : OutputProcessor::SOVStoreType::Average,
5317 28 : state.dataHeatBal->Zone(zoneNum).Name);
5318 56 : SetupOutputVariable(state,
5319 : "Zone Hot Water Equipment Convective Heating Energy",
5320 : OutputProcessor::Unit::J,
5321 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWConGain,
5322 : OutputProcessor::SOVTimeStepType::Zone,
5323 : OutputProcessor::SOVStoreType::Summed,
5324 28 : state.dataHeatBal->Zone(zoneNum).Name);
5325 56 : SetupOutputVariable(state,
5326 : "Zone Hot Water Equipment Convective Heating Rate",
5327 : OutputProcessor::Unit::W,
5328 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWConGainRate,
5329 : OutputProcessor::SOVTimeStepType::Zone,
5330 : OutputProcessor::SOVStoreType::Average,
5331 28 : state.dataHeatBal->Zone(zoneNum).Name);
5332 56 : SetupOutputVariable(state,
5333 : "Zone Hot Water Equipment Latent Gain Energy",
5334 : OutputProcessor::Unit::J,
5335 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWLatGain,
5336 : OutputProcessor::SOVTimeStepType::Zone,
5337 : OutputProcessor::SOVStoreType::Summed,
5338 28 : state.dataHeatBal->Zone(zoneNum).Name);
5339 56 : SetupOutputVariable(state,
5340 : "Zone Hot Water Equipment Latent Gain Rate",
5341 : OutputProcessor::Unit::W,
5342 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWLatGainRate,
5343 : OutputProcessor::SOVTimeStepType::Zone,
5344 : OutputProcessor::SOVStoreType::Average,
5345 28 : state.dataHeatBal->Zone(zoneNum).Name);
5346 56 : SetupOutputVariable(state,
5347 : "Zone Hot Water Equipment Lost Heat Energy",
5348 : OutputProcessor::Unit::J,
5349 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWLost,
5350 : OutputProcessor::SOVTimeStepType::Zone,
5351 : OutputProcessor::SOVStoreType::Summed,
5352 28 : state.dataHeatBal->Zone(zoneNum).Name);
5353 56 : SetupOutputVariable(state,
5354 : "Zone Hot Water Equipment Lost Heat Rate",
5355 : OutputProcessor::Unit::W,
5356 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWLostRate,
5357 : OutputProcessor::SOVTimeStepType::Zone,
5358 : OutputProcessor::SOVStoreType::Average,
5359 28 : state.dataHeatBal->Zone(zoneNum).Name);
5360 56 : SetupOutputVariable(state,
5361 : "Zone Hot Water Equipment Total Heating Energy",
5362 : OutputProcessor::Unit::J,
5363 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWTotGain,
5364 : OutputProcessor::SOVTimeStepType::Zone,
5365 : OutputProcessor::SOVStoreType::Summed,
5366 28 : state.dataHeatBal->Zone(zoneNum).Name);
5367 56 : SetupOutputVariable(state,
5368 : "Zone Hot Water Equipment Total Heating Rate",
5369 : OutputProcessor::Unit::W,
5370 14 : state.dataHeatBal->ZoneRpt(zoneNum).HWTotGainRate,
5371 : OutputProcessor::SOVTimeStepType::Zone,
5372 : OutputProcessor::SOVStoreType::Average,
5373 28 : state.dataHeatBal->Zone(zoneNum).Name);
5374 : }
5375 : // Reset zone output flag
5376 4814 : addZoneOutputs(zoneNum) = false;
5377 : }
5378 :
5379 : // Space total report variables
5380 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
5381 4818 : if (addSpaceOutputs(spaceNum)) {
5382 56 : SetupOutputVariable(state,
5383 : "Space Hot Water Equipment District Heating Rate",
5384 : OutputProcessor::Unit::W,
5385 14 : state.dataHeatBal->spaceRpt(spaceNum).HWPower,
5386 : OutputProcessor::SOVTimeStepType::Zone,
5387 : OutputProcessor::SOVStoreType::Average,
5388 28 : state.dataHeatBal->space(spaceNum).Name);
5389 56 : SetupOutputVariable(state,
5390 : "Space Hot Water Equipment District Heating Energy",
5391 : OutputProcessor::Unit::J,
5392 14 : state.dataHeatBal->spaceRpt(spaceNum).HWConsump,
5393 : OutputProcessor::SOVTimeStepType::Zone,
5394 : OutputProcessor::SOVStoreType::Summed,
5395 28 : state.dataHeatBal->space(spaceNum).Name);
5396 :
5397 56 : SetupOutputVariable(state,
5398 : "Space Hot Water Equipment Radiant Heating Energy",
5399 : OutputProcessor::Unit::J,
5400 14 : state.dataHeatBal->spaceRpt(spaceNum).HWRadGain,
5401 : OutputProcessor::SOVTimeStepType::Zone,
5402 : OutputProcessor::SOVStoreType::Summed,
5403 28 : state.dataHeatBal->space(spaceNum).Name);
5404 56 : SetupOutputVariable(state,
5405 : "Space Hot Water Equipment Radiant Heating Rate",
5406 : OutputProcessor::Unit::W,
5407 14 : state.dataHeatBal->spaceRpt(spaceNum).HWRadGainRate,
5408 : OutputProcessor::SOVTimeStepType::Zone,
5409 : OutputProcessor::SOVStoreType::Average,
5410 28 : state.dataHeatBal->space(spaceNum).Name);
5411 56 : SetupOutputVariable(state,
5412 : "Space Hot Water Equipment Convective Heating Energy",
5413 : OutputProcessor::Unit::J,
5414 14 : state.dataHeatBal->spaceRpt(spaceNum).HWConGain,
5415 : OutputProcessor::SOVTimeStepType::Zone,
5416 : OutputProcessor::SOVStoreType::Summed,
5417 28 : state.dataHeatBal->space(spaceNum).Name);
5418 56 : SetupOutputVariable(state,
5419 : "Space Hot Water Equipment Convective Heating Rate",
5420 : OutputProcessor::Unit::W,
5421 14 : state.dataHeatBal->spaceRpt(spaceNum).HWConGainRate,
5422 : OutputProcessor::SOVTimeStepType::Zone,
5423 : OutputProcessor::SOVStoreType::Average,
5424 28 : state.dataHeatBal->space(spaceNum).Name);
5425 56 : SetupOutputVariable(state,
5426 : "Space Hot Water Equipment Latent Gain Energy",
5427 : OutputProcessor::Unit::J,
5428 14 : state.dataHeatBal->spaceRpt(spaceNum).HWLatGain,
5429 : OutputProcessor::SOVTimeStepType::Zone,
5430 : OutputProcessor::SOVStoreType::Summed,
5431 28 : state.dataHeatBal->space(spaceNum).Name);
5432 56 : SetupOutputVariable(state,
5433 : "Space Hot Water Equipment Latent Gain Rate",
5434 : OutputProcessor::Unit::W,
5435 14 : state.dataHeatBal->spaceRpt(spaceNum).HWLatGainRate,
5436 : OutputProcessor::SOVTimeStepType::Zone,
5437 : OutputProcessor::SOVStoreType::Average,
5438 28 : state.dataHeatBal->space(spaceNum).Name);
5439 56 : SetupOutputVariable(state,
5440 : "Space Hot Water Equipment Lost Heat Energy",
5441 : OutputProcessor::Unit::J,
5442 14 : state.dataHeatBal->spaceRpt(spaceNum).HWLost,
5443 : OutputProcessor::SOVTimeStepType::Zone,
5444 : OutputProcessor::SOVStoreType::Summed,
5445 28 : state.dataHeatBal->space(spaceNum).Name);
5446 56 : SetupOutputVariable(state,
5447 : "Space Hot Water Equipment Lost Heat Rate",
5448 : OutputProcessor::Unit::W,
5449 14 : state.dataHeatBal->spaceRpt(spaceNum).HWLostRate,
5450 : OutputProcessor::SOVTimeStepType::Zone,
5451 : OutputProcessor::SOVStoreType::Average,
5452 28 : state.dataHeatBal->space(spaceNum).Name);
5453 56 : SetupOutputVariable(state,
5454 : "Space Hot Water Equipment Total Heating Energy",
5455 : OutputProcessor::Unit::J,
5456 14 : state.dataHeatBal->spaceRpt(spaceNum).HWTotGain,
5457 : OutputProcessor::SOVTimeStepType::Zone,
5458 : OutputProcessor::SOVStoreType::Summed,
5459 28 : state.dataHeatBal->space(spaceNum).Name);
5460 56 : SetupOutputVariable(state,
5461 : "Space Hot Water Equipment Total Heating Rate",
5462 : OutputProcessor::Unit::W,
5463 14 : state.dataHeatBal->spaceRpt(spaceNum).HWTotGainRate,
5464 : OutputProcessor::SOVTimeStepType::Zone,
5465 : OutputProcessor::SOVStoreType::Average,
5466 28 : state.dataHeatBal->space(spaceNum).Name);
5467 : }
5468 : // Reset space output flag
5469 4818 : addSpaceOutputs(spaceNum) = false;
5470 : }
5471 :
5472 : // Object report variables
5473 776 : for (int stmEqNum = 1; stmEqNum <= state.dataHeatBal->TotStmEquip; ++stmEqNum) {
5474 : // Set flags for zone and space total report variables
5475 5 : addZoneOutputs(state.dataHeatBal->ZoneSteamEq(stmEqNum).ZonePtr) = true;
5476 5 : addSpaceOutputs(state.dataHeatBal->ZoneSteamEq(stmEqNum).spaceIndex) = true;
5477 20 : SetupOutputVariable(state,
5478 : "Steam Equipment District Heating Rate",
5479 : OutputProcessor::Unit::W,
5480 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Power,
5481 : OutputProcessor::SOVTimeStepType::Zone,
5482 : OutputProcessor::SOVStoreType::Average,
5483 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5484 40 : SetupOutputVariable(state,
5485 : "Steam Equipment District Heating Energy",
5486 : OutputProcessor::Unit::J,
5487 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Consumption,
5488 : OutputProcessor::SOVTimeStepType::Zone,
5489 : OutputProcessor::SOVStoreType::Summed,
5490 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name,
5491 : _,
5492 : "DistrictHeating",
5493 : "InteriorEquipment",
5494 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).EndUseSubcategory,
5495 : "Building",
5496 5 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneSteamEq(stmEqNum).ZonePtr).Name,
5497 5 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneSteamEq(stmEqNum).ZonePtr).Multiplier,
5498 5 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneSteamEq(stmEqNum).ZonePtr).ListMultiplier,
5499 : _,
5500 : _,
5501 10 : state.dataHeatBal->space(state.dataHeatBal->ZoneSteamEq(stmEqNum).spaceIndex).spaceType);
5502 :
5503 20 : SetupOutputVariable(state,
5504 : "Steam Equipment Radiant Heating Energy",
5505 : OutputProcessor::Unit::J,
5506 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).RadGainEnergy,
5507 : OutputProcessor::SOVTimeStepType::Zone,
5508 : OutputProcessor::SOVStoreType::Summed,
5509 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5510 20 : SetupOutputVariable(state,
5511 : "Steam Equipment Radiant Heating Rate",
5512 : OutputProcessor::Unit::W,
5513 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).RadGainRate,
5514 : OutputProcessor::SOVTimeStepType::Zone,
5515 : OutputProcessor::SOVStoreType::Average,
5516 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5517 20 : SetupOutputVariable(state,
5518 : "Steam Equipment Convective Heating Energy",
5519 : OutputProcessor::Unit::J,
5520 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).ConGainEnergy,
5521 : OutputProcessor::SOVTimeStepType::Zone,
5522 : OutputProcessor::SOVStoreType::Summed,
5523 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5524 20 : SetupOutputVariable(state,
5525 : "Steam Equipment Convective Heating Rate",
5526 : OutputProcessor::Unit::W,
5527 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).ConGainRate,
5528 : OutputProcessor::SOVTimeStepType::Zone,
5529 : OutputProcessor::SOVStoreType::Average,
5530 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5531 20 : SetupOutputVariable(state,
5532 : "Steam Equipment Latent Gain Energy",
5533 : OutputProcessor::Unit::J,
5534 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).LatGainEnergy,
5535 : OutputProcessor::SOVTimeStepType::Zone,
5536 : OutputProcessor::SOVStoreType::Summed,
5537 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5538 20 : SetupOutputVariable(state,
5539 : "Steam Equipment Latent Gain Rate",
5540 : OutputProcessor::Unit::W,
5541 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).LatGainRate,
5542 : OutputProcessor::SOVTimeStepType::Zone,
5543 : OutputProcessor::SOVStoreType::Average,
5544 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5545 20 : SetupOutputVariable(state,
5546 : "Steam Equipment Lost Heat Energy",
5547 : OutputProcessor::Unit::J,
5548 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).LostEnergy,
5549 : OutputProcessor::SOVTimeStepType::Zone,
5550 : OutputProcessor::SOVStoreType::Summed,
5551 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5552 20 : SetupOutputVariable(state,
5553 : "Steam Equipment Lost Heat Rate",
5554 : OutputProcessor::Unit::W,
5555 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).LostRate,
5556 : OutputProcessor::SOVTimeStepType::Zone,
5557 : OutputProcessor::SOVStoreType::Average,
5558 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5559 20 : SetupOutputVariable(state,
5560 : "Steam Equipment Total Heating Energy",
5561 : OutputProcessor::Unit::J,
5562 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).TotGainEnergy,
5563 : OutputProcessor::SOVTimeStepType::Zone,
5564 : OutputProcessor::SOVStoreType::Summed,
5565 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5566 20 : SetupOutputVariable(state,
5567 : "Steam Equipment Total Heating Rate",
5568 : OutputProcessor::Unit::W,
5569 5 : state.dataHeatBal->ZoneSteamEq(stmEqNum).TotGainRate,
5570 : OutputProcessor::SOVTimeStepType::Zone,
5571 : OutputProcessor::SOVStoreType::Average,
5572 10 : state.dataHeatBal->ZoneSteamEq(stmEqNum).Name);
5573 : }
5574 :
5575 : // Zone total report variables
5576 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
5577 4814 : if (addZoneOutputs(zoneNum)) {
5578 20 : SetupOutputVariable(state,
5579 : "Zone Steam Equipment District Heating Rate",
5580 : OutputProcessor::Unit::W,
5581 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamPower,
5582 : OutputProcessor::SOVTimeStepType::Zone,
5583 : OutputProcessor::SOVStoreType::Average,
5584 10 : state.dataHeatBal->Zone(zoneNum).Name);
5585 20 : SetupOutputVariable(state,
5586 : "Zone Steam Equipment District Heating Energy",
5587 : OutputProcessor::Unit::J,
5588 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamConsump,
5589 : OutputProcessor::SOVTimeStepType::Zone,
5590 : OutputProcessor::SOVStoreType::Summed,
5591 10 : state.dataHeatBal->Zone(zoneNum).Name);
5592 :
5593 20 : SetupOutputVariable(state,
5594 : "Zone Steam Equipment Radiant Heating Energy",
5595 : OutputProcessor::Unit::J,
5596 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamRadGain,
5597 : OutputProcessor::SOVTimeStepType::Zone,
5598 : OutputProcessor::SOVStoreType::Summed,
5599 10 : state.dataHeatBal->Zone(zoneNum).Name);
5600 20 : SetupOutputVariable(state,
5601 : "Zone Steam Equipment Radiant Heating Rate",
5602 : OutputProcessor::Unit::W,
5603 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamRadGainRate,
5604 : OutputProcessor::SOVTimeStepType::Zone,
5605 : OutputProcessor::SOVStoreType::Average,
5606 10 : state.dataHeatBal->Zone(zoneNum).Name);
5607 20 : SetupOutputVariable(state,
5608 : "Zone Steam Equipment Convective Heating Energy",
5609 : OutputProcessor::Unit::J,
5610 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamConGain,
5611 : OutputProcessor::SOVTimeStepType::Zone,
5612 : OutputProcessor::SOVStoreType::Summed,
5613 10 : state.dataHeatBal->Zone(zoneNum).Name);
5614 20 : SetupOutputVariable(state,
5615 : "Zone Steam Equipment Convective Heating Rate",
5616 : OutputProcessor::Unit::W,
5617 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamConGainRate,
5618 : OutputProcessor::SOVTimeStepType::Zone,
5619 : OutputProcessor::SOVStoreType::Average,
5620 10 : state.dataHeatBal->Zone(zoneNum).Name);
5621 20 : SetupOutputVariable(state,
5622 : "Zone Steam Equipment Latent Gain Energy",
5623 : OutputProcessor::Unit::J,
5624 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamLatGain,
5625 : OutputProcessor::SOVTimeStepType::Zone,
5626 : OutputProcessor::SOVStoreType::Summed,
5627 10 : state.dataHeatBal->Zone(zoneNum).Name);
5628 20 : SetupOutputVariable(state,
5629 : "Zone Steam Equipment Latent Gain Rate",
5630 : OutputProcessor::Unit::W,
5631 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamLatGainRate,
5632 : OutputProcessor::SOVTimeStepType::Zone,
5633 : OutputProcessor::SOVStoreType::Average,
5634 10 : state.dataHeatBal->Zone(zoneNum).Name);
5635 20 : SetupOutputVariable(state,
5636 : "Zone Steam Equipment Lost Heat Energy",
5637 : OutputProcessor::Unit::J,
5638 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamLost,
5639 : OutputProcessor::SOVTimeStepType::Zone,
5640 : OutputProcessor::SOVStoreType::Summed,
5641 10 : state.dataHeatBal->Zone(zoneNum).Name);
5642 20 : SetupOutputVariable(state,
5643 : "Zone Steam Equipment Lost Heat Rate",
5644 : OutputProcessor::Unit::W,
5645 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamLostRate,
5646 : OutputProcessor::SOVTimeStepType::Zone,
5647 : OutputProcessor::SOVStoreType::Average,
5648 10 : state.dataHeatBal->Zone(zoneNum).Name);
5649 20 : SetupOutputVariable(state,
5650 : "Zone Steam Equipment Total Heating Energy",
5651 : OutputProcessor::Unit::J,
5652 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamTotGain,
5653 : OutputProcessor::SOVTimeStepType::Zone,
5654 : OutputProcessor::SOVStoreType::Summed,
5655 10 : state.dataHeatBal->Zone(zoneNum).Name);
5656 20 : SetupOutputVariable(state,
5657 : "Zone Steam Equipment Total Heating Rate",
5658 : OutputProcessor::Unit::W,
5659 5 : state.dataHeatBal->ZoneRpt(zoneNum).SteamTotGainRate,
5660 : OutputProcessor::SOVTimeStepType::Zone,
5661 : OutputProcessor::SOVStoreType::Average,
5662 10 : state.dataHeatBal->Zone(zoneNum).Name);
5663 : }
5664 : // Reset zone output flag
5665 4814 : addZoneOutputs(zoneNum) = false;
5666 : }
5667 :
5668 : // Space total report variables
5669 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
5670 4818 : if (addSpaceOutputs(spaceNum)) {
5671 20 : SetupOutputVariable(state,
5672 : "Space Steam Equipment District Heating Rate",
5673 : OutputProcessor::Unit::W,
5674 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamPower,
5675 : OutputProcessor::SOVTimeStepType::Zone,
5676 : OutputProcessor::SOVStoreType::Average,
5677 10 : state.dataHeatBal->space(spaceNum).Name);
5678 20 : SetupOutputVariable(state,
5679 : "Space Steam Equipment District Heating Energy",
5680 : OutputProcessor::Unit::J,
5681 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamConsump,
5682 : OutputProcessor::SOVTimeStepType::Zone,
5683 : OutputProcessor::SOVStoreType::Summed,
5684 10 : state.dataHeatBal->space(spaceNum).Name);
5685 :
5686 20 : SetupOutputVariable(state,
5687 : "Space Steam Equipment Radiant Heating Energy",
5688 : OutputProcessor::Unit::J,
5689 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamRadGain,
5690 : OutputProcessor::SOVTimeStepType::Zone,
5691 : OutputProcessor::SOVStoreType::Summed,
5692 10 : state.dataHeatBal->space(spaceNum).Name);
5693 20 : SetupOutputVariable(state,
5694 : "Space Steam Equipment Radiant Heating Rate",
5695 : OutputProcessor::Unit::W,
5696 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamRadGainRate,
5697 : OutputProcessor::SOVTimeStepType::Zone,
5698 : OutputProcessor::SOVStoreType::Average,
5699 10 : state.dataHeatBal->space(spaceNum).Name);
5700 20 : SetupOutputVariable(state,
5701 : "Space Steam Equipment Convective Heating Energy",
5702 : OutputProcessor::Unit::J,
5703 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamConGain,
5704 : OutputProcessor::SOVTimeStepType::Zone,
5705 : OutputProcessor::SOVStoreType::Summed,
5706 10 : state.dataHeatBal->space(spaceNum).Name);
5707 20 : SetupOutputVariable(state,
5708 : "Space Steam Equipment Convective Heating Rate",
5709 : OutputProcessor::Unit::W,
5710 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamConGainRate,
5711 : OutputProcessor::SOVTimeStepType::Zone,
5712 : OutputProcessor::SOVStoreType::Average,
5713 10 : state.dataHeatBal->space(spaceNum).Name);
5714 20 : SetupOutputVariable(state,
5715 : "Space Steam Equipment Latent Gain Energy",
5716 : OutputProcessor::Unit::J,
5717 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamLatGain,
5718 : OutputProcessor::SOVTimeStepType::Zone,
5719 : OutputProcessor::SOVStoreType::Summed,
5720 10 : state.dataHeatBal->space(spaceNum).Name);
5721 20 : SetupOutputVariable(state,
5722 : "Space Steam Equipment Latent Gain Rate",
5723 : OutputProcessor::Unit::W,
5724 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamLatGainRate,
5725 : OutputProcessor::SOVTimeStepType::Zone,
5726 : OutputProcessor::SOVStoreType::Average,
5727 10 : state.dataHeatBal->space(spaceNum).Name);
5728 20 : SetupOutputVariable(state,
5729 : "Space Steam Equipment Lost Heat Energy",
5730 : OutputProcessor::Unit::J,
5731 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamLost,
5732 : OutputProcessor::SOVTimeStepType::Zone,
5733 : OutputProcessor::SOVStoreType::Summed,
5734 10 : state.dataHeatBal->space(spaceNum).Name);
5735 20 : SetupOutputVariable(state,
5736 : "Space Steam Equipment Lost Heat Rate",
5737 : OutputProcessor::Unit::W,
5738 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamLostRate,
5739 : OutputProcessor::SOVTimeStepType::Zone,
5740 : OutputProcessor::SOVStoreType::Average,
5741 10 : state.dataHeatBal->space(spaceNum).Name);
5742 20 : SetupOutputVariable(state,
5743 : "Space Steam Equipment Total Heating Energy",
5744 : OutputProcessor::Unit::J,
5745 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamTotGain,
5746 : OutputProcessor::SOVTimeStepType::Zone,
5747 : OutputProcessor::SOVStoreType::Summed,
5748 10 : state.dataHeatBal->space(spaceNum).Name);
5749 20 : SetupOutputVariable(state,
5750 : "Space Steam Equipment Total Heating Rate",
5751 : OutputProcessor::Unit::W,
5752 5 : state.dataHeatBal->spaceRpt(spaceNum).SteamTotGainRate,
5753 : OutputProcessor::SOVTimeStepType::Zone,
5754 : OutputProcessor::SOVStoreType::Average,
5755 10 : state.dataHeatBal->space(spaceNum).Name);
5756 : }
5757 : // Reset space output flag
5758 4818 : addSpaceOutputs(spaceNum) = false;
5759 : }
5760 :
5761 : // Object report variables
5762 835 : for (int othEqNum = 1; othEqNum <= state.dataHeatBal->TotOthEquip; ++othEqNum) {
5763 : // Set flags for zone and space total report variables
5764 64 : addZoneOutputs(state.dataHeatBal->ZoneOtherEq(othEqNum).ZonePtr) = true;
5765 64 : addSpaceOutputs(state.dataHeatBal->ZoneOtherEq(othEqNum).spaceIndex) = true;
5766 64 : if (state.dataHeatBal->ZoneOtherEq(othEqNum).OtherEquipFuelType != ExteriorEnergyUse::ExteriorFuelUsage::Invalid) {
5767 4 : std::string fuelTypeString = state.dataHeatBal->ZoneOtherEq(othEqNum).otherEquipFuelTypeString;
5768 10 : SetupOutputVariable(state,
5769 4 : "Other Equipment " + fuelTypeString + " Rate",
5770 : OutputProcessor::Unit::W,
5771 2 : state.dataHeatBal->ZoneOtherEq(othEqNum).Power,
5772 : OutputProcessor::SOVTimeStepType::Zone,
5773 : OutputProcessor::SOVStoreType::Average,
5774 2 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5775 18 : SetupOutputVariable(state,
5776 4 : "Other Equipment " + fuelTypeString + " Energy",
5777 : OutputProcessor::Unit::J,
5778 2 : state.dataHeatBal->ZoneOtherEq(othEqNum).Consumption,
5779 : OutputProcessor::SOVTimeStepType::Zone,
5780 : OutputProcessor::SOVStoreType::Summed,
5781 2 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name,
5782 : _,
5783 : fuelTypeString,
5784 : "InteriorEquipment",
5785 2 : state.dataHeatBal->ZoneOtherEq(othEqNum).EndUseSubcategory,
5786 : "Building",
5787 2 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneOtherEq(othEqNum).ZonePtr).Name,
5788 2 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneOtherEq(othEqNum).ZonePtr).Multiplier,
5789 2 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneOtherEq(othEqNum).ZonePtr).ListMultiplier,
5790 : _,
5791 : _,
5792 2 : state.dataHeatBal->space(state.dataHeatBal->ZoneOtherEq(othEqNum).spaceIndex).spaceType);
5793 : }
5794 :
5795 256 : SetupOutputVariable(state,
5796 : "Other Equipment Radiant Heating Energy",
5797 : OutputProcessor::Unit::J,
5798 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).RadGainEnergy,
5799 : OutputProcessor::SOVTimeStepType::Zone,
5800 : OutputProcessor::SOVStoreType::Summed,
5801 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5802 256 : SetupOutputVariable(state,
5803 : "Other Equipment Radiant Heating Rate",
5804 : OutputProcessor::Unit::W,
5805 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).RadGainRate,
5806 : OutputProcessor::SOVTimeStepType::Zone,
5807 : OutputProcessor::SOVStoreType::Average,
5808 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5809 256 : SetupOutputVariable(state,
5810 : "Other Equipment Convective Heating Energy",
5811 : OutputProcessor::Unit::J,
5812 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).ConGainEnergy,
5813 : OutputProcessor::SOVTimeStepType::Zone,
5814 : OutputProcessor::SOVStoreType::Summed,
5815 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5816 256 : SetupOutputVariable(state,
5817 : "Other Equipment Convective Heating Rate",
5818 : OutputProcessor::Unit::W,
5819 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).ConGainRate,
5820 : OutputProcessor::SOVTimeStepType::Zone,
5821 : OutputProcessor::SOVStoreType::Average,
5822 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5823 256 : SetupOutputVariable(state,
5824 : "Other Equipment Latent Gain Energy",
5825 : OutputProcessor::Unit::J,
5826 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).LatGainEnergy,
5827 : OutputProcessor::SOVTimeStepType::Zone,
5828 : OutputProcessor::SOVStoreType::Summed,
5829 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5830 256 : SetupOutputVariable(state,
5831 : "Other Equipment Latent Gain Rate",
5832 : OutputProcessor::Unit::W,
5833 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).LatGainRate,
5834 : OutputProcessor::SOVTimeStepType::Zone,
5835 : OutputProcessor::SOVStoreType::Average,
5836 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5837 256 : SetupOutputVariable(state,
5838 : "Other Equipment Lost Heat Energy",
5839 : OutputProcessor::Unit::J,
5840 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).LostEnergy,
5841 : OutputProcessor::SOVTimeStepType::Zone,
5842 : OutputProcessor::SOVStoreType::Summed,
5843 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5844 256 : SetupOutputVariable(state,
5845 : "Other Equipment Lost Heat Rate",
5846 : OutputProcessor::Unit::W,
5847 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).LostRate,
5848 : OutputProcessor::SOVTimeStepType::Zone,
5849 : OutputProcessor::SOVStoreType::Average,
5850 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5851 256 : SetupOutputVariable(state,
5852 : "Other Equipment Total Heating Energy",
5853 : OutputProcessor::Unit::J,
5854 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).TotGainEnergy,
5855 : OutputProcessor::SOVTimeStepType::Zone,
5856 : OutputProcessor::SOVStoreType::Summed,
5857 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5858 256 : SetupOutputVariable(state,
5859 : "Other Equipment Total Heating Rate",
5860 : OutputProcessor::Unit::W,
5861 64 : state.dataHeatBal->ZoneOtherEq(othEqNum).TotGainRate,
5862 : OutputProcessor::SOVTimeStepType::Zone,
5863 : OutputProcessor::SOVStoreType::Average,
5864 128 : state.dataHeatBal->ZoneOtherEq(othEqNum).Name);
5865 : }
5866 :
5867 : // Zone total report variables
5868 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
5869 4814 : if (addZoneOutputs(zoneNum)) {
5870 33 : bool firstFuelType = true;
5871 66 : std::string firstFuel;
5872 35 : for (std::string fuelTypeString : state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNames) {
5873 2 : if (firstFuelType) {
5874 2 : firstFuel = fuelTypeString;
5875 10 : SetupOutputVariable(state,
5876 4 : "Zone Other Equipment " + fuelTypeString + " Rate",
5877 : OutputProcessor::Unit::W,
5878 2 : state.dataHeatBal->ZoneRpt(zoneNum).OtherPower,
5879 : OutputProcessor::SOVTimeStepType::Zone,
5880 : OutputProcessor::SOVStoreType::Average,
5881 2 : state.dataHeatBal->Zone(zoneNum).Name);
5882 10 : SetupOutputVariable(state,
5883 4 : "Zone Other Equipment " + fuelTypeString + " Energy",
5884 : OutputProcessor::Unit::J,
5885 2 : state.dataHeatBal->ZoneRpt(zoneNum).OtherConsump,
5886 : OutputProcessor::SOVTimeStepType::Zone,
5887 : OutputProcessor::SOVStoreType::Summed,
5888 2 : state.dataHeatBal->Zone(zoneNum).Name);
5889 2 : firstFuelType = false;
5890 : } else {
5891 0 : ShowWarningError(state,
5892 0 : "setupIHGOutputs: Output variables=Zone Other Equipment " + fuelTypeString +
5893 : " Rate and Energy are not available.");
5894 0 : ShowContinueError(state, "Only the first Other Equipment fuel type used in a zone is reported. (" + firstFuel + ")");
5895 : }
5896 : }
5897 :
5898 132 : SetupOutputVariable(state,
5899 : "Zone Other Equipment Radiant Heating Energy",
5900 : OutputProcessor::Unit::J,
5901 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherRadGain,
5902 : OutputProcessor::SOVTimeStepType::Zone,
5903 : OutputProcessor::SOVStoreType::Summed,
5904 66 : state.dataHeatBal->Zone(zoneNum).Name);
5905 132 : SetupOutputVariable(state,
5906 : "Zone Other Equipment Radiant Heating Rate",
5907 : OutputProcessor::Unit::W,
5908 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherRadGainRate,
5909 : OutputProcessor::SOVTimeStepType::Zone,
5910 : OutputProcessor::SOVStoreType::Average,
5911 66 : state.dataHeatBal->Zone(zoneNum).Name);
5912 132 : SetupOutputVariable(state,
5913 : "Zone Other Equipment Convective Heating Energy",
5914 : OutputProcessor::Unit::J,
5915 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherConGain,
5916 : OutputProcessor::SOVTimeStepType::Zone,
5917 : OutputProcessor::SOVStoreType::Summed,
5918 66 : state.dataHeatBal->Zone(zoneNum).Name);
5919 132 : SetupOutputVariable(state,
5920 : "Zone Other Equipment Convective Heating Rate",
5921 : OutputProcessor::Unit::W,
5922 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherConGainRate,
5923 : OutputProcessor::SOVTimeStepType::Zone,
5924 : OutputProcessor::SOVStoreType::Average,
5925 66 : state.dataHeatBal->Zone(zoneNum).Name);
5926 132 : SetupOutputVariable(state,
5927 : "Zone Other Equipment Latent Gain Energy",
5928 : OutputProcessor::Unit::J,
5929 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherLatGain,
5930 : OutputProcessor::SOVTimeStepType::Zone,
5931 : OutputProcessor::SOVStoreType::Summed,
5932 66 : state.dataHeatBal->Zone(zoneNum).Name);
5933 132 : SetupOutputVariable(state,
5934 : "Zone Other Equipment Latent Gain Rate",
5935 : OutputProcessor::Unit::W,
5936 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherLatGainRate,
5937 : OutputProcessor::SOVTimeStepType::Zone,
5938 : OutputProcessor::SOVStoreType::Average,
5939 66 : state.dataHeatBal->Zone(zoneNum).Name);
5940 132 : SetupOutputVariable(state,
5941 : "Zone Other Equipment Lost Heat Energy",
5942 : OutputProcessor::Unit::J,
5943 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherLost,
5944 : OutputProcessor::SOVTimeStepType::Zone,
5945 : OutputProcessor::SOVStoreType::Summed,
5946 66 : state.dataHeatBal->Zone(zoneNum).Name);
5947 132 : SetupOutputVariable(state,
5948 : "Zone Other Equipment Lost Heat Rate",
5949 : OutputProcessor::Unit::W,
5950 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherLostRate,
5951 : OutputProcessor::SOVTimeStepType::Zone,
5952 : OutputProcessor::SOVStoreType::Average,
5953 66 : state.dataHeatBal->Zone(zoneNum).Name);
5954 132 : SetupOutputVariable(state,
5955 : "Zone Other Equipment Total Heating Energy",
5956 : OutputProcessor::Unit::J,
5957 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherTotGain,
5958 : OutputProcessor::SOVTimeStepType::Zone,
5959 : OutputProcessor::SOVStoreType::Summed,
5960 66 : state.dataHeatBal->Zone(zoneNum).Name);
5961 132 : SetupOutputVariable(state,
5962 : "Zone Other Equipment Total Heating Rate",
5963 : OutputProcessor::Unit::W,
5964 33 : state.dataHeatBal->ZoneRpt(zoneNum).OtherTotGainRate,
5965 : OutputProcessor::SOVTimeStepType::Zone,
5966 : OutputProcessor::SOVStoreType::Average,
5967 66 : state.dataHeatBal->Zone(zoneNum).Name);
5968 : }
5969 : // Reset zone output flag
5970 4814 : addZoneOutputs(zoneNum) = false;
5971 : }
5972 :
5973 : // Space total report variables
5974 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
5975 4818 : if (addSpaceOutputs(spaceNum)) {
5976 33 : bool firstFuelType = true;
5977 66 : std::string firstFuel;
5978 35 : for (std::string fuelTypeString : state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNames) {
5979 2 : if (firstFuelType) {
5980 2 : firstFuel = fuelTypeString;
5981 10 : SetupOutputVariable(state,
5982 4 : "Space Other Equipment " + fuelTypeString + " Rate",
5983 : OutputProcessor::Unit::W,
5984 2 : state.dataHeatBal->spaceRpt(spaceNum).OtherPower,
5985 : OutputProcessor::SOVTimeStepType::Zone,
5986 : OutputProcessor::SOVStoreType::Average,
5987 2 : state.dataHeatBal->space(spaceNum).Name);
5988 10 : SetupOutputVariable(state,
5989 4 : "Space Other Equipment " + fuelTypeString + " Energy",
5990 : OutputProcessor::Unit::J,
5991 2 : state.dataHeatBal->spaceRpt(spaceNum).OtherConsump,
5992 : OutputProcessor::SOVTimeStepType::Zone,
5993 : OutputProcessor::SOVStoreType::Summed,
5994 2 : state.dataHeatBal->space(spaceNum).Name);
5995 2 : firstFuelType = false;
5996 : } else {
5997 0 : ShowWarningError(state,
5998 0 : "setupIHGOutputs: Output variables=Space Other Equipment " + fuelTypeString +
5999 : " Rate and Energy are not available.");
6000 0 : ShowContinueError(state, "Only the first Other Equipment fuel type used in a zone is reported. (" + firstFuel + ")");
6001 : }
6002 : }
6003 :
6004 132 : SetupOutputVariable(state,
6005 : "Space Other Equipment Radiant Heating Energy",
6006 : OutputProcessor::Unit::J,
6007 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherRadGain,
6008 : OutputProcessor::SOVTimeStepType::Zone,
6009 : OutputProcessor::SOVStoreType::Summed,
6010 66 : state.dataHeatBal->space(spaceNum).Name);
6011 132 : SetupOutputVariable(state,
6012 : "Space Other Equipment Radiant Heating Rate",
6013 : OutputProcessor::Unit::W,
6014 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherRadGainRate,
6015 : OutputProcessor::SOVTimeStepType::Zone,
6016 : OutputProcessor::SOVStoreType::Average,
6017 66 : state.dataHeatBal->space(spaceNum).Name);
6018 132 : SetupOutputVariable(state,
6019 : "Space Other Equipment Convective Heating Energy",
6020 : OutputProcessor::Unit::J,
6021 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherConGain,
6022 : OutputProcessor::SOVTimeStepType::Zone,
6023 : OutputProcessor::SOVStoreType::Summed,
6024 66 : state.dataHeatBal->space(spaceNum).Name);
6025 132 : SetupOutputVariable(state,
6026 : "Space Other Equipment Convective Heating Rate",
6027 : OutputProcessor::Unit::W,
6028 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherConGainRate,
6029 : OutputProcessor::SOVTimeStepType::Zone,
6030 : OutputProcessor::SOVStoreType::Average,
6031 66 : state.dataHeatBal->space(spaceNum).Name);
6032 132 : SetupOutputVariable(state,
6033 : "Space Other Equipment Latent Gain Energy",
6034 : OutputProcessor::Unit::J,
6035 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherLatGain,
6036 : OutputProcessor::SOVTimeStepType::Zone,
6037 : OutputProcessor::SOVStoreType::Summed,
6038 66 : state.dataHeatBal->space(spaceNum).Name);
6039 132 : SetupOutputVariable(state,
6040 : "Space Other Equipment Latent Gain Rate",
6041 : OutputProcessor::Unit::W,
6042 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherLatGainRate,
6043 : OutputProcessor::SOVTimeStepType::Zone,
6044 : OutputProcessor::SOVStoreType::Average,
6045 66 : state.dataHeatBal->space(spaceNum).Name);
6046 132 : SetupOutputVariable(state,
6047 : "Space Other Equipment Lost Heat Energy",
6048 : OutputProcessor::Unit::J,
6049 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherLost,
6050 : OutputProcessor::SOVTimeStepType::Zone,
6051 : OutputProcessor::SOVStoreType::Summed,
6052 66 : state.dataHeatBal->space(spaceNum).Name);
6053 132 : SetupOutputVariable(state,
6054 : "Space Other Equipment Lost Heat Rate",
6055 : OutputProcessor::Unit::W,
6056 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherLostRate,
6057 : OutputProcessor::SOVTimeStepType::Zone,
6058 : OutputProcessor::SOVStoreType::Average,
6059 66 : state.dataHeatBal->space(spaceNum).Name);
6060 132 : SetupOutputVariable(state,
6061 : "Space Other Equipment Total Heating Energy",
6062 : OutputProcessor::Unit::J,
6063 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherTotGain,
6064 : OutputProcessor::SOVTimeStepType::Zone,
6065 : OutputProcessor::SOVStoreType::Summed,
6066 66 : state.dataHeatBal->space(spaceNum).Name);
6067 132 : SetupOutputVariable(state,
6068 : "Space Other Equipment Total Heating Rate",
6069 : OutputProcessor::Unit::W,
6070 33 : state.dataHeatBal->spaceRpt(spaceNum).OtherTotGainRate,
6071 : OutputProcessor::SOVTimeStepType::Zone,
6072 : OutputProcessor::SOVStoreType::Average,
6073 66 : state.dataHeatBal->space(spaceNum).Name);
6074 : }
6075 : // Reset space output flag
6076 4818 : addSpaceOutputs(spaceNum) = false;
6077 : }
6078 : // Object report variables
6079 778 : for (int itEqNum = 1; itEqNum <= state.dataHeatBal->TotITEquip; ++itEqNum) {
6080 : // Set flags for zone and space total report variables
6081 7 : addZoneOutputs(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr) = true;
6082 7 : addSpaceOutputs(state.dataHeatBal->ZoneITEq(itEqNum).spaceIndex) = true;
6083 :
6084 7 : constexpr std::array<std::string_view, (int)PERptVars::Num> PowerOutputVariableStrings = {
6085 : "ITE CPU Electricity Rate",
6086 : "ITE Fan Electricity Rate",
6087 : "ITE UPS Electricity Rate",
6088 : "ITE CPU Electricity Rate at Design Inlet Conditions",
6089 : "ITE Fan Electricity Rate at Design Inlet Conditions",
6090 : "ITE UPS Heat Gain to Zone Rate",
6091 : "ITE Total Heat Gain to Zone Rate"};
6092 :
6093 56 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
6094 147 : SetupOutputVariable(state,
6095 49 : PowerOutputVariableStrings[i],
6096 : OutputProcessor::Unit::W,
6097 49 : state.dataHeatBal->ZoneITEq(itEqNum).PowerRpt[i],
6098 : OutputProcessor::SOVTimeStepType::Zone,
6099 : OutputProcessor::SOVStoreType::Average,
6100 49 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6101 : }
6102 :
6103 49 : SetupOutputVariable(state,
6104 : "ITE CPU Electricity Energy",
6105 : OutputProcessor::Unit::J,
6106 7 : state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::CPU],
6107 : OutputProcessor::SOVTimeStepType::Zone,
6108 : OutputProcessor::SOVStoreType::Summed,
6109 7 : state.dataHeatBal->ZoneITEq(itEqNum).Name,
6110 : _,
6111 : "Electricity",
6112 : "InteriorEquipment",
6113 7 : state.dataHeatBal->ZoneITEq(itEqNum).EndUseSubcategoryCPU,
6114 : "Building",
6115 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Name,
6116 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Multiplier,
6117 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).ListMultiplier,
6118 : _,
6119 : _,
6120 14 : state.dataHeatBal->space(state.dataHeatBal->ZoneITEq(itEqNum).spaceIndex).spaceType);
6121 :
6122 49 : SetupOutputVariable(state,
6123 : "ITE Fan Electricity Energy",
6124 : OutputProcessor::Unit::J,
6125 7 : state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::Fan],
6126 : OutputProcessor::SOVTimeStepType::Zone,
6127 : OutputProcessor::SOVStoreType::Summed,
6128 7 : state.dataHeatBal->ZoneITEq(itEqNum).Name,
6129 : _,
6130 : "Electricity",
6131 : "InteriorEquipment",
6132 7 : state.dataHeatBal->ZoneITEq(itEqNum).EndUseSubcategoryFan,
6133 : "Building",
6134 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Name,
6135 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Multiplier,
6136 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).ListMultiplier,
6137 : _,
6138 : _,
6139 14 : state.dataHeatBal->space(state.dataHeatBal->ZoneITEq(itEqNum).spaceIndex).spaceType);
6140 49 : SetupOutputVariable(state,
6141 : "ITE UPS Electricity Energy",
6142 : OutputProcessor::Unit::J,
6143 7 : state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::UPS],
6144 : OutputProcessor::SOVTimeStepType::Zone,
6145 : OutputProcessor::SOVStoreType::Summed,
6146 7 : state.dataHeatBal->ZoneITEq(itEqNum).Name,
6147 : _,
6148 : "Electricity",
6149 : "InteriorEquipment",
6150 7 : state.dataHeatBal->ZoneITEq(itEqNum).EndUseSubcategoryUPS,
6151 : "Building",
6152 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Name,
6153 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Multiplier,
6154 7 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).ListMultiplier,
6155 : _,
6156 : _,
6157 14 : state.dataHeatBal->space(state.dataHeatBal->ZoneITEq(itEqNum).spaceIndex).spaceType);
6158 21 : SetupOutputVariable(state,
6159 : "ITE CPU Electricity Energy at Design Inlet Conditions",
6160 : OutputProcessor::Unit::J,
6161 7 : state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::CPUAtDesign],
6162 : OutputProcessor::SOVTimeStepType::Zone,
6163 : OutputProcessor::SOVStoreType::Summed,
6164 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6165 21 : SetupOutputVariable(state,
6166 : "ITE Fan Electricity Energy at Design Inlet Conditions",
6167 : OutputProcessor::Unit::J,
6168 7 : state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::FanAtDesign],
6169 : OutputProcessor::SOVTimeStepType::Zone,
6170 : OutputProcessor::SOVStoreType::Summed,
6171 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6172 21 : SetupOutputVariable(state,
6173 : "ITE UPS Heat Gain to Zone Energy",
6174 : OutputProcessor::Unit::J,
6175 7 : state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::UPSGainToZone],
6176 : OutputProcessor::SOVTimeStepType::Zone,
6177 : OutputProcessor::SOVStoreType::Summed,
6178 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6179 21 : SetupOutputVariable(state,
6180 : "ITE Total Heat Gain to Zone Energy",
6181 : OutputProcessor::Unit::J,
6182 7 : state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::ConGainToZone],
6183 : OutputProcessor::SOVTimeStepType::Zone,
6184 : OutputProcessor::SOVStoreType::Summed,
6185 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6186 :
6187 28 : SetupOutputVariable(state,
6188 : "ITE Standard Density Air Volume Flow Rate",
6189 : OutputProcessor::Unit::m3_s,
6190 7 : state.dataHeatBal->ZoneITEq(itEqNum).AirVolFlowStdDensity,
6191 : OutputProcessor::SOVTimeStepType::Zone,
6192 : OutputProcessor::SOVStoreType::Average,
6193 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6194 28 : SetupOutputVariable(state,
6195 : "ITE Current Density Air Volume Flow Rate",
6196 : OutputProcessor::Unit::m3_s,
6197 7 : state.dataHeatBal->ZoneITEq(itEqNum).AirVolFlowCurDensity,
6198 : OutputProcessor::SOVTimeStepType::Zone,
6199 : OutputProcessor::SOVStoreType::Average,
6200 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6201 28 : SetupOutputVariable(state,
6202 : "ITE Air Mass Flow Rate",
6203 : OutputProcessor::Unit::kg_s,
6204 7 : state.dataHeatBal->ZoneITEq(itEqNum).AirMassFlow,
6205 : OutputProcessor::SOVTimeStepType::Zone,
6206 : OutputProcessor::SOVStoreType::Average,
6207 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6208 28 : SetupOutputVariable(state,
6209 : "ITE Air Inlet Dry-Bulb Temperature",
6210 : OutputProcessor::Unit::C,
6211 7 : state.dataHeatBal->ZoneITEq(itEqNum).AirInletDryBulbT,
6212 : OutputProcessor::SOVTimeStepType::Zone,
6213 : OutputProcessor::SOVStoreType::Average,
6214 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6215 28 : SetupOutputVariable(state,
6216 : "ITE Air Inlet Dewpoint Temperature",
6217 : OutputProcessor::Unit::C,
6218 7 : state.dataHeatBal->ZoneITEq(itEqNum).AirInletDewpointT,
6219 : OutputProcessor::SOVTimeStepType::Zone,
6220 : OutputProcessor::SOVStoreType::Average,
6221 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6222 28 : SetupOutputVariable(state,
6223 : "ITE Air Inlet Relative Humidity",
6224 : OutputProcessor::Unit::Perc,
6225 7 : state.dataHeatBal->ZoneITEq(itEqNum).AirInletRelHum,
6226 : OutputProcessor::SOVTimeStepType::Zone,
6227 : OutputProcessor::SOVStoreType::Average,
6228 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6229 28 : SetupOutputVariable(state,
6230 : "ITE Air Outlet Dry-Bulb Temperature",
6231 : OutputProcessor::Unit::C,
6232 7 : state.dataHeatBal->ZoneITEq(itEqNum).AirOutletDryBulbT,
6233 : OutputProcessor::SOVTimeStepType::Zone,
6234 : OutputProcessor::SOVStoreType::Average,
6235 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6236 7 : if (state.dataHeatBal->ZoneITEq(itEqNum).SupplyAirNodeNum != 0) {
6237 28 : SetupOutputVariable(state,
6238 : "ITE Supply Heat Index",
6239 : OutputProcessor::Unit::None,
6240 7 : state.dataHeatBal->ZoneITEq(itEqNum).SHI,
6241 : OutputProcessor::SOVTimeStepType::Zone,
6242 : OutputProcessor::SOVStoreType::Average,
6243 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6244 : }
6245 28 : SetupOutputVariable(state,
6246 : "ITE Air Inlet Operating Range Exceeded Time",
6247 : OutputProcessor::Unit::hr,
6248 7 : state.dataHeatBal->ZoneITEq(itEqNum).TimeOutOfOperRange,
6249 : OutputProcessor::SOVTimeStepType::Zone,
6250 : OutputProcessor::SOVStoreType::Summed,
6251 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6252 28 : SetupOutputVariable(state,
6253 : "ITE Air Inlet Dry-Bulb Temperature Above Operating Range Time",
6254 : OutputProcessor::Unit::hr,
6255 7 : state.dataHeatBal->ZoneITEq(itEqNum).TimeAboveDryBulbT,
6256 : OutputProcessor::SOVTimeStepType::Zone,
6257 : OutputProcessor::SOVStoreType::Summed,
6258 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6259 28 : SetupOutputVariable(state,
6260 : "ITE Air Inlet Dry-Bulb Temperature Below Operating Range Time",
6261 : OutputProcessor::Unit::hr,
6262 7 : state.dataHeatBal->ZoneITEq(itEqNum).TimeBelowDryBulbT,
6263 : OutputProcessor::SOVTimeStepType::Zone,
6264 : OutputProcessor::SOVStoreType::Summed,
6265 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6266 28 : SetupOutputVariable(state,
6267 : "ITE Air Inlet Dewpoint Temperature Above Operating Range Time",
6268 : OutputProcessor::Unit::hr,
6269 7 : state.dataHeatBal->ZoneITEq(itEqNum).TimeAboveDewpointT,
6270 : OutputProcessor::SOVTimeStepType::Zone,
6271 : OutputProcessor::SOVStoreType::Summed,
6272 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6273 28 : SetupOutputVariable(state,
6274 : "ITE Air Inlet Dewpoint Temperature Below Operating Range Time",
6275 : OutputProcessor::Unit::hr,
6276 7 : state.dataHeatBal->ZoneITEq(itEqNum).TimeBelowDewpointT,
6277 : OutputProcessor::SOVTimeStepType::Zone,
6278 : OutputProcessor::SOVStoreType::Summed,
6279 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6280 28 : SetupOutputVariable(state,
6281 : "ITE Air Inlet Relative Humidity Above Operating Range Time",
6282 : OutputProcessor::Unit::hr,
6283 7 : state.dataHeatBal->ZoneITEq(itEqNum).TimeAboveRH,
6284 : OutputProcessor::SOVTimeStepType::Zone,
6285 : OutputProcessor::SOVStoreType::Summed,
6286 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6287 28 : SetupOutputVariable(state,
6288 : "ITE Air Inlet Relative Humidity Below Operating Range Time",
6289 : OutputProcessor::Unit::hr,
6290 7 : state.dataHeatBal->ZoneITEq(itEqNum).TimeBelowRH,
6291 : OutputProcessor::SOVTimeStepType::Zone,
6292 : OutputProcessor::SOVStoreType::Summed,
6293 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6294 28 : SetupOutputVariable(state,
6295 : "ITE Air Inlet Dry-Bulb Temperature Difference Above Operating Range",
6296 : OutputProcessor::Unit::deltaC,
6297 7 : state.dataHeatBal->ZoneITEq(itEqNum).DryBulbTAboveDeltaT,
6298 : OutputProcessor::SOVTimeStepType::Zone,
6299 : OutputProcessor::SOVStoreType::Average,
6300 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6301 28 : SetupOutputVariable(state,
6302 : "ITE Air Inlet Dry-Bulb Temperature Difference Below Operating Range",
6303 : OutputProcessor::Unit::deltaC,
6304 7 : state.dataHeatBal->ZoneITEq(itEqNum).DryBulbTBelowDeltaT,
6305 : OutputProcessor::SOVTimeStepType::Zone,
6306 : OutputProcessor::SOVStoreType::Average,
6307 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6308 28 : SetupOutputVariable(state,
6309 : "ITE Air Inlet Dewpoint Temperature Difference Above Operating Range",
6310 : OutputProcessor::Unit::deltaC,
6311 7 : state.dataHeatBal->ZoneITEq(itEqNum).DewpointTAboveDeltaT,
6312 : OutputProcessor::SOVTimeStepType::Zone,
6313 : OutputProcessor::SOVStoreType::Average,
6314 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6315 28 : SetupOutputVariable(state,
6316 : "ITE Air Inlet Dewpoint Temperature Difference Below Operating Range",
6317 : OutputProcessor::Unit::deltaC,
6318 7 : state.dataHeatBal->ZoneITEq(itEqNum).DewpointTBelowDeltaT,
6319 : OutputProcessor::SOVTimeStepType::Zone,
6320 : OutputProcessor::SOVStoreType::Average,
6321 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6322 28 : SetupOutputVariable(state,
6323 : "ITE Air Inlet Relative Humidity Difference Above Operating Range",
6324 : OutputProcessor::Unit::Perc,
6325 7 : state.dataHeatBal->ZoneITEq(itEqNum).RHAboveDeltaRH,
6326 : OutputProcessor::SOVTimeStepType::Zone,
6327 : OutputProcessor::SOVStoreType::Average,
6328 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6329 28 : SetupOutputVariable(state,
6330 : "ITE Air Inlet Relative Humidity Difference Below Operating Range",
6331 : OutputProcessor::Unit::Perc,
6332 7 : state.dataHeatBal->ZoneITEq(itEqNum).RHBelowDeltaRH,
6333 : OutputProcessor::SOVTimeStepType::Zone,
6334 : OutputProcessor::SOVStoreType::Average,
6335 14 : state.dataHeatBal->ZoneITEq(itEqNum).Name);
6336 : }
6337 :
6338 : // Zone total report variables
6339 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
6340 4814 : if (addZoneOutputs(zoneNum)) {
6341 :
6342 7 : constexpr std::array<std::string_view, (int)PERptVars::Num> PowerOutputVariableStrings = {
6343 : "Zone ITE CPU Electricity Rate",
6344 : "Zone ITE Fan Electricity Rate",
6345 : "Zone ITE UPS Electricity Rate",
6346 : "Zone ITE CPU Electricity Rate at Design Inlet Conditions",
6347 : "Zone ITE Fan Electricity Rate at Design Inlet Conditions",
6348 : "Zone ITE UPS Heat Gain to Zone Rate",
6349 : "Zone ITE Total Heat Gain to Zone Rate"};
6350 :
6351 56 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
6352 147 : SetupOutputVariable(state,
6353 49 : PowerOutputVariableStrings[i],
6354 : OutputProcessor::Unit::W,
6355 49 : state.dataHeatBal->ZoneRpt(zoneNum).PowerRpt[i],
6356 : OutputProcessor::SOVTimeStepType::Zone,
6357 : OutputProcessor::SOVStoreType::Average,
6358 49 : state.dataHeatBal->Zone(zoneNum).Name);
6359 : }
6360 :
6361 28 : SetupOutputVariable(state,
6362 : "Zone ITE Adjusted Return Air Temperature",
6363 : OutputProcessor::Unit::W,
6364 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEAdjReturnTemp,
6365 : OutputProcessor::SOVTimeStepType::Zone,
6366 : OutputProcessor::SOVStoreType::Average,
6367 14 : state.dataHeatBal->Zone(zoneNum).Name);
6368 :
6369 7 : constexpr std::array<std::string_view, (int)PERptVars::Num> EnergyOutputVariableStrings = {
6370 : "Zone ITE CPU Electricity Energy",
6371 : "Zone ITE Fan Electricity Energy",
6372 : "Zone ITE UPS Electricity Energy",
6373 : "Zone ITE CPU Electricity Energy at Design Inlet Conditions",
6374 : "Zone ITE Fan Electricity Energy at Design Inlet Conditions",
6375 : "Zone ITE UPS Heat Gain to Zone Energy",
6376 : "Zone ITE Total Heat Gain to Zone Energy"};
6377 :
6378 56 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
6379 147 : SetupOutputVariable(state,
6380 49 : EnergyOutputVariableStrings[i],
6381 : OutputProcessor::Unit::J,
6382 49 : state.dataHeatBal->ZoneRpt(zoneNum).EnergyRpt[i],
6383 : OutputProcessor::SOVTimeStepType::Zone,
6384 : OutputProcessor::SOVStoreType::Summed,
6385 49 : state.dataHeatBal->Zone(zoneNum).Name);
6386 : }
6387 :
6388 28 : SetupOutputVariable(state,
6389 : "Zone ITE Standard Density Air Volume Flow Rate",
6390 : OutputProcessor::Unit::m3_s,
6391 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqAirVolFlowStdDensity,
6392 : OutputProcessor::SOVTimeStepType::Zone,
6393 : OutputProcessor::SOVStoreType::Average,
6394 14 : state.dataHeatBal->Zone(zoneNum).Name);
6395 28 : SetupOutputVariable(state,
6396 : "Zone ITE Air Mass Flow Rate",
6397 : OutputProcessor::Unit::kg_s,
6398 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqAirMassFlow,
6399 : OutputProcessor::SOVTimeStepType::Zone,
6400 : OutputProcessor::SOVStoreType::Average,
6401 14 : state.dataHeatBal->Zone(zoneNum).Name);
6402 28 : SetupOutputVariable(state,
6403 : "Zone ITE Average Supply Heat Index",
6404 : OutputProcessor::Unit::None,
6405 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqSHI,
6406 : OutputProcessor::SOVTimeStepType::Zone,
6407 : OutputProcessor::SOVStoreType::Average,
6408 14 : state.dataHeatBal->Zone(zoneNum).Name);
6409 28 : SetupOutputVariable(state,
6410 : "Zone ITE Any Air Inlet Operating Range Exceeded Time",
6411 : OutputProcessor::Unit::hr,
6412 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeOutOfOperRange,
6413 : OutputProcessor::SOVTimeStepType::Zone,
6414 : OutputProcessor::SOVStoreType::Summed,
6415 14 : state.dataHeatBal->Zone(zoneNum).Name);
6416 28 : SetupOutputVariable(state,
6417 : "Zone ITE Any Air Inlet Dry-Bulb Temperature Above Operating Range Time",
6418 : OutputProcessor::Unit::hr,
6419 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeAboveDryBulbT,
6420 : OutputProcessor::SOVTimeStepType::Zone,
6421 : OutputProcessor::SOVStoreType::Summed,
6422 14 : state.dataHeatBal->Zone(zoneNum).Name);
6423 28 : SetupOutputVariable(state,
6424 : "Zone ITE Any Air Inlet Dry-Bulb Temperature Below Operating Range Time",
6425 : OutputProcessor::Unit::hr,
6426 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeBelowDryBulbT,
6427 : OutputProcessor::SOVTimeStepType::Zone,
6428 : OutputProcessor::SOVStoreType::Summed,
6429 14 : state.dataHeatBal->Zone(zoneNum).Name);
6430 28 : SetupOutputVariable(state,
6431 : "Zone ITE Any Air Inlet Dewpoint Temperature Above Operating Range Time",
6432 : OutputProcessor::Unit::hr,
6433 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeAboveDewpointT,
6434 : OutputProcessor::SOVTimeStepType::Zone,
6435 : OutputProcessor::SOVStoreType::Summed,
6436 14 : state.dataHeatBal->Zone(zoneNum).Name);
6437 28 : SetupOutputVariable(state,
6438 : "Zone ITE Any Air Inlet Dewpoint Temperature Below Operating Range Time",
6439 : OutputProcessor::Unit::hr,
6440 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeBelowDewpointT,
6441 : OutputProcessor::SOVTimeStepType::Zone,
6442 : OutputProcessor::SOVStoreType::Summed,
6443 14 : state.dataHeatBal->Zone(zoneNum).Name);
6444 28 : SetupOutputVariable(state,
6445 : "Zone ITE Any Air Inlet Relative Humidity Above Operating Range Time",
6446 : OutputProcessor::Unit::hr,
6447 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeAboveRH,
6448 : OutputProcessor::SOVTimeStepType::Zone,
6449 : OutputProcessor::SOVStoreType::Summed,
6450 14 : state.dataHeatBal->Zone(zoneNum).Name);
6451 28 : SetupOutputVariable(state,
6452 : "Zone ITE Any Air Inlet Relative Humidity Below Operating Range Time",
6453 : OutputProcessor::Unit::hr,
6454 7 : state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeBelowRH,
6455 : OutputProcessor::SOVTimeStepType::Zone,
6456 : OutputProcessor::SOVStoreType::Summed,
6457 14 : state.dataHeatBal->Zone(zoneNum).Name);
6458 : }
6459 : // Reset zone output flag
6460 4814 : addZoneOutputs(zoneNum) = false;
6461 : }
6462 :
6463 : // Space total report variables
6464 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
6465 4818 : if (addSpaceOutputs(spaceNum)) {
6466 7 : constexpr std::array<std::string_view, (int)PERptVars::Num> PowerOutputVariableStrings = {
6467 : "Space ITE CPU Electricity Rate",
6468 : "Space ITE Fan Electricity Rate",
6469 : "Space ITE UPS Electricity Rate",
6470 : "Space ITE CPU Electricity Rate at Design Inlet Conditions",
6471 : "Space ITE Fan Electricity Rate at Design Inlet Conditions",
6472 : "Space ITE UPS Heat Gain to Zone Rate",
6473 : "Space ITE Total Heat Gain to Zone Rate"};
6474 :
6475 56 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
6476 147 : SetupOutputVariable(state,
6477 49 : PowerOutputVariableStrings[i],
6478 : OutputProcessor::Unit::W,
6479 49 : state.dataHeatBal->spaceRpt(spaceNum).PowerRpt[i],
6480 : OutputProcessor::SOVTimeStepType::Zone,
6481 : OutputProcessor::SOVStoreType::Average,
6482 49 : state.dataHeatBal->space(spaceNum).Name);
6483 : }
6484 :
6485 : // Not applicable for space until space has it's own air temeratures
6486 : // Setup Output Variable(state,
6487 : // "Space ITE Adjusted Return Air Temperature",
6488 : // OutputProcessor::Unit::W,
6489 : // state.dataHeatBal->spaceRpt(spaceNum).ITEAdjReturnTemp,
6490 : // OutputProcessor::SOVTimeStepType::Zone,
6491 : // OutputProcessor::SOVStoreType::Average,
6492 : // state.dataHeatBal->space(spaceNum).Name);
6493 :
6494 7 : constexpr std::array<std::string_view, (int)PERptVars::Num> EnergyOutputVariableStrings = {
6495 : "Space ITE CPU Electricity Energy",
6496 : "Space ITE Fan Electricity Energy",
6497 : "Space ITE UPS Electricity Energy",
6498 : "Space ITE CPU Electricity Energy at Design Inlet Conditions",
6499 : "Space ITE Fan Electricity Energy at Design Inlet Conditions",
6500 : "Space ITE UPS Heat Gain to Zone Energy",
6501 : "Space ITE Total Heat Gain to Zone Energy"};
6502 :
6503 56 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
6504 147 : SetupOutputVariable(state,
6505 49 : EnergyOutputVariableStrings[i],
6506 : OutputProcessor::Unit::J,
6507 49 : state.dataHeatBal->spaceRpt(spaceNum).EnergyRpt[i],
6508 : OutputProcessor::SOVTimeStepType::Zone,
6509 : OutputProcessor::SOVStoreType::Summed,
6510 49 : state.dataHeatBal->space(spaceNum).Name);
6511 : }
6512 :
6513 28 : SetupOutputVariable(state,
6514 : "Space ITE Standard Density Air Volume Flow Rate",
6515 : OutputProcessor::Unit::m3_s,
6516 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqAirVolFlowStdDensity,
6517 : OutputProcessor::SOVTimeStepType::Zone,
6518 : OutputProcessor::SOVStoreType::Average,
6519 14 : state.dataHeatBal->space(spaceNum).Name);
6520 28 : SetupOutputVariable(state,
6521 : "Space ITE Air Mass Flow Rate",
6522 : OutputProcessor::Unit::kg_s,
6523 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqAirMassFlow,
6524 : OutputProcessor::SOVTimeStepType::Zone,
6525 : OutputProcessor::SOVStoreType::Average,
6526 14 : state.dataHeatBal->space(spaceNum).Name);
6527 28 : SetupOutputVariable(state,
6528 : "Space ITE Average Supply Heat Index",
6529 : OutputProcessor::Unit::None,
6530 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqSHI,
6531 : OutputProcessor::SOVTimeStepType::Zone,
6532 : OutputProcessor::SOVStoreType::Average,
6533 14 : state.dataHeatBal->space(spaceNum).Name);
6534 28 : SetupOutputVariable(state,
6535 : "Space ITE Any Air Inlet Operating Range Exceeded Time",
6536 : OutputProcessor::Unit::hr,
6537 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange,
6538 : OutputProcessor::SOVTimeStepType::Zone,
6539 : OutputProcessor::SOVStoreType::Summed,
6540 14 : state.dataHeatBal->space(spaceNum).Name);
6541 28 : SetupOutputVariable(state,
6542 : "Space ITE Any Air Inlet Dry-Bulb Temperature Above Operating Range Time",
6543 : OutputProcessor::Unit::hr,
6544 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveDryBulbT,
6545 : OutputProcessor::SOVTimeStepType::Zone,
6546 : OutputProcessor::SOVStoreType::Summed,
6547 14 : state.dataHeatBal->space(spaceNum).Name);
6548 28 : SetupOutputVariable(state,
6549 : "Space ITE Any Air Inlet Dry-Bulb Temperature Below Operating Range Time",
6550 : OutputProcessor::Unit::hr,
6551 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowDryBulbT,
6552 : OutputProcessor::SOVTimeStepType::Zone,
6553 : OutputProcessor::SOVStoreType::Summed,
6554 14 : state.dataHeatBal->space(spaceNum).Name);
6555 28 : SetupOutputVariable(state,
6556 : "Space ITE Any Air Inlet Dewpoint Temperature Above Operating Range Time",
6557 : OutputProcessor::Unit::hr,
6558 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveDewpointT,
6559 : OutputProcessor::SOVTimeStepType::Zone,
6560 : OutputProcessor::SOVStoreType::Summed,
6561 14 : state.dataHeatBal->space(spaceNum).Name);
6562 28 : SetupOutputVariable(state,
6563 : "Space ITE Any Air Inlet Dewpoint Temperature Below Operating Range Time",
6564 : OutputProcessor::Unit::hr,
6565 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowDewpointT,
6566 : OutputProcessor::SOVTimeStepType::Zone,
6567 : OutputProcessor::SOVStoreType::Summed,
6568 14 : state.dataHeatBal->space(spaceNum).Name);
6569 28 : SetupOutputVariable(state,
6570 : "Space ITE Any Air Inlet Relative Humidity Above Operating Range Time",
6571 : OutputProcessor::Unit::hr,
6572 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveRH,
6573 : OutputProcessor::SOVTimeStepType::Zone,
6574 : OutputProcessor::SOVStoreType::Summed,
6575 14 : state.dataHeatBal->space(spaceNum).Name);
6576 28 : SetupOutputVariable(state,
6577 : "Space ITE Any Air Inlet Relative Humidity Below Operating Range Time",
6578 : OutputProcessor::Unit::hr,
6579 7 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowRH,
6580 : OutputProcessor::SOVTimeStepType::Zone,
6581 : OutputProcessor::SOVStoreType::Summed,
6582 14 : state.dataHeatBal->space(spaceNum).Name);
6583 : }
6584 : // Reset space output flag
6585 4818 : addSpaceOutputs(spaceNum) = false;
6586 : }
6587 :
6588 : // Object report variables
6589 774 : for (int bbHeatNum = 1; bbHeatNum <= state.dataHeatBal->TotBBHeat; ++bbHeatNum) {
6590 : // Set flags for zone and space total report variables
6591 3 : addZoneOutputs(state.dataHeatBal->ZoneBBHeat(bbHeatNum).ZonePtr) = true;
6592 3 : addSpaceOutputs(state.dataHeatBal->ZoneBBHeat(bbHeatNum).spaceIndex) = true;
6593 12 : SetupOutputVariable(state,
6594 : "Baseboard Electricity Rate",
6595 : OutputProcessor::Unit::W,
6596 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Power,
6597 : OutputProcessor::SOVTimeStepType::Zone,
6598 : OutputProcessor::SOVStoreType::Average,
6599 6 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name);
6600 24 : SetupOutputVariable(state,
6601 : "Baseboard Electricity Energy",
6602 : OutputProcessor::Unit::J,
6603 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Consumption,
6604 : OutputProcessor::SOVTimeStepType::Zone,
6605 : OutputProcessor::SOVStoreType::Summed,
6606 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name,
6607 : _,
6608 : "Electricity",
6609 : "InteriorEquipment",
6610 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).EndUseSubcategory,
6611 : "Building",
6612 3 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneBBHeat(bbHeatNum).ZonePtr).Name,
6613 3 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneBBHeat(bbHeatNum).ZonePtr).Multiplier,
6614 3 : state.dataHeatBal->Zone(state.dataHeatBal->ZoneBBHeat(bbHeatNum).ZonePtr).ListMultiplier,
6615 : _,
6616 : _,
6617 6 : state.dataHeatBal->space(state.dataHeatBal->ZoneBBHeat(bbHeatNum).spaceIndex).spaceType);
6618 :
6619 12 : SetupOutputVariable(state,
6620 : "Baseboard Radiant Heating Energy",
6621 : OutputProcessor::Unit::J,
6622 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).RadGainEnergy,
6623 : OutputProcessor::SOVTimeStepType::Zone,
6624 : OutputProcessor::SOVStoreType::Summed,
6625 6 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name);
6626 12 : SetupOutputVariable(state,
6627 : "Baseboard Radiant Heating Rate",
6628 : OutputProcessor::Unit::W,
6629 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).RadGainRate,
6630 : OutputProcessor::SOVTimeStepType::Zone,
6631 : OutputProcessor::SOVStoreType::Average,
6632 6 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name);
6633 12 : SetupOutputVariable(state,
6634 : "Baseboard Convective Heating Energy",
6635 : OutputProcessor::Unit::J,
6636 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).ConGainEnergy,
6637 : OutputProcessor::SOVTimeStepType::Zone,
6638 : OutputProcessor::SOVStoreType::Summed,
6639 6 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name);
6640 12 : SetupOutputVariable(state,
6641 : "Baseboard Convective Heating Rate",
6642 : OutputProcessor::Unit::W,
6643 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).ConGainRate,
6644 : OutputProcessor::SOVTimeStepType::Zone,
6645 : OutputProcessor::SOVStoreType::Average,
6646 6 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name);
6647 12 : SetupOutputVariable(state,
6648 : "Baseboard Total Heating Energy",
6649 : OutputProcessor::Unit::J,
6650 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).TotGainEnergy,
6651 : OutputProcessor::SOVTimeStepType::Zone,
6652 : OutputProcessor::SOVStoreType::Summed,
6653 6 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name);
6654 12 : SetupOutputVariable(state,
6655 : "Baseboard Total Heating Rate",
6656 : OutputProcessor::Unit::W,
6657 3 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).TotGainRate,
6658 : OutputProcessor::SOVTimeStepType::Zone,
6659 : OutputProcessor::SOVStoreType::Average,
6660 6 : state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name);
6661 : }
6662 :
6663 : // Zone total report variables
6664 5585 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
6665 4814 : if (addZoneOutputs(zoneNum)) {
6666 12 : SetupOutputVariable(state,
6667 : "Zone Baseboard Electricity Rate",
6668 : OutputProcessor::Unit::W,
6669 3 : state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatPower,
6670 : OutputProcessor::SOVTimeStepType::Zone,
6671 : OutputProcessor::SOVStoreType::Average,
6672 6 : state.dataHeatBal->Zone(zoneNum).Name);
6673 12 : SetupOutputVariable(state,
6674 : "Zone Baseboard Electricity Energy",
6675 : OutputProcessor::Unit::J,
6676 3 : state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatElecCons,
6677 : OutputProcessor::SOVTimeStepType::Zone,
6678 : OutputProcessor::SOVStoreType::Summed,
6679 6 : state.dataHeatBal->Zone(zoneNum).Name);
6680 :
6681 12 : SetupOutputVariable(state,
6682 : "Zone Baseboard Radiant Heating Energy",
6683 : OutputProcessor::Unit::J,
6684 3 : state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatRadGain,
6685 : OutputProcessor::SOVTimeStepType::Zone,
6686 : OutputProcessor::SOVStoreType::Summed,
6687 6 : state.dataHeatBal->Zone(zoneNum).Name);
6688 12 : SetupOutputVariable(state,
6689 : "Zone Baseboard Radiant Heating Rate",
6690 : OutputProcessor::Unit::W,
6691 3 : state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatRadGainRate,
6692 : OutputProcessor::SOVTimeStepType::Zone,
6693 : OutputProcessor::SOVStoreType::Average,
6694 6 : state.dataHeatBal->Zone(zoneNum).Name);
6695 12 : SetupOutputVariable(state,
6696 : "Zone Baseboard Convective Heating Energy",
6697 : OutputProcessor::Unit::J,
6698 3 : state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatConGain,
6699 : OutputProcessor::SOVTimeStepType::Zone,
6700 : OutputProcessor::SOVStoreType::Summed,
6701 6 : state.dataHeatBal->Zone(zoneNum).Name);
6702 12 : SetupOutputVariable(state,
6703 : "Zone Baseboard Convective Heating Rate",
6704 : OutputProcessor::Unit::W,
6705 3 : state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatConGainRate,
6706 : OutputProcessor::SOVTimeStepType::Zone,
6707 : OutputProcessor::SOVStoreType::Average,
6708 6 : state.dataHeatBal->Zone(zoneNum).Name);
6709 12 : SetupOutputVariable(state,
6710 : "Zone Baseboard Total Heating Energy",
6711 : OutputProcessor::Unit::J,
6712 3 : state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatTotGain,
6713 : OutputProcessor::SOVTimeStepType::Zone,
6714 : OutputProcessor::SOVStoreType::Summed,
6715 6 : state.dataHeatBal->Zone(zoneNum).Name);
6716 12 : SetupOutputVariable(state,
6717 : "Zone Baseboard Total Heating Rate",
6718 : OutputProcessor::Unit::W,
6719 3 : state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatTotGainRate,
6720 : OutputProcessor::SOVTimeStepType::Zone,
6721 : OutputProcessor::SOVStoreType::Average,
6722 6 : state.dataHeatBal->Zone(zoneNum).Name);
6723 : }
6724 : // Reset zone output flag
6725 4814 : addZoneOutputs(zoneNum) = false;
6726 : }
6727 :
6728 : // Space total report variables
6729 5589 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
6730 4818 : if (addSpaceOutputs(spaceNum)) {
6731 12 : SetupOutputVariable(state,
6732 : "Space Baseboard Electricity Rate",
6733 : OutputProcessor::Unit::W,
6734 3 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatPower,
6735 : OutputProcessor::SOVTimeStepType::Zone,
6736 : OutputProcessor::SOVStoreType::Average,
6737 6 : state.dataHeatBal->space(spaceNum).Name);
6738 12 : SetupOutputVariable(state,
6739 : "Space Baseboard Electricity Energy",
6740 : OutputProcessor::Unit::J,
6741 3 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatElecCons,
6742 : OutputProcessor::SOVTimeStepType::Zone,
6743 : OutputProcessor::SOVStoreType::Summed,
6744 6 : state.dataHeatBal->space(spaceNum).Name);
6745 :
6746 12 : SetupOutputVariable(state,
6747 : "Space Baseboard Radiant Heating Energy",
6748 : OutputProcessor::Unit::J,
6749 3 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatRadGain,
6750 : OutputProcessor::SOVTimeStepType::Zone,
6751 : OutputProcessor::SOVStoreType::Summed,
6752 6 : state.dataHeatBal->space(spaceNum).Name);
6753 12 : SetupOutputVariable(state,
6754 : "Space Baseboard Radiant Heating Rate",
6755 : OutputProcessor::Unit::W,
6756 3 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatRadGainRate,
6757 : OutputProcessor::SOVTimeStepType::Zone,
6758 : OutputProcessor::SOVStoreType::Average,
6759 6 : state.dataHeatBal->space(spaceNum).Name);
6760 12 : SetupOutputVariable(state,
6761 : "Space Baseboard Convective Heating Energy",
6762 : OutputProcessor::Unit::J,
6763 3 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatConGain,
6764 : OutputProcessor::SOVTimeStepType::Zone,
6765 : OutputProcessor::SOVStoreType::Summed,
6766 6 : state.dataHeatBal->space(spaceNum).Name);
6767 12 : SetupOutputVariable(state,
6768 : "Space Baseboard Convective Heating Rate",
6769 : OutputProcessor::Unit::W,
6770 3 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatConGainRate,
6771 : OutputProcessor::SOVTimeStepType::Zone,
6772 : OutputProcessor::SOVStoreType::Average,
6773 6 : state.dataHeatBal->space(spaceNum).Name);
6774 12 : SetupOutputVariable(state,
6775 : "Space Baseboard Total Heating Energy",
6776 : OutputProcessor::Unit::J,
6777 3 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatTotGain,
6778 : OutputProcessor::SOVTimeStepType::Zone,
6779 : OutputProcessor::SOVStoreType::Summed,
6780 6 : state.dataHeatBal->space(spaceNum).Name);
6781 12 : SetupOutputVariable(state,
6782 : "Space Baseboard Total Heating Rate",
6783 : OutputProcessor::Unit::W,
6784 3 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatTotGainRate,
6785 : OutputProcessor::SOVTimeStepType::Zone,
6786 : OutputProcessor::SOVStoreType::Average,
6787 6 : state.dataHeatBal->space(spaceNum).Name);
6788 : }
6789 : // Reset space output flag
6790 4818 : addSpaceOutputs(spaceNum) = false;
6791 : }
6792 771 : }
6793 :
6794 2568509 : void InitInternalHeatGains(EnergyPlusData &state)
6795 : {
6796 :
6797 : // SUBROUTINE INFORMATION:
6798 : // AUTHOR Linda K. Lawrie
6799 : // DATE WRITTEN September 1997
6800 : // MODIFIED November 1998, FW: add adjustment to elec lights for dayltg controls
6801 : // August 2003, FCW: add optional calculation of light-to-return fraction
6802 : // as a function of return plenum air temperature.
6803 : // RE-ENGINEERED na
6804 :
6805 : // PURPOSE OF THIS SUBROUTINE:
6806 : // This subroutine sets up the zone internal heat gains
6807 : // that are independent of the zone air temperature.
6808 :
6809 : // Using/Aliasing
6810 : using namespace ScheduleManager;
6811 : using DaylightingDevices::FigureTDDZoneGains;
6812 : using FuelCellElectricGenerator::FigureFuelCellZoneGains;
6813 : using MicroCHPElectricGenerator::FigureMicroCHPZoneGains;
6814 : using OutputReportTabular::AllocateLoadComponentArrays;
6815 : using Psychrometrics::PsyRhoAirFnPbTdbW;
6816 : using RefrigeratedCase::FigureRefrigerationZoneGains;
6817 : using WaterThermalTanks::CalcWaterThermalTankZoneGains;
6818 : using WaterUse::CalcWaterUseZoneGains;
6819 :
6820 : // SUBROUTINE PARAMETER DEFINITIONS:
6821 : static constexpr std::array<Real64, 9> C = {
6822 : 6.4611027, 0.946892, 0.0000255737, 7.139322, -0.0627909, 0.0000589271, -0.198550, 0.000940018, -0.00000149532};
6823 2568509 : static ZoneCatEUseData const zeroZoneCatEUse; // For initialization
6824 :
6825 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
6826 : Real64 ActivityLevel_WperPerson; // Units on Activity Level (Schedule)
6827 : Real64 NumberOccupants; // Number of occupants
6828 : Real64 Q; // , QR
6829 : Real64 TotalPeopleGain; // Total heat gain from people (intermediate calculational variable)
6830 : Real64 SensiblePeopleGain; // Sensible heat gain from people (intermediate calculational variable)
6831 : Real64 FractionConvected; // For general lighting, fraction of heat from lights convected to zone air
6832 : Real64 FractionReturnAir; // For general lighting, fraction of heat from lights convected to zone's return air
6833 : Real64 FractionRadiant; // For general lighting, fraction of heat from lights to zone that is long wave
6834 : Real64 ReturnPlenumTemp; // Air temperature of a zone's return air plenum (C)
6835 : Real64 pulseMultipler; // use to create a pulse for the load component report computations
6836 :
6837 : // REAL(r64), ALLOCATABLE, SAVE, DIMENSION(:) :: QSA
6838 :
6839 : // IF (.NOT. ALLOCATED(QSA)) ALLOCATE(QSA(NumOfZones))
6840 :
6841 : // Zero out time step variables
6842 21015074 : for (auto &e : state.dataHeatBal->ZoneIntGain) {
6843 18446565 : e.NOFOCC = 0.0;
6844 18446565 : e.QOCTOT = 0.0;
6845 18446565 : e.QOCSEN = 0.0;
6846 18446565 : e.QOCLAT = 0.0;
6847 18446565 : e.QOCRAD = 0.0;
6848 18446565 : e.QOCCON = 0.0;
6849 18446565 : e.QLTSW = 0.0;
6850 18446565 : e.QLTCRA = 0.0;
6851 18446565 : e.QLTRAD = 0.0;
6852 18446565 : e.QLTCON = 0.0;
6853 18446565 : e.QLTTOT = 0.0;
6854 :
6855 18446565 : e.QEELAT = 0.0;
6856 18446565 : e.QEERAD = 0.0;
6857 18446565 : e.QEECON = 0.0;
6858 18446565 : e.QEELost = 0.0;
6859 18446565 : e.QGELAT = 0.0;
6860 18446565 : e.QGERAD = 0.0;
6861 18446565 : e.QGECON = 0.0;
6862 18446565 : e.QGELost = 0.0;
6863 18446565 : e.QBBRAD = 0.0;
6864 18446565 : e.QBBCON = 0.0;
6865 18446565 : e.QOELAT = 0.0;
6866 18446565 : e.QOERAD = 0.0;
6867 18446565 : e.QOECON = 0.0;
6868 18446565 : e.QOELost = 0.0;
6869 18446565 : e.QHWLAT = 0.0;
6870 18446565 : e.QHWRAD = 0.0;
6871 18446565 : e.QHWCON = 0.0;
6872 18446565 : e.QHWLost = 0.0;
6873 18446565 : e.QSELAT = 0.0;
6874 18446565 : e.QSERAD = 0.0;
6875 18446565 : e.QSECON = 0.0;
6876 18446565 : e.QSELost = 0.0;
6877 : }
6878 :
6879 21031250 : for (auto &e : state.dataHeatBal->spaceIntGain) {
6880 18462741 : e.NOFOCC = 0.0;
6881 18462741 : e.QOCTOT = 0.0;
6882 18462741 : e.QOCSEN = 0.0;
6883 18462741 : e.QOCLAT = 0.0;
6884 18462741 : e.QOCRAD = 0.0;
6885 18462741 : e.QOCCON = 0.0;
6886 18462741 : e.QLTSW = 0.0;
6887 18462741 : e.QLTCRA = 0.0;
6888 18462741 : e.QLTRAD = 0.0;
6889 18462741 : e.QLTCON = 0.0;
6890 18462741 : e.QLTTOT = 0.0;
6891 :
6892 18462741 : e.QEELAT = 0.0;
6893 18462741 : e.QEERAD = 0.0;
6894 18462741 : e.QEECON = 0.0;
6895 18462741 : e.QEELost = 0.0;
6896 18462741 : e.QGELAT = 0.0;
6897 18462741 : e.QGERAD = 0.0;
6898 18462741 : e.QGECON = 0.0;
6899 18462741 : e.QGELost = 0.0;
6900 18462741 : e.QBBRAD = 0.0;
6901 18462741 : e.QBBCON = 0.0;
6902 18462741 : e.QOELAT = 0.0;
6903 18462741 : e.QOERAD = 0.0;
6904 18462741 : e.QOECON = 0.0;
6905 18462741 : e.QOELost = 0.0;
6906 18462741 : e.QHWLAT = 0.0;
6907 18462741 : e.QHWRAD = 0.0;
6908 18462741 : e.QHWCON = 0.0;
6909 18462741 : e.QHWLost = 0.0;
6910 18462741 : e.QSELAT = 0.0;
6911 18462741 : e.QSERAD = 0.0;
6912 18462741 : e.QSECON = 0.0;
6913 18462741 : e.QSELost = 0.0;
6914 : }
6915 :
6916 2568509 : state.dataHeatBal->ZoneIntEEuse = zeroZoneCatEUse; // Set all member arrays to zeros
6917 :
6918 21015074 : for (auto &e : state.dataHeatBal->ZoneRpt) {
6919 18446565 : e.LtsPower = 0.0;
6920 18446565 : e.ElecPower = 0.0;
6921 18446565 : e.GasPower = 0.0;
6922 18446565 : e.HWPower = 0.0;
6923 18446565 : e.SteamPower = 0.0;
6924 18446565 : e.BaseHeatPower = 0.0;
6925 18446565 : e.CO2Rate = 0.0;
6926 : }
6927 :
6928 21031250 : for (auto &e : state.dataHeatBal->spaceRpt) {
6929 18462741 : e.LtsPower = 0.0;
6930 18462741 : e.ElecPower = 0.0;
6931 18462741 : e.GasPower = 0.0;
6932 18462741 : e.HWPower = 0.0;
6933 18462741 : e.SteamPower = 0.0;
6934 18462741 : e.BaseHeatPower = 0.0;
6935 18462741 : e.CO2Rate = 0.0;
6936 : }
6937 :
6938 21015074 : for (auto &e : state.dataHeatBal->ZonePreDefRep) {
6939 18446565 : e.NumOcc = 0.0;
6940 : }
6941 :
6942 : // QSA = 0.0
6943 :
6944 : // Process Internal Heat Gains, People done below
6945 : // Occupant Stuff
6946 : // METHOD:
6947 : // The function is based on a curve fit to data presented in
6948 : // Table 48 'Heat Gain From People' of Chapter 1 of the 'Carrier
6949 : // Handbook of Air Conditioning System Design', 1965. Values of
6950 : // Sensible gain were obtained from the table at average adjusted
6951 : // metabolic rates 350, 400, 450, 500, 750, 850, 1000, and
6952 : // 1450 Btu/hr each at temperatures 82, 80, 78, 75, and 70F.
6953 : // Sensible gains of 0.0 at 96F and equal to the metabolic rate
6954 : // at 30F were assumed in order to give reasonable values beyond
6955 : // The reported temperature range.
6956 17672913 : for (int Loop = 1; Loop <= state.dataHeatBal->TotPeople; ++Loop) {
6957 15104404 : int NZ = state.dataHeatBal->People(Loop).ZonePtr;
6958 15104404 : auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(NZ);
6959 15104404 : NumberOccupants =
6960 15104404 : state.dataHeatBal->People(Loop).NumberOfPeople * GetCurrentScheduleValue(state, state.dataHeatBal->People(Loop).NumberOfPeoplePtr);
6961 15104404 : if (state.dataHeatBal->People(Loop).EMSPeopleOn) NumberOccupants = state.dataHeatBal->People(Loop).EMSNumberOfPeople;
6962 :
6963 15104404 : TotalPeopleGain = 0.0;
6964 15104404 : SensiblePeopleGain = 0.0;
6965 :
6966 15104404 : if (NumberOccupants > 0.0) {
6967 6901312 : ActivityLevel_WperPerson = GetCurrentScheduleValue(state, state.dataHeatBal->People(Loop).ActivityLevelPtr);
6968 6901312 : TotalPeopleGain = NumberOccupants * ActivityLevel_WperPerson;
6969 : // if the user did not specify a sensible fraction, calculate the sensible heat gain
6970 6901312 : if (state.dataHeatBal->People(Loop).UserSpecSensFrac == DataGlobalConstants::AutoCalculate) {
6971 6826142 : Real64 airTemp = thisZoneHB.MAT;
6972 6826142 : if (state.dataRoomAirMod->anyNonMixingRoomAirModel) {
6973 39066 : if (state.dataRoomAirMod->IsZoneDV(NZ) || state.dataRoomAirMod->IsZoneUI(NZ)) {
6974 15024 : airTemp = state.dataRoomAirMod->TCMF(NZ);
6975 : }
6976 : }
6977 6826142 : SensiblePeopleGain =
6978 13652284 : NumberOccupants * (C[0] + ActivityLevel_WperPerson * (C[1] + ActivityLevel_WperPerson * C[2]) +
6979 13652284 : airTemp * ((C[3] + ActivityLevel_WperPerson * (C[4] + ActivityLevel_WperPerson * C[5])) +
6980 6826142 : airTemp * (C[6] + ActivityLevel_WperPerson * (C[7] + ActivityLevel_WperPerson * C[8]))));
6981 : } else { // if the user did specify a sensible fraction, use it
6982 75170 : SensiblePeopleGain = TotalPeopleGain * state.dataHeatBal->People(Loop).UserSpecSensFrac;
6983 : }
6984 :
6985 6901312 : if (SensiblePeopleGain > TotalPeopleGain) SensiblePeopleGain = TotalPeopleGain;
6986 6901312 : if (SensiblePeopleGain < 0.0) SensiblePeopleGain = 0.0;
6987 :
6988 : // For predefined tabular reports related to outside air ventilation
6989 6901312 : state.dataHeatBal->ZonePreDefRep(NZ).isOccupied = true; // set flag to occupied to be used in tabular reporting for ventilation
6990 6901312 : state.dataHeatBal->ZonePreDefRep(NZ).NumOcc += NumberOccupants;
6991 6901312 : state.dataHeatBal->ZonePreDefRep(NZ).NumOccAccum += NumberOccupants * state.dataGlobal->TimeStepZone;
6992 6901312 : state.dataHeatBal->ZonePreDefRep(NZ).NumOccAccumTime += state.dataGlobal->TimeStepZone;
6993 : } else {
6994 8203092 : state.dataHeatBal->ZonePreDefRep(NZ).isOccupied = false; // set flag to occupied to be used in tabular reporting for ventilation
6995 : }
6996 :
6997 15104404 : state.dataHeatBal->People(Loop).NumOcc = NumberOccupants;
6998 15104404 : state.dataHeatBal->People(Loop).RadGainRate = SensiblePeopleGain * state.dataHeatBal->People(Loop).FractionRadiant;
6999 15104404 : state.dataHeatBal->People(Loop).ConGainRate = SensiblePeopleGain * state.dataHeatBal->People(Loop).FractionConvected;
7000 15104404 : state.dataHeatBal->People(Loop).SenGainRate = SensiblePeopleGain;
7001 15104404 : state.dataHeatBal->People(Loop).LatGainRate = TotalPeopleGain - SensiblePeopleGain;
7002 15104404 : state.dataHeatBal->People(Loop).TotGainRate = TotalPeopleGain;
7003 15104404 : state.dataHeatBal->People(Loop).CO2GainRate = TotalPeopleGain * state.dataHeatBal->People(Loop).CO2RateFactor;
7004 :
7005 15104404 : int spaceNum = state.dataHeatBal->People(Loop).spaceIndex;
7006 15104404 : state.dataHeatBal->spaceIntGain(spaceNum).NOFOCC += state.dataHeatBal->People(Loop).NumOcc;
7007 15104404 : state.dataHeatBal->spaceIntGain(spaceNum).QOCRAD += state.dataHeatBal->People(Loop).RadGainRate;
7008 15104404 : state.dataHeatBal->spaceIntGain(spaceNum).QOCCON += state.dataHeatBal->People(Loop).ConGainRate;
7009 15104404 : state.dataHeatBal->spaceIntGain(spaceNum).QOCSEN += state.dataHeatBal->People(Loop).SenGainRate;
7010 15104404 : state.dataHeatBal->spaceIntGain(spaceNum).QOCLAT += state.dataHeatBal->People(Loop).LatGainRate;
7011 15104404 : state.dataHeatBal->spaceIntGain(spaceNum).QOCTOT += state.dataHeatBal->People(Loop).TotGainRate;
7012 : }
7013 :
7014 21015074 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
7015 18446565 : state.dataHeatBal->ZoneIntGain(zoneNum).NOFOCC = 0.0;
7016 18446565 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCRAD = 0.0;
7017 18446565 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCCON = 0.0;
7018 18446565 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCSEN = 0.0;
7019 18446565 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCLAT = 0.0;
7020 18446565 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCTOT = 0.0;
7021 36909306 : for (int spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) {
7022 18462741 : state.dataHeatBal->ZoneIntGain(zoneNum).NOFOCC += state.dataHeatBal->spaceIntGain(spaceNum).NOFOCC;
7023 18462741 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCRAD += state.dataHeatBal->spaceIntGain(spaceNum).QOCRAD;
7024 18462741 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCCON += state.dataHeatBal->spaceIntGain(spaceNum).QOCCON;
7025 18462741 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCSEN += state.dataHeatBal->spaceIntGain(spaceNum).QOCSEN;
7026 18462741 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCLAT += state.dataHeatBal->spaceIntGain(spaceNum).QOCLAT;
7027 18462741 : state.dataHeatBal->ZoneIntGain(zoneNum).QOCTOT += state.dataHeatBal->spaceIntGain(spaceNum).QOCTOT;
7028 : }
7029 : }
7030 :
7031 18547344 : for (int Loop = 1; Loop <= state.dataHeatBal->TotLights; ++Loop) {
7032 15978835 : int NZ = state.dataHeatBal->Lights(Loop).ZonePtr;
7033 15978835 : int spaceNum = state.dataHeatBal->Lights(Loop).spaceIndex;
7034 15978835 : Q = state.dataHeatBal->Lights(Loop).DesignLevel * GetCurrentScheduleValue(state, state.dataHeatBal->Lights(Loop).SchedPtr);
7035 :
7036 15978835 : if (state.dataDaylightingData->ZoneDaylight(NZ).totRefPts > 0) {
7037 1415124 : if (state.dataHeatBal->Lights(Loop).FractionReplaceable > 0.0) { // FractionReplaceable can only be 0 or 1 for these models
7038 1415124 : Q *= state.dataDaylightingData->spacePowerReductionFactor(spaceNum);
7039 : }
7040 : }
7041 :
7042 : // Reduce lighting power due to demand limiting
7043 15978835 : if (state.dataHeatBal->Lights(Loop).ManageDemand && (Q > state.dataHeatBal->Lights(Loop).DemandLimit))
7044 1020 : Q = state.dataHeatBal->Lights(Loop).DemandLimit;
7045 :
7046 : // Set Q to EMS override if being called for by EMs
7047 15978835 : if (state.dataHeatBal->Lights(Loop).EMSLightsOn) Q = state.dataHeatBal->Lights(Loop).EMSLightingPower;
7048 :
7049 15978835 : FractionConvected = state.dataHeatBal->Lights(Loop).FractionConvected;
7050 15978835 : FractionReturnAir = state.dataHeatBal->Lights(Loop).FractionReturnAir;
7051 15978835 : FractionRadiant = state.dataHeatBal->Lights(Loop).FractionRadiant;
7052 15978835 : if (state.dataHeatBal->Lights(Loop).FractionReturnAirIsCalculated && !state.dataGlobal->ZoneSizingCalc &&
7053 0 : state.dataGlobal->SimTimeSteps > 1) {
7054 : // Calculate FractionReturnAir based on conditions in the zone's return air plenum, if there is one.
7055 0 : if (state.dataHeatBal->Zone(NZ).IsControlled) {
7056 0 : int retNum = state.dataHeatBal->Lights(Loop).ZoneReturnNum;
7057 0 : int ReturnZonePlenumCondNum = state.dataZoneEquip->ZoneEquipConfig(NZ).ReturnNodePlenumNum(retNum);
7058 0 : if (ReturnZonePlenumCondNum > 0) {
7059 0 : ReturnPlenumTemp = state.dataZonePlenum->ZoneRetPlenCond(ReturnZonePlenumCondNum).ZoneTemp;
7060 0 : FractionReturnAir = state.dataHeatBal->Lights(Loop).FractionReturnAirPlenTempCoeff1 -
7061 0 : state.dataHeatBal->Lights(Loop).FractionReturnAirPlenTempCoeff2 * ReturnPlenumTemp;
7062 0 : FractionReturnAir = max(0.0, min(1.0, FractionReturnAir));
7063 0 : if (FractionReturnAir >= (1.0 - state.dataHeatBal->Lights(Loop).FractionShortWave)) {
7064 0 : FractionReturnAir = 1.0 - state.dataHeatBal->Lights(Loop).FractionShortWave;
7065 0 : FractionRadiant = 0.0;
7066 0 : FractionConvected = 0.0;
7067 : } else {
7068 0 : FractionRadiant =
7069 0 : ((1.0 - FractionReturnAir - state.dataHeatBal->Lights(Loop).FractionShortWave) /
7070 0 : (state.dataHeatBal->Lights(Loop).FractionRadiant + state.dataHeatBal->Lights(Loop).FractionConvected)) *
7071 0 : state.dataHeatBal->Lights(Loop).FractionRadiant;
7072 0 : FractionConvected = 1.0 - (FractionReturnAir + FractionRadiant + state.dataHeatBal->Lights(Loop).FractionShortWave);
7073 : }
7074 : }
7075 : }
7076 : }
7077 :
7078 15978835 : state.dataHeatBal->Lights(Loop).Power = Q;
7079 15978835 : state.dataHeatBal->Lights(Loop).RadGainRate = Q * FractionRadiant;
7080 15978835 : state.dataHeatBal->Lights(Loop).VisGainRate = Q * state.dataHeatBal->Lights(Loop).FractionShortWave;
7081 15978835 : state.dataHeatBal->Lights(Loop).ConGainRate = Q * FractionConvected;
7082 15978835 : state.dataHeatBal->Lights(Loop).RetAirGainRate = Q * FractionReturnAir;
7083 15978835 : state.dataHeatBal->Lights(Loop).TotGainRate = Q;
7084 :
7085 15978835 : state.dataHeatBal->ZoneRpt(NZ).LtsPower += state.dataHeatBal->Lights(Loop).Power;
7086 15978835 : state.dataHeatBal->ZoneIntGain(NZ).QLTRAD += state.dataHeatBal->Lights(Loop).RadGainRate;
7087 15978835 : state.dataHeatBal->ZoneIntGain(NZ).QLTSW += state.dataHeatBal->Lights(Loop).VisGainRate;
7088 15978835 : state.dataHeatBal->ZoneIntGain(NZ).QLTCON += state.dataHeatBal->Lights(Loop).ConGainRate;
7089 15978835 : state.dataHeatBal->ZoneIntGain(NZ).QLTCRA += state.dataHeatBal->Lights(Loop).RetAirGainRate;
7090 15978835 : state.dataHeatBal->ZoneIntGain(NZ).QLTTOT += state.dataHeatBal->Lights(Loop).TotGainRate;
7091 :
7092 15978835 : state.dataHeatBal->spaceRpt(spaceNum).LtsPower += state.dataHeatBal->Lights(Loop).Power;
7093 15978835 : state.dataHeatBal->spaceIntGain(spaceNum).QLTRAD += state.dataHeatBal->Lights(Loop).RadGainRate;
7094 15978835 : state.dataHeatBal->spaceIntGain(spaceNum).QLTSW += state.dataHeatBal->Lights(Loop).VisGainRate;
7095 15978835 : state.dataHeatBal->spaceIntGain(spaceNum).QLTCON += state.dataHeatBal->Lights(Loop).ConGainRate;
7096 15978835 : state.dataHeatBal->spaceIntGain(spaceNum).QLTCRA += state.dataHeatBal->Lights(Loop).RetAirGainRate;
7097 15978835 : state.dataHeatBal->spaceIntGain(spaceNum).QLTTOT += state.dataHeatBal->Lights(Loop).TotGainRate;
7098 : }
7099 :
7100 19156386 : for (int Loop = 1; Loop <= state.dataHeatBal->TotElecEquip; ++Loop) {
7101 16587877 : Q = state.dataHeatBal->ZoneElectric(Loop).DesignLevel * GetCurrentScheduleValue(state, state.dataHeatBal->ZoneElectric(Loop).SchedPtr);
7102 :
7103 : // Reduce equipment power due to demand limiting
7104 16587877 : if (state.dataHeatBal->ZoneElectric(Loop).ManageDemand && (Q > state.dataHeatBal->ZoneElectric(Loop).DemandLimit))
7105 850 : Q = state.dataHeatBal->ZoneElectric(Loop).DemandLimit;
7106 :
7107 : // Set Q to EMS override if being called for by EMs
7108 16587877 : if (state.dataHeatBal->ZoneElectric(Loop).EMSZoneEquipOverrideOn) Q = state.dataHeatBal->ZoneElectric(Loop).EMSEquipPower;
7109 :
7110 16587877 : state.dataHeatBal->ZoneElectric(Loop).Power = Q;
7111 16587877 : state.dataHeatBal->ZoneElectric(Loop).RadGainRate = Q * state.dataHeatBal->ZoneElectric(Loop).FractionRadiant;
7112 16587877 : state.dataHeatBal->ZoneElectric(Loop).ConGainRate = Q * state.dataHeatBal->ZoneElectric(Loop).FractionConvected;
7113 16587877 : state.dataHeatBal->ZoneElectric(Loop).LatGainRate = Q * state.dataHeatBal->ZoneElectric(Loop).FractionLatent;
7114 16587877 : state.dataHeatBal->ZoneElectric(Loop).LostRate = Q * state.dataHeatBal->ZoneElectric(Loop).FractionLost;
7115 16587877 : state.dataHeatBal->ZoneElectric(Loop).TotGainRate = Q - state.dataHeatBal->ZoneElectric(Loop).LostRate;
7116 :
7117 16587877 : int NZ = state.dataHeatBal->ZoneElectric(Loop).ZonePtr;
7118 16587877 : state.dataHeatBal->ZoneRpt(NZ).ElecPower += state.dataHeatBal->ZoneElectric(Loop).Power;
7119 16587877 : state.dataHeatBal->ZoneIntGain(NZ).QEERAD += state.dataHeatBal->ZoneElectric(Loop).RadGainRate;
7120 16587877 : state.dataHeatBal->ZoneIntGain(NZ).QEECON += state.dataHeatBal->ZoneElectric(Loop).ConGainRate;
7121 16587877 : state.dataHeatBal->ZoneIntGain(NZ).QEELAT += state.dataHeatBal->ZoneElectric(Loop).LatGainRate;
7122 16587877 : state.dataHeatBal->ZoneIntGain(NZ).QEELost += state.dataHeatBal->ZoneElectric(Loop).LostRate;
7123 :
7124 16587877 : int spaceNum = state.dataHeatBal->ZoneElectric(Loop).spaceIndex;
7125 16587877 : state.dataHeatBal->spaceRpt(spaceNum).ElecPower += state.dataHeatBal->ZoneElectric(Loop).Power;
7126 16587877 : state.dataHeatBal->spaceIntGain(spaceNum).QEERAD += state.dataHeatBal->ZoneElectric(Loop).RadGainRate;
7127 16587877 : state.dataHeatBal->spaceIntGain(spaceNum).QEECON += state.dataHeatBal->ZoneElectric(Loop).ConGainRate;
7128 16587877 : state.dataHeatBal->spaceIntGain(spaceNum).QEELAT += state.dataHeatBal->ZoneElectric(Loop).LatGainRate;
7129 16587877 : state.dataHeatBal->spaceIntGain(spaceNum).QEELost += state.dataHeatBal->ZoneElectric(Loop).LostRate;
7130 : }
7131 :
7132 2867342 : for (int Loop = 1; Loop <= state.dataHeatBal->TotGasEquip; ++Loop) {
7133 298833 : Q = state.dataHeatBal->ZoneGas(Loop).DesignLevel * GetCurrentScheduleValue(state, state.dataHeatBal->ZoneGas(Loop).SchedPtr);
7134 :
7135 : // Set Q to EMS override if being called for by EMs
7136 298833 : if (state.dataHeatBal->ZoneGas(Loop).EMSZoneEquipOverrideOn) Q = state.dataHeatBal->ZoneGas(Loop).EMSEquipPower;
7137 :
7138 298833 : state.dataHeatBal->ZoneGas(Loop).Power = Q;
7139 298833 : state.dataHeatBal->ZoneGas(Loop).RadGainRate = Q * state.dataHeatBal->ZoneGas(Loop).FractionRadiant;
7140 298833 : state.dataHeatBal->ZoneGas(Loop).ConGainRate = Q * state.dataHeatBal->ZoneGas(Loop).FractionConvected;
7141 298833 : state.dataHeatBal->ZoneGas(Loop).LatGainRate = Q * state.dataHeatBal->ZoneGas(Loop).FractionLatent;
7142 298833 : state.dataHeatBal->ZoneGas(Loop).LostRate = Q * state.dataHeatBal->ZoneGas(Loop).FractionLost;
7143 298833 : state.dataHeatBal->ZoneGas(Loop).TotGainRate = Q - state.dataHeatBal->ZoneGas(Loop).LostRate;
7144 298833 : state.dataHeatBal->ZoneGas(Loop).CO2GainRate = Q * state.dataHeatBal->ZoneGas(Loop).CO2RateFactor;
7145 :
7146 298833 : int NZ = state.dataHeatBal->ZoneGas(Loop).ZonePtr;
7147 298833 : state.dataHeatBal->ZoneRpt(NZ).GasPower += state.dataHeatBal->ZoneGas(Loop).Power;
7148 298833 : state.dataHeatBal->ZoneIntGain(NZ).QGERAD += state.dataHeatBal->ZoneGas(Loop).RadGainRate;
7149 298833 : state.dataHeatBal->ZoneIntGain(NZ).QGECON += state.dataHeatBal->ZoneGas(Loop).ConGainRate;
7150 298833 : state.dataHeatBal->ZoneIntGain(NZ).QGELAT += state.dataHeatBal->ZoneGas(Loop).LatGainRate;
7151 298833 : state.dataHeatBal->ZoneIntGain(NZ).QGELost += state.dataHeatBal->ZoneGas(Loop).LostRate;
7152 :
7153 298833 : int spaceNum = state.dataHeatBal->ZoneGas(Loop).spaceIndex;
7154 298833 : state.dataHeatBal->spaceRpt(spaceNum).GasPower += state.dataHeatBal->ZoneGas(Loop).Power;
7155 298833 : state.dataHeatBal->spaceIntGain(spaceNum).QGERAD += state.dataHeatBal->ZoneGas(Loop).RadGainRate;
7156 298833 : state.dataHeatBal->spaceIntGain(spaceNum).QGECON += state.dataHeatBal->ZoneGas(Loop).ConGainRate;
7157 298833 : state.dataHeatBal->spaceIntGain(spaceNum).QGELAT += state.dataHeatBal->ZoneGas(Loop).LatGainRate;
7158 298833 : state.dataHeatBal->spaceIntGain(spaceNum).QGELost += state.dataHeatBal->ZoneGas(Loop).LostRate;
7159 : }
7160 :
7161 2895071 : for (int Loop = 1; Loop <= state.dataHeatBal->TotOthEquip; ++Loop) {
7162 326562 : Q = state.dataHeatBal->ZoneOtherEq(Loop).DesignLevel * GetCurrentScheduleValue(state, state.dataHeatBal->ZoneOtherEq(Loop).SchedPtr);
7163 :
7164 : // Set Q to EMS override if being called for by EMs
7165 326562 : if (state.dataHeatBal->ZoneOtherEq(Loop).EMSZoneEquipOverrideOn) Q = state.dataHeatBal->ZoneOtherEq(Loop).EMSEquipPower;
7166 :
7167 326562 : state.dataHeatBal->ZoneOtherEq(Loop).Power = Q;
7168 326562 : state.dataHeatBal->ZoneOtherEq(Loop).RadGainRate = Q * state.dataHeatBal->ZoneOtherEq(Loop).FractionRadiant;
7169 326562 : state.dataHeatBal->ZoneOtherEq(Loop).ConGainRate = Q * state.dataHeatBal->ZoneOtherEq(Loop).FractionConvected;
7170 326562 : state.dataHeatBal->ZoneOtherEq(Loop).LatGainRate = Q * state.dataHeatBal->ZoneOtherEq(Loop).FractionLatent;
7171 326562 : state.dataHeatBal->ZoneOtherEq(Loop).LostRate = Q * state.dataHeatBal->ZoneOtherEq(Loop).FractionLost;
7172 326562 : state.dataHeatBal->ZoneOtherEq(Loop).TotGainRate = Q - state.dataHeatBal->ZoneOtherEq(Loop).LostRate;
7173 :
7174 326562 : int NZ = state.dataHeatBal->ZoneOtherEq(Loop).ZonePtr;
7175 326562 : state.dataHeatBal->ZoneRpt(NZ).OtherPower += state.dataHeatBal->ZoneOtherEq(Loop).Power;
7176 326562 : state.dataHeatBal->ZoneIntGain(NZ).QOERAD += state.dataHeatBal->ZoneOtherEq(Loop).RadGainRate;
7177 326562 : state.dataHeatBal->ZoneIntGain(NZ).QOECON += state.dataHeatBal->ZoneOtherEq(Loop).ConGainRate;
7178 326562 : state.dataHeatBal->ZoneIntGain(NZ).QOELAT += state.dataHeatBal->ZoneOtherEq(Loop).LatGainRate;
7179 326562 : state.dataHeatBal->ZoneIntGain(NZ).QOELost += state.dataHeatBal->ZoneOtherEq(Loop).LostRate;
7180 :
7181 326562 : int spaceNum = state.dataHeatBal->ZoneOtherEq(Loop).spaceIndex;
7182 326562 : state.dataHeatBal->spaceRpt(spaceNum).OtherPower += state.dataHeatBal->ZoneOtherEq(Loop).Power;
7183 326562 : state.dataHeatBal->spaceIntGain(spaceNum).QOERAD += state.dataHeatBal->ZoneOtherEq(Loop).RadGainRate;
7184 326562 : state.dataHeatBal->spaceIntGain(spaceNum).QOECON += state.dataHeatBal->ZoneOtherEq(Loop).ConGainRate;
7185 326562 : state.dataHeatBal->spaceIntGain(spaceNum).QOELAT += state.dataHeatBal->ZoneOtherEq(Loop).LatGainRate;
7186 326562 : state.dataHeatBal->spaceIntGain(spaceNum).QOELost += state.dataHeatBal->ZoneOtherEq(Loop).LostRate;
7187 : }
7188 :
7189 2654789 : for (int Loop = 1; Loop <= state.dataHeatBal->TotHWEquip; ++Loop) {
7190 86280 : Q = state.dataHeatBal->ZoneHWEq(Loop).DesignLevel * GetCurrentScheduleValue(state, state.dataHeatBal->ZoneHWEq(Loop).SchedPtr);
7191 :
7192 : // Set Q to EMS override if being called for by EMs
7193 86280 : if (state.dataHeatBal->ZoneHWEq(Loop).EMSZoneEquipOverrideOn) Q = state.dataHeatBal->ZoneHWEq(Loop).EMSEquipPower;
7194 :
7195 86280 : state.dataHeatBal->ZoneHWEq(Loop).Power = Q;
7196 86280 : state.dataHeatBal->ZoneHWEq(Loop).RadGainRate = Q * state.dataHeatBal->ZoneHWEq(Loop).FractionRadiant;
7197 86280 : state.dataHeatBal->ZoneHWEq(Loop).ConGainRate = Q * state.dataHeatBal->ZoneHWEq(Loop).FractionConvected;
7198 86280 : state.dataHeatBal->ZoneHWEq(Loop).LatGainRate = Q * state.dataHeatBal->ZoneHWEq(Loop).FractionLatent;
7199 86280 : state.dataHeatBal->ZoneHWEq(Loop).LostRate = Q * state.dataHeatBal->ZoneHWEq(Loop).FractionLost;
7200 86280 : state.dataHeatBal->ZoneHWEq(Loop).TotGainRate = Q - state.dataHeatBal->ZoneHWEq(Loop).LostRate;
7201 :
7202 86280 : int NZ = state.dataHeatBal->ZoneHWEq(Loop).ZonePtr;
7203 86280 : state.dataHeatBal->ZoneRpt(NZ).HWPower += state.dataHeatBal->ZoneHWEq(Loop).Power;
7204 86280 : state.dataHeatBal->ZoneIntGain(NZ).QHWRAD += state.dataHeatBal->ZoneHWEq(Loop).RadGainRate;
7205 86280 : state.dataHeatBal->ZoneIntGain(NZ).QHWCON += state.dataHeatBal->ZoneHWEq(Loop).ConGainRate;
7206 86280 : state.dataHeatBal->ZoneIntGain(NZ).QHWLAT += state.dataHeatBal->ZoneHWEq(Loop).LatGainRate;
7207 86280 : state.dataHeatBal->ZoneIntGain(NZ).QHWLost += state.dataHeatBal->ZoneHWEq(Loop).LostRate;
7208 :
7209 86280 : int spaceNum = state.dataHeatBal->ZoneHWEq(Loop).spaceIndex;
7210 86280 : state.dataHeatBal->spaceRpt(spaceNum).HWPower += state.dataHeatBal->ZoneHWEq(Loop).Power;
7211 86280 : state.dataHeatBal->spaceIntGain(spaceNum).QHWRAD += state.dataHeatBal->ZoneHWEq(Loop).RadGainRate;
7212 86280 : state.dataHeatBal->spaceIntGain(spaceNum).QHWCON += state.dataHeatBal->ZoneHWEq(Loop).ConGainRate;
7213 86280 : state.dataHeatBal->spaceIntGain(spaceNum).QHWLAT += state.dataHeatBal->ZoneHWEq(Loop).LatGainRate;
7214 86280 : state.dataHeatBal->spaceIntGain(spaceNum).QHWLost += state.dataHeatBal->ZoneHWEq(Loop).LostRate;
7215 : }
7216 :
7217 2582024 : for (int Loop = 1; Loop <= state.dataHeatBal->TotStmEquip; ++Loop) {
7218 13515 : Q = state.dataHeatBal->ZoneSteamEq(Loop).DesignLevel * GetCurrentScheduleValue(state, state.dataHeatBal->ZoneSteamEq(Loop).SchedPtr);
7219 :
7220 : // Set Q to EMS override if being called for by EMs
7221 13515 : if (state.dataHeatBal->ZoneSteamEq(Loop).EMSZoneEquipOverrideOn) Q = state.dataHeatBal->ZoneSteamEq(Loop).EMSEquipPower;
7222 :
7223 13515 : state.dataHeatBal->ZoneSteamEq(Loop).Power = Q;
7224 13515 : state.dataHeatBal->ZoneSteamEq(Loop).RadGainRate = Q * state.dataHeatBal->ZoneSteamEq(Loop).FractionRadiant;
7225 13515 : state.dataHeatBal->ZoneSteamEq(Loop).ConGainRate = Q * state.dataHeatBal->ZoneSteamEq(Loop).FractionConvected;
7226 13515 : state.dataHeatBal->ZoneSteamEq(Loop).LatGainRate = Q * state.dataHeatBal->ZoneSteamEq(Loop).FractionLatent;
7227 13515 : state.dataHeatBal->ZoneSteamEq(Loop).LostRate = Q * state.dataHeatBal->ZoneSteamEq(Loop).FractionLost;
7228 13515 : state.dataHeatBal->ZoneSteamEq(Loop).TotGainRate = Q - state.dataHeatBal->ZoneSteamEq(Loop).LostRate;
7229 :
7230 13515 : int NZ = state.dataHeatBal->ZoneSteamEq(Loop).ZonePtr;
7231 13515 : state.dataHeatBal->ZoneRpt(NZ).SteamPower += state.dataHeatBal->ZoneSteamEq(Loop).Power;
7232 13515 : state.dataHeatBal->ZoneIntGain(NZ).QSERAD += state.dataHeatBal->ZoneSteamEq(Loop).RadGainRate;
7233 13515 : state.dataHeatBal->ZoneIntGain(NZ).QSECON += state.dataHeatBal->ZoneSteamEq(Loop).ConGainRate;
7234 13515 : state.dataHeatBal->ZoneIntGain(NZ).QSELAT += state.dataHeatBal->ZoneSteamEq(Loop).LatGainRate;
7235 13515 : state.dataHeatBal->ZoneIntGain(NZ).QSELost += state.dataHeatBal->ZoneSteamEq(Loop).LostRate;
7236 :
7237 13515 : int spaceNum = state.dataHeatBal->ZoneSteamEq(Loop).spaceIndex;
7238 13515 : state.dataHeatBal->spaceRpt(spaceNum).SteamPower += state.dataHeatBal->ZoneSteamEq(Loop).Power;
7239 13515 : state.dataHeatBal->spaceIntGain(spaceNum).QSERAD += state.dataHeatBal->ZoneSteamEq(Loop).RadGainRate;
7240 13515 : state.dataHeatBal->spaceIntGain(spaceNum).QSECON += state.dataHeatBal->ZoneSteamEq(Loop).ConGainRate;
7241 13515 : state.dataHeatBal->spaceIntGain(spaceNum).QSELAT += state.dataHeatBal->ZoneSteamEq(Loop).LatGainRate;
7242 13515 : state.dataHeatBal->spaceIntGain(spaceNum).QSELost += state.dataHeatBal->ZoneSteamEq(Loop).LostRate;
7243 : }
7244 :
7245 2576618 : for (int Loop = 1; Loop <= state.dataHeatBal->TotBBHeat; ++Loop) {
7246 8109 : int NZ = state.dataHeatBal->ZoneBBHeat(Loop).ZonePtr;
7247 8109 : if (state.dataHeatBal->Zone(NZ).OutDryBulbTemp >= state.dataHeatBal->ZoneBBHeat(Loop).HighTemperature) {
7248 4059 : Q = 0.0;
7249 4050 : } else if (state.dataHeatBal->Zone(NZ).OutDryBulbTemp > state.dataHeatBal->ZoneBBHeat(Loop).LowTemperature) {
7250 4050 : Q = (state.dataHeatBal->Zone(NZ).OutDryBulbTemp - state.dataHeatBal->ZoneBBHeat(Loop).LowTemperature) *
7251 2700 : (state.dataHeatBal->ZoneBBHeat(Loop).CapatHighTemperature - state.dataHeatBal->ZoneBBHeat(Loop).CapatLowTemperature) /
7252 1350 : (state.dataHeatBal->ZoneBBHeat(Loop).HighTemperature - state.dataHeatBal->ZoneBBHeat(Loop).LowTemperature) +
7253 1350 : state.dataHeatBal->ZoneBBHeat(Loop).CapatLowTemperature;
7254 : } else {
7255 2700 : Q = state.dataHeatBal->ZoneBBHeat(Loop).CapatLowTemperature;
7256 : }
7257 8109 : Q *= GetCurrentScheduleValue(state, state.dataHeatBal->ZoneBBHeat(Loop).SchedPtr);
7258 :
7259 : // set with EMS value if being called for.
7260 8109 : if (state.dataHeatBal->ZoneBBHeat(Loop).EMSZoneBaseboardOverrideOn) Q = state.dataHeatBal->ZoneBBHeat(Loop).EMSZoneBaseboardPower;
7261 :
7262 8109 : state.dataHeatBal->ZoneBBHeat(Loop).Power = Q;
7263 8109 : state.dataHeatBal->ZoneBBHeat(Loop).RadGainRate = Q * state.dataHeatBal->ZoneBBHeat(Loop).FractionRadiant;
7264 8109 : state.dataHeatBal->ZoneBBHeat(Loop).ConGainRate = Q * state.dataHeatBal->ZoneBBHeat(Loop).FractionConvected;
7265 8109 : state.dataHeatBal->ZoneBBHeat(Loop).TotGainRate = Q;
7266 :
7267 8109 : NZ = state.dataHeatBal->ZoneBBHeat(Loop).ZonePtr;
7268 8109 : state.dataHeatBal->ZoneRpt(NZ).BaseHeatPower += state.dataHeatBal->ZoneBBHeat(Loop).Power;
7269 8109 : state.dataHeatBal->ZoneIntGain(NZ).QBBRAD += state.dataHeatBal->ZoneBBHeat(Loop).RadGainRate;
7270 8109 : state.dataHeatBal->ZoneIntGain(NZ).QBBCON += state.dataHeatBal->ZoneBBHeat(Loop).ConGainRate;
7271 :
7272 8109 : int spaceNum = state.dataHeatBal->ZoneBBHeat(Loop).spaceIndex;
7273 8109 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatPower += state.dataHeatBal->ZoneBBHeat(Loop).Power;
7274 8109 : state.dataHeatBal->spaceIntGain(spaceNum).QBBRAD += state.dataHeatBal->ZoneBBHeat(Loop).RadGainRate;
7275 8109 : state.dataHeatBal->spaceIntGain(spaceNum).QBBCON += state.dataHeatBal->ZoneBBHeat(Loop).ConGainRate;
7276 : }
7277 :
7278 2576753 : for (int Loop = 1; Loop <= state.dataHeatBal->TotCO2Gen; ++Loop) {
7279 8244 : int NZ = state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr;
7280 8244 : state.dataHeatBal->ZoneCO2Gen(Loop).CO2GainRate =
7281 8244 : state.dataHeatBal->ZoneCO2Gen(Loop).CO2DesignRate * GetCurrentScheduleValue(state, state.dataHeatBal->ZoneCO2Gen(Loop).SchedPtr);
7282 8244 : state.dataHeatBal->ZoneRpt(NZ).CO2Rate += state.dataHeatBal->ZoneCO2Gen(Loop).CO2GainRate;
7283 : }
7284 :
7285 2568509 : if (state.dataHeatBal->TotITEquip > 0) CalcZoneITEq(state);
7286 :
7287 2568509 : CalcWaterThermalTankZoneGains(state);
7288 2568509 : PipeHeatTransfer::PipeHTData::CalcZonePipesHeatGain(state);
7289 2568509 : CalcWaterUseZoneGains(state);
7290 2568509 : FigureFuelCellZoneGains(state);
7291 2568509 : FigureMicroCHPZoneGains(state);
7292 2568509 : initializeElectricPowerServiceZoneGains(state);
7293 2568509 : FigureTDDZoneGains(state);
7294 2568509 : FigureRefrigerationZoneGains(state);
7295 :
7296 : // store pointer values to hold generic internal gain values constant for entire timestep
7297 2568509 : UpdateInternalGainValues(state);
7298 :
7299 21015074 : for (int NZ = 1; NZ <= state.dataGlobal->NumOfZones; ++NZ) {
7300 :
7301 18446565 : auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(NZ);
7302 18446565 : thisZoneHB.ZoneLatentGain = InternalHeatGains::SumAllInternalLatentGains(state, NZ); // Also sets space gains
7303 : // Added for hybrid model
7304 18446565 : if (state.dataHybridModel->FlagHybridModel_PC) {
7305 8096 : thisZoneHB.ZoneLatentGainExceptPeople = InternalHeatGains::SumAllInternalLatentGainsExceptPeople(state, NZ); // Also sets space gains
7306 : }
7307 : }
7308 :
7309 : // QL is per radiant enclosure (one or more spaces if grouped by air boundaries)
7310 21002924 : for (int enclosureNum = 1; enclosureNum <= state.dataViewFactor->NumOfRadiantEnclosures; ++enclosureNum) {
7311 18434415 : auto &thisEnclosure(state.dataViewFactor->EnclRadInfo(enclosureNum));
7312 18434415 : thisEnclosure.radQThermalRad = 0.0;
7313 36897156 : for (int const spaceNum : thisEnclosure.spaceNums) {
7314 18462741 : Real64 spaceQL = SumAllSpaceInternalRadiationGains(state, spaceNum);
7315 18462741 : thisEnclosure.radQThermalRad += spaceQL;
7316 : }
7317 : }
7318 :
7319 2568509 : pulseMultipler = 0.01; // the W/sqft pulse for the zone
7320 2568509 : if (state.dataGlobal->CompLoadReportIsReq) {
7321 161772 : AllocateLoadComponentArrays(state);
7322 : }
7323 21015074 : for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) { // Loop through all surfaces...
7324 36909306 : for (int spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) {
7325 18462741 : auto &thisSpace = state.dataHeatBal->space(spaceNum);
7326 18462741 : int const firstSurf = thisSpace.HTSurfaceFirst;
7327 18462741 : int const lastSurf = thisSpace.HTSurfaceLast;
7328 18462741 : if (firstSurf <= 0) continue;
7329 178178515 : for (int SurfNum = firstSurf; SurfNum <= lastSurf; ++SurfNum) {
7330 159715774 : auto &thisEnclosure(state.dataViewFactor->EnclRadInfo(state.dataSurface->Surface(SurfNum).RadEnclIndex));
7331 :
7332 159715774 : if (!state.dataGlobal->doLoadComponentPulseNow) {
7333 159713656 : state.dataHeatBal->SurfQdotRadIntGainsInPerArea(SurfNum) =
7334 159713656 : thisEnclosure.radQThermalRad * thisEnclosure.radThermAbsMult * state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
7335 : } else {
7336 2118 : state.dataInternalHeatGains->curQL = thisEnclosure.radQThermalRad;
7337 : // for the loads component report during the special sizing run increase the radiant portion
7338 : // a small amount to create a "pulse" of heat that is used for the delayed loads
7339 2118 : state.dataInternalHeatGains->adjQL = state.dataInternalHeatGains->curQL + thisEnclosure.FloorArea * pulseMultipler;
7340 : // ITABSF is the Inside Thermal Absorptance
7341 : // EnclRadThermAbsMult is a multiplier for each zone
7342 : // SurfQdotRadIntGainsInPerArea is the thermal radiation absorbed on inside surfaces
7343 2118 : state.dataHeatBal->SurfQdotRadIntGainsInPerArea(SurfNum) =
7344 2118 : state.dataInternalHeatGains->adjQL * thisEnclosure.radThermAbsMult * state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
7345 : // store the magnitude and time of the pulse
7346 2118 : state.dataOutRptTab->radiantPulseTimestep(state.dataSize->CurOverallSimDay, zoneNum) =
7347 2118 : (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
7348 2118 : state.dataOutRptTab->radiantPulseReceived(state.dataSize->CurOverallSimDay, SurfNum) =
7349 4236 : (state.dataInternalHeatGains->adjQL - state.dataInternalHeatGains->curQL) * thisEnclosure.radThermAbsMult *
7350 4236 : state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum) * state.dataSurface->Surface(SurfNum).Area;
7351 : }
7352 : }
7353 : }
7354 : }
7355 2568509 : }
7356 :
7357 2568509 : void CheckReturnAirHeatGain(EnergyPlusData &state)
7358 : {
7359 : // SUBROUTINE INFORMATION:
7360 : // AUTHOR Xuan Luo
7361 : // DATE WRITTEN Jan 2018
7362 :
7363 : // PURPOSE OF THIS SUBROUTINE:
7364 : // This subroutine currently creates the values for standard "zone loads" reporting
7365 : // from the heat balance module.
7366 :
7367 : // Using/Aliasing
7368 :
7369 21015074 : for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) {
7370 18446565 : if (state.dataHeatBal->Zone(ZoneNum).HasAdjustedReturnTempByITE && state.dataHeatBal->Zone(ZoneNum).HasLtsRetAirGain) {
7371 0 : ShowFatalError(state,
7372 : "Return air heat gains from lights are not allowed when Air Flow Calculation Method = "
7373 : "FlowControlWithApproachTemperatures in zones with ITE objects.");
7374 : }
7375 18446565 : if (state.dataHeatBal->Zone(ZoneNum).HasAdjustedReturnTempByITE && state.dataHeatBal->Zone(ZoneNum).HasAirFlowWindowReturn) {
7376 0 : ShowFatalError(state,
7377 : "Return air heat gains from windows are not allowed when Air Flow Calculation Method = "
7378 : "FlowControlWithApproachTemperatures in zones with ITE objects.");
7379 : }
7380 : }
7381 2568509 : }
7382 :
7383 11508 : void CalcZoneITEq(EnergyPlusData &state)
7384 : {
7385 :
7386 : // SUBROUTINE INFORMATION:
7387 : // AUTHOR M.J. Witte
7388 : // DATE WRITTEN October 2014
7389 :
7390 : // PURPOSE OF THIS SUBROUTINE:
7391 : // This subroutine calculates the gains and other results for ElectricEquipment:ITE:AirCooled.
7392 : // This broken into a separate subroutine, because the calculations are more detailed than the other
7393 : // types of internal gains.
7394 :
7395 : using ScheduleManager::GetCurrentScheduleValue;
7396 : using namespace Psychrometrics;
7397 : using Curve::CurveValue;
7398 : using DataHVACGlobals::SmallAirVolFlow;
7399 : using DataHVACGlobals::SmallTempDiff;
7400 :
7401 : // Operating Limits for environmental class: None, A1, A2, A3, A4, B, C, H1
7402 : // From ASHRAE 2021 Thermal Guidelines environmental classes for Air-Cooled ITE
7403 : static constexpr std::array<Real64, static_cast<int>(ITEClass::Num)> DBMin = {
7404 : -99.0, 15.0, 10.0, 5.0, 5.0, 5.0, 5.0, 5.0}; // Minimum dry-bulb temperature [C]
7405 : static constexpr std::array<Real64, static_cast<int>(ITEClass::Num)> DBMax = {
7406 : 99.0, 32.0, 35.0, 40.0, 45.0, 35.0, 40.0, 25.0}; // Maximum dry-bulb temperature [C]
7407 : static constexpr std::array<Real64, static_cast<int>(ITEClass::Num)> DPMin = {
7408 : -99.0, -12.0, -12.0, -12.0, -12.0, -99.0, -99.0, -12.0}; // Minimum dewpoint temperature [C]
7409 : static constexpr std::array<Real64, static_cast<int>(ITEClass::Num)> DPMax = {
7410 : 99.0, 17.0, 21.0, 24.0, 24.0, 28.0, 28.0, 17.0}; // Maximum dewpoint temperature [C]
7411 : static constexpr std::array<Real64, static_cast<int>(ITEClass::Num)> RHMin = {
7412 : 0.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0}; // Minimum relative humidity [%]
7413 : static constexpr std::array<Real64, static_cast<int>(ITEClass::Num)> RHMax = {
7414 : 99.0, 80.0, 80.0, 85.0, 90.0, 80.0, 80.0, 80.0}; // Maximum relative humidity [%]
7415 :
7416 : static constexpr std::string_view RoutineName("CalcZoneITEq");
7417 : int Loop;
7418 : int NZ;
7419 : int SupplyNodeNum; // Supply air node number (if zero, then not specified)
7420 : Real64 OperSchedFrac; // Operating schedule fraction
7421 : Real64 CPULoadSchedFrac; // CPU loading schedule fraction
7422 : ITEInletConnection AirConnection; // Air connection type
7423 11508 : Real64 TSupply(0.0); // Supply air temperature [C]
7424 : Real64 WSupply; // Supply air humidity ratio [kgWater/kgDryAir]
7425 : Real64 RecircFrac; // Recirulation fraction - current
7426 : Real64 TRecirc; // Recirulation air temperature [C]
7427 : Real64 WRecirc; // Recirulation air humidity ratio [kgWater/kgDryAir]
7428 : Real64 TAirIn; // Entering air dry-bulb temperature [C]
7429 : Real64 TAirInDesign; // Design entering air dry-bulb temperature [C]
7430 : Real64 WAirIn; // Entering air humidity ratio [kgWater/kgDryAir]
7431 : Real64 TDPAirIn; // Entering air dewpoint temperature [C]
7432 : Real64 RHAirIn; // Entering air relative humidity [%]
7433 : Real64 SupplyHeatIndex; // Supply heat index
7434 : Real64 TAirOut; // Leaving air temperature [C]
7435 : Real64 AirVolFlowFrac; // Air volume flow fraction
7436 : Real64 AirVolFlowFracDesignT; // Air volume flow fraction at design entering air temperature
7437 : Real64 AirVolFlowRate; // Air volume flow rate at current density [m3/s]
7438 : Real64 AirMassFlowRate; // Air mass flow rate [kg/s]
7439 : Real64 CPUPower; // CPU power input [W]
7440 : Real64 FanPower; // Fan power input [W]
7441 : Real64 UPSPower; // UPS new power input (losses) [W]
7442 : Real64 UPSPartLoadRatio; // UPS part load ratio (current total power input / design total power input)
7443 : Real64 UPSHeatGain; // UPS convective heat gain to zone [W]
7444 :
7445 23016 : std::map<int, std::vector<int>> ZoneITEMap;
7446 :
7447 : // Zero out time step variables
7448 : // Object report variables
7449 28440 : for (Loop = 1; Loop <= state.dataHeatBal->TotITEquip; ++Loop) {
7450 :
7451 135456 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
7452 118524 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[i] = 0.0;
7453 118524 : state.dataHeatBal->ZoneITEq(Loop).EnergyRpt[i] = 0.0;
7454 : }
7455 :
7456 16932 : state.dataHeatBal->ZoneITEq(Loop).AirVolFlowStdDensity = 0.0;
7457 16932 : state.dataHeatBal->ZoneITEq(Loop).AirVolFlowCurDensity = 0.0;
7458 16932 : state.dataHeatBal->ZoneITEq(Loop).AirMassFlow = 0.0;
7459 16932 : state.dataHeatBal->ZoneITEq(Loop).AirInletDryBulbT = 0.0;
7460 16932 : state.dataHeatBal->ZoneITEq(Loop).AirInletDewpointT = 0.0;
7461 16932 : state.dataHeatBal->ZoneITEq(Loop).AirInletRelHum = 0.0;
7462 16932 : state.dataHeatBal->ZoneITEq(Loop).AirOutletDryBulbT = 0.0;
7463 16932 : state.dataHeatBal->ZoneITEq(Loop).SHI = 0.0;
7464 16932 : state.dataHeatBal->ZoneITEq(Loop).TimeOutOfOperRange = 0.0;
7465 16932 : state.dataHeatBal->ZoneITEq(Loop).TimeAboveDryBulbT = 0.0;
7466 16932 : state.dataHeatBal->ZoneITEq(Loop).TimeBelowDryBulbT = 0.0;
7467 16932 : state.dataHeatBal->ZoneITEq(Loop).TimeAboveDewpointT = 0.0;
7468 16932 : state.dataHeatBal->ZoneITEq(Loop).TimeBelowDewpointT = 0.0;
7469 16932 : state.dataHeatBal->ZoneITEq(Loop).TimeAboveRH = 0.0;
7470 16932 : state.dataHeatBal->ZoneITEq(Loop).TimeBelowRH = 0.0;
7471 16932 : state.dataHeatBal->ZoneITEq(Loop).DryBulbTAboveDeltaT = 0.0;
7472 16932 : state.dataHeatBal->ZoneITEq(Loop).DryBulbTBelowDeltaT = 0.0;
7473 16932 : state.dataHeatBal->ZoneITEq(Loop).DewpointTAboveDeltaT = 0.0;
7474 16932 : state.dataHeatBal->ZoneITEq(Loop).DewpointTBelowDeltaT = 0.0;
7475 16932 : state.dataHeatBal->ZoneITEq(Loop).RHAboveDeltaRH = 0.0;
7476 16932 : state.dataHeatBal->ZoneITEq(Loop).RHBelowDeltaRH = 0.0;
7477 : } // ZoneITEq init loop
7478 :
7479 : // Zone total report variables
7480 39288 : for (Loop = 1; Loop <= state.dataGlobal->NumOfZones; ++Loop) {
7481 :
7482 222240 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
7483 194460 : state.dataHeatBal->ZoneRpt(Loop).PowerRpt[i] = 0.0;
7484 194460 : state.dataHeatBal->ZoneRpt(Loop).EnergyRpt[i] = 0.0;
7485 : }
7486 :
7487 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEAdjReturnTemp = 0.0;
7488 :
7489 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqAirVolFlowStdDensity = 0.0;
7490 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqAirMassFlow = 0.0;
7491 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqSHI = 0.0;
7492 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqTimeOutOfOperRange = 0.0;
7493 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqTimeAboveDryBulbT = 0.0;
7494 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqTimeBelowDryBulbT = 0.0;
7495 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqTimeAboveDewpointT = 0.0;
7496 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqTimeBelowDewpointT = 0.0;
7497 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqTimeAboveRH = 0.0;
7498 27780 : state.dataHeatBal->ZoneRpt(Loop).ITEqTimeBelowRH = 0.0;
7499 :
7500 27780 : state.dataHeatBal->ZoneRpt(Loop).SumTinMinusTSup = 0.0;
7501 27780 : state.dataHeatBal->ZoneRpt(Loop).SumToutMinusTSup = 0.0;
7502 : } // Zone init loop
7503 :
7504 : // Space total report variables
7505 39288 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
7506 :
7507 222240 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
7508 194460 : state.dataHeatBal->spaceRpt(spaceNum).PowerRpt[i] = 0.0;
7509 194460 : state.dataHeatBal->spaceRpt(spaceNum).EnergyRpt[i] = 0.0;
7510 : }
7511 :
7512 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEAdjReturnTemp = 0.0;
7513 :
7514 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqAirVolFlowStdDensity = 0.0;
7515 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqAirMassFlow = 0.0;
7516 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqSHI = 0.0;
7517 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange = 0.0;
7518 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveDryBulbT = 0.0;
7519 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowDryBulbT = 0.0;
7520 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveDewpointT = 0.0;
7521 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowDewpointT = 0.0;
7522 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveRH = 0.0;
7523 27780 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowRH = 0.0;
7524 :
7525 27780 : state.dataHeatBal->spaceRpt(spaceNum).SumTinMinusTSup = 0.0;
7526 27780 : state.dataHeatBal->spaceRpt(spaceNum).SumToutMinusTSup = 0.0;
7527 : } // Space init spaceNum
7528 :
7529 28440 : for (Loop = 1; Loop <= state.dataHeatBal->TotITEquip; ++Loop) {
7530 : // Get schedules
7531 16932 : NZ = state.dataHeatBal->ZoneITEq(Loop).ZonePtr;
7532 16932 : auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(NZ);
7533 16932 : int spaceNum = state.dataHeatBal->ZoneITEq(Loop).spaceIndex;
7534 16932 : OperSchedFrac = GetCurrentScheduleValue(state, state.dataHeatBal->ZoneITEq(Loop).OperSchedPtr);
7535 16932 : CPULoadSchedFrac = GetCurrentScheduleValue(state, state.dataHeatBal->ZoneITEq(Loop).CPULoadSchedPtr);
7536 :
7537 : // Determine inlet air temperature and humidity
7538 16932 : AirConnection = state.dataHeatBal->ZoneITEq(Loop).AirConnectionType;
7539 16932 : RecircFrac = 0.0;
7540 16932 : SupplyNodeNum = state.dataHeatBal->ZoneITEq(Loop).SupplyAirNodeNum;
7541 16932 : if (state.dataHeatBal->ZoneITEq(Loop).FlowControlWithApproachTemps) {
7542 9480 : TSupply = state.dataLoopNodes->Node(SupplyNodeNum).Temp;
7543 9480 : WSupply = state.dataLoopNodes->Node(SupplyNodeNum).HumRat;
7544 9480 : if (state.dataHeatBal->ZoneITEq(Loop).SupplyApproachTempSch != 0) {
7545 0 : TAirIn = TSupply + GetCurrentScheduleValue(state, state.dataHeatBal->ZoneITEq(Loop).SupplyApproachTempSch);
7546 : } else {
7547 9480 : TAirIn = TSupply + state.dataHeatBal->ZoneITEq(Loop).SupplyApproachTemp;
7548 : }
7549 9480 : WAirIn = state.dataLoopNodes->Node(SupplyNodeNum).HumRat;
7550 : } else {
7551 7452 : if (AirConnection == ITEInletConnection::AdjustedSupply) {
7552 7452 : TSupply = state.dataLoopNodes->Node(SupplyNodeNum).Temp;
7553 7452 : WSupply = state.dataLoopNodes->Node(SupplyNodeNum).HumRat;
7554 7452 : if (state.dataHeatBal->ZoneITEq(Loop).RecircFLTCurve != 0) {
7555 14904 : RecircFrac = state.dataHeatBal->ZoneITEq(Loop).DesignRecircFrac *
7556 14904 : CurveValue(state, state.dataHeatBal->ZoneITEq(Loop).RecircFLTCurve, CPULoadSchedFrac, TSupply);
7557 : } else {
7558 0 : RecircFrac = state.dataHeatBal->ZoneITEq(Loop).DesignRecircFrac;
7559 : }
7560 7452 : TRecirc = thisZoneHB.MAT;
7561 7452 : WRecirc = thisZoneHB.ZoneAirHumRat;
7562 7452 : TAirIn = TRecirc * RecircFrac + TSupply * (1.0 - RecircFrac);
7563 7452 : WAirIn = WRecirc * RecircFrac + WSupply * (1.0 - RecircFrac);
7564 0 : } else if (AirConnection == ITEInletConnection::RoomAirModel) {
7565 : // Room air model option: TAirIn=TAirZone, according to EngineeringRef 17.1.4
7566 0 : TAirIn = thisZoneHB.MAT;
7567 0 : TSupply = TAirIn;
7568 0 : WAirIn = thisZoneHB.ZoneAirHumRat;
7569 : } else {
7570 : // TAirIn = TRoomAirNodeIn, according to EngineeringRef 17.1.4
7571 0 : if (state.dataHeatBal->ZoneITEq(Loop).inControlledZone) {
7572 0 : int ZoneAirInletNode = state.dataZoneEquip->ZoneEquipConfig(NZ).InletNode(1);
7573 0 : TSupply = state.dataLoopNodes->Node(ZoneAirInletNode).Temp;
7574 : } else {
7575 0 : TSupply = thisZoneHB.MAT;
7576 : }
7577 0 : TAirIn = thisZoneHB.MAT;
7578 0 : WAirIn = thisZoneHB.ZoneAirHumRat;
7579 : }
7580 : }
7581 16932 : TDPAirIn = PsyTdpFnWPb(state, WAirIn, state.dataEnvrn->StdBaroPress, RoutineName);
7582 16932 : RHAirIn = 100.0 * PsyRhFnTdbWPb(state, TAirIn, WAirIn, state.dataEnvrn->StdBaroPress, RoutineName); // RHAirIn is %
7583 :
7584 : // Calculate power input and airflow
7585 16932 : TAirInDesign = state.dataHeatBal->ZoneITEq(Loop).DesignTAirIn;
7586 :
7587 16932 : if (state.dataGlobal->DoingSizing && state.dataHeatBal->ZoneITEq(Loop).FlowControlWithApproachTemps) {
7588 :
7589 2700 : TAirInDesign = state.dataHeatBal->ZoneITEq(Loop).SizingTAirIn;
7590 2700 : if (state.dataHeatBal->ZoneITEq(Loop).SupplyApproachTempSch != 0) {
7591 0 : TAirInDesign = TAirInDesign + GetCurrentScheduleValue(state, state.dataHeatBal->ZoneITEq(Loop).SupplyApproachTempSch);
7592 : } else {
7593 2700 : TAirInDesign = TAirInDesign + state.dataHeatBal->ZoneITEq(Loop).SupplyApproachTemp;
7594 : }
7595 2700 : OperSchedFrac = GetCurrentScheduleValue(state, state.dataHeatBal->ZoneITEq(Loop).OperSchedPtr);
7596 2700 : CPULoadSchedFrac = GetCurrentScheduleValue(state, state.dataHeatBal->ZoneITEq(Loop).CPULoadSchedPtr);
7597 : }
7598 :
7599 33864 : CPUPower = max(state.dataHeatBal->ZoneITEq(Loop).DesignCPUPower * OperSchedFrac *
7600 33864 : CurveValue(state, state.dataHeatBal->ZoneITEq(Loop).CPUPowerFLTCurve, CPULoadSchedFrac, TAirIn),
7601 : 0.0);
7602 16932 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::CPUAtDesign] =
7603 33864 : max(state.dataHeatBal->ZoneITEq(Loop).DesignCPUPower * OperSchedFrac *
7604 33864 : CurveValue(state, state.dataHeatBal->ZoneITEq(Loop).CPUPowerFLTCurve, CPULoadSchedFrac, TAirInDesign),
7605 : 0.0);
7606 :
7607 16932 : AirVolFlowFrac = max(CurveValue(state, state.dataHeatBal->ZoneITEq(Loop).AirFlowFLTCurve, CPULoadSchedFrac, TAirIn), 0.0);
7608 16932 : AirVolFlowRate = state.dataHeatBal->ZoneITEq(Loop).DesignAirVolFlowRate * OperSchedFrac * AirVolFlowFrac;
7609 16932 : if (AirVolFlowRate < SmallAirVolFlow) {
7610 21 : AirVolFlowRate = 0.0;
7611 : }
7612 16932 : AirVolFlowFracDesignT = max(CurveValue(state, state.dataHeatBal->ZoneITEq(Loop).AirFlowFLTCurve, CPULoadSchedFrac, TAirInDesign), 0.0);
7613 :
7614 33864 : FanPower = max(state.dataHeatBal->ZoneITEq(Loop).DesignFanPower * OperSchedFrac *
7615 33864 : CurveValue(state, state.dataHeatBal->ZoneITEq(Loop).FanPowerFFCurve, AirVolFlowFrac),
7616 : 0.0);
7617 16932 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::FanAtDesign] =
7618 33864 : max(state.dataHeatBal->ZoneITEq(Loop).DesignFanPower * OperSchedFrac *
7619 33864 : CurveValue(state, state.dataHeatBal->ZoneITEq(Loop).FanPowerFFCurve, AirVolFlowFracDesignT),
7620 : 0.0);
7621 :
7622 : // Calculate UPS net power input (power in less power to ITEquip) and UPS heat gain to zone
7623 16932 : if (state.dataHeatBal->ZoneITEq(Loop).DesignTotalPower > 0.0) {
7624 16932 : UPSPartLoadRatio = (CPUPower + FanPower) / state.dataHeatBal->ZoneITEq(Loop).DesignTotalPower;
7625 : } else {
7626 0 : UPSPartLoadRatio = 0.0;
7627 : }
7628 16932 : if (state.dataHeatBal->ZoneITEq(Loop).UPSEfficFPLRCurve != 0) {
7629 16932 : UPSPower =
7630 33864 : (CPUPower + FanPower) * max((1.0 - state.dataHeatBal->ZoneITEq(Loop).DesignUPSEfficiency *
7631 33864 : CurveValue(state, state.dataHeatBal->ZoneITEq(Loop).UPSEfficFPLRCurve, UPSPartLoadRatio)),
7632 : 0.0);
7633 : } else {
7634 0 : UPSPower = (CPUPower + FanPower) * max((1.0 - state.dataHeatBal->ZoneITEq(Loop).DesignUPSEfficiency), 0.0);
7635 : }
7636 16932 : UPSHeatGain = UPSPower * state.dataHeatBal->ZoneITEq(Loop).UPSLossToZoneFrac;
7637 :
7638 : // Calculate air outlet conditions and convective heat gain to zone
7639 :
7640 16932 : AirMassFlowRate = AirVolFlowRate * PsyRhoAirFnPbTdbW(state, state.dataEnvrn->StdBaroPress, TAirIn, WAirIn, RoutineName);
7641 16932 : if (AirMassFlowRate > 0.0) {
7642 16911 : TAirOut = TAirIn + (CPUPower + FanPower) / AirMassFlowRate / PsyCpAirFnW(WAirIn);
7643 : } else {
7644 21 : TAirOut = TAirIn;
7645 : }
7646 :
7647 16932 : if (std::abs(TAirOut - TSupply) < SmallTempDiff) {
7648 0 : TAirOut = TSupply;
7649 : }
7650 :
7651 16932 : if ((SupplyNodeNum != 0) && (TAirOut != TSupply)) {
7652 16932 : SupplyHeatIndex = (TAirIn - TSupply) / (TAirOut - TSupply);
7653 : } else {
7654 0 : SupplyHeatIndex = 0.0;
7655 : }
7656 :
7657 16932 : if (AirConnection == ITEInletConnection::AdjustedSupply || AirConnection == ITEInletConnection::ZoneAirNode) {
7658 : // If not a room air model, then all ITEquip power input is a convective heat gain to the zone heat balance, plus UPS heat gain
7659 16932 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::ConGainToZone] = CPUPower + FanPower + UPSHeatGain;
7660 0 : } else if (AirConnection == ITEInletConnection::RoomAirModel) {
7661 : // Room air model option not implemented yet - set room air model outlet node conditions here
7662 : // If a room air model, then the only convective heat gain to the zone heat balance is the UPS heat gain
7663 0 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::ConGainToZone] = UPSHeatGain;
7664 : }
7665 16932 : if (state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(Loop).ZonePtr).HasAdjustedReturnTempByITE) {
7666 9480 : ZoneITEMap[state.dataHeatBal->ZoneITEq(Loop).ZonePtr].push_back(Loop);
7667 : }
7668 16932 : if (state.dataGlobal->DoingSizing && state.dataHeatBal->ZoneITEq(Loop).FlowControlWithApproachTemps) {
7669 8100 : if (state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::FanAtDesign] +
7670 5400 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::CPUAtDesign] >
7671 2700 : state.dataHeatBal->ZoneITEq(Loop).DesignTotalPower) {
7672 2700 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::ConGainToZone] =
7673 5400 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::FanAtDesign] +
7674 2700 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::CPUAtDesign];
7675 : }
7676 : }
7677 : // Object report variables
7678 16932 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::CPU] = CPUPower;
7679 16932 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::Fan] = FanPower;
7680 16932 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::UPS] = UPSPower;
7681 : // ZoneITEq( Loop ).CPUPowerAtDesign = set above
7682 : // ZoneITEq( Loop ).FanPowerAtDesign = set above
7683 16932 : state.dataHeatBal->ZoneITEq(Loop).PowerRpt[(int)PERptVars::UPSGainToZone] = UPSHeatGain; // UPSGainRateToZone = UPSHeatGain;
7684 : // ZoneITEq( Loop ).ConGainRateToZone = set above
7685 :
7686 135456 : for (int i = 0; i < (int)PERptVars::Num; ++i) {
7687 118524 : state.dataHeatBal->ZoneRpt(NZ).PowerRpt[i] += state.dataHeatBal->ZoneITEq(Loop).PowerRpt[i];
7688 118524 : state.dataHeatBal->spaceRpt(spaceNum).PowerRpt[i] += state.dataHeatBal->ZoneITEq(Loop).PowerRpt[i];
7689 118524 : state.dataHeatBal->ZoneITEq(Loop).EnergyRpt[i] = state.dataHeatBal->ZoneITEq(Loop).PowerRpt[i] * state.dataGlobal->TimeStepZoneSec;
7690 118524 : state.dataHeatBal->ZoneRpt(NZ).EnergyRpt[i] += state.dataHeatBal->ZoneITEq(Loop).EnergyRpt[i];
7691 118524 : state.dataHeatBal->spaceRpt(spaceNum).EnergyRpt[i] += state.dataHeatBal->ZoneITEq(Loop).EnergyRpt[i];
7692 : }
7693 :
7694 16932 : state.dataHeatBal->ZoneITEq(Loop).AirVolFlowStdDensity = AirMassFlowRate * state.dataEnvrn->StdRhoAir;
7695 16932 : state.dataHeatBal->ZoneITEq(Loop).AirVolFlowCurDensity = AirVolFlowRate;
7696 16932 : state.dataHeatBal->ZoneITEq(Loop).AirMassFlow = AirMassFlowRate;
7697 16932 : state.dataHeatBal->ZoneITEq(Loop).AirInletDryBulbT = TAirIn;
7698 16932 : state.dataHeatBal->ZoneITEq(Loop).AirInletDewpointT = TDPAirIn;
7699 16932 : state.dataHeatBal->ZoneITEq(Loop).AirInletRelHum = RHAirIn;
7700 16932 : state.dataHeatBal->ZoneITEq(Loop).AirOutletDryBulbT = TAirOut;
7701 16932 : state.dataHeatBal->ZoneITEq(Loop).SHI = SupplyHeatIndex;
7702 :
7703 16932 : state.dataHeatBal->ZoneRpt(NZ).ITEqAirVolFlowStdDensity += state.dataHeatBal->ZoneITEq(Loop).AirVolFlowStdDensity;
7704 16932 : state.dataHeatBal->ZoneRpt(NZ).ITEqAirMassFlow += state.dataHeatBal->ZoneITEq(Loop).AirMassFlow;
7705 16932 : state.dataHeatBal->ZoneRpt(NZ).SumTinMinusTSup += (TAirIn - TSupply) * AirVolFlowRate;
7706 16932 : state.dataHeatBal->ZoneRpt(NZ).SumToutMinusTSup += (TAirOut - TSupply) * AirVolFlowRate;
7707 :
7708 16932 : state.dataHeatBal->spaceRpt(spaceNum).ITEqAirVolFlowStdDensity += state.dataHeatBal->ZoneITEq(Loop).AirVolFlowStdDensity;
7709 16932 : state.dataHeatBal->spaceRpt(spaceNum).ITEqAirMassFlow += state.dataHeatBal->ZoneITEq(Loop).AirMassFlow;
7710 16932 : state.dataHeatBal->spaceRpt(spaceNum).SumTinMinusTSup += (TAirIn - TSupply) * AirVolFlowRate;
7711 16932 : state.dataHeatBal->spaceRpt(spaceNum).SumToutMinusTSup += (TAirOut - TSupply) * AirVolFlowRate;
7712 :
7713 : // Check environmental class operating range limits (defined as parameters in this subroutine)
7714 : // Index for environmental class (None=0, A1=1, A2=2, A3=3, A4=4, B=5, C=6, H1=7)
7715 16932 : int EnvClass = static_cast<int>(state.dataHeatBal->ZoneITEq(Loop).Class);
7716 16932 : if (EnvClass > 0) {
7717 16932 : if (TAirIn > DBMax[EnvClass]) {
7718 2951 : state.dataHeatBal->ZoneITEq(Loop).TimeAboveDryBulbT = state.dataGlobal->TimeStepZone;
7719 2951 : state.dataHeatBal->ZoneITEq(Loop).TimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7720 2951 : state.dataHeatBal->ZoneITEq(Loop).DryBulbTAboveDeltaT = TAirIn - DBMax[EnvClass];
7721 2951 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeAboveDryBulbT = state.dataGlobal->TimeStepZone;
7722 2951 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7723 2951 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveDryBulbT = state.dataGlobal->TimeStepZone;
7724 2951 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7725 : }
7726 16932 : if (TAirIn < DBMin[EnvClass]) {
7727 1379 : state.dataHeatBal->ZoneITEq(Loop).TimeBelowDryBulbT = state.dataGlobal->TimeStepZone;
7728 1379 : state.dataHeatBal->ZoneITEq(Loop).TimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7729 1379 : state.dataHeatBal->ZoneITEq(Loop).DryBulbTBelowDeltaT = TAirIn - DBMin[EnvClass];
7730 1379 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeBelowDryBulbT = state.dataGlobal->TimeStepZone;
7731 1379 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7732 1379 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowDryBulbT = state.dataGlobal->TimeStepZone;
7733 1379 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7734 : }
7735 16932 : if (TDPAirIn > DPMax[EnvClass]) {
7736 6 : state.dataHeatBal->ZoneITEq(Loop).TimeAboveDewpointT = state.dataGlobal->TimeStepZone;
7737 6 : state.dataHeatBal->ZoneITEq(Loop).TimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7738 6 : state.dataHeatBal->ZoneITEq(Loop).DewpointTAboveDeltaT = TDPAirIn - DPMax[EnvClass];
7739 6 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeAboveDewpointT = state.dataGlobal->TimeStepZone;
7740 6 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7741 6 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveDewpointT = state.dataGlobal->TimeStepZone;
7742 6 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7743 : }
7744 16932 : if (TDPAirIn < DPMin[EnvClass]) {
7745 5215 : state.dataHeatBal->ZoneITEq(Loop).TimeBelowDewpointT = state.dataGlobal->TimeStepZone;
7746 5215 : state.dataHeatBal->ZoneITEq(Loop).TimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7747 5215 : state.dataHeatBal->ZoneITEq(Loop).DewpointTBelowDeltaT = TDPAirIn - DPMin[EnvClass];
7748 5215 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeBelowDewpointT = state.dataGlobal->TimeStepZone;
7749 5215 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7750 5215 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowDewpointT = state.dataGlobal->TimeStepZone;
7751 5215 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7752 : }
7753 16932 : if (RHAirIn > RHMax[EnvClass]) {
7754 696 : state.dataHeatBal->ZoneITEq(Loop).TimeAboveRH = state.dataGlobal->TimeStepZone;
7755 696 : state.dataHeatBal->ZoneITEq(Loop).TimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7756 696 : state.dataHeatBal->ZoneITEq(Loop).RHAboveDeltaRH = RHAirIn - RHMax[EnvClass];
7757 696 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeAboveRH = state.dataGlobal->TimeStepZone;
7758 696 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7759 696 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveRH = state.dataGlobal->TimeStepZone;
7760 696 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7761 : }
7762 16932 : if (RHAirIn < RHMin[EnvClass]) {
7763 5703 : state.dataHeatBal->ZoneITEq(Loop).TimeBelowRH = state.dataGlobal->TimeStepZone;
7764 5703 : state.dataHeatBal->ZoneITEq(Loop).TimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7765 5703 : state.dataHeatBal->ZoneITEq(Loop).RHBelowDeltaRH = RHAirIn - RHMin[EnvClass];
7766 5703 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeBelowRH = state.dataGlobal->TimeStepZone;
7767 5703 : state.dataHeatBal->ZoneRpt(NZ).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7768 5703 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowRH = state.dataGlobal->TimeStepZone;
7769 5703 : state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange = state.dataGlobal->TimeStepZone;
7770 : }
7771 : }
7772 :
7773 : } // ZoneITEq calc loop
7774 :
7775 : // Zone and space-level sensible heat index
7776 28440 : for (Loop = 1; Loop <= state.dataHeatBal->TotITEquip; ++Loop) {
7777 16932 : int ZN = state.dataHeatBal->ZoneITEq(Loop).ZonePtr;
7778 16932 : int spaceNum = state.dataHeatBal->ZoneITEq(Loop).spaceIndex;
7779 16932 : if (state.dataHeatBal->ZoneRpt(ZN).SumToutMinusTSup != 0.0) {
7780 16911 : state.dataHeatBal->ZoneRpt(ZN).ITEqSHI =
7781 16911 : state.dataHeatBal->ZoneRpt(ZN).SumTinMinusTSup / state.dataHeatBal->ZoneRpt(ZN).SumToutMinusTSup;
7782 : }
7783 16932 : if (state.dataHeatBal->spaceRpt(spaceNum).SumToutMinusTSup != 0.0) {
7784 16911 : state.dataHeatBal->spaceRpt(spaceNum).ITEqSHI =
7785 16911 : state.dataHeatBal->spaceRpt(spaceNum).SumTinMinusTSup / state.dataHeatBal->spaceRpt(spaceNum).SumToutMinusTSup;
7786 : }
7787 : }
7788 :
7789 23016 : std::map<int, std::vector<int>>::iterator it = ZoneITEMap.begin();
7790 : Real64 totalGain;
7791 : Real64 totalRate;
7792 : Real64 TAirReturn;
7793 30468 : while (it != ZoneITEMap.end()) {
7794 9480 : if (state.dataHeatBal->Zone(it->first).HasAdjustedReturnTempByITE) {
7795 9480 : totalGain = 0;
7796 9480 : totalRate = 0;
7797 18960 : for (int i : it->second) {
7798 9480 : if (state.dataHeatBal->ZoneITEq(i).ReturnApproachTempSch != 0) {
7799 0 : TAirReturn = state.dataHeatBal->ZoneITEq(i).AirOutletDryBulbT +
7800 0 : GetCurrentScheduleValue(state, state.dataHeatBal->ZoneITEq(i).ReturnApproachTempSch);
7801 : } else {
7802 9480 : TAirReturn = state.dataHeatBal->ZoneITEq(i).AirOutletDryBulbT + state.dataHeatBal->ZoneITEq(i).ReturnApproachTemp;
7803 : }
7804 9480 : totalRate += state.dataHeatBal->ZoneITEq(i).AirMassFlow;
7805 9480 : totalGain += state.dataHeatBal->ZoneITEq(i).AirMassFlow * TAirReturn;
7806 : }
7807 9480 : if (totalRate != 0) {
7808 9468 : state.dataHeatBal->Zone(it->first).AdjustedReturnTempByITE = totalGain / totalRate;
7809 9468 : state.dataHeatBal->ZoneRpt(it->first).ITEAdjReturnTemp = state.dataHeatBal->Zone(it->first).AdjustedReturnTempByITE;
7810 : }
7811 : }
7812 9480 : it++;
7813 : }
7814 :
7815 11508 : } // End CalcZoneITEq
7816 :
7817 2568509 : void ReportInternalHeatGains(EnergyPlusData &state)
7818 : {
7819 :
7820 : // SUBROUTINE INFORMATION:
7821 : // AUTHOR Richard Liesen
7822 : // DATE WRITTEN June 1997
7823 : // MODIFIED July 1997 RKS
7824 : // RE-ENGINEERED December 1998 LKL
7825 :
7826 : // PURPOSE OF THIS SUBROUTINE:
7827 : // This subroutine currently creates the values for standard "zone loads" reporting
7828 : // from the heat balance module.
7829 :
7830 : // METHODOLOGY EMPLOYED:
7831 : // The reporting methodology is described in the OutputDataStructure.doc
7832 : // as the "modified modular" format.
7833 :
7834 : // REFERENCES:
7835 : // OutputDataStructure.doc (EnergyPlus documentation)
7836 :
7837 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
7838 : static constexpr std::array<DataHeatBalance::IntGainType, 8> TradIntGainTypes = {DataHeatBalance::IntGainType::People,
7839 : DataHeatBalance::IntGainType::Lights,
7840 : DataHeatBalance::IntGainType::ElectricEquipment,
7841 : DataHeatBalance::IntGainType::ElectricEquipmentITEAirCooled,
7842 : DataHeatBalance::IntGainType::GasEquipment,
7843 : DataHeatBalance::IntGainType::HotWaterEquipment,
7844 : DataHeatBalance::IntGainType::SteamEquipment,
7845 : DataHeatBalance::IntGainType::OtherEquipment};
7846 :
7847 17672913 : for (int Loop = 1; Loop <= state.dataHeatBal->TotPeople; ++Loop) {
7848 15104404 : state.dataHeatBal->People(Loop).RadGainEnergy = state.dataHeatBal->People(Loop).RadGainRate * state.dataGlobal->TimeStepZoneSec;
7849 15104404 : state.dataHeatBal->People(Loop).ConGainEnergy = state.dataHeatBal->People(Loop).ConGainRate * state.dataGlobal->TimeStepZoneSec;
7850 15104404 : state.dataHeatBal->People(Loop).SenGainEnergy = state.dataHeatBal->People(Loop).SenGainRate * state.dataGlobal->TimeStepZoneSec;
7851 15104404 : state.dataHeatBal->People(Loop).LatGainEnergy = state.dataHeatBal->People(Loop).LatGainRate * state.dataGlobal->TimeStepZoneSec;
7852 15104404 : state.dataHeatBal->People(Loop).TotGainEnergy = state.dataHeatBal->People(Loop).TotGainRate * state.dataGlobal->TimeStepZoneSec;
7853 : }
7854 :
7855 18547344 : for (int Loop = 1; Loop <= state.dataHeatBal->TotLights; ++Loop) {
7856 15978835 : state.dataHeatBal->Lights(Loop).Consumption = state.dataHeatBal->Lights(Loop).Power * state.dataGlobal->TimeStepZoneSec;
7857 15978835 : state.dataHeatBal->Lights(Loop).RadGainEnergy = state.dataHeatBal->Lights(Loop).RadGainRate * state.dataGlobal->TimeStepZoneSec;
7858 15978835 : state.dataHeatBal->Lights(Loop).VisGainEnergy = state.dataHeatBal->Lights(Loop).VisGainRate * state.dataGlobal->TimeStepZoneSec;
7859 15978835 : state.dataHeatBal->Lights(Loop).ConGainEnergy = state.dataHeatBal->Lights(Loop).ConGainRate * state.dataGlobal->TimeStepZoneSec;
7860 15978835 : state.dataHeatBal->Lights(Loop).RetAirGainEnergy = state.dataHeatBal->Lights(Loop).RetAirGainRate * state.dataGlobal->TimeStepZoneSec;
7861 15978835 : state.dataHeatBal->Lights(Loop).TotGainEnergy = state.dataHeatBal->Lights(Loop).TotGainRate * state.dataGlobal->TimeStepZoneSec;
7862 15978835 : if (!state.dataGlobal->WarmupFlag) {
7863 3946594 : if (state.dataGlobal->DoOutputReporting && state.dataOutRptTab->WriteTabularFiles &&
7864 1497614 : (state.dataGlobal->KindOfSim == DataGlobalConstants::KindOfSim::RunPeriodWeather)) { // for weather simulations only
7865 : // for tabular report, accumulate the total electricity used for each Light object
7866 350870 : state.dataHeatBal->Lights(Loop).SumConsumption += state.dataHeatBal->Lights(Loop).Consumption;
7867 : // for tabular report, accumulate the time when each Light has consumption (using a very small threshold instead of zero)
7868 350870 : if (state.dataHeatBal->Lights(Loop).Power > 0.01 * state.dataHeatBal->Lights(Loop).DesignLevel) {
7869 350870 : state.dataHeatBal->Lights(Loop).SumTimeNotZeroCons += state.dataGlobal->TimeStepZone;
7870 : }
7871 : }
7872 : }
7873 : }
7874 :
7875 19156386 : for (int Loop = 1; Loop <= state.dataHeatBal->TotElecEquip; ++Loop) {
7876 16587877 : state.dataHeatBal->ZoneElectric(Loop).Consumption = state.dataHeatBal->ZoneElectric(Loop).Power * state.dataGlobal->TimeStepZoneSec;
7877 16587877 : state.dataHeatBal->ZoneElectric(Loop).RadGainEnergy =
7878 16587877 : state.dataHeatBal->ZoneElectric(Loop).RadGainRate * state.dataGlobal->TimeStepZoneSec;
7879 16587877 : state.dataHeatBal->ZoneElectric(Loop).ConGainEnergy =
7880 16587877 : state.dataHeatBal->ZoneElectric(Loop).ConGainRate * state.dataGlobal->TimeStepZoneSec;
7881 16587877 : state.dataHeatBal->ZoneElectric(Loop).LatGainEnergy =
7882 16587877 : state.dataHeatBal->ZoneElectric(Loop).LatGainRate * state.dataGlobal->TimeStepZoneSec;
7883 16587877 : state.dataHeatBal->ZoneElectric(Loop).LostEnergy = state.dataHeatBal->ZoneElectric(Loop).LostRate * state.dataGlobal->TimeStepZoneSec;
7884 16587877 : state.dataHeatBal->ZoneElectric(Loop).TotGainEnergy =
7885 16587877 : state.dataHeatBal->ZoneElectric(Loop).TotGainRate * state.dataGlobal->TimeStepZoneSec;
7886 : }
7887 :
7888 2867342 : for (int Loop = 1; Loop <= state.dataHeatBal->TotGasEquip; ++Loop) {
7889 298833 : state.dataHeatBal->ZoneGas(Loop).Consumption = state.dataHeatBal->ZoneGas(Loop).Power * state.dataGlobal->TimeStepZoneSec;
7890 298833 : state.dataHeatBal->ZoneGas(Loop).RadGainEnergy = state.dataHeatBal->ZoneGas(Loop).RadGainRate * state.dataGlobal->TimeStepZoneSec;
7891 298833 : state.dataHeatBal->ZoneGas(Loop).ConGainEnergy = state.dataHeatBal->ZoneGas(Loop).ConGainRate * state.dataGlobal->TimeStepZoneSec;
7892 298833 : state.dataHeatBal->ZoneGas(Loop).LatGainEnergy = state.dataHeatBal->ZoneGas(Loop).LatGainRate * state.dataGlobal->TimeStepZoneSec;
7893 298833 : state.dataHeatBal->ZoneGas(Loop).LostEnergy = state.dataHeatBal->ZoneGas(Loop).LostRate * state.dataGlobal->TimeStepZoneSec;
7894 298833 : state.dataHeatBal->ZoneGas(Loop).TotGainEnergy = state.dataHeatBal->ZoneGas(Loop).TotGainRate * state.dataGlobal->TimeStepZoneSec;
7895 : }
7896 :
7897 2895071 : for (int Loop = 1; Loop <= state.dataHeatBal->TotOthEquip; ++Loop) {
7898 326562 : state.dataHeatBal->ZoneOtherEq(Loop).Consumption = state.dataHeatBal->ZoneOtherEq(Loop).Power * state.dataGlobal->TimeStepZoneSec;
7899 326562 : state.dataHeatBal->ZoneOtherEq(Loop).RadGainEnergy = state.dataHeatBal->ZoneOtherEq(Loop).RadGainRate * state.dataGlobal->TimeStepZoneSec;
7900 326562 : state.dataHeatBal->ZoneOtherEq(Loop).ConGainEnergy = state.dataHeatBal->ZoneOtherEq(Loop).ConGainRate * state.dataGlobal->TimeStepZoneSec;
7901 326562 : state.dataHeatBal->ZoneOtherEq(Loop).LatGainEnergy = state.dataHeatBal->ZoneOtherEq(Loop).LatGainRate * state.dataGlobal->TimeStepZoneSec;
7902 326562 : state.dataHeatBal->ZoneOtherEq(Loop).LostEnergy = state.dataHeatBal->ZoneOtherEq(Loop).LostRate * state.dataGlobal->TimeStepZoneSec;
7903 326562 : state.dataHeatBal->ZoneOtherEq(Loop).TotGainEnergy = state.dataHeatBal->ZoneOtherEq(Loop).TotGainRate * state.dataGlobal->TimeStepZoneSec;
7904 : }
7905 :
7906 2654789 : for (int Loop = 1; Loop <= state.dataHeatBal->TotHWEquip; ++Loop) {
7907 86280 : state.dataHeatBal->ZoneHWEq(Loop).Consumption = state.dataHeatBal->ZoneHWEq(Loop).Power * state.dataGlobal->TimeStepZoneSec;
7908 86280 : state.dataHeatBal->ZoneHWEq(Loop).RadGainEnergy = state.dataHeatBal->ZoneHWEq(Loop).RadGainRate * state.dataGlobal->TimeStepZoneSec;
7909 86280 : state.dataHeatBal->ZoneHWEq(Loop).ConGainEnergy = state.dataHeatBal->ZoneHWEq(Loop).ConGainRate * state.dataGlobal->TimeStepZoneSec;
7910 86280 : state.dataHeatBal->ZoneHWEq(Loop).LatGainEnergy = state.dataHeatBal->ZoneHWEq(Loop).LatGainRate * state.dataGlobal->TimeStepZoneSec;
7911 86280 : state.dataHeatBal->ZoneHWEq(Loop).LostEnergy = state.dataHeatBal->ZoneHWEq(Loop).LostRate * state.dataGlobal->TimeStepZoneSec;
7912 86280 : state.dataHeatBal->ZoneHWEq(Loop).TotGainEnergy = state.dataHeatBal->ZoneHWEq(Loop).TotGainRate * state.dataGlobal->TimeStepZoneSec;
7913 : }
7914 :
7915 2582024 : for (int Loop = 1; Loop <= state.dataHeatBal->TotStmEquip; ++Loop) {
7916 13515 : state.dataHeatBal->ZoneSteamEq(Loop).Consumption = state.dataHeatBal->ZoneSteamEq(Loop).Power * state.dataGlobal->TimeStepZoneSec;
7917 13515 : state.dataHeatBal->ZoneSteamEq(Loop).RadGainEnergy = state.dataHeatBal->ZoneSteamEq(Loop).RadGainRate * state.dataGlobal->TimeStepZoneSec;
7918 13515 : state.dataHeatBal->ZoneSteamEq(Loop).ConGainEnergy = state.dataHeatBal->ZoneSteamEq(Loop).ConGainRate * state.dataGlobal->TimeStepZoneSec;
7919 13515 : state.dataHeatBal->ZoneSteamEq(Loop).LatGainEnergy = state.dataHeatBal->ZoneSteamEq(Loop).LatGainRate * state.dataGlobal->TimeStepZoneSec;
7920 13515 : state.dataHeatBal->ZoneSteamEq(Loop).LostEnergy = state.dataHeatBal->ZoneSteamEq(Loop).LostRate * state.dataGlobal->TimeStepZoneSec;
7921 13515 : state.dataHeatBal->ZoneSteamEq(Loop).TotGainEnergy = state.dataHeatBal->ZoneSteamEq(Loop).TotGainRate * state.dataGlobal->TimeStepZoneSec;
7922 : }
7923 :
7924 2576618 : for (int Loop = 1; Loop <= state.dataHeatBal->TotBBHeat; ++Loop) {
7925 8109 : state.dataHeatBal->ZoneBBHeat(Loop).Consumption = state.dataHeatBal->ZoneBBHeat(Loop).Power * state.dataGlobal->TimeStepZoneSec;
7926 8109 : state.dataHeatBal->ZoneBBHeat(Loop).RadGainEnergy = state.dataHeatBal->ZoneBBHeat(Loop).RadGainRate * state.dataGlobal->TimeStepZoneSec;
7927 8109 : state.dataHeatBal->ZoneBBHeat(Loop).ConGainEnergy = state.dataHeatBal->ZoneBBHeat(Loop).ConGainRate * state.dataGlobal->TimeStepZoneSec;
7928 8109 : state.dataHeatBal->ZoneBBHeat(Loop).TotGainEnergy = state.dataHeatBal->ZoneBBHeat(Loop).TotGainRate * state.dataGlobal->TimeStepZoneSec;
7929 : }
7930 :
7931 21031250 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
7932 : // People
7933 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleNumOcc = state.dataHeatBal->spaceIntGain(spaceNum).NOFOCC;
7934 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleRadGain =
7935 18462741 : state.dataHeatBal->spaceIntGain(spaceNum).QOCRAD * state.dataGlobal->TimeStepZoneSec;
7936 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleConGain =
7937 18462741 : state.dataHeatBal->spaceIntGain(spaceNum).QOCCON * state.dataGlobal->TimeStepZoneSec;
7938 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleSenGain =
7939 18462741 : state.dataHeatBal->spaceIntGain(spaceNum).QOCSEN * state.dataGlobal->TimeStepZoneSec;
7940 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleLatGain =
7941 18462741 : state.dataHeatBal->spaceIntGain(spaceNum).QOCLAT * state.dataGlobal->TimeStepZoneSec;
7942 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleTotGain =
7943 18462741 : state.dataHeatBal->spaceIntGain(spaceNum).QOCTOT * state.dataGlobal->TimeStepZoneSec;
7944 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleRadGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QOCRAD;
7945 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleConGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QOCCON;
7946 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleSenGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QOCSEN;
7947 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleLatGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QOCLAT;
7948 18462741 : state.dataHeatBal->spaceRpt(spaceNum).PeopleTotGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QOCTOT;
7949 :
7950 : // General Lights
7951 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsRetAirGain =
7952 18462741 : state.dataHeatBal->spaceIntGain(spaceNum).QLTCRA * state.dataGlobal->TimeStepZoneSec;
7953 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsRadGain = state.dataHeatBal->spaceIntGain(spaceNum).QLTRAD * state.dataGlobal->TimeStepZoneSec;
7954 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsTotGain = state.dataHeatBal->spaceIntGain(spaceNum).QLTTOT * state.dataGlobal->TimeStepZoneSec;
7955 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsConGain = state.dataHeatBal->spaceIntGain(spaceNum).QLTCON * state.dataGlobal->TimeStepZoneSec;
7956 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsVisGain = state.dataHeatBal->spaceIntGain(spaceNum).QLTSW * state.dataGlobal->TimeStepZoneSec;
7957 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsRetAirGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QLTCRA;
7958 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsRadGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QLTRAD;
7959 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsTotGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QLTTOT;
7960 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsConGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QLTCON;
7961 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsVisGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QLTSW;
7962 18462741 : state.dataHeatBal->spaceRpt(spaceNum).LtsElecConsump = state.dataHeatBal->spaceRpt(spaceNum).LtsTotGain;
7963 :
7964 : // Electric Equipment
7965 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecConGain = state.dataHeatBal->spaceIntGain(spaceNum).QEECON * state.dataGlobal->TimeStepZoneSec;
7966 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecRadGain = state.dataHeatBal->spaceIntGain(spaceNum).QEERAD * state.dataGlobal->TimeStepZoneSec;
7967 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecLatGain = state.dataHeatBal->spaceIntGain(spaceNum).QEELAT * state.dataGlobal->TimeStepZoneSec;
7968 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecLost = state.dataHeatBal->spaceIntGain(spaceNum).QEELost * state.dataGlobal->TimeStepZoneSec;
7969 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecConGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QEECON;
7970 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecRadGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QEERAD;
7971 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecLatGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QEELAT;
7972 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecLostRate = state.dataHeatBal->spaceIntGain(spaceNum).QEELost;
7973 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecConsump =
7974 36925482 : state.dataHeatBal->spaceRpt(spaceNum).ElecConGain + state.dataHeatBal->spaceRpt(spaceNum).ElecRadGain +
7975 36925482 : state.dataHeatBal->spaceRpt(spaceNum).ElecLatGain + state.dataHeatBal->spaceRpt(spaceNum).ElecLost;
7976 55388223 : state.dataHeatBal->spaceRpt(spaceNum).ElecTotGain = state.dataHeatBal->spaceRpt(spaceNum).ElecConGain +
7977 36925482 : state.dataHeatBal->spaceRpt(spaceNum).ElecRadGain +
7978 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecLatGain;
7979 55388223 : state.dataHeatBal->spaceRpt(spaceNum).ElecTotGainRate = state.dataHeatBal->spaceRpt(spaceNum).ElecConGainRate +
7980 36925482 : state.dataHeatBal->spaceRpt(spaceNum).ElecRadGainRate +
7981 18462741 : state.dataHeatBal->spaceRpt(spaceNum).ElecLatGainRate;
7982 :
7983 : // Gas Equipment
7984 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasConGain = state.dataHeatBal->spaceIntGain(spaceNum).QGECON * state.dataGlobal->TimeStepZoneSec;
7985 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasRadGain = state.dataHeatBal->spaceIntGain(spaceNum).QGERAD * state.dataGlobal->TimeStepZoneSec;
7986 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasLatGain = state.dataHeatBal->spaceIntGain(spaceNum).QGELAT * state.dataGlobal->TimeStepZoneSec;
7987 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasLost = state.dataHeatBal->spaceIntGain(spaceNum).QGELost * state.dataGlobal->TimeStepZoneSec;
7988 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasConGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QGECON;
7989 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasRadGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QGERAD;
7990 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasLatGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QGELAT;
7991 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasLostRate = state.dataHeatBal->spaceIntGain(spaceNum).QGELost;
7992 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasConsump =
7993 36925482 : state.dataHeatBal->spaceRpt(spaceNum).GasConGain + state.dataHeatBal->spaceRpt(spaceNum).GasRadGain +
7994 36925482 : state.dataHeatBal->spaceRpt(spaceNum).GasLatGain + state.dataHeatBal->spaceRpt(spaceNum).GasLost;
7995 55388223 : state.dataHeatBal->spaceRpt(spaceNum).GasTotGain = state.dataHeatBal->spaceRpt(spaceNum).GasConGain +
7996 36925482 : state.dataHeatBal->spaceRpt(spaceNum).GasRadGain +
7997 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasLatGain;
7998 55388223 : state.dataHeatBal->spaceRpt(spaceNum).GasTotGainRate = state.dataHeatBal->spaceRpt(spaceNum).GasConGainRate +
7999 36925482 : state.dataHeatBal->spaceRpt(spaceNum).GasRadGainRate +
8000 18462741 : state.dataHeatBal->spaceRpt(spaceNum).GasLatGainRate;
8001 :
8002 : // Hot Water Equipment
8003 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWConGain = state.dataHeatBal->spaceIntGain(spaceNum).QHWCON * state.dataGlobal->TimeStepZoneSec;
8004 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWRadGain = state.dataHeatBal->spaceIntGain(spaceNum).QHWRAD * state.dataGlobal->TimeStepZoneSec;
8005 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWLatGain = state.dataHeatBal->spaceIntGain(spaceNum).QHWLAT * state.dataGlobal->TimeStepZoneSec;
8006 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWLost = state.dataHeatBal->spaceIntGain(spaceNum).QHWLost * state.dataGlobal->TimeStepZoneSec;
8007 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWConGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QHWCON;
8008 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWRadGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QHWRAD;
8009 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWLatGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QHWLAT;
8010 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWLostRate = state.dataHeatBal->spaceIntGain(spaceNum).QHWLost;
8011 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWConsump =
8012 36925482 : state.dataHeatBal->spaceRpt(spaceNum).HWConGain + state.dataHeatBal->spaceRpt(spaceNum).HWRadGain +
8013 36925482 : state.dataHeatBal->spaceRpt(spaceNum).HWLatGain + state.dataHeatBal->spaceRpt(spaceNum).HWLost;
8014 55388223 : state.dataHeatBal->spaceRpt(spaceNum).HWTotGain = state.dataHeatBal->spaceRpt(spaceNum).HWConGain +
8015 36925482 : state.dataHeatBal->spaceRpt(spaceNum).HWRadGain +
8016 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWLatGain;
8017 55388223 : state.dataHeatBal->spaceRpt(spaceNum).HWTotGainRate = state.dataHeatBal->spaceRpt(spaceNum).HWConGainRate +
8018 36925482 : state.dataHeatBal->spaceRpt(spaceNum).HWRadGainRate +
8019 18462741 : state.dataHeatBal->spaceRpt(spaceNum).HWLatGainRate;
8020 :
8021 : // Steam Equipment
8022 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamConGain = state.dataHeatBal->spaceIntGain(spaceNum).QSECON * state.dataGlobal->TimeStepZoneSec;
8023 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamRadGain = state.dataHeatBal->spaceIntGain(spaceNum).QSERAD * state.dataGlobal->TimeStepZoneSec;
8024 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamLatGain = state.dataHeatBal->spaceIntGain(spaceNum).QSELAT * state.dataGlobal->TimeStepZoneSec;
8025 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamLost = state.dataHeatBal->spaceIntGain(spaceNum).QSELost * state.dataGlobal->TimeStepZoneSec;
8026 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamConGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QSECON;
8027 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamRadGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QSERAD;
8028 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamLatGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QSELAT;
8029 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamLostRate = state.dataHeatBal->spaceIntGain(spaceNum).QSELost;
8030 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamConsump =
8031 36925482 : state.dataHeatBal->spaceRpt(spaceNum).SteamConGain + state.dataHeatBal->spaceRpt(spaceNum).SteamRadGain +
8032 36925482 : state.dataHeatBal->spaceRpt(spaceNum).SteamLatGain + state.dataHeatBal->spaceRpt(spaceNum).SteamLost;
8033 55388223 : state.dataHeatBal->spaceRpt(spaceNum).SteamTotGain = state.dataHeatBal->spaceRpt(spaceNum).SteamConGain +
8034 36925482 : state.dataHeatBal->spaceRpt(spaceNum).SteamRadGain +
8035 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamLatGain;
8036 55388223 : state.dataHeatBal->spaceRpt(spaceNum).SteamTotGainRate = state.dataHeatBal->spaceRpt(spaceNum).SteamConGainRate +
8037 36925482 : state.dataHeatBal->spaceRpt(spaceNum).SteamRadGainRate +
8038 18462741 : state.dataHeatBal->spaceRpt(spaceNum).SteamLatGainRate;
8039 :
8040 : // Other Equipment
8041 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherConGain = state.dataHeatBal->spaceIntGain(spaceNum).QOECON * state.dataGlobal->TimeStepZoneSec;
8042 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherRadGain = state.dataHeatBal->spaceIntGain(spaceNum).QOERAD * state.dataGlobal->TimeStepZoneSec;
8043 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherLatGain = state.dataHeatBal->spaceIntGain(spaceNum).QOELAT * state.dataGlobal->TimeStepZoneSec;
8044 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherLost = state.dataHeatBal->spaceIntGain(spaceNum).QOELost * state.dataGlobal->TimeStepZoneSec;
8045 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherConGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QOECON;
8046 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherRadGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QOERAD;
8047 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherLatGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QOELAT;
8048 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherLostRate = state.dataHeatBal->spaceIntGain(spaceNum).QOELost;
8049 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherConsump =
8050 36925482 : state.dataHeatBal->spaceRpt(spaceNum).OtherConGain + state.dataHeatBal->spaceRpt(spaceNum).OtherRadGain +
8051 36925482 : state.dataHeatBal->spaceRpt(spaceNum).OtherLatGain + state.dataHeatBal->spaceRpt(spaceNum).OtherLost;
8052 55388223 : state.dataHeatBal->spaceRpt(spaceNum).OtherTotGain = state.dataHeatBal->spaceRpt(spaceNum).OtherConGain +
8053 36925482 : state.dataHeatBal->spaceRpt(spaceNum).OtherRadGain +
8054 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherLatGain;
8055 55388223 : state.dataHeatBal->spaceRpt(spaceNum).OtherTotGainRate = state.dataHeatBal->spaceRpt(spaceNum).OtherConGainRate +
8056 36925482 : state.dataHeatBal->spaceRpt(spaceNum).OtherRadGainRate +
8057 18462741 : state.dataHeatBal->spaceRpt(spaceNum).OtherLatGainRate;
8058 :
8059 : // Baseboard Heat
8060 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatConGain =
8061 18462741 : state.dataHeatBal->spaceIntGain(spaceNum).QBBCON * state.dataGlobal->TimeStepZoneSec;
8062 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatRadGain =
8063 18462741 : state.dataHeatBal->spaceIntGain(spaceNum).QBBRAD * state.dataGlobal->TimeStepZoneSec;
8064 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatConGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QBBCON;
8065 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatRadGainRate = state.dataHeatBal->spaceIntGain(spaceNum).QBBRAD;
8066 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatTotGain =
8067 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatConGain + state.dataHeatBal->spaceRpt(spaceNum).BaseHeatRadGain;
8068 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatTotGainRate =
8069 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatConGainRate + state.dataHeatBal->spaceRpt(spaceNum).BaseHeatRadGainRate;
8070 18462741 : state.dataHeatBal->spaceRpt(spaceNum).BaseHeatElecCons = state.dataHeatBal->spaceRpt(spaceNum).BaseHeatTotGain;
8071 :
8072 : // Overall Space Variables
8073 :
8074 : // these overalls include component gains from devices like water heater, water use, and generators
8075 : // working vars QFCConv QGenConv QFCRad QGenRad WaterUseLatentGain WaterThermalTankGain WaterUseSensibleGain
8076 :
8077 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotVisHeatGain = state.dataHeatBal->spaceRpt(spaceNum).LtsVisGain;
8078 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotVisHeatGainRate = state.dataHeatBal->spaceRpt(spaceNum).LtsVisGainRate;
8079 :
8080 18462741 : int zoneNum = state.dataHeatBal->space(spaceNum).zoneNum;
8081 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotRadiantGainRate = SumInternalRadiationGainsByTypes(state, zoneNum, TradIntGainTypes, spaceNum);
8082 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotRadiantGain =
8083 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotRadiantGainRate * state.dataGlobal->TimeStepZoneSec;
8084 :
8085 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotConvectiveGainRate =
8086 36925482 : SumInternalConvectionGainsByTypes(state, zoneNum, TradIntGainTypes, spaceNum);
8087 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotConvectiveGain =
8088 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotConvectiveGainRate * state.dataGlobal->TimeStepZoneSec;
8089 :
8090 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotLatentGainRate = SumInternalLatentGainsByTypes(state, zoneNum, TradIntGainTypes, spaceNum);
8091 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotLatentGain =
8092 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotLatentGainRate * state.dataGlobal->TimeStepZoneSec;
8093 :
8094 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotTotalHeatGainRate =
8095 36925482 : state.dataHeatBal->spaceRpt(spaceNum).TotLatentGainRate + state.dataHeatBal->spaceRpt(spaceNum).TotRadiantGainRate +
8096 36925482 : state.dataHeatBal->spaceRpt(spaceNum).TotConvectiveGainRate + state.dataHeatBal->spaceRpt(spaceNum).TotVisHeatGainRate;
8097 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotTotalHeatGain =
8098 18462741 : state.dataHeatBal->spaceRpt(spaceNum).TotTotalHeatGainRate * state.dataGlobal->TimeStepZoneSec;
8099 : }
8100 :
8101 21015074 : for (int ZoneLoop = 1; ZoneLoop <= state.dataGlobal->NumOfZones; ++ZoneLoop) {
8102 : // People
8103 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleNumOcc = 0.0;
8104 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleRadGain = 0.0;
8105 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleConGain = 0.0;
8106 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleSenGain = 0.0;
8107 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleLatGain = 0.0;
8108 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleTotGain = 0.0;
8109 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleRadGainRate = 0.0;
8110 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleConGainRate = 0.0;
8111 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleSenGainRate = 0.0;
8112 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleLatGainRate = 0.0;
8113 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleTotGainRate = 0.0;
8114 :
8115 36909306 : for (int spaceNum : state.dataHeatBal->Zone(ZoneLoop).spaceIndexes) {
8116 : // People
8117 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleNumOcc += state.dataHeatBal->spaceRpt(spaceNum).PeopleNumOcc;
8118 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleRadGain += state.dataHeatBal->spaceRpt(spaceNum).PeopleRadGain;
8119 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleConGain += state.dataHeatBal->spaceRpt(spaceNum).PeopleConGain;
8120 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleSenGain += state.dataHeatBal->spaceRpt(spaceNum).PeopleSenGain;
8121 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleLatGain += state.dataHeatBal->spaceRpt(spaceNum).PeopleLatGain;
8122 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleTotGain += state.dataHeatBal->spaceRpt(spaceNum).PeopleTotGain;
8123 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleRadGainRate += state.dataHeatBal->spaceRpt(spaceNum).PeopleRadGainRate;
8124 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleConGainRate += state.dataHeatBal->spaceRpt(spaceNum).PeopleConGainRate;
8125 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleSenGainRate += state.dataHeatBal->spaceRpt(spaceNum).PeopleSenGainRate;
8126 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleLatGainRate += state.dataHeatBal->spaceRpt(spaceNum).PeopleLatGainRate;
8127 18462741 : state.dataHeatBal->ZoneRpt(ZoneLoop).PeopleTotGainRate += state.dataHeatBal->spaceRpt(spaceNum).PeopleTotGainRate;
8128 : }
8129 : // General Lights
8130 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsRetAirGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTCRA * state.dataGlobal->TimeStepZoneSec;
8131 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsRadGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTRAD * state.dataGlobal->TimeStepZoneSec;
8132 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsTotGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTTOT * state.dataGlobal->TimeStepZoneSec;
8133 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsConGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTCON * state.dataGlobal->TimeStepZoneSec;
8134 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsVisGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTSW * state.dataGlobal->TimeStepZoneSec;
8135 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsRetAirGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTCRA;
8136 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsRadGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTRAD;
8137 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsTotGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTTOT;
8138 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsConGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTCON;
8139 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsVisGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QLTSW;
8140 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).LtsElecConsump = state.dataHeatBal->ZoneRpt(ZoneLoop).LtsTotGain;
8141 :
8142 : // Electric Equipment
8143 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecConGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QEECON * state.dataGlobal->TimeStepZoneSec;
8144 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecRadGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QEERAD * state.dataGlobal->TimeStepZoneSec;
8145 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecLatGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QEELAT * state.dataGlobal->TimeStepZoneSec;
8146 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecLost = state.dataHeatBal->ZoneIntGain(ZoneLoop).QEELost * state.dataGlobal->TimeStepZoneSec;
8147 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecConGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QEECON;
8148 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecRadGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QEERAD;
8149 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecLatGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QEELAT;
8150 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecLostRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QEELost;
8151 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecConsump =
8152 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecConGain + state.dataHeatBal->ZoneRpt(ZoneLoop).ElecRadGain +
8153 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecLatGain + state.dataHeatBal->ZoneRpt(ZoneLoop).ElecLost;
8154 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecTotGain = state.dataHeatBal->ZoneRpt(ZoneLoop).ElecConGain +
8155 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecRadGain +
8156 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecLatGain;
8157 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecTotGainRate = state.dataHeatBal->ZoneRpt(ZoneLoop).ElecConGainRate +
8158 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecRadGainRate +
8159 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).ElecLatGainRate;
8160 :
8161 : // Gas Equipment
8162 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasConGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QGECON * state.dataGlobal->TimeStepZoneSec;
8163 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasRadGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QGERAD * state.dataGlobal->TimeStepZoneSec;
8164 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasLatGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QGELAT * state.dataGlobal->TimeStepZoneSec;
8165 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasLost = state.dataHeatBal->ZoneIntGain(ZoneLoop).QGELost * state.dataGlobal->TimeStepZoneSec;
8166 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasConGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QGECON;
8167 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasRadGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QGERAD;
8168 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasLatGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QGELAT;
8169 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasLostRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QGELost;
8170 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasConsump =
8171 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasConGain + state.dataHeatBal->ZoneRpt(ZoneLoop).GasRadGain +
8172 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasLatGain + state.dataHeatBal->ZoneRpt(ZoneLoop).GasLost;
8173 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasTotGain = state.dataHeatBal->ZoneRpt(ZoneLoop).GasConGain +
8174 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasRadGain +
8175 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasLatGain;
8176 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasTotGainRate = state.dataHeatBal->ZoneRpt(ZoneLoop).GasConGainRate +
8177 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasRadGainRate +
8178 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).GasLatGainRate;
8179 :
8180 : // Hot Water Equipment
8181 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWConGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QHWCON * state.dataGlobal->TimeStepZoneSec;
8182 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWRadGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QHWRAD * state.dataGlobal->TimeStepZoneSec;
8183 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWLatGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QHWLAT * state.dataGlobal->TimeStepZoneSec;
8184 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWLost = state.dataHeatBal->ZoneIntGain(ZoneLoop).QHWLost * state.dataGlobal->TimeStepZoneSec;
8185 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWConGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QHWCON;
8186 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWRadGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QHWRAD;
8187 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWLatGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QHWLAT;
8188 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWLostRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QHWLost;
8189 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWConsump =
8190 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWConGain + state.dataHeatBal->ZoneRpt(ZoneLoop).HWRadGain +
8191 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWLatGain + state.dataHeatBal->ZoneRpt(ZoneLoop).HWLost;
8192 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWTotGain = state.dataHeatBal->ZoneRpt(ZoneLoop).HWConGain +
8193 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWRadGain +
8194 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWLatGain;
8195 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWTotGainRate = state.dataHeatBal->ZoneRpt(ZoneLoop).HWConGainRate +
8196 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWRadGainRate +
8197 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).HWLatGainRate;
8198 :
8199 : // Steam Equipment
8200 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamConGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QSECON * state.dataGlobal->TimeStepZoneSec;
8201 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamRadGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QSERAD * state.dataGlobal->TimeStepZoneSec;
8202 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamLatGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QSELAT * state.dataGlobal->TimeStepZoneSec;
8203 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamLost = state.dataHeatBal->ZoneIntGain(ZoneLoop).QSELost * state.dataGlobal->TimeStepZoneSec;
8204 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamConGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QSECON;
8205 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamRadGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QSERAD;
8206 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamLatGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QSELAT;
8207 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamLostRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QSELost;
8208 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamConsump =
8209 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamConGain + state.dataHeatBal->ZoneRpt(ZoneLoop).SteamRadGain +
8210 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamLatGain + state.dataHeatBal->ZoneRpt(ZoneLoop).SteamLost;
8211 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamTotGain = state.dataHeatBal->ZoneRpt(ZoneLoop).SteamConGain +
8212 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamRadGain +
8213 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamLatGain;
8214 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamTotGainRate = state.dataHeatBal->ZoneRpt(ZoneLoop).SteamConGainRate +
8215 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamRadGainRate +
8216 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).SteamLatGainRate;
8217 :
8218 : // Other Equipment
8219 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherConGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QOECON * state.dataGlobal->TimeStepZoneSec;
8220 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherRadGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QOERAD * state.dataGlobal->TimeStepZoneSec;
8221 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherLatGain = state.dataHeatBal->ZoneIntGain(ZoneLoop).QOELAT * state.dataGlobal->TimeStepZoneSec;
8222 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherLost = state.dataHeatBal->ZoneIntGain(ZoneLoop).QOELost * state.dataGlobal->TimeStepZoneSec;
8223 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherConGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QOECON;
8224 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherRadGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QOERAD;
8225 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherLatGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QOELAT;
8226 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherLostRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QOELost;
8227 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherConsump =
8228 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherConGain + state.dataHeatBal->ZoneRpt(ZoneLoop).OtherRadGain +
8229 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherLatGain + state.dataHeatBal->ZoneRpt(ZoneLoop).OtherLost;
8230 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherTotGain = state.dataHeatBal->ZoneRpt(ZoneLoop).OtherConGain +
8231 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherRadGain +
8232 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherLatGain;
8233 55339695 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherTotGainRate = state.dataHeatBal->ZoneRpt(ZoneLoop).OtherConGainRate +
8234 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherRadGainRate +
8235 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).OtherLatGainRate;
8236 :
8237 : // Baseboard Heat
8238 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatConGain =
8239 18446565 : state.dataHeatBal->ZoneIntGain(ZoneLoop).QBBCON * state.dataGlobal->TimeStepZoneSec;
8240 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatRadGain =
8241 18446565 : state.dataHeatBal->ZoneIntGain(ZoneLoop).QBBRAD * state.dataGlobal->TimeStepZoneSec;
8242 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatConGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QBBCON;
8243 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatRadGainRate = state.dataHeatBal->ZoneIntGain(ZoneLoop).QBBRAD;
8244 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatTotGain =
8245 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatConGain + state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatRadGain;
8246 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatTotGainRate =
8247 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatConGainRate + state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatRadGainRate;
8248 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatElecCons = state.dataHeatBal->ZoneRpt(ZoneLoop).BaseHeatTotGain;
8249 :
8250 : // Overall Zone Variables
8251 :
8252 : // these overalls include component gains from devices like water heater, water use, and generators
8253 : // working vars QFCConv QGenConv QFCRad QGenRad WaterUseLatentGain WaterThermalTankGain WaterUseSensibleGain
8254 :
8255 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotVisHeatGain = state.dataHeatBal->ZoneRpt(ZoneLoop).LtsVisGain;
8256 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotVisHeatGainRate = state.dataHeatBal->ZoneRpt(ZoneLoop).LtsVisGainRate;
8257 :
8258 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotRadiantGainRate = SumInternalRadiationGainsByTypes(state, ZoneLoop, TradIntGainTypes);
8259 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotRadiantGain =
8260 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotRadiantGainRate * state.dataGlobal->TimeStepZoneSec;
8261 :
8262 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotConvectiveGainRate = SumInternalConvectionGainsByTypes(state, ZoneLoop, TradIntGainTypes);
8263 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotConvectiveGain =
8264 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotConvectiveGainRate * state.dataGlobal->TimeStepZoneSec;
8265 :
8266 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotLatentGainRate = SumInternalLatentGainsByTypes(state, ZoneLoop, TradIntGainTypes);
8267 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotLatentGain =
8268 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotLatentGainRate * state.dataGlobal->TimeStepZoneSec;
8269 :
8270 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotTotalHeatGainRate =
8271 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotLatentGainRate + state.dataHeatBal->ZoneRpt(ZoneLoop).TotRadiantGainRate +
8272 36893130 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotConvectiveGainRate + state.dataHeatBal->ZoneRpt(ZoneLoop).TotVisHeatGainRate;
8273 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotTotalHeatGain =
8274 18446565 : state.dataHeatBal->ZoneRpt(ZoneLoop).TotTotalHeatGainRate * state.dataGlobal->TimeStepZoneSec;
8275 : }
8276 2568509 : }
8277 :
8278 290 : Real64 GetDesignLightingLevelForZone(EnergyPlusData &state, int const WhichZone) // name of zone
8279 : {
8280 :
8281 : // FUNCTION INFORMATION:
8282 : // AUTHOR Linda Lawrie
8283 : // DATE WRITTEN April 2007; January 2008 - moved to InternalGains
8284 : // MODIFIED na
8285 : // RE-ENGINEERED na
8286 :
8287 : // PURPOSE OF THIS FUNCTION:
8288 : // This routine sums the Lighting Level for a zone.
8289 : // Will issue a severe error for illegal zone.
8290 : // Must be called after InternalHeatGains get input.
8291 :
8292 : // Using/Aliasing
8293 : using namespace DataHeatBalance;
8294 : // Return value
8295 : Real64 DesignLightingLevelSum; // Sum of design lighting level for this zone
8296 :
8297 : // FUNCTION LOCAL VARIABLE DECLARATIONS:
8298 : int Loop;
8299 :
8300 290 : if (state.dataInternalHeatGains->GetInternalHeatGainsInputFlag) {
8301 0 : ShowFatalError(state, "GetDesignLightingLevelForZone: Function called prior to Getting Lights Input.");
8302 : }
8303 :
8304 290 : DesignLightingLevelSum = 0.0;
8305 :
8306 6985 : for (Loop = 1; Loop <= state.dataHeatBal->TotLights; ++Loop) {
8307 6695 : if (state.dataHeatBal->Lights(Loop).ZonePtr == WhichZone) {
8308 290 : DesignLightingLevelSum += state.dataHeatBal->Lights(Loop).DesignLevel;
8309 : }
8310 : }
8311 :
8312 290 : return DesignLightingLevelSum;
8313 : }
8314 :
8315 127 : bool CheckThermalComfortSchedules(bool const WorkEffSch, // Blank work efficiency schedule = true
8316 : bool const CloInsSch, // Blank clothing insulation schedule = true
8317 : bool const AirVeloSch) // Blank air velocity schedule = true
8318 : {
8319 127 : bool TCSchedsPresent = false;
8320 :
8321 127 : if (!WorkEffSch || !CloInsSch || !AirVeloSch) {
8322 34 : TCSchedsPresent = true;
8323 : }
8324 :
8325 127 : return TCSchedsPresent;
8326 : }
8327 :
8328 290 : void CheckLightsReplaceableMinMaxForZone(EnergyPlusData &state, int const WhichZone) // Zone Number
8329 : {
8330 :
8331 : // SUBROUTINE INFORMATION:
8332 : // AUTHOR Linda Lawrie
8333 : // DATE WRITTEN April 2007
8334 : // MODIFIED na
8335 : // RE-ENGINEERED na
8336 :
8337 : // PURPOSE OF THIS SUBROUTINE:
8338 : // Daylighting is not available unless Lights (replaceable) is 0.0 or 1.0. No dimming will be done
8339 : // unless the lights replaceable fraction is 1.0. This is documented in the InputOutputReference but
8340 : // not warned about. Also, this will sum the Zone Design Lighting level, in case the calling routine
8341 : // would like to have an error if the lights is zero and daylighting is requested.
8342 :
8343 : // METHODOLOGY EMPLOYED:
8344 : // Traverse the LIGHTS structure and get fraction replaceable - min/max as well as lighting
8345 : // level for a zone.
8346 :
8347 : // Using/Aliasing
8348 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
8349 : int Loop;
8350 : Real64 LightsRepMin; // Minimum Lighting replacement fraction for any lights statement for this zone
8351 : Real64 LightsRepMax; // Maximum Lighting replacement fraction for any lights statement for this zone
8352 : int NumLights; // Number of Lights statement for that zone.
8353 :
8354 290 : if (state.dataInternalHeatGains->GetInternalHeatGainsInputFlag) {
8355 0 : ShowFatalError(state, "CheckLightsReplaceableMinMaxForZone: Function called prior to Getting Lights Input.");
8356 : }
8357 :
8358 290 : LightsRepMin = 99999.0;
8359 290 : LightsRepMax = -99999.0;
8360 290 : NumLights = 0;
8361 :
8362 6985 : for (Loop = 1; Loop <= state.dataHeatBal->TotLights; ++Loop) {
8363 6695 : if (state.dataHeatBal->Lights(Loop).ZonePtr != WhichZone) continue;
8364 290 : LightsRepMin = min(LightsRepMin, state.dataHeatBal->Lights(Loop).FractionReplaceable);
8365 290 : LightsRepMax = max(LightsRepMax, state.dataHeatBal->Lights(Loop).FractionReplaceable);
8366 290 : ++NumLights;
8367 580 : if ((state.dataDaylightingData->ZoneDaylight(WhichZone).totRefPts > 0) &&
8368 580 : (state.dataHeatBal->Lights(Loop).FractionReplaceable > 0.0 && state.dataHeatBal->Lights(Loop).FractionReplaceable < 1.0)) {
8369 0 : ShowWarningError(state, "CheckLightsReplaceableMinMaxForZone: Fraction Replaceable must be 0.0 or 1.0 if used with daylighting.");
8370 0 : ShowContinueError(state,
8371 0 : "..Lights=\"" + state.dataHeatBal->Lights(Loop).Name +
8372 : "\", Fraction Replaceable will be reset to 1.0 to allow dimming controls");
8373 0 : ShowContinueError(state, "..in Zone=" + state.dataHeatBal->Zone(WhichZone).Name);
8374 0 : state.dataHeatBal->Lights(Loop).FractionReplaceable = 1.0;
8375 : }
8376 : }
8377 :
8378 290 : if (state.dataDaylightingData->ZoneDaylight(WhichZone).totRefPts > 0) {
8379 290 : if (LightsRepMax == 0.0) {
8380 0 : ShowWarningError(state, "CheckLightsReplaceable: Zone \"" + state.dataHeatBal->Zone(WhichZone).Name + "\" has Daylighting:Controls.");
8381 0 : ShowContinueError(state, "but all of the LIGHTS object in that zone have zero Fraction Replaceable.");
8382 0 : ShowContinueError(state, "The daylighting controls will have no effect.");
8383 : }
8384 290 : if (NumLights == 0) {
8385 0 : ShowWarningError(state, "CheckLightsReplaceable: Zone \"" + state.dataHeatBal->Zone(WhichZone).Name + "\" has Daylighting:Controls.");
8386 0 : ShowContinueError(state, "but there are no LIGHTS objects in that zone.");
8387 0 : ShowContinueError(state, "The daylighting controls will have no effect.");
8388 : }
8389 : }
8390 290 : }
8391 :
8392 6192269 : void UpdateInternalGainValues(EnergyPlusData &state, Optional_bool_const SuppressRadiationUpdate, Optional_bool_const SumLatentGains)
8393 : {
8394 :
8395 : // SUBROUTINE INFORMATION:
8396 : // AUTHOR B. Griffith
8397 : // DATE WRITTEN Dec. 2011
8398 6192269 : bool DoRadiationUpdate = true;
8399 6192269 : bool ReSumLatentGains = false;
8400 :
8401 6192269 : if (present(SuppressRadiationUpdate)) {
8402 3623760 : if (SuppressRadiationUpdate) DoRadiationUpdate = false;
8403 : }
8404 :
8405 6192269 : if (present(SumLatentGains)) {
8406 3623760 : if (SumLatentGains) ReSumLatentGains = true;
8407 : }
8408 :
8409 : // store pointer values to hold generic internal gain values constant for entire timestep
8410 52604097 : for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) {
8411 46411828 : auto &thisIntGain = state.dataHeatBal->spaceIntGainDevices(spaceNum);
8412 173838559 : for (int Loop = 1; Loop <= thisIntGain.numberOfDevices; ++Loop) {
8413 127426731 : thisIntGain.device(Loop).ConvectGainRate = *thisIntGain.device(Loop).PtrConvectGainRate * thisIntGain.device(Loop).spaceGainFrac;
8414 127426731 : thisIntGain.device(Loop).ReturnAirConvGainRate =
8415 127426731 : *thisIntGain.device(Loop).PtrReturnAirConvGainRate * thisIntGain.device(Loop).spaceGainFrac;
8416 127426731 : if (DoRadiationUpdate)
8417 51386660 : thisIntGain.device(Loop).RadiantGainRate = *thisIntGain.device(Loop).PtrRadiantGainRate * thisIntGain.device(Loop).spaceGainFrac;
8418 127426731 : thisIntGain.device(Loop).LatentGainRate = *thisIntGain.device(Loop).PtrLatentGainRate * thisIntGain.device(Loop).spaceGainFrac;
8419 127426731 : thisIntGain.device(Loop).ReturnAirLatentGainRate =
8420 127426731 : *thisIntGain.device(Loop).PtrReturnAirLatentGainRate * thisIntGain.device(Loop).spaceGainFrac;
8421 127426731 : thisIntGain.device(Loop).CarbonDioxideGainRate =
8422 127426731 : *thisIntGain.device(Loop).PtrCarbonDioxideGainRate * thisIntGain.device(Loop).spaceGainFrac;
8423 127426731 : thisIntGain.device(Loop).GenericContamGainRate =
8424 127426731 : *thisIntGain.device(Loop).PtrGenericContamGainRate * thisIntGain.device(Loop).spaceGainFrac;
8425 : }
8426 : }
8427 6192269 : if (ReSumLatentGains) {
8428 31551851 : for (int NZ = 1; NZ <= state.dataGlobal->NumOfZones; ++NZ) {
8429 27928091 : auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(NZ);
8430 27928091 : thisZoneHB.ZoneLatentGain = InternalHeatGains::SumAllInternalLatentGains(state, NZ);
8431 : // Added for the hybrid model
8432 27928091 : if (state.dataHybridModel->FlagHybridModel_PC) {
8433 8216 : thisZoneHB.ZoneLatentGainExceptPeople = InternalHeatGains::SumAllInternalLatentGainsExceptPeople(state, NZ);
8434 : }
8435 : }
8436 : }
8437 :
8438 6192269 : if (state.dataContaminantBalance->Contaminant.GenericContamSimulation && allocated(state.dataContaminantBalance->ZoneGCGain)) {
8439 353309 : for (int NZ = 1; NZ <= state.dataGlobal->NumOfZones; ++NZ) {
8440 322745 : state.dataContaminantBalance->ZoneGCGain(NZ) = InternalHeatGains::SumAllInternalGenericContamGains(state, NZ);
8441 322745 : state.dataHeatBal->ZoneRpt(NZ).GCRate = state.dataContaminantBalance->ZoneGCGain(NZ);
8442 : }
8443 : }
8444 6192269 : }
8445 :
8446 83836874 : Real64 zoneSumAllInternalConvectionGains(EnergyPlusData &state,
8447 : int const zoneNum // zone index pointer to sum gains for
8448 : )
8449 : {
8450 83836874 : Real64 zoneSumConvGainRate(0.0);
8451 : // worker routine for summing all the internal gain types
8452 :
8453 167736736 : for (int spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) {
8454 83899862 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) continue;
8455 73926567 : zoneSumConvGainRate += InternalHeatGains::spaceSumAllInternalConvectionGains(state, spaceNum);
8456 : }
8457 :
8458 83836874 : return zoneSumConvGainRate;
8459 : }
8460 :
8461 73986591 : Real64 spaceSumAllInternalConvectionGains(EnergyPlusData &state,
8462 : int const spaceNum // space index pointer to sum gains for
8463 : )
8464 : {
8465 : // SUBROUTINE INFORMATION:
8466 : // AUTHOR B. Griffith
8467 : // DATE WRITTEN Nov. 2011
8468 :
8469 : // PURPOSE OF THIS SUBROUTINE:
8470 : // worker routine for summing all the internal gain types
8471 :
8472 73986591 : Real64 spaceSumConvGainRate(0.0);
8473 :
8474 302379520 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8475 228392929 : spaceSumConvGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ConvectGainRate;
8476 : }
8477 73986591 : return spaceSumConvGainRate;
8478 : }
8479 :
8480 : // For HybridModel
8481 16432 : Real64 SumAllInternalConvectionGainsExceptPeople(EnergyPlusData &state, int const ZoneNum)
8482 : {
8483 : // Return value
8484 16432 : Real64 SumConvGainRateExceptPeople(0.0);
8485 :
8486 32864 : std::string str_people = "PEOPLE";
8487 :
8488 32864 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8489 16432 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8490 0 : continue;
8491 : }
8492 :
8493 32864 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8494 16432 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompObjectType != str_people) {
8495 0 : SumConvGainRateExceptPeople += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ConvectGainRate;
8496 : }
8497 : }
8498 : }
8499 :
8500 32864 : return SumConvGainRateExceptPeople;
8501 : }
8502 :
8503 38464914 : Real64 SumInternalConvectionGainsByTypes(
8504 : EnergyPlusData &state,
8505 : int const ZoneNum, // zone index pointer for which zone to sum gains for
8506 : gsl::span<const DataHeatBalance::IntGainType> GainTypeARR, // variable length 1-d array of enum valued gain types
8507 : int const spaceIndex) // space index pointer, sum gains only for this space
8508 : {
8509 :
8510 : // SUBROUTINE INFORMATION:
8511 : // AUTHOR B. Griffith
8512 : // DATE WRITTEN Nov. 2011cl
8513 :
8514 : // PURPOSE OF THIS SUBROUTINE:
8515 : // worker routine for summing a subset of the internal gain types
8516 :
8517 : // Return value
8518 38464914 : Real64 SumConvGainRate = 0.0;
8519 :
8520 38464914 : int NumberOfTypes = GainTypeARR.size();
8521 :
8522 : // TODO MJW: This could be refactored to avoid duplicate code, but for now . . . .
8523 38464914 : if (spaceIndex > 0) {
8524 69849401 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceIndex).numberOfDevices; ++DeviceNum) {
8525 462479940 : for (int TypeNum = 0; TypeNum < NumberOfTypes; ++TypeNum) {
8526 411093280 : if (state.dataHeatBal->spaceIntGainDevices(spaceIndex).device(DeviceNum).CompType == GainTypeARR[TypeNum]) {
8527 48428209 : SumConvGainRate += state.dataHeatBal->spaceIntGainDevices(spaceIndex).device(DeviceNum).ConvectGainRate;
8528 : }
8529 : }
8530 : }
8531 : } else {
8532 40063722 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8533 20061549 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8534 2282414 : continue;
8535 : }
8536 73425469 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8537 496932398 : for (int TypeNum = 0; TypeNum < NumberOfTypes; ++TypeNum) {
8538 441286064 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompType == GainTypeARR[TypeNum]) {
8539 49059546 : SumConvGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ConvectGainRate;
8540 : }
8541 : }
8542 : }
8543 : }
8544 : }
8545 :
8546 38464914 : return SumConvGainRate;
8547 : }
8548 :
8549 56018484 : Real64 zoneSumAllReturnAirConvectionGains(EnergyPlusData &state,
8550 : int const zoneNum, // zone index pointer to sum gains for
8551 : int const returnNodeNum // return air node number
8552 : )
8553 : {
8554 56018484 : Real64 zoneSumReturnAirGainRate = 0.0;
8555 112068608 : for (int spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) {
8556 56050124 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) continue;
8557 55145159 : zoneSumReturnAirGainRate += InternalHeatGains::spaceSumAllReturnAirConvectionGains(state, spaceNum, returnNodeNum);
8558 : }
8559 :
8560 56018484 : return zoneSumReturnAirGainRate;
8561 : }
8562 :
8563 55145159 : Real64 spaceSumAllReturnAirConvectionGains(EnergyPlusData &state,
8564 : int const spaceNum, // space index pointer to sum gains for
8565 : int const returnNodeNum // return air node number
8566 : )
8567 : {
8568 :
8569 : // SUBROUTINE INFORMATION:
8570 : // AUTHOR B. Griffith
8571 : // DATE WRITTEN Dec. 2011
8572 :
8573 : // PURPOSE OF THIS SUBROUTINE:
8574 : // worker routine for summing all the internal gain types
8575 :
8576 55145159 : Real64 spaceSumReturnAirGainRate = 0.0;
8577 :
8578 231544425 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8579 : // If ReturnNodeNum is zero, sum for entire zone, otherwise sum only for specified ReturnNodeNum
8580 176399266 : if ((returnNodeNum == 0) || (returnNodeNum == state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ReturnAirNodeNum)) {
8581 73717896 : spaceSumReturnAirGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ReturnAirConvGainRate;
8582 : }
8583 : }
8584 :
8585 55145159 : return spaceSumReturnAirGainRate;
8586 : }
8587 :
8588 372600 : Real64 SumReturnAirConvectionGainsByTypes(
8589 : EnergyPlusData &state,
8590 : int const ZoneNum, // zone index pointer for which zone to sum gains for
8591 : gsl::span<const DataHeatBalance::IntGainType> GainTypeARR // variable length 1-d array of integer valued gain types
8592 : )
8593 : {
8594 :
8595 : // SUBROUTINE INFORMATION:
8596 : // AUTHOR B. Griffith
8597 : // DATE WRITTEN Nov. 2011
8598 :
8599 : // PURPOSE OF THIS SUBROUTINE:
8600 : // worker routine for summing a subset of the internal gain types
8601 :
8602 : // Return value
8603 372600 : Real64 SumReturnAirGainRate(0.0);
8604 :
8605 372600 : int NumberOfTypes = GainTypeARR.size();
8606 :
8607 756000 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8608 383400 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8609 62100 : continue;
8610 : }
8611 :
8612 1320300 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8613 6493500 : for (int TypeNum = 0; TypeNum < NumberOfTypes; ++TypeNum) {
8614 :
8615 5494500 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompType == GainTypeARR[TypeNum]) {
8616 160650 : SumReturnAirGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ReturnAirConvGainRate;
8617 : }
8618 : }
8619 : }
8620 : }
8621 :
8622 372600 : return SumReturnAirGainRate;
8623 : }
8624 :
8625 18462741 : Real64 SumAllSpaceInternalRadiationGains(EnergyPlusData &state,
8626 : int const spaceNum // space index pointer for which space to sum gains for
8627 : )
8628 : {
8629 :
8630 : // SUBROUTINE INFORMATION:
8631 : // AUTHOR B. Griffith
8632 : // DATE WRITTEN Nov. 2011
8633 :
8634 : // PURPOSE OF THIS SUBROUTINE:
8635 : // worker routine for summing all the internal gain types
8636 :
8637 : // Return value
8638 18462741 : Real64 sumRadGainRate(0.0);
8639 :
8640 18462741 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8641 2034014 : sumRadGainRate = 0.0;
8642 2034014 : return sumRadGainRate;
8643 : }
8644 :
8645 67815387 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8646 51386660 : sumRadGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).RadiantGainRate;
8647 : }
8648 :
8649 16428727 : return sumRadGainRate;
8650 : }
8651 :
8652 : Real64
8653 37840806 : SumInternalRadiationGainsByTypes(EnergyPlusData &state,
8654 : int const ZoneNum, // zone index pointer for which zone to sum gains for
8655 : gsl::span<const DataHeatBalance::IntGainType> GainTypeARR, // variable length 1-d array of enum valued gain types
8656 : int const spaceIndex) // space index pointer, sum gains only for this space
8657 : {
8658 :
8659 : // SUBROUTINE INFORMATION:
8660 : // AUTHOR B. Griffith
8661 : // DATE WRITTEN Dec. 2011
8662 :
8663 : // PURPOSE OF THIS SUBROUTINE:
8664 : // worker routine for summing a subset of the internal gain types
8665 :
8666 : // Return value
8667 37840806 : Real64 SumRadiationGainRate(0.0);
8668 :
8669 37840806 : int NumberOfTypes = GainTypeARR.size();
8670 :
8671 : // TODO MJW: This could be refactored to avoid duplicate code, but for now . . . .
8672 37840806 : if (spaceIndex > 0) {
8673 69849401 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceIndex).numberOfDevices; ++DeviceNum) {
8674 462479940 : for (int TypeNum = 0; TypeNum < NumberOfTypes; ++TypeNum) {
8675 411093280 : if (state.dataHeatBal->spaceIntGainDevices(spaceIndex).device(DeviceNum).CompType == GainTypeARR[TypeNum]) {
8676 48428209 : SumRadiationGainRate += state.dataHeatBal->spaceIntGainDevices(spaceIndex).device(DeviceNum).RadiantGainRate;
8677 : }
8678 : }
8679 : }
8680 : } else {
8681 38799306 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8682 19421241 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8683 2189264 : continue;
8684 : }
8685 71116137 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8686 483958440 : for (int TypeNum = 0; TypeNum < NumberOfTypes; ++TypeNum) {
8687 430074280 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompType == GainTypeARR[TypeNum]) {
8688 48927709 : SumRadiationGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).RadiantGainRate;
8689 : }
8690 : }
8691 : }
8692 : }
8693 : }
8694 :
8695 37840806 : return SumRadiationGainRate;
8696 : }
8697 :
8698 46374656 : Real64 SumAllInternalLatentGains(EnergyPlusData &state,
8699 : int const ZoneNum // zone index pointer for which zone to sum gains for
8700 : )
8701 : {
8702 :
8703 : // SUBROUTINE INFORMATION:
8704 : // AUTHOR B. Griffith
8705 : // DATE WRITTEN Nov. 2011
8706 :
8707 : // PURPOSE OF THIS SUBROUTINE:
8708 : // worker routine for summing all the internal gain types
8709 :
8710 : // Return value
8711 46374656 : Real64 SumLatentGainRate(0.0);
8712 :
8713 92786484 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8714 46411828 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8715 5356701 : continue;
8716 : }
8717 :
8718 168481858 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8719 127426731 : SumLatentGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).LatentGainRate;
8720 : }
8721 41055127 : state.dataZoneTempPredictorCorrector->spaceHeatBalance(spaceNum).ZoneLatentGain = SumLatentGainRate;
8722 : }
8723 :
8724 46374656 : return SumLatentGainRate;
8725 : }
8726 :
8727 : // Added for hybrid model -- calculate the latent gain from all sources except for people
8728 16312 : Real64 SumAllInternalLatentGainsExceptPeople(EnergyPlusData &state,
8729 : int const ZoneNum // zone index pointer for which zone to sum gains for
8730 : )
8731 : {
8732 : // Return value
8733 16312 : Real64 SumLatentGainRateExceptPeople(0.0);
8734 :
8735 32624 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8736 16312 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8737 0 : continue;
8738 : }
8739 :
8740 32624 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8741 16312 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompType != DataHeatBalance::IntGainType::People) {
8742 0 : SumLatentGainRateExceptPeople += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).LatentGainRate;
8743 : }
8744 : }
8745 16312 : state.dataZoneTempPredictorCorrector->spaceHeatBalance(spaceNum).ZoneLatentGainExceptPeople = SumLatentGainRateExceptPeople;
8746 : }
8747 :
8748 16312 : return SumLatentGainRateExceptPeople;
8749 : }
8750 :
8751 : Real64
8752 37654506 : SumInternalLatentGainsByTypes(EnergyPlusData &state,
8753 : int const ZoneNum, // zone index pointer for which zone to sum gains for
8754 : gsl::span<const DataHeatBalance::IntGainType> GainTypeARR, // variable length 1-d array of enum valued gain types
8755 : int const spaceIndex) // space index pointer, sum gains only for this space
8756 : {
8757 : // SUBROUTINE INFORMATION:
8758 : // AUTHOR B. Griffith
8759 : // DATE WRITTEN Dec. 2011
8760 :
8761 : // PURPOSE OF THIS SUBROUTINE:
8762 : // worker routine for summing a subset of the internal gain types
8763 :
8764 : // Return value
8765 37654506 : Real64 SumLatentGainRate(0.0);
8766 :
8767 37654506 : int NumberOfTypes = GainTypeARR.size();
8768 :
8769 : // TODO MJW: This could be refactored to avoid duplicate code, but for now . . . .
8770 37654506 : if (spaceIndex > 0) {
8771 69849401 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceIndex).numberOfDevices; ++DeviceNum) {
8772 462479940 : for (int TypeNum = 0; TypeNum < NumberOfTypes; ++TypeNum) {
8773 411093280 : if (state.dataHeatBal->spaceIntGainDevices(spaceIndex).device(DeviceNum).CompType == GainTypeARR[TypeNum]) {
8774 48428209 : SumLatentGainRate += state.dataHeatBal->spaceIntGainDevices(spaceIndex).device(DeviceNum).LatentGainRate;
8775 : }
8776 : }
8777 : }
8778 : } else {
8779 38421306 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8780 19229541 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8781 2158214 : continue;
8782 : }
8783 70455987 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8784 474467940 : for (int TypeNum = 0; TypeNum < NumberOfTypes; ++TypeNum) {
8785 421083280 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompType == GainTypeARR[TypeNum]) {
8786 48767059 : SumLatentGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).LatentGainRate;
8787 : }
8788 : }
8789 : }
8790 : }
8791 : }
8792 :
8793 37654506 : return SumLatentGainRate;
8794 : }
8795 :
8796 46863198 : Real64 SumAllReturnAirLatentGains(EnergyPlusData &state,
8797 : int const ZoneNum, // zone index pointer for which zone to sum gains for
8798 : int const ReturnNodeNum // return air node number
8799 : )
8800 : {
8801 :
8802 : // SUBROUTINE INFORMATION:
8803 : // AUTHOR B. Griffith
8804 : // DATE WRITTEN Nov. 2011
8805 :
8806 : // PURPOSE OF THIS SUBROUTINE:
8807 : // worker routine for summing all the internal gain types
8808 :
8809 46863198 : Real64 SumRetAirLatentGainRate(0.0);
8810 :
8811 93758036 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8812 46894838 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8813 412770 : continue;
8814 : }
8815 :
8816 195896688 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8817 : // If ReturnNodeNum is zero, sum for entire zone, otherwise sum only for specified ReturnNodeNum
8818 149414620 : if ((ReturnNodeNum == 0) || (ReturnNodeNum == state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ReturnAirNodeNum)) {
8819 46733952 : SumRetAirLatentGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ReturnAirLatentGainRate;
8820 : }
8821 : }
8822 : }
8823 :
8824 46863198 : return SumRetAirLatentGainRate;
8825 : }
8826 :
8827 138756 : Real64 SumAllInternalCO2Gains(EnergyPlusData &state,
8828 : int const ZoneNum // zone index pointer for which zone to sum gains for
8829 : )
8830 : {
8831 :
8832 : // SUBROUTINE INFORMATION:
8833 : // AUTHOR B. Griffith
8834 : // DATE WRITTEN Dec. 2011
8835 :
8836 : // PURPOSE OF THIS SUBROUTINE:
8837 : // worker routine for summing all the internal gain types
8838 :
8839 : // Return value
8840 138756 : Real64 SumCO2GainRate(0.0);
8841 :
8842 277512 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8843 138756 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8844 7440 : continue;
8845 : }
8846 :
8847 529353 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8848 398037 : SumCO2GainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CarbonDioxideGainRate;
8849 : }
8850 : }
8851 :
8852 138756 : return SumCO2GainRate;
8853 : }
8854 :
8855 : // Added for hybrid model -- function for calculating CO2 gains except people
8856 8100 : Real64 SumAllInternalCO2GainsExceptPeople(EnergyPlusData &state,
8857 : int const ZoneNum // zone index pointer for which zone to sum gains for
8858 : )
8859 : {
8860 : // Return value
8861 8100 : Real64 SumCO2GainRateExceptPeople(0.0);
8862 :
8863 16200 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8864 8100 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8865 0 : continue;
8866 : }
8867 :
8868 16200 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8869 8100 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompType != DataHeatBalance::IntGainType::People) {
8870 0 : SumCO2GainRateExceptPeople += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CarbonDioxideGainRate;
8871 : }
8872 : }
8873 : }
8874 :
8875 8100 : return SumCO2GainRateExceptPeople;
8876 : }
8877 :
8878 : Real64
8879 138756 : SumInternalCO2GainsByTypes(EnergyPlusData &state,
8880 : int const ZoneNum, // zone index pointer for which zone to sum gains for
8881 : gsl::span<const DataHeatBalance::IntGainType> GainTypeARR // variable length 1-d array of integer valued gain types
8882 : )
8883 : {
8884 :
8885 : // SUBROUTINE INFORMATION:
8886 : // AUTHOR B. Griffith
8887 : // DATE WRITTEN Dec. 2011
8888 :
8889 : // PURPOSE OF THIS SUBROUTINE:
8890 : // worker routine for summing a subset of the internal gain types
8891 :
8892 : // Return value
8893 138756 : Real64 SumCO2GainRate(0.0);
8894 :
8895 138756 : int NumberOfTypes = GainTypeARR.size();
8896 :
8897 277512 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8898 138756 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8899 7440 : continue;
8900 : }
8901 :
8902 529353 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8903 796074 : for (int TypeNum = 0; TypeNum < NumberOfTypes; ++TypeNum) {
8904 :
8905 398037 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompType == GainTypeARR[TypeNum]) {
8906 138444 : SumCO2GainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CarbonDioxideGainRate;
8907 : }
8908 : }
8909 : }
8910 : }
8911 :
8912 138756 : return SumCO2GainRate;
8913 : }
8914 :
8915 322745 : Real64 SumAllInternalGenericContamGains(EnergyPlusData &state,
8916 : int const ZoneNum // zone index pointer for which zone to sum gains for
8917 : )
8918 : {
8919 :
8920 : // SUBROUTINE INFORMATION:
8921 : // AUTHOR L. Gu
8922 : // DATE WRITTEN Feb. 2012
8923 :
8924 : // PURPOSE OF THIS SUBROUTINE:
8925 : // worker routine for summing all the internal gain types based on the existing subrotine SumAllInternalCO2Gains
8926 :
8927 : // Return value
8928 322745 : Real64 SumGCGainRate(0.0);
8929 :
8930 645490 : for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
8931 322745 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
8932 5047 : continue;
8933 : }
8934 :
8935 1335719 : for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
8936 1018021 : SumGCGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).GenericContamGainRate;
8937 : }
8938 : }
8939 :
8940 322745 : return SumGCGainRate;
8941 : }
8942 :
8943 783283 : void GatherComponentLoadsIntGain(EnergyPlusData &state)
8944 : {
8945 : // SUBROUTINE INFORMATION:
8946 : // AUTHOR Jason Glazer
8947 : // DATE WRITTEN September 2012
8948 : // MODIFIED na
8949 : // RE-ENGINEERED na
8950 :
8951 : // PURPOSE OF THIS SUBROUTINE:
8952 : // Gather values during sizing used for loads component report.
8953 :
8954 : // METHODOLOGY EMPLOYED:
8955 : // Save sequence of values for report during sizing.
8956 :
8957 : // Using/Aliasing
8958 : using namespace DataHeatBalance;
8959 :
8960 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
8961 : static constexpr std::array<DataHeatBalance::IntGainType, 1> IntGainTypesPeople = {DataHeatBalance::IntGainType::People};
8962 : static constexpr std::array<DataHeatBalance::IntGainType, 1> IntGainTypesLight = {DataHeatBalance::IntGainType::Lights};
8963 : static constexpr std::array<DataHeatBalance::IntGainType, 6> IntGainTypesEquip = {DataHeatBalance::IntGainType::ElectricEquipment,
8964 : DataHeatBalance::IntGainType::ElectricEquipmentITEAirCooled,
8965 : DataHeatBalance::IntGainType::GasEquipment,
8966 : DataHeatBalance::IntGainType::HotWaterEquipment,
8967 : DataHeatBalance::IntGainType::SteamEquipment,
8968 : DataHeatBalance::IntGainType::OtherEquipment};
8969 : static constexpr std::array<DataHeatBalance::IntGainType, 10> IntGainTypesRefrig = {
8970 : DataHeatBalance::IntGainType::RefrigerationCase,
8971 : DataHeatBalance::IntGainType::RefrigerationCompressorRack,
8972 : DataHeatBalance::IntGainType::RefrigerationSystemAirCooledCondenser,
8973 : DataHeatBalance::IntGainType::RefrigerationSystemSuctionPipe,
8974 : DataHeatBalance::IntGainType::RefrigerationSecondaryReceiver,
8975 : DataHeatBalance::IntGainType::RefrigerationSecondaryPipe,
8976 : DataHeatBalance::IntGainType::RefrigerationWalkIn,
8977 : DataHeatBalance::IntGainType::RefrigerationTransSysAirCooledGasCooler,
8978 : DataHeatBalance::IntGainType::RefrigerationTransSysSuctionPipeMT,
8979 : DataHeatBalance::IntGainType::RefrigerationTransSysSuctionPipeLT};
8980 : static constexpr std::array<DataHeatBalance::IntGainType, 3> IntGainTypesWaterUse = {DataHeatBalance::IntGainType::WaterUseEquipment,
8981 : DataHeatBalance::IntGainType::WaterHeaterMixed,
8982 : DataHeatBalance::IntGainType::WaterHeaterStratified};
8983 : static constexpr std::array<DataHeatBalance::IntGainType, 20> IntGainTypesHvacLoss = {
8984 : DataHeatBalance::IntGainType::ZoneBaseboardOutdoorTemperatureControlled,
8985 : DataHeatBalance::IntGainType::ThermalStorageChilledWaterMixed,
8986 : DataHeatBalance::IntGainType::ThermalStorageChilledWaterStratified,
8987 : DataHeatBalance::IntGainType::PipeIndoor,
8988 : DataHeatBalance::IntGainType::Pump_VarSpeed,
8989 : DataHeatBalance::IntGainType::Pump_ConSpeed,
8990 : DataHeatBalance::IntGainType::Pump_Cond,
8991 : DataHeatBalance::IntGainType::PumpBank_VarSpeed,
8992 : DataHeatBalance::IntGainType::PumpBank_ConSpeed,
8993 : DataHeatBalance::IntGainType::PlantComponentUserDefined,
8994 : DataHeatBalance::IntGainType::CoilUserDefined,
8995 : DataHeatBalance::IntGainType::ZoneHVACForcedAirUserDefined,
8996 : DataHeatBalance::IntGainType::AirTerminalUserDefined,
8997 : DataHeatBalance::IntGainType::PackagedTESCoilTank,
8998 : DataHeatBalance::IntGainType::FanSystemModel,
8999 : DataHeatBalance::IntGainType::SecCoolingDXCoilSingleSpeed,
9000 : DataHeatBalance::IntGainType::SecHeatingDXCoilSingleSpeed,
9001 : DataHeatBalance::IntGainType::SecCoolingDXCoilTwoSpeed,
9002 : DataHeatBalance::IntGainType::SecCoolingDXCoilMultiSpeed,
9003 : DataHeatBalance::IntGainType::SecHeatingDXCoilMultiSpeed};
9004 : static constexpr std::array<DataHeatBalance::IntGainType, 10> IntGainTypesPowerGen = {
9005 : DataHeatBalance::IntGainType::GeneratorFuelCell,
9006 : DataHeatBalance::IntGainType::GeneratorMicroCHP,
9007 : DataHeatBalance::IntGainType::ElectricLoadCenterTransformer,
9008 : DataHeatBalance::IntGainType::ElectricLoadCenterInverterSimple,
9009 : DataHeatBalance::IntGainType::ElectricLoadCenterInverterFunctionOfPower,
9010 : DataHeatBalance::IntGainType::ElectricLoadCenterInverterLookUpTable,
9011 : DataHeatBalance::IntGainType::ElectricLoadCenterStorageLiIonNmcBattery,
9012 : DataHeatBalance::IntGainType::ElectricLoadCenterStorageBattery,
9013 : DataHeatBalance::IntGainType::ElectricLoadCenterStorageSimple,
9014 : DataHeatBalance::IntGainType::ElectricLoadCenterConverter};
9015 :
9016 783283 : if (state.dataGlobal->CompLoadReportIsReq && !state.dataGlobal->isPulseZoneSizing) {
9017 31050 : int TimeStepInDay = (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
9018 217350 : for (int iZone = 1; iZone <= state.dataGlobal->NumOfZones; ++iZone) {
9019 186300 : state.dataOutRptTab->peopleInstantSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9020 372600 : SumInternalConvectionGainsByTypes(state, iZone, IntGainTypesPeople);
9021 186300 : state.dataOutRptTab->peopleLatentSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9022 372600 : SumInternalLatentGainsByTypes(state, iZone, IntGainTypesPeople);
9023 186300 : state.dataOutRptTab->peopleRadSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9024 372600 : SumInternalRadiationGainsByTypes(state, iZone, IntGainTypesPeople);
9025 :
9026 186300 : state.dataOutRptTab->lightInstantSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9027 372600 : SumInternalConvectionGainsByTypes(state, iZone, IntGainTypesLight);
9028 186300 : state.dataOutRptTab->lightRetAirSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9029 372600 : SumReturnAirConvectionGainsByTypes(state, iZone, IntGainTypesLight);
9030 186300 : state.dataOutRptTab->lightLWRadSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9031 372600 : SumInternalRadiationGainsByTypes(state, iZone, IntGainTypesLight);
9032 :
9033 186300 : state.dataOutRptTab->equipInstantSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9034 372600 : SumInternalConvectionGainsByTypes(state, iZone, IntGainTypesEquip);
9035 186300 : state.dataOutRptTab->equipLatentSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9036 372600 : SumInternalLatentGainsByTypes(state, iZone, IntGainTypesEquip);
9037 186300 : state.dataOutRptTab->equipRadSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9038 372600 : SumInternalRadiationGainsByTypes(state, iZone, IntGainTypesEquip);
9039 :
9040 186300 : state.dataOutRptTab->refrigInstantSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9041 372600 : SumInternalConvectionGainsByTypes(state, iZone, IntGainTypesRefrig);
9042 186300 : state.dataOutRptTab->refrigRetAirSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9043 372600 : SumReturnAirConvectionGainsByTypes(state, iZone, IntGainTypesRefrig);
9044 186300 : state.dataOutRptTab->refrigLatentSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9045 372600 : SumInternalLatentGainsByTypes(state, iZone, IntGainTypesRefrig);
9046 :
9047 186300 : state.dataOutRptTab->waterUseInstantSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9048 372600 : SumInternalConvectionGainsByTypes(state, iZone, IntGainTypesWaterUse);
9049 186300 : state.dataOutRptTab->waterUseLatentSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9050 372600 : SumInternalLatentGainsByTypes(state, iZone, IntGainTypesWaterUse);
9051 :
9052 186300 : state.dataOutRptTab->hvacLossInstantSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9053 372600 : SumInternalConvectionGainsByTypes(state, iZone, IntGainTypesHvacLoss);
9054 186300 : state.dataOutRptTab->hvacLossRadSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9055 372600 : SumInternalRadiationGainsByTypes(state, iZone, IntGainTypesHvacLoss);
9056 :
9057 186300 : state.dataOutRptTab->powerGenInstantSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9058 372600 : SumInternalConvectionGainsByTypes(state, iZone, IntGainTypesPowerGen);
9059 186300 : state.dataOutRptTab->powerGenRadSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, iZone) =
9060 372600 : SumInternalRadiationGainsByTypes(state, iZone, IntGainTypesPowerGen);
9061 : }
9062 : }
9063 783283 : }
9064 :
9065 18 : int GetInternalGainDeviceIndex(EnergyPlusData &state,
9066 : int const spaceNum, // space index pointer for which space to sum gains for
9067 : DataHeatBalance::IntGainType const intGainType, // space internal gain type enum
9068 : std::string_view const intGainName) // Internal gain name
9069 : {
9070 :
9071 : // SUBROUTINE INFORMATION:
9072 : // AUTHOR B. Griffith
9073 : // DATE WRITTEN June 2012
9074 :
9075 : // PURPOSE OF THIS SUBROUTINE:
9076 : // utility to retrieve index pointer to a specific internal gain
9077 : // the subroutine returns the index of matched internal gain device or -1 if no match found.
9078 :
9079 : int DeviceNum;
9080 : int DeviceIndex;
9081 18 : if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) {
9082 0 : DeviceIndex = -1;
9083 0 : return DeviceIndex;
9084 : }
9085 36 : for (DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) {
9086 72 : if ((UtilityRoutines::SameString(state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompObjectName,
9087 54 : intGainName.data())) &&
9088 18 : (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompType == intGainType)) {
9089 18 : DeviceIndex = DeviceNum;
9090 18 : break;
9091 : } else {
9092 18 : DeviceIndex = -1;
9093 : }
9094 : }
9095 18 : return DeviceIndex;
9096 : }
9097 :
9098 53823 : Real64 SumInternalConvectionGainsByIndices(
9099 : EnergyPlusData &state,
9100 : int const numGains, // number of device gains to sum
9101 : const Array1D_int &deviceSpaceARR, // variable length 1-d array of integer space index pointers to include in summation
9102 : const Array1D_int &deviceIndexARR, // variable length 1-d array of integer device index pointers to include in summation
9103 : const Array1D<Real64> &fractionARR // array of fractional multipliers to apply to devices
9104 : )
9105 : {
9106 :
9107 : // SUBROUTINE INFORMATION:
9108 : // AUTHOR B. Griffith
9109 : // DATE WRITTEN June 2012
9110 :
9111 : // PURPOSE OF THIS SUBROUTINE:
9112 : // worker routine for summing a subset of the internal gains by index
9113 :
9114 : // Return value
9115 53823 : Real64 sumConvGainRate(0.0);
9116 :
9117 53823 : assert(numGains <= isize(deviceSpaceARR));
9118 53823 : assert(numGains <= isize(deviceIndexARR));
9119 53823 : assert(numGains <= isize(fractionARR));
9120 :
9121 215292 : for (int loop = 1; loop <= numGains; ++loop) {
9122 161469 : int spaceNum = deviceSpaceARR(loop);
9123 161469 : int deviceNum = deviceIndexARR(loop);
9124 161469 : Real64 deviceFraction = fractionARR(loop);
9125 161469 : sumConvGainRate += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(deviceNum).ConvectGainRate * deviceFraction;
9126 : }
9127 53823 : return sumConvGainRate;
9128 : }
9129 :
9130 53823 : Real64 SumInternalLatentGainsByIndices(
9131 : EnergyPlusData &state,
9132 : int const numGains, // number of device gains to sum
9133 : const Array1D_int &deviceSpaceARR, // variable length 1-d array of integer space index pointers to include in summation
9134 : const Array1D_int &deviceIndexARR, // variable length 1-d array of integer device index pointers to include in summation
9135 : const Array1D<Real64> &fractionARR // array of fractional multipliers to apply to devices
9136 : )
9137 : {
9138 :
9139 : // SUBROUTINE INFORMATION:
9140 : // AUTHOR B. Griffith
9141 : // DATE WRITTEN June 2012
9142 :
9143 : // PURPOSE OF THIS SUBROUTINE:
9144 : // worker routine for summing a subset of the internal gains by index
9145 :
9146 : // Return value
9147 53823 : Real64 sumLatentGainRate(0.0);
9148 :
9149 53823 : assert(numGains <= isize(deviceSpaceARR));
9150 53823 : assert(numGains <= isize(deviceIndexARR));
9151 53823 : assert(numGains <= isize(fractionARR));
9152 :
9153 215292 : for (int loop = 1; loop <= numGains; ++loop) {
9154 161469 : int spaceNum = deviceSpaceARR(loop);
9155 161469 : int deviceNum = deviceIndexARR(loop);
9156 161469 : Real64 deviceFraction = fractionARR(loop);
9157 161469 : sumLatentGainRate =
9158 161469 : sumLatentGainRate + state.dataHeatBal->spaceIntGainDevices(spaceNum).device(deviceNum).LatentGainRate * deviceFraction;
9159 : }
9160 53823 : return sumLatentGainRate;
9161 : }
9162 :
9163 27433 : Real64 SumReturnAirConvectionGainsByIndices(
9164 : EnergyPlusData &state,
9165 : int const numGains, // number of device gains to sum
9166 : const Array1D_int &deviceSpaceARR, // variable length 1-d array of integer space index pointers to include in summation
9167 : const Array1D_int &deviceIndexARR, // variable length 1-d array of integer device index pointers to include in summation
9168 : const Array1D<Real64> &fractionARR // array of fractional multipliers to apply to devices
9169 : )
9170 : {
9171 :
9172 : // SUBROUTINE INFORMATION:
9173 : // AUTHOR B. Griffith
9174 : // DATE WRITTEN June 2012
9175 :
9176 : // PURPOSE OF THIS SUBROUTINE:
9177 : // worker routine for summing a subset of the internal gains by index
9178 :
9179 : // Return value
9180 27433 : Real64 sumReturnAirGainRate(0.0);
9181 :
9182 27433 : assert(numGains <= isize(deviceSpaceARR));
9183 27433 : assert(numGains <= isize(deviceIndexARR));
9184 27433 : assert(numGains <= isize(fractionARR));
9185 :
9186 109732 : for (int loop = 1; loop <= numGains; ++loop) {
9187 82299 : int spaceNum = deviceSpaceARR(loop);
9188 82299 : int deviceNum = deviceIndexARR(loop);
9189 82299 : Real64 deviceFraction = fractionARR(loop);
9190 82299 : sumReturnAirGainRate =
9191 82299 : sumReturnAirGainRate + state.dataHeatBal->spaceIntGainDevices(spaceNum).device(deviceNum).ReturnAirConvGainRate * deviceFraction;
9192 : }
9193 27433 : return sumReturnAirGainRate;
9194 : }
9195 :
9196 : } // namespace InternalHeatGains
9197 :
9198 2313 : } // namespace EnergyPlus
|