-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeatBalanceSurfaceManager.cc
6131 lines (5189 loc) · 305 KB
/
HeatBalanceSurfaceManager.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// C++ Headers
#include <cassert>
#include <cmath>
// ObjexxFCL Headers
#include <ObjexxFCL/FArray.functions.hh>
#include <ObjexxFCL/FArray1D.hh>
#include <ObjexxFCL/FArray2D.hh>
#include <ObjexxFCL/Fmath.hh>
#include <ObjexxFCL/gio.hh>
#include <ObjexxFCL/MArray.functions.hh>
#include <ObjexxFCL/string.functions.hh>
// EnergyPlus Headers
#include <HeatBalanceSurfaceManager.hh>
#include <ConvectionCoefficients.hh>
#include <DataAirflowNetwork.hh>
#include <DataDaylighting.hh>
#include <DataDaylightingDevices.hh>
#include <DataDElight.hh>
#include <DataEnvironment.hh>
#include <DataGlobals.hh>
#include <DataHeatBalance.hh>
#include <DataHeatBalFanSys.hh>
#include <DataHeatBalSurface.hh>
#include <DataLoopNode.hh>
#include <DataMoistureBalance.hh>
#include <DataMoistureBalanceEMPD.hh>
#include <DataPrecisionGlobals.hh>
#include <DataRoomAirModel.hh>
#include <DataRuntimeLanguage.hh>
#include <DataSizing.hh>
#include <DataSurfaces.hh>
#include <DataSystemVariables.hh>
#include <DataTimings.hh>
#include <DataWindowEquivalentLayer.hh>
#include <DataZoneEquipment.hh>
#include <DaylightingDevices.hh>
#include <DaylightingManager.hh>
#include <DElightManagerF.hh>
#include <DisplayRoutines.hh>
#include <EcoRoofManager.hh>
#include <ElectricBaseboardRadiator.hh>
#include <General.hh>
#include <GeneralRoutines.hh>
#include <HeatBalanceAirManager.hh>
#include <HeatBalanceHAMTManager.hh>
#include <HeatBalanceIntRadExchange.hh>
#include <HeatBalanceMovableInsulation.hh>
#include <HeatBalanceSurfaceManager.hh>
#include <HeatBalFiniteDiffManager.hh>
#include <HighTempRadiantSystem.hh>
#include <HWBaseboardRadiator.hh>
#include <InputProcessor.hh>
#include <InternalHeatGains.hh>
#include <LowTempRadiantSystem.hh>
#include <MoistureBalanceEMPDManager.hh>
#include <OutputProcessor.hh>
#include <OutputReportPredefined.hh>
#include <OutputReportTabular.hh>
#include <Psychrometrics.hh>
#include <ScheduleManager.hh>
#include <SolarShading.hh>
#include <SteamBaseboardRadiator.hh>
#include <ThermalComfort.hh>
#include <UtilityRoutines.hh>
#include <WindowEquivalentLayer.hh>
#include <WindowManager.hh>
namespace EnergyPlus {
namespace HeatBalanceSurfaceManager {
// Module containing the routines dealing with the Heat Balance of the surfaces
// MODULE INFORMATION:
// AUTHOR
// DATE WRITTEN
// MODIFIED DJS (PSU Dec 2006) to add ecoroof
// RE-ENGINEERED na
// MODIFIED Jainam Shah (December 2014) to add 'GreenRoof_with_PlantCoverage'
// RE-ENGINEERED na
// PURPOSE OF THIS MODULE:
// To encapsulate the data and algorithms required to
// manage the simluation of the surface heat balance for the building.
// METHODOLOGY EMPLOYED:
// na
// REFERENCES:
// The heat balance method is outlined in the "TARP Reference Manual", NIST, NBSIR 83-2655, Feb 1983.
// The methods are also summarized in many BSO Theses and papers.
// OTHER NOTES:
// This module was created from IBLAST subroutines
// USE STATEMENTS:
// Use statements for data only modules
// Using/Aliasing
using namespace DataPrecisionGlobals;
using namespace DataGlobals;
using namespace DataEnvironment;
using namespace DataHeatBalFanSys;
using namespace DataHeatBalance;
using namespace DataHeatBalSurface;
using namespace DataSurfaces;
using DataMoistureBalance::TempOutsideAirFD;
using DataMoistureBalance::RhoVaporAirOut;
using DataMoistureBalance::RhoVaporAirIn;
using DataMoistureBalance::HConvExtFD;
using DataMoistureBalance::HMassConvExtFD;
using DataMoistureBalance::HConvInFD;
using DataMoistureBalance::HMassConvInFD;
using DataMoistureBalance::RhoVaporSurfIn;
using DataMoistureBalance::HSkyFD;
using DataMoistureBalance::HGrndFD;
using DataMoistureBalance::HAirFD;
//unused0909USE DataMoistureBalanceEMPD, ONLY: MoistEMPDNew, MoistEMPDFlux
// Use statements for access to subroutines in other modules
using namespace InputProcessor;
using namespace ScheduleManager;
using namespace SolarShading;
using namespace DaylightingManager;
// Data
// MODULE PARAMETER DEFINITIONS:
static std::string const BlankString;
// DERIVED TYPE DEFINITIONS:
// na
// MODULE VARIABLE DECLARATIONS:
// na
// Subroutine Specifications for the Heat Balance Module
// Driver Routines
// Initialization routines for module
// Algorithms for the module
// These are now external subroutines
//PUBLIC CalcHeatBalanceOutsideSurf ! The heat balance routines are now public because the
//PUBLIC CalcHeatBalanceInsideSurf ! radiant systems need access to them in order to simulate
// Record Keeping/Utility Routines for Module
// Reporting routines for module
// MODULE SUBROUTINES:
//*************************************************************************
// Functions
void
ManageSurfaceHeatBalance()
{
// SUBROUTINE INFORMATION:
// AUTHOR Richard Liesen
// DATE WRITTEN January 1998
// MODIFIED na
// RE-ENGINEERED na
// PURPOSE OF THIS SUBROUTINE:
// This subroutine manages the heat surface balance method of calculating
// building thermal loads. It is called from the HeatBalanceManager
// at the time step level. This driver manages the calls to all of
// the other drivers and simulation algorithms.
// METHODOLOGY EMPLOYED:
// na
// REFERENCES:
// na
// Using/Aliasing
using HeatBalanceAirManager::ManageAirHeatBalance;
using ThermalComfort::ManageThermalComfort;
using OutputReportTabular::GatherComponentLoadsSurface; // for writing tabular compoonent loads output reports
using DataSystemVariables::DeveloperFlag;
using HeatBalFiniteDiffManager::SurfaceFD;
// Locals
// SUBROUTINE PARAMETER DEFINITIONS:
// na
// INTERFACE BLOCK SPECIFICATIONS:
// na
// DERIVED TYPE DEFINITIONS:
// na
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
// na
static bool firstTime( true );
int SurfNum;
int ConstrNum;
// FLOW:
if ( firstTime ) DisplayString( "Initializing Surfaces" );
InitSurfaceHeatBalance(); // Initialize all heat balance related parameters
// Solve the zone heat balance 'Detailed' solution
// Call the outside and inside surface heat balances
if ( firstTime ) DisplayString( "Calculate Outside Surface Heat Balance" );
CalcHeatBalanceOutsideSurf();
if ( firstTime ) DisplayString( "Calculate Inside Surface Heat Balance" );
CalcHeatBalanceInsideSurf();
// The air heat balance must be called before the temperature history
// updates because there may be a radiant system in the building
if ( firstTime ) DisplayString( "Calculate Air Heat Balance" );
ManageAirHeatBalance();
// IF NECESSARY, do one final "average" heat balance pass. This is only
// necessary if a radiant system is present and it was actually on for
// part or all of the time step.
UpdateFinalSurfaceHeatBalance();
// Before we leave the Surface Manager the thermal histories need to be updated
if ( ( any_eq( HeatTransferAlgosUsed, UseCTF ) ) || ( any_eq( HeatTransferAlgosUsed, UseEMPD ) ) ) {
UpdateThermalHistories(); //Update the thermal histories
}
if ( any_eq( HeatTransferAlgosUsed, UseCondFD ) ) {
for ( SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum ) {
if ( Surface( SurfNum ).Construction <= 0 ) continue; // Shading surface, not really a heat transfer surface
ConstrNum = Surface( SurfNum ).Construction;
if ( Construct( ConstrNum ).TypeIsWindow ) continue; // Windows simulated in Window module
if ( Surface( SurfNum ).HeatTransferAlgorithm != HeatTransferModel_CondFD ) continue;
SurfaceFD( SurfNum ).UpdateMoistureBalance();
}
}
ManageThermalComfort( false ); // "Record keeping" for the zone
ReportSurfaceHeatBalance();
if ( ZoneSizingCalc ) GatherComponentLoadsSurface();
firstTime = false;
}
// Beginning Initialization Section of the Module
//******************************************************************************
void
InitSurfaceHeatBalance()
{
// SUBROUTINE INFORMATION:
// AUTHOR Richard J. Liesen
// DATE WRITTEN January 1998
// MODIFIED Nov. 1999, FCW,
// Move ComputeIntThermalAbsorpFactors
// so called every timestep
// Jan 2004, RJH
// Added calls to alternative daylighting analysis using DElight
// All modifications demarked with RJH (Rob Hitchcock)
// RJH, Jul 2004: add error handling for DElight calls
// RE-ENGINEERED na
// PURPOSE OF THIS SUBROUTINE:
// This subroutine is for surface initializations within the
// heat balance.
// METHODOLOGY EMPLOYED:
// Uses the status flags to trigger record keeping events.
// REFERENCES:
// na
// Using/Aliasing
using DataDaylighting::ZoneDaylight;
using DataDaylighting::NoDaylighting;
using DataDaylighting::DetailedDaylighting;
using DataDaylighting::DElightDaylighting;
using DataDaylighting::mapResultsToReport;
using DataDaylighting::TotIllumMaps;
using DataDaylightingDevices::NumOfTDDPipes;
using DataDElight::LUX2FC;
using namespace SolarShading;
using ConvectionCoefficients::InitInteriorConvectionCoeffs;
using InternalHeatGains::ManageInternalHeatGains;
using DataRoomAirModel::IsZoneDV;
using DataRoomAirModel::IsZoneCV;
using DataRoomAirModel::IsZoneUI;
using HeatBalanceIntRadExchange::CalcInteriorRadExchange;
using HeatBalFiniteDiffManager::InitHeatBalFiniteDiff;
using DataSystemVariables::GoodIOStatValue;
using DataGlobals::AnyEnergyManagementSystemInModel;
// RJH DElight Modification Begin
using namespace DElightManagerF;
// RJH DElight Modification End
// Locals
// SUBROUTINE PARAMETER DEFINITIONS:
Real64 const Eps( 1.e-10 ); // Small number
static gio::Fmt fmtA( "(A)" );
static gio::Fmt fmtLD( "*" );
// INTERFACE BLOCK SPECIFICATIONS:
// na
// DERIVED TYPE DEFINITIONS:
// na
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
int ConstrNum; // Construction index
int NZ; // DO loop counter for zones
Real64 QIC; // Intermediate calculation variable
Real64 QOC; // Intermediate calculation variable
int SurfNum; // DO loop counter for surfaces
int Term; // DO loop counter for conduction equation terms
Real64 TSC; // Intermediate calculation variable
int ZoneNum; // Counter for zone loop initialization
// RJH DElight Modification Begin
Real64 dPowerReducFac; // Return value Electric Lighting Power Reduction Factor for current Zone and Timestep
Real64 dHISKFFC; // double value for argument passing
Real64 dHISUNFFC; // double value for argument passing
Real64 dSOLCOS1; // double value for argument passing
Real64 dSOLCOS2; // double value for argument passing
Real64 dSOLCOS3; // double value for argument passing
Real64 dLatitude; // double value for argument passing
Real64 dCloudFraction; // double value for argument passing
int iErrorFlag; // Error Flag for warning/errors returned from DElight
int iDElightErrorFile; // Unit number for reading DElight Error File (eplusout.delightdfdmp)
int iReadStatus; // Error File Read Status
std::string cErrorLine; // Each DElight Error line can be up to 210 characters long
std::string cErrorMsg; // Each DElight Error Message can be up to 200 characters long
bool bEndofErrFile; // End of Error File flag
int iDElightRefPt; // Reference Point number for reading DElight Dump File (eplusout.delighteldmp)
Real64 dRefPtIllum; // tmp var for reading RefPt illuminance
// RJH DElight Modification End
static bool firstTime( true );
int MapNum;
int iwriteStatus;
bool errFlag;
bool elOpened;
// LOGICAL :: ShadowingSurf
// FLOW:
if ( firstTime ) DisplayString( "Initializing Outdoor environment for Surfaces" );
// Initialize zone outdoor environmental variables
// Bulk Initialization for Temperatures & WindSpeed
// using the zone, modify the zone Dry/Wet BulbTemps
SetOutBulbTempAt( NumOfZones, Zone( {1,NumOfZones} ).ma( &ZoneData::Centroid ).z(), Zone( {1,NumOfZones} ).OutDryBulbTemp(), Zone( {1,NumOfZones} ).OutWetBulbTemp(), "Zone" );
SetWindSpeedAt( NumOfZones, Zone( {1,NumOfZones} ).ma( &ZoneData::Centroid ).z(), Zone( {1,NumOfZones} ).WindSpeed(), "Zone" );
// DO ZoneNum = 1, NumOfZones
// Zone(ZoneNum)%WindSpeed = WindSpeedAt(Zone(ZoneNum)%Centroid%z)
// END DO
// Initialize surface outdoor environmental variables
// Bulk Initialization for Temperatures & WindSpeed
// using the surface centroids, modify the surface Dry/Wet BulbTemps
SetOutBulbTempAt( TotSurfaces, Surface( {1,TotSurfaces} ).ma( &SurfaceData::Centroid ).z(), Surface( {1,TotSurfaces} ).OutDryBulbTemp(), Surface( {1,TotSurfaces} ).OutWetBulbTemp(), "Surface" );
SetWindSpeedAt( TotSurfaces, Surface( {1,TotSurfaces} ).ma( &SurfaceData::Centroid ).z(), Surface( {1,TotSurfaces} ).WindSpeed(), "Surface" );
// DO SurfNum = 1, TotSurfaces
// IF (Surface(SurfNum)%ExtWind) Surface(SurfNum)%WindSpeed = WindSpeedAt(Surface(SurfNum)%Centroid%z)
// END DO
if ( AnyEnergyManagementSystemInModel ) {
for ( SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum ) {
if ( Surface( SurfNum ).OutDryBulbTempEMSOverrideOn ) {
Surface( SurfNum ).OutDryBulbTemp = Surface( SurfNum ).OutDryBulbTempEMSOverrideValue;
}
if ( Surface( SurfNum ).OutWetBulbTempEMSOverrideOn ) {
Surface( SurfNum ).OutWetBulbTemp = Surface( SurfNum ).OutWetBulbTempEMSOverrideValue;
}
if ( Surface( SurfNum ).WindSpeedEMSOverrideOn ) {
Surface( SurfNum ).WindSpeed = Surface( SurfNum ).WindSpeedEMSOverrideValue;
}
}
}
// Do the Begin Simulation initializations
if ( BeginSimFlag ) {
AllocateSurfaceHeatBalArrays(); // Allocate the Module Arrays before any inits take place
InterZoneWindow = any( Zone.HasInterZoneWindow() );
IsZoneDV.dimension( NumOfZones, false );
IsZoneCV.dimension( NumOfZones, false );
IsZoneUI.dimension( NumOfZones, false );
}
// Do the Begin Environment initializations
if ( BeginEnvrnFlag ) {
if ( firstTime ) DisplayString( "Initializing Temperature and Flux Histories" );
InitThermalAndFluxHistories(); // Set initial temperature and flux histories
}
// There are no daily initializations done in this portion of the surface heat balance
// There are no hourly initializations done in this portion of the surface heat balance
if ( AnyEnergyManagementSystemInModel ) {
InitEMSControlledConstructions();
InitEMSControlledSurfaceProperties();
}
// Need to be called each timestep in order to check if surface points to new construction (EMS) and if does then
// complex fenestration needs to be initialized for additional states
TimestepInitComplexFenestration();
// Calculate exterior-surface multipliers that account for anisotropy of
// sky radiance
if ( SunIsUp && DifSolarRad > 0.0 ) {
AnisoSkyViewFactors();
} else {
AnisoSkyMult = 0.0;
}
// Set shading flag for exterior windows (except flags related to daylighting) and
// window construction (unshaded or shaded) to be used in heat balance calculation
if ( firstTime ) DisplayString( "Initializing Window Shading" );
WindowShadingManager();
// Calculate factors that are used to determine how much long-wave radiation from internal
// gains is absorbed by interior surfaces
if ( firstTime ) DisplayString( "Computing Interior Absorption Factors" );
ComputeIntThermalAbsorpFactors();
// Calculate factors for diffuse solar absorbed by room surfaces and interior shades
if ( firstTime ) DisplayString( "Computing Interior Diffuse Solar Absorption Factors" );
ComputeIntSWAbsorpFactors();
// Calculate factors for exchange of diffuse solar between zones through interzone windows
if ( firstTime ) DisplayString( "Computing Interior Diffuse Solar Exchange through Interzone Windows" );
ComputeDifSolExcZonesWIZWindows( NumOfZones );
// For daylit zones, calculate interior daylight illuminance at reference points and
// simulate lighting control system to get overhead electric lighting reduction
// factor due to daylighting.
for ( SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum ) {
if ( Surface( SurfNum ).Class == SurfaceClass_Window && Surface( SurfNum ).ExtSolar ) {
SurfaceWindow( SurfNum ).IllumFromWinAtRefPt1Rep = 0.0;
SurfaceWindow( SurfNum ).IllumFromWinAtRefPt2Rep = 0.0;
SurfaceWindow( SurfNum ).LumWinFromRefPt1Rep = 0.0;
SurfaceWindow( SurfNum ).LumWinFromRefPt2Rep = 0.0;
}
}
for ( NZ = 1; NZ <= NumOfZones; ++NZ ) {
// RJH DElight Modification Begin - Change Daylighting test to continue for Detailed AND DElight
if ( ZoneDaylight( NZ ).DaylightType == NoDaylighting ) continue;
// RJH DElight Modification End - Change Daylighting test to continue for Detailed AND DElight
ZoneDaylight( NZ ).DaylIllumAtRefPt = 0.0;
ZoneDaylight( NZ ).GlareIndexAtRefPt = 0.0;
ZoneDaylight( NZ ).ZonePowerReductionFactor = 1.0;
ZoneDaylight( NZ ).InterReflIllFrIntWins = 0.0; // inter-reflected illuminance from interior windows
if ( ZoneDaylight( NZ ).TotalDaylRefPoints != 0 ) {
ZoneDaylight( NZ ).TimeExceedingGlareIndexSPAtRefPt = 0.0;
ZoneDaylight( NZ ).TimeExceedingDaylightIlluminanceSPAtRefPt = 0.0;
}
if ( SunIsUp && ZoneDaylight( NZ ).TotalDaylRefPoints != 0 ) {
if ( firstTime ) DisplayString( "Computing Interior Daylighting Illumination" );
DayltgInteriorIllum( NZ );
if ( ! DoingSizing ) DayltgInteriorMapIllum( NZ );
}
if ( SunIsUp && NumOfTDDPipes > 0 && NZ == 1 ) {
if ( firstTime ) DisplayString( "Computing Interior Daylighting Illumination for TDD pipes" );
DayltgInteriorTDDIllum();
}
// RJH DElight Modification Begin - Call to DElight electric lighting control subroutine
// Check if the sun is up and the current Thermal Zone hosts a Daylighting:DElight object
if ( SunIsUp && ZoneDaylight( NZ ).TotalDElightRefPts != 0 ) {
// Call DElight interior illuminance and electric lighting control subroutine
dPowerReducFac = 1.0;
dHISKFFC = HISKF * LUX2FC;
dHISUNFFC = HISUNF * LUX2FC;
dSOLCOS1 = SOLCOS( 1 );
dSOLCOS2 = SOLCOS( 2 );
dSOLCOS3 = SOLCOS( 3 );
dLatitude = Latitude;
dCloudFraction = CloudFraction;
// Init Error Flag to 0 (no Warnings or Errors)
iErrorFlag = 0;
DElightElecLtgCtrl( len( Zone( NZ ).Name ), Zone( NZ ).Name, dLatitude, dHISKFFC, dHISUNFFC, dCloudFraction, dSOLCOS1, dSOLCOS2, dSOLCOS3, dPowerReducFac, iErrorFlag );
// Check Error Flag for Warnings or Errors returning from DElight
// RJH 2008-03-07: If no warnings/errors then read refpt illuminances for standard output reporting
if ( iErrorFlag != 0 ) {
// Open DElight Electric Lighting Error File for reading
iDElightErrorFile = GetNewUnitNumber();
// RJH 2008-03-07: open file with READWRITE
{ IOFlags flags; flags.ACTION( "READWRITE" ); gio::open( iDElightErrorFile, "eplusout.delighteldmp", flags ); iwriteStatus = flags.ios(); }
if ( iwriteStatus == 0 ) {
elOpened = true;
} else {
elOpened = false;
}
// IF (iwriteStatus /= 0) THEN
// CALL ShowFatalError('InitSurfaceHeatBalance: Could not open file "eplusout.delighteldmp" for output (readwrite).')
// ENDIF
// Open(unit=iDElightErrorFile, file='eplusout.delighteldmp', action='READ')
// Sequentially read lines in DElight Electric Lighting Error File
// and process them using standard EPlus warning/error handling calls
bEndofErrFile = false;
iReadStatus = 0;
while ( ! bEndofErrFile && iwriteStatus == 0 && iReadStatus == 0 ) {
{ IOFlags flags; gio::read( iDElightErrorFile, fmtA, flags ) >> cErrorLine; iReadStatus = flags.ios(); }
if ( iReadStatus < GoodIOStatValue ) {
bEndofErrFile = true;
continue;
}
// Is the current line a Warning message?
if ( has_prefix( cErrorLine, "WARNING: " ) ) {
cErrorMsg = cErrorLine.substr( 9 );
ShowWarningError( cErrorMsg );
}
// Is the current line an Error message?
if ( has_prefix( cErrorLine, "ERROR: " ) ) {
cErrorMsg = cErrorLine.substr( 7 );
ShowSevereError( cErrorMsg );
iErrorFlag = 1;
}
}
// Close DElight Error File and delete
if ( elOpened ) { IOFlags flags; flags.DISPOSE( "DELETE" ); gio::close( iDElightErrorFile, flags ); };
// If any DElight Error occurred then ShowFatalError to terminate
if ( iErrorFlag > 0 ) {
ShowFatalError( "End of DElight Error Messages" );
}
} else { // RJH 2008-03-07: No errors
// extract reference point illuminance values from DElight Electric Lighting dump file for reporting
// Open DElight Electric Lighting Dump File for reading
iDElightErrorFile = GetNewUnitNumber();
{ IOFlags flags; flags.ACTION( "READWRITE" ); gio::open( iDElightErrorFile, "eplusout.delighteldmp", flags ); iwriteStatus = flags.ios(); }
// IF (iwriteStatus /= 0) THEN
// CALL ShowFatalError('InitSurfaceHeatBalance: Could not open file "eplusout.delighteldmp" for output (readwrite).')
// ENDIF
if ( iwriteStatus == 0 ) {
elOpened = true;
} else {
elOpened = false;
}
// Sequentially read lines in DElight Electric Lighting Dump File
// and extract refpt illuminances for standard EPlus output handling
bEndofErrFile = false;
iDElightRefPt = 0;
iReadStatus = 0;
while ( ! bEndofErrFile && iwriteStatus == 0 && iReadStatus == 0 ) {
{ IOFlags flags; gio::read( iDElightErrorFile, fmtLD, flags ) >> dRefPtIllum; iReadStatus = flags.ios(); }
if ( iReadStatus < GoodIOStatValue ) {
bEndofErrFile = true;
continue;
}
// Increment refpt counter
++iDElightRefPt;
// Assure refpt index does not exceed number of refpts in this zone
if ( iDElightRefPt <= ZoneDaylight( NZ ).TotalDElightRefPts ) {
ZoneDaylight( NZ ).DaylIllumAtRefPt( iDElightRefPt ) = dRefPtIllum;
}
}
// Close DElight Electric Lighting Dump File and delete
if ( elOpened ) { IOFlags flags; flags.DISPOSE( "DELETE" ); gio::close( iDElightErrorFile, flags ); };
}
// Store the calculated total zone Power Reduction Factor due to DElight daylighting
// in the ZoneDaylight structure for later use
ZoneDaylight( NZ ).ZonePowerReductionFactor = dPowerReducFac;
}
// RJH DElight Modification End - Call to DElight electric lighting control subroutine
}
errFlag = false;
for ( SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum ) {
if ( Surface( SurfNum ).Class != SurfaceClass_Window ) continue;
SurfaceWindow( SurfNum ).FracTimeShadingDeviceOn = 0.0;
if ( SurfaceWindow( SurfNum ).ShadingFlag > 0 ) {
SurfaceWindow( SurfNum ).FracTimeShadingDeviceOn = 1.0;
} else {
SurfaceWindow( SurfNum ).FracTimeShadingDeviceOn = 0.0;
}
}
CalcInteriorRadExchange( TH( _, 1, 2 ), 0, NetLWRadToSurf, _, "Main" );
if ( AirflowWindows ) WindowGapAirflowControl();
// The order of these initializations is important currently. Over time we hope to
// take the appropriate parts of these inits to the other heat balance managers
if ( firstTime ) DisplayString( "Initializing Solar Heat Gains" );
InitSolarHeatGains();
if ( SunIsUp && ( BeamSolarRad + GndSolarRad + DifSolarRad > 0.0 ) ) {
for ( NZ = 1; NZ <= NumOfZones; ++NZ ) {
if ( ZoneDaylight( NZ ).TotalDaylRefPoints > 0 ) {
if ( Zone( NZ ).HasInterZoneWindow ) {
DayltgInterReflIllFrIntWins( NZ );
DayltgGlareWithIntWins( ZoneDaylight( NZ ).GlareIndexAtRefPt, NZ );
}
DayltgElecLightingControl( NZ );
}
}
} else if ( mapResultsToReport && TimeStep == NumOfTimeStepInHour ) {
for ( MapNum = 1; MapNum <= TotIllumMaps; ++MapNum ) {
ReportIllumMap( MapNum );
}
mapResultsToReport = false;
}
if ( firstTime ) DisplayString( "Initializing Internal Heat Gains" );
ManageInternalHeatGains( false );
if ( firstTime ) DisplayString( "Initializing Interior Solar Distribution" );
InitIntSolarDistribution();
if ( firstTime ) DisplayString( "Initializing Interior Convection Coefficients" );
InitInteriorConvectionCoeffs( TempSurfInTmp );
if ( BeginSimFlag ) { // Now's the time to report surfaces, if desired
// if (firstTime) CALL DisplayString('Reporting Surfaces')
// CALL ReportSurfaces
if ( firstTime ) DisplayString( "Gathering Information for Predefined Reporting" );
GatherForPredefinedReport();
}
// Initialize the temperature history terms for conduction through the surfaces
if ( any_eq( HeatTransferAlgosUsed, UseCondFD ) ) {
InitHeatBalFiniteDiff();
}
CTFConstOutPart = 0.0;
CTFConstInPart = 0.0;
CTFTsrcConstPart = 0.0;
for ( SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum ) { // Loop through all surfaces...
auto const & surface( Surface( SurfNum ) );
if ( ! surface.HeatTransSurf ) continue; // Skip non-heat transfer surfaces
if ( surface.HeatTransferAlgorithm != HeatTransferModel_CTF && surface.HeatTransferAlgorithm != HeatTransferModel_EMPD ) continue;
if ( surface.Class == SurfaceClass_Window ) continue;
// Outside surface temp of "normal" windows not needed in Window5 calculation approach
// Window layer temperatures are calculated in CalcHeatBalanceInsideSurf
ConstrNum = surface.Construction;
auto const & construct( Construct( ConstrNum ) );
if ( construct.NumCTFTerms > 1 ) { // COMPUTE CONSTANT PORTION OF CONDUCTIVE FLUXES.
QIC = 0.0;
QOC = 0.0;
TSC = 0.0;
for ( Term = 1; Term <= construct.NumCTFTerms; ++Term ) {
// Sign convention for the various terms in the following two equations
// is based on the form of the Conduction Transfer Function equation
// given by:
// Qin,now = (Sum of)(Y Tout) - (Sum of)(Z Tin) + (Sum of)(F Qin,old)
// Qout,now = (Sum of)(X Tout) - (Sum of)(Y Tin) + (Sum of)(F Qout,old)
// In both equations, flux is positive from outside to inside.
//Tuned Aliases and linear indexing
Real64 const ctf_cross( construct.CTFCross( Term ) );
Real64 const ctf_flux( construct.CTFFlux( Term ) );
assert( equal_dimensions( TH, QH ) );
auto const l11( TH.index( SurfNum, Term + 1, 1 ) );
auto const l12( TH.index( SurfNum, Term + 1, 2 ) );
Real64 const TH11( TH[ l11 ] ); // TH( SurfNum, Term + 1, 1 )
Real64 const TH12( TH[ l12 ] ); // TH( SurfNum, Term + 1, 2 )
QIC += ctf_cross * TH11 - construct.CTFInside( Term ) * TH12 + construct.CTFFlux( Term ) * QH[ l12 ]; //Tuned QH( SurfNum, Term + 1, 2 )
QOC += construct.CTFOutside( Term ) * TH11 - ctf_cross * TH12 + construct.CTFFlux( Term ) * QH[ l11 ]; //Tuned QH( SurfNum, Term + 1, 1 )
if ( construct.SourceSinkPresent ) {
Real64 const QsrcHist1( QsrcHist( SurfNum, Term + 1 ) );
QIC += construct.CTFSourceIn( Term ) * QsrcHist1;
QOC += construct.CTFSourceOut( Term ) * QsrcHist1;
TSC += construct.CTFTSourceOut( Term ) * TH11 + construct.CTFTSourceIn( Term ) * TH12 + construct.CTFTSourceQ( Term ) * QsrcHist1 + construct.CTFFlux( Term ) * TsrcHist( SurfNum, Term + 1 );
}
}
CTFConstOutPart( SurfNum ) = QOC;
CTFConstInPart( SurfNum ) = QIC;
CTFTsrcConstPart( SurfNum ) = TSC;
} else { // Number of CTF Terms = 1-->Resistance only constructions have no history terms.
CTFConstOutPart( SurfNum ) = 0.0;
CTFConstInPart( SurfNum ) = 0.0;
CTFTsrcConstPart( SurfNum ) = 0.0;
}
} // ...end of surfaces DO loop for initializing temperature history terms for the surface heat balances
// Zero out all of the radiant system heat balance coefficient arrays
RadSysTiHBConstCoef = 0.0;
RadSysTiHBToutCoef = 0.0;
RadSysTiHBQsrcCoef = 0.0;
RadSysToHBConstCoef = 0.0;
RadSysToHBTinCoef = 0.0;
RadSysToHBQsrcCoef = 0.0;
QRadSysSource = 0.0;
QPVSysSource = 0.0;
QHTRadSysSurf = 0.0;
QHWBaseboardSurf = 0.0;
QSteamBaseboardSurf = 0.0;
QElecBaseboardSurf = 0.0;
if ( ZoneSizingCalc ) GatherComponentLoadsSurfAbsFact();
if ( firstTime ) DisplayString( "Completed Initializing Surface Heat Balance" );
firstTime = false;
}
void
GatherForPredefinedReport()
{
// SUBROUTINE INFORMATION:
// AUTHOR Jason Glazer
// DATE WRITTEN August 2006
// MODIFIED na
// RE-ENGINEERED na
// PURPOSE OF THIS SUBROUTINE:
// This subroutine reports the information for the predefined reports
// related to envelope components.
// METHODOLOGY EMPLOYED:
// na
// REFERENCES:
// na
// Using/Aliasing
using namespace OutputReportPredefined;
using WindowManager::CalcNominalWindowCond;
// Locals
// SUBROUTINE ARGUMENT DEFINITIONS:
// na
// SUBROUTINE PARAMETER DEFINITIONS:
// na
// INTERFACE BLOCK SPECIFICATIONS:
// na
// DERIVED TYPE DEFINITIONS:
// na
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
std::string surfName;
int curCons;
int zonePt;
Real64 mult;
Real64 curAzimuth;
Real64 curTilt;
int iSurf;
Real64 windowArea;
Real64 frameWidth;
Real64 frameArea;
Real64 dividerArea;
//counts for object count report
FArray1D_int numSurfaces( 20 );
FArray1D_int numExtSurfaces( 20 );
int frameDivNum;
bool isExterior;
// the following variables are for the CalcNominalWindowCond call but only SHGCSummer is needed
Real64 nomCond;
Real64 SHGCSummer;
Real64 TransSolNorm;
Real64 TransVisNorm;
Real64 nomUfact;
int errFlag;
int curWSC;
//following variables are totals for fenestration table
static Real64 windowAreaWMult( 0.0 );
static Real64 fenTotArea( 0.0 );
static Real64 fenTotAreaNorth( 0.0 );
static Real64 fenTotAreaNonNorth( 0.0 );
static Real64 ufactArea( 0.0 );
static Real64 ufactAreaNorth( 0.0 );
static Real64 ufactAreaNonNorth( 0.0 );
static Real64 shgcArea( 0.0 );
static Real64 shgcAreaNorth( 0.0 );
static Real64 shgcAreaNonNorth( 0.0 );
static Real64 vistranArea( 0.0 );
static Real64 vistranAreaNorth( 0.0 );
static Real64 vistranAreaNonNorth( 0.0 );
static Real64 intFenTotArea( 0.0 );
static Real64 intUfactArea( 0.0 );
static Real64 intShgcArea( 0.0 );
static Real64 intVistranArea( 0.0 );
bool isNorth;
numSurfaces = 0;
numExtSurfaces = 0;
for ( iSurf = 1; iSurf <= TotSurfaces; ++iSurf ) {
zonePt = Surface( iSurf ).Zone;
//only exterior surfaces including underground
if ( ( Surface( iSurf ).ExtBoundCond == ExternalEnvironment ) || ( Surface( iSurf ).ExtBoundCond == Ground ) || ( Surface( iSurf ).ExtBoundCond == GroundFCfactorMethod ) ) {
isExterior = true;
{ auto const SELECT_CASE_var( Surface( iSurf ).Class );
if ( ( SELECT_CASE_var == SurfaceClass_Wall ) || ( SELECT_CASE_var == SurfaceClass_Floor ) || ( SELECT_CASE_var == SurfaceClass_Roof ) ) {
surfName = Surface( iSurf ).Name;
curCons = Surface( iSurf ).Construction;
PreDefTableEntry( pdchOpCons, surfName, Construct( curCons ).Name );
PreDefTableEntry( pdchOpRefl, surfName, 1 - Construct( curCons ).OutsideAbsorpSolar );
PreDefTableEntry( pdchOpUfactNoFilm, surfName, NominalU( Surface( iSurf ).Construction ), 3 );
mult = Zone( zonePt ).Multiplier * Zone( zonePt ).ListMultiplier;
PreDefTableEntry( pdchOpGrArea, surfName, Surface( iSurf ).GrossArea * mult );
curAzimuth = Surface( iSurf ).Azimuth;
PreDefTableEntry( pdchOpAzimuth, surfName, curAzimuth );
curTilt = Surface( iSurf ).Tilt;
PreDefTableEntry( pdchOpTilt, surfName, curTilt );
if ( ( curTilt >= 60.0 ) && ( curTilt < 180.0 ) ) {
if ( ( curAzimuth >= 315.0 ) || ( curAzimuth < 45.0 ) ) {
PreDefTableEntry( pdchOpDir, surfName, "N" );
} else if ( ( curAzimuth >= 45.0 ) && ( curAzimuth < 135.0 ) ) {
PreDefTableEntry( pdchOpDir, surfName, "E" );
} else if ( ( curAzimuth >= 135.0 ) && ( curAzimuth < 225.0 ) ) {
PreDefTableEntry( pdchOpDir, surfName, "S" );
} else if ( ( curAzimuth >= 225.0 ) && ( curAzimuth < 315.0 ) ) {
PreDefTableEntry( pdchOpDir, surfName, "W" );
}
}
} else if ( ( SELECT_CASE_var == SurfaceClass_Window ) || ( SELECT_CASE_var == SurfaceClass_TDD_Dome ) ) {
surfName = Surface( iSurf ).Name;
curCons = Surface( iSurf ).Construction;
PreDefTableEntry( pdchFenCons, surfName, Construct( curCons ).Name );
zonePt = Surface( iSurf ).Zone;
mult = Zone( zonePt ).Multiplier * Zone( zonePt ).ListMultiplier * Surface( iSurf ).Multiplier;
//include the frame area if present
windowArea = Surface( iSurf ).GrossArea;
frameArea = 0.0;
dividerArea = 0.0;
frameDivNum = Surface( iSurf ).FrameDivider;
if ( frameDivNum != 0 ) {
frameWidth = FrameDivider( frameDivNum ).FrameWidth;
frameArea = ( Surface( iSurf ).Height + 2.0 * frameWidth ) * ( Surface( iSurf ).Width + 2.0 * frameWidth ) - ( Surface( iSurf ).Height * Surface( iSurf ).Width );
windowArea += frameArea;
dividerArea = FrameDivider( frameDivNum ).DividerWidth * ( FrameDivider( frameDivNum ).HorDividers * Surface( iSurf ).Width + FrameDivider( frameDivNum ).VertDividers * Surface( iSurf ).Height - FrameDivider( frameDivNum ).HorDividers * FrameDivider( frameDivNum ).VertDividers * FrameDivider( frameDivNum ).DividerWidth );
PreDefTableEntry( pdchFenFrameConductance, surfName, FrameDivider( frameDivNum ).FrameConductance, 3 );
PreDefTableEntry( pdchFenDividerConductance, surfName, FrameDivider( frameDivNum ).DividerConductance, 3 );
}
windowAreaWMult = windowArea * mult;
PreDefTableEntry( pdchFenAreaOf1, surfName, windowArea );
PreDefTableEntry( pdchFenFrameAreaOf1, surfName, frameArea );
PreDefTableEntry( pdchFenDividerAreaOf1, surfName, dividerArea );
PreDefTableEntry( pdchFenGlassAreaOf1, surfName, windowArea - ( frameArea + dividerArea ) );
PreDefTableEntry( pdchFenArea, surfName, windowAreaWMult );
nomUfact = NominalU( Surface( iSurf ).Construction );
PreDefTableEntry( pdchFenUfact, surfName, nomUfact, 3 );
//if the construction report is requested the SummerSHGC is already calculated
if ( Construct( curCons ).SummerSHGC != 0 ) {
SHGCSummer = Construct( curCons ).SummerSHGC;
TransVisNorm = Construct( curCons ).VisTransNorm;
} else {
//must calculate Summer SHGC
if ( ! Construct( curCons ).WindowTypeEQL ) {
CalcNominalWindowCond( curCons, 2, nomCond, SHGCSummer, TransSolNorm, TransVisNorm, errFlag );
}
}
PreDefTableEntry( pdchFenSHGC, surfName, SHGCSummer, 3 );
PreDefTableEntry( pdchFenVisTr, surfName, TransVisNorm, 3 );
PreDefTableEntry( pdchFenParent, surfName, Surface( iSurf ).BaseSurfName );
curAzimuth = Surface( iSurf ).Azimuth;
PreDefTableEntry( pdchFenAzimuth, surfName, curAzimuth );
isNorth = false;
curTilt = Surface( iSurf ).Tilt;
PreDefTableEntry( pdchFenTilt, surfName, curTilt );
if ( ( curTilt >= 60.0 ) && ( curTilt < 180.0 ) ) {
if ( ( curAzimuth >= 315.0 ) || ( curAzimuth < 45.0 ) ) {
PreDefTableEntry( pdchFenDir, surfName, "N" );
isNorth = true;
} else if ( ( curAzimuth >= 45.0 ) && ( curAzimuth < 135.0 ) ) {
PreDefTableEntry( pdchFenDir, surfName, "E" );
} else if ( ( curAzimuth >= 135.0 ) && ( curAzimuth < 225.0 ) ) {
PreDefTableEntry( pdchFenDir, surfName, "S" );
} else if ( ( curAzimuth >= 225.0 ) && ( curAzimuth < 315.0 ) ) {
PreDefTableEntry( pdchFenDir, surfName, "W" );
}
}
curWSC = Surface( iSurf ).WindowShadingControlPtr;
//compute totals for area weighted averages
fenTotArea += windowAreaWMult;
ufactArea += nomUfact * windowAreaWMult;
shgcArea += SHGCSummer * windowAreaWMult;
vistranArea += TransVisNorm * windowAreaWMult;
if ( isNorth ) {
fenTotAreaNorth += windowAreaWMult;
ufactAreaNorth += nomUfact * windowAreaWMult;
shgcAreaNorth += SHGCSummer * windowAreaWMult;
vistranAreaNorth += TransVisNorm * windowAreaWMult;
} else {
fenTotAreaNonNorth += windowAreaWMult;
ufactAreaNonNorth += nomUfact * windowAreaWMult;
shgcAreaNonNorth += SHGCSummer * windowAreaWMult;
vistranAreaNonNorth += TransVisNorm * windowAreaWMult;
}
// shading
if ( curWSC != 0 ) {
PreDefTableEntry( pdchFenSwitchable, surfName, "Yes" );
//shading report
PreDefTableEntry( pdchWscName, surfName, WindowShadingControl( curWSC ).Name );
{ auto const SELECT_CASE_var1( WindowShadingControl( curWSC ).ShadingType );
if ( SELECT_CASE_var1 == WSC_ST_NoShade ) {
PreDefTableEntry( pdchWscShading, surfName, "No Shade" );
} else if ( SELECT_CASE_var1 == WSC_ST_InteriorShade ) {
PreDefTableEntry( pdchWscShading, surfName, "Interior Shade" );
} else if ( SELECT_CASE_var1 == WSC_ST_SwitchableGlazing ) {
PreDefTableEntry( pdchWscShading, surfName, "Switchable Glazing" );
} else if ( SELECT_CASE_var1 == WSC_ST_ExteriorShade ) {
PreDefTableEntry( pdchWscShading, surfName, "Exterior Shade" );
} else if ( SELECT_CASE_var1 == WSC_ST_InteriorBlind ) {
PreDefTableEntry( pdchWscShading, surfName, "Interior Blind" );
} else if ( SELECT_CASE_var1 == WSC_ST_ExteriorBlind ) {
PreDefTableEntry( pdchWscShading, surfName, "Exterior Blind" );
} else if ( SELECT_CASE_var1 == WSC_ST_BetweenGlassShade ) {
PreDefTableEntry( pdchWscShading, surfName, "Between Glass Shade" );
} else if ( SELECT_CASE_var1 == WSC_ST_BetweenGlassBlind ) {
PreDefTableEntry( pdchWscShading, surfName, "Between Glass Blind" );
} else if ( SELECT_CASE_var1 == WSC_ST_ExteriorScreen ) {
PreDefTableEntry( pdchWscShading, surfName, "Exterior Screen" );
}}
{ auto const SELECT_CASE_var1( WindowShadingControl( curWSC ).ShadingControlType );
if ( SELECT_CASE_var1 == WSCT_AlwaysOn ) {
PreDefTableEntry( pdchWscControl, surfName, "AlwaysOn" );
} else if ( SELECT_CASE_var1 == WSCT_AlwaysOff ) {
PreDefTableEntry( pdchWscControl, surfName, "AlwaysOff" );
} else if ( SELECT_CASE_var1 == WSCT_OnIfScheduled ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfScheduleAllows" );
} else if ( SELECT_CASE_var1 == WSCT_HiSolar ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighSolarOnWindow" );
} else if ( SELECT_CASE_var1 == WSCT_HiHorzSolar ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighHorizontalSolar" );
} else if ( SELECT_CASE_var1 == WSCT_HiOutAirTemp ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighOutdoorAirTemperature" );
} else if ( SELECT_CASE_var1 == WSCT_HiZoneAirTemp ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighZoneAirTemperature" );
} else if ( SELECT_CASE_var1 == WSCT_HiZoneCooling ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighZoneCooling" );
} else if ( SELECT_CASE_var1 == WSCT_HiGlare ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighGlare" );
} else if ( SELECT_CASE_var1 == WSCT_MeetDaylIlumSetp ) {
PreDefTableEntry( pdchWscControl, surfName, "MeetDaylightIlluminanceSetpoint" );
} else if ( SELECT_CASE_var1 == WSCT_OnNightLoOutTemp_OffDay ) {
PreDefTableEntry( pdchWscControl, surfName, "OnNightIfLowOutdoorTempAndOffDay" );
} else if ( SELECT_CASE_var1 == WSCT_OnNightLoInTemp_OffDay ) {
PreDefTableEntry( pdchWscControl, surfName, "OnNightIfLowInsideTempAndOffDay" );
} else if ( SELECT_CASE_var1 == WSCT_OnNightIfHeating_OffDay ) {
PreDefTableEntry( pdchWscControl, surfName, "OnNightIfHeatingAndOffDay" );
} else if ( SELECT_CASE_var1 == WSCT_OnNightLoOutTemp_OnDayCooling ) {
PreDefTableEntry( pdchWscControl, surfName, "OnNightIfLowOutdoorTempAndOnDayIfCooling" );
} else if ( SELECT_CASE_var1 == WSCT_OnNightIfHeating_OnDayCooling ) {
PreDefTableEntry( pdchWscControl, surfName, "OnNightIfHeatingAndOnDayIfCooling" );
} else if ( SELECT_CASE_var1 == WSCT_OffNight_OnDay_HiSolarWindow ) {
PreDefTableEntry( pdchWscControl, surfName, "OffNightAndOnDayIfCoolingAndHighSolarOnWindow" );
} else if ( SELECT_CASE_var1 == WSCT_OnNight_OnDay_HiSolarWindow ) {
PreDefTableEntry( pdchWscControl, surfName, "OnNightAndOnDayIfCoolingAndHighSolarOnWindow" );
} else if ( SELECT_CASE_var1 == WSCT_OnHiOutTemp_HiSolarWindow ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighOutdoorAirTempAndHighSolarOnWindow" );
} else if ( SELECT_CASE_var1 == WSCT_OnHiOutTemp_HiHorzSolar ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighOutdoorAirTempAndHighHorizontalSolar" );
} else if ( SELECT_CASE_var1 == WSCT_OnHiZoneTemp_HiSolarWindow ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighZoneAirTempAndHighSolarOnWindow" );
} else if ( SELECT_CASE_var1 == WSCT_OnHiZoneTemp_HiHorzSolar ) {
PreDefTableEntry( pdchWscControl, surfName, "OnIfHighZoneAirTempAndHighHorizontalSolar" );
}}
if ( WindowShadingControl( curWSC ).ShadedConstruction != 0 ) {
PreDefTableEntry( pdchWscShadCons, surfName, Construct( WindowShadingControl( curWSC ).ShadedConstruction ).Name );
}
if ( WindowShadingControl( curWSC ).GlareControlIsActive ) {
PreDefTableEntry( pdchWscGlare, surfName, "Yes" );
} else {
PreDefTableEntry( pdchWscGlare, surfName, "No" );
}
} else {
PreDefTableEntry( pdchFenSwitchable, surfName, "No" );
}
} else if ( SELECT_CASE_var == SurfaceClass_Door ) {
surfName = Surface( iSurf ).Name;
curCons = Surface( iSurf ).Construction;
PreDefTableEntry( pdchDrCons, surfName, Construct( curCons ).Name );
PreDefTableEntry( pdchDrUfactNoFilm, surfName, NominalU( Surface( iSurf ).Construction ), 3 );
mult = Zone( zonePt ).Multiplier * Zone( zonePt ).ListMultiplier;
PreDefTableEntry( pdchDrGrArea, surfName, Surface( iSurf ).GrossArea * mult );
PreDefTableEntry( pdchDrParent, surfName, Surface( iSurf ).BaseSurfName );