-
Notifications
You must be signed in to change notification settings - Fork 7
/
readDOE.m
358 lines (320 loc) · 14.9 KB
/
readDOE.m
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
% Read Excel files of DOE buildings
% Sheet 1 = BuildingSummary
% Sheet 2 = ZoneSummary
% Sheet 3 = LocationSummary
% Sheet 4 = Schedules
% Note BLD8 & 10 = school
% DOE Building Types
bldType = {'FullServiceRestaurant';
'Hospital';
'LargeHotel';
'LargeOffice';
'MedOffice';
'MidRiseApartment';
'OutPatient';
'PrimarySchool';
'QuickServiceRestaurant';
'SecondarySchool';
'SmallHotel';
'SmallOffice';
'StandAloneRetail';
'StripMall';
'SuperMarket';
'WareHouse'};
zoneType = {'1A (Miami)';
'2A (Houston)';
'2B (Phoenix)';
'3A (Atlanta)';
'3B-CA (Los Angeles)';
'3B (Las Vegas)';
'3C (San Francisco)';
'4A (Baltimore)';
'4B (Albuquerque)';
'4C (Seattle)';
'5A (Chicago)';
'5B (Boulder)';
'6A (Minneapolis)';
'6B (Helena)';
'7 (Duluth)';
'8 (Fairbanks)'};
builtEra = {'Pre80';
'Pst80';
'New'};
% Building (Type,Era,Zone), Type = 1-16, Era = 1-3, Zone = 1-16
refDOE (16,3,16) = Building;
Schedule (16,3,16) = SchDef;
refBEM (16,3,16) = BEMDef;
for i = 1:16
file = strcat('C:\Sim\UWG4.1\data\DOERefBuildings\BLD',num2str(i),'.xlsx');
% Read building summary (Sheet 1)
[num, ~, ~] = xlsread(file,1);
nFloor = num(4,4:6);
glazing = num(5,4:6);
hCeiling = num(6,4:6);
ver2hor = num(8,4:6);
AreaRoof = num(9,4:6);
% Read zone summary (Sheet 2)
[num, ~, ~] = xlsread(file,2);
AreaFloor = num(3:5,6);
Volume = num(3:5,7);
AreaWall = num(3:5,9);
AreaWindow = num(3:5,10);
Occupant = num(3:5,12);
Light = num(3:5,13);
Elec = num(3:5,14);
Gas = num(3:5,15);
SHW = num(3:5,16); % litres/hour
Infil = num(3:5,21); % ACH
Vent = num(3:5,18); % L/s/m^2
% Read location summary (Sheet 3)
[num, text, ~] = xlsread(file,3);
TypeWall = [text(4,5:20); text(15,5:20); text(26,5:20)];
RvalWall = [num(5,5:20); num(16,5:20); num(27,5:20)];
TypeRoof = [text(6,5:20); text(17,5:20); text(28,5:20)];
RvalRoof = [num(7,5:20); num(18,5:20); num(29,5:20)];
Uwindow = [num(8,5:20); num(19,5:20); num(30,5:20)];
SHGC = [num(9,5:20); num(20,5:20); num(31,5:20)];
HVAC = [num(10,5:20); num(21,5:20); num(32,5:20)];
HEAT = [num(11,5:20); num(22,5:20); num(33,5:20)];
COP = [num(12,5:20); num(23,5:20); num(34,5:20)];
EffHeat = [num(13,5:20); num(24,5:20); num(35,5:20)];
FanFlow = [num(14,5:20); num(25,5:20); num(36,5:20)];
% Read schedule (Sheet 4)
[num, text, ~] = xlsread(file,4);
SchEquip = num(2:4,7:30);
SchLight = num(5:7,7:30);
SchOcc = num(8:10,7:30);
SetCool = num(11:13,7:30);
SetHeat = num(14:16,7:30);
SchGas = num(17:19,7:30);
SchSWH = num(20:22,7:30);
for j = 1:3
for k = 1:16
refDOE (i,j,k) = Building(hCeiling(j),... % floorHeight
1,... % intHeatNight
1,... % intHeatDay
0.1,... % intHeatFRad
0.1,... % intHeatFLat
Infil(j),... % infil (ACH)
Vent(j)/1000,... % vent (m^3/s/m^2)
glazing(j),... % glazing ratio
Uwindow(j,k),... % uValue
SHGC(j,k),... % shgc
'AIR',... % a/c type
COP(j,k),... % cop
297,... % coolSetpointDay
297,... % coolSetpointNight
293,... % heatSetpointDay
293,... % heatSetpointNight
HVAC(j,k)*1000/AreaFloor(j),... % coolCap (refDOE in kW)
EffHeat(j,k),... % heatEff
293); % initialTemp
refDOE(i,j,k).heatCap = HEAT(j,k)*1000/AreaFloor(j);
refDOE(i,j,k).Type = bldType(i);
refDOE(i,j,k).Era = builtEra(j);
refDOE(i,j,k).Zone = zoneType(k);
% Define wall, roof, road, and mass
% Material (thermalCond, volHeat = specific heat * density);
Stucco = Material (0.6918, 837.0 * 1858.0);
Concrete = Material (1.311, 836.8 * 2240);
Insulation = Material (0.049, 836.8 * 265.0);
Gypsum = Material (0.16, 830.0 * 784.9);
Wood = Material (0.11,1210.0*544.62);
% Wall (1 in stucco, concrete, insulation, gypsum)
if strcmp(TypeWall(j,k),'MassWall')
% 1" stucco, 8" concrete, tbd insulation, 1/2" gypsum
Rbase = 0.271087; % based on stucco, concrete, gypsum
Rins = RvalWall(j,k) - Rbase;
D_ins = Rins * Insulation.thermalCond;
if D_ins > 0.01
thickness = [0.0254;0.0508;0.0508;0.0508;0.0508;D_ins;0.0127];
layers = [Stucco;Concrete;Concrete;Concrete;Concrete;Insulation;Gypsum];
else
thickness = [0.0254;0.0508;0.0508;0.0508;0.0508;0.0127];
layers = [Stucco;Concrete;Concrete;Concrete;Concrete;Gypsum];
end
wall = Element(0.08,0.92,thickness,layers,0,293,0);
% If mass wall, assume mass foor (4" concrete)
% Mass (assume 4" concrete);
alb = 0.2;
emis = 0.9;
thickness = [0.054;0.054];
concrete = Material (1.31,2240.0*836.8);
mass = Element(alb,emis,thickness,[concrete;concrete],0,293,1);
elseif strcmp(TypeWall(j,k),'WoodFrame')
% 0.01m wood siding, tbd insulation, 1/2" gypsum
Rbase = 0.170284091; % based on wood siding, gypsum
Rins = RvalWall(j,k) - Rbase;
D_ins = Rins * Insulation.thermalCond;
if D_ins > 0.01
thickness = [0.01;D_ins;0.0127];
layers = [Wood;Insulation;Gypsum];
else
thickness = [0.01;0.0127];
layers = [Wood;Gypsum];
end
wall = Element(0.22,0.92,thickness,layers,0,293,0);
% If wood frame wall, assume wooden floor
alb = 0.2;
emis = 0.9;
thickness = 0.05 * ones (2,1);
wood = Material (1.31,2240.0*836.8);
mass = Element(alb,emis,thickness,[wood;wood],0,293,1);
elseif strcmp(TypeWall(j,k),'SteelFrame')
% 1" stucco, 8" concrete, tbd insulation, 1/2" gypsum
Rbase = 0.271087; % based on stucco, concrete, gypsum
Rins = RvalWall(j,k) - Rbase;
D_ins = Rins * Insulation.thermalCond;
if D_ins > 0.01
thickness = [0.0254;0.0508;0.0508;0.0508;0.0508;D_ins;0.0127];
layers = [Stucco;Concrete;Concrete;Concrete;Concrete;Insulation;Gypsum];
else % If insulation is too thin, assume no insulation
thickness = [0.0254;0.0508;0.0508;0.0508;0.0508;0.0127];
layers = [Stucco;Concrete;Concrete;Concrete;Concrete;Gypsum];
end
wall = Element(0.15,0.92,thickness,layers,0,293,0);
% wall = Element(0.2,0.92,thickness,layers,0,293,0); % Singapore case
% % TOULOUS case
% thickness = [0.05;0.05;0.05;0.05;0.05;0.05;0.03;0.0127];
% layers = [Concrete;Concrete;Concrete;Concrete;Concrete;Concrete;Insulation;Gypsum];
% wall = Element(0.25,0.93,thickness,layers,0,293,0);
%
% % BUBBLE case
% thickness = [0.05;0.05;0.05;0.05;0.03;0.0127];
% layers = [Concrete;Concrete;Concrete;Concrete;Insulation;Gypsum];
% wall = Element(0.15,0.93,thickness,layers,0,293,0);
% If mass wall, assume mass foor
% Mass (assume 4" concrete);
alb = 0.2; % Adjusted for Bubble/Toulouse case (0.08 per Energy Plus)
emis = 0.93;
thickness = 0.05 * ones (2,1);
% thickness = 0.102*ones(2,1); % for Bubble
mass = Element(alb,emis,thickness,[Concrete;Concrete],0,293,1);
elseif strcmp(TypeWall(j,k),'MetalWall')
% metal siding, insulation, 1/2" gypsum
alb = 0.2;
emis = 0.9;
D_ins = max((RvalWall(j,k) * Insulation.thermalCond)/2,0.01);
wall = Element(alb,emis,[D_ins;D_ins;0.0127],[Insulation;Insulation;Gypsum],0,293,0);
% Mass (assume 4" concrete);
alb = 0.2;
emis = 0.9;
thickness = 0.05 * ones (2,1);
concrete = Material (1.31,2240.0*836.8);
mass = Element(alb,emis,thickness,[concrete;concrete],0,293,1);
end
% Roof
if strcmp(TypeRoof(j,k),'IEAD')
% IEAD-> membrane, insulation, decking
alb = 0.2;
emis = 0.93;
D_ins = max(RvalRoof(j,k) * Insulation.thermalCond / 2,0.01);
roof = Element(alb,emis,[D_ins;D_ins],[Insulation;Insulation],0,293,0);
% % TOULOUS/BUBBLE Case
% alb = 0.15;
% emis = 0.93;
% thickness = [0.06;0.05;0.05;0.05;0.05;0.03];
% roof = Element(alb,emis,thickness,[Concrete;Wood;Wood;Wood;Wood;Insulation],0,293,0);
elseif strcmp(TypeRoof(j,k),'Attic')
% IEAD-> membrane, insulation, decking
alb = 0.2;
emis = 0.9;
D_ins = max(RvalRoof(j,k) * Insulation.thermalCond/2,0.01);
roof = Element(alb,emis,[D_ins;D_ins],[Insulation;Insulation],0,293,0);
elseif strcmp(TypeRoof(j,k),'MetalRoof')
% IEAD-> membrane, insulation, decking
alb = 0.2;
emis = 0.9;
D_ins = max(RvalRoof(j,k) * Insulation.thermalCond/2,0.01);
roof = Element(alb,emis,[D_ins;D_ins],[Insulation;Insulation],0,293,0);
end
% Define bulding energy model, set fraction to zero
refBEM(i,j,k) = BEMDef(refDOE(i,j,k),mass,wall,roof,0);
refBEM(i,j,k).building.FanMax = FanFlow(j,k);
Schedule(i,j,k).Elec = SchEquip; % 3x24 matrix of schedule for electricity (WD,Sat,Sun)
Schedule(i,j,k).Light = SchLight; % 3x24 matrix of schedule for light (WD,Sat,Sun)
Schedule(i,j,k).Gas = SchGas; % 3x24 matrix of schedule for gas (WD,Sat,Sun)
Schedule(i,j,k).Occ = SchOcc; % 3x24 matrix of schedule for occupancy (WD,Sat,Sun)
Schedule(i,j,k).Cool = SetCool; % 3x24 matrix of schedule for cooling temp (WD,Sat,Sun) % off for BUBBLE case
Schedule(i,j,k).Heat = SetHeat; % 3x24 matrix of schedule for heating temp (WD,Sat,Sun)
Schedule(i,j,k).SWH = SchSWH; % 3x24 matrix of schedule for SWH (WD,Sat,Sun)
Schedule(i,j,k).Qelec = Elec(j); % W/m^2 (max) for electrical plug process
Schedule(i,j,k).Qlight = Light(j); % W/m^2 (max) for light
Schedule(i,j,k).Nocc = Occupant(j)/AreaFloor(j); % Person/m^2
Schedule(i,j,k).Qgas = Gas(j); % W/m^2 (max) for gas
Schedule(i,j,k).Vent = Vent(j)/1000; % m^3/m^2 per person
Schedule(i,j,k).Vswh = SHW(j)/AreaFloor(j); % litres per hour per m^2 of floor
end
end
end
% % BUBBLE/TOULOUSE adjustment Case
% refBEM(6,2,5).building.glazingRatio = 0.3;
% % Singapore adjustment Case
% refBEM(6,2,1).building.glazingRatio = 0.3;
save ('RefDOE.mat','refDOE','refBEM','Schedule');
% wall & roof definition based on material
% Material,
% 1/2IN Gypsum, !- Name
% Smooth, !- Roughness
% 0.0127, !- Thickness {m}
% 0.1600, !- Conductivity {W/m-K}
% 784.9000, !- Density {kg/m3}
% 830.0000, !- Specific Heat {J/kg-K}
% 0.9000, !- Thermal Absorptance
% 0.9200, !- Solar Absorptance
% 0.9200; !- Visible Absorptance
%
% Material,
% 1IN Stucco, !- Name
% Smooth, !- Roughness
% 0.0253, !- Thickness
% 0.6918, !- Conductivity
% 1858.0000, !- Density
% 837.0000, !- Specific Heat
% 0.9000, !- Thermal Absorptance
% 0.9200, !- Solar Absorptance
% 0.9200; !- Visible Absorptance
%
% Material,
% 8IN CONCRETE HW, !- Name
% Rough, !- Roughness
% 0.2032, !- Thickness {m}
% 1.3110, !- Conductivity {W/m-K}
% 2240.0000, !- Density {kg/m3}
% 836.8000, !- Specific Heat {J/kg-K}
% 0.9000, !- Thermal Absorptance
% 0.7000, !- Solar Absorptance
% 0.7000; !- Visible Absorptance
%
% Material,
% Mass NonRes Wall Insulation, !- Name
% MediumRough, !- Roughness
% 0.0484268844343858, !- Thickness {m}
% 0.049, !- Conductivity {W/m-K}
% 265.0000, !- Density {kg/m3}
% 836.8000, !- Specific Heat {J/kg-K}
% 0.9000, !- Thermal Absorptance
% 0.7000, !- Solar Absorptance
% 0.7000; !- Visible Absorptance
%
% Material,
% Std Wood 6inch, !- Name
% MediumSmooth, !- Roughness
% 0.15, !- Thickness {m}
% 0.12, !- Conductivity {W/m-K}
% 540.0000, !- Density {kg/m3}
% 1210, !- Specific Heat {J/kg-K}
% 0.9000000, !- Thermal Absorptance
% 0.7000000, !- Solar Absorptance
% 0.7000000; !- Visible Absorptance! Common Materials
%
% Material,
% Wood Siding, !- Name
% MediumSmooth, !- Roughness
% 0.0100, !- Thickness {m}
% 0.1100, !- Conductivity {W/m-K}
% 544.6200, !- Density {kg/m3}
% 1210.0000, !- Specific Heat {J/kg-K}
% 0.9000, !- Thermal Absorptance
% 0.7800, !- Solar Absorptance
% 0.7800; !- Visible Absorptance