From f805c3e9fd926714781cff702c1a9612ab1fc909 Mon Sep 17 00:00:00 2001 From: michbeg Date: Thu, 10 Aug 2017 18:36:58 -0400 Subject: [PATCH 1/8] Add dhw objects to midriseapart class --- bpeng/simulation/initial_idf/empty_start.idf | 203 ++++++++++--------- bpeng/simulation/midrise.py | 89 ++++++++ 2 files changed, 193 insertions(+), 99 deletions(-) diff --git a/bpeng/simulation/initial_idf/empty_start.idf b/bpeng/simulation/initial_idf/empty_start.idf index 9056b48..a79412e 100644 --- a/bpeng/simulation/initial_idf/empty_start.idf +++ b/bpeng/simulation/initial_idf/empty_start.idf @@ -370,6 +370,11 @@ Site:Location, 0, !- Time Zone {hr} 0; !- Elevation {m} + Site:WaterMainsTemperature, + CORRELATION, !- Calculation Method + , !- Temperature Schedule Name + 12.56, !- Annual Average Outdoor Air Temperature {C} + 25.20; !- Maximum Difference In Monthly Average Outdoor Air Temperatures {deltaC} !- =========== ALL OBJECTS IN CLASS: GROUNDTEMPERATURES =========== ! @@ -536,7 +541,7 @@ Construction, Construction, AIR-WALL, !- Name MAT-AIR-WALL; !- Outside Layer - + Construction, InteriorFurnishings, !- Name Std Wood 6inch; !- Outside Layer @@ -702,14 +707,14 @@ Material:NoMass, ! Revision 1.1 2010/01/20 21:49:30 d3l143 ! Initial revision ! -! Note: -! January 20, 2010: We experienced a problem in upgrading Warehouse from V3.0 to V4.0. +! Note: +! January 20, 2010: We experienced a problem in upgrading Warehouse from V3.0 to V4.0. ! The R value of the semiheated roof goes to around 0.0002 for Miami and Ryihad which V4.0 compliants that it is below 0.001. ! This was not a problem for V3.0. Here we implemented a temporal solution to re-set the r value to 0.001 when it is below it. ! ------------------------------------------------------------------ ! !- =========== ALL OBJECTS IN CLASS: MATERIAL:REGULAR =========== - + Material, AC02 Acoustic Ceiling, !- Name MediumSmooth, !- Roughness @@ -720,7 +725,7 @@ Material:NoMass, 0.9000000, !- Thermal Absorptance 0.7000000, !- Solar Absorptance 0.2000000; !- Visible Absorptance - + Material, F07 25mm stucco, !- Name Smooth, !- Roughness @@ -740,8 +745,8 @@ Material:NoMass, 7824, !- Density {kg/m3} 500, !- Specific Heat {J/kg-K} 0.9, !- Absorptance:Thermal - 0.7; !- Absorptance:Solar - + 0.7; !- Absorptance:Solar + Material, F12 Asphalt shingles, !- Name VeryRough, !- Roughness @@ -750,8 +755,8 @@ Material:NoMass, 1120, !- Density {kg/m3} 1260, !- Specific Heat {J/kg-K} 0.9, !- Absorptance:Thermal - 0.7; !- Absorptance:Solar - + 0.7; !- Absorptance:Solar + Material, F13 Built-up roofing, !- Name Rough, !- Roughness @@ -772,7 +777,7 @@ Material:NoMass, 0.9000, !- Absorptance:Thermal 0.7000, !- Absorptance:Solar 0.5000; !- Absorptance:Visible - + Material, G01 16mm gypsum board, !- Name MediumSmooth, !- Roughness @@ -780,7 +785,7 @@ Material:NoMass, 0.16, !- Conductivity {W/m-K} 800, !- Density {kg/m3} 1090; !- Specific Heat {J/kg-K} - + Material, G02 16mm plywood, !- Name Smooth, !- Roughness @@ -788,7 +793,7 @@ Material:NoMass, 0.12, !- Conductivity {W/m-K} 544, !- Density {kg/m3} 1210; !- Specific Heat {J/kg-K} - + Material, M14 150mm heavyweight concrete roof, !- Name MediumRough, !- Roughness @@ -864,7 +869,7 @@ Material:NoMass, ! Absorptance:Thermal -- ! Absorptance:Solar - + Material:NoMass, Air_Wall_Material, !- Name Rough, !- Roughness @@ -981,7 +986,7 @@ Material:NoMass, 0.7; !- Visible Absorptance !- =========== ALL OBJECTS IN CLASS: CONSTRUCTION =========== - + Construction, Air_Wall, !- Name Air_Wall_Material; !- Outside Layer @@ -989,7 +994,7 @@ Material:NoMass, Construction, DropCeiling, !- Name AC02 Acoustic Ceiling; !- Outside Layer - + Construction, OpaqueDoor, !- Name Std Opaque Door Panel; !- Outside Layer @@ -998,54 +1003,54 @@ Material:NoMass, AtticRoofDeck, !- Name F12 Asphalt shingles, !- Outside Layer G02 16mm plywood; !- Layer 2 - + Construction, int_wall, !- Name G01 13mm gypsum board, !- Outside Layer G01 13mm gypsum board; !- Layer 2 - + Construction, ext_slab_8in_with_carpet,!- Name 200mm Normalweight concrete floor, !- Outside Layer CP02 CARPET PAD; !- Layer 2 - + Construction, ext_slab_8in, !- Name 200mm Normalweight concrete floor; !- Outside Layer - + Construction, ext_slab_6in_with_carpet,!- Name 150mm Normalweight concrete floor, !- Outside Layer CP02 CARPET PAD; !- Layer 2 - + Construction, ext_slab_6in, !- Name 150mm Normalweight concrete floor; !- Outside Layer - + Construction, int_slab_floor, !- Name 100mm Normalweight concrete floor, !- Outside Layer CP02 CARPET PAD; !- Layer 2 - + Construction, int_slab_ceiling, !- Name CP02 CARPET PAD, !- Outside Layer 100mm Normalweight concrete floor; !- Layer 2 - + Construction, basement_wall, !- Name M10 200mm concrete block basement wall; !- Outside Layer - + Construction, int_wood_floor, !- Name AC02 Acoustic Ceiling, !- Outside Layer G02 16mm plywood, !- Layer 2 CP02 CARPET PAD; !- Layer 3 - + Construction, ext_soffit_floor, !- Name G02 16mm plywood; !- Outside Layer - + Construction, nonres_roof, !- Name F13 Built-up roofing, !- Outside Layer @@ -1124,19 +1129,19 @@ Material:NoMass, CP02 CARPET PAD, !- Outside Layer 100mm Normalweight concrete floor, !- Layer #1 Nonres_Floor_Insulation; !- Layer #2 - + Construction, res_floor_ceiling, !- Name - reverse ordered layers for res_floor CP02 CARPET PAD, !- Outside Layer 100mm Normalweight concrete floor, !- Layer #1 Res_Floor_Insulation; !- Layer #2 - + Construction, semiheated_floor_ceiling, !- Name - reverse ordered layers for semiheated_floor CP02 CARPET PAD, !- Outside Layer 100mm Normalweight concrete floor, !- Layer #1 Semiheated_Floor_Insulation; !- Layer #2 - + @@ -1165,13 +1170,13 @@ Material:NoMass, ! ! Revision 1.1 2010/01/20 21:58:41 d3l143 ! Initial revision -! Revised 5/19/2010: Added new constructions for bb from E+ window +! Revised 5/19/2010: Added new constructions for bb from E+ window ! construction library ! ! ------------------------------------------------------------------ ! !- =========== ALL OBJECTS IN CLASS: MATERIAL:WINDOWGLASS =========== - + WindowMaterial:Glazing, GREEN 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1187,9 +1192,9 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.84, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + ! ID 221 - + WindowMaterial:Glazing, REF B CLEAR HI 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1205,7 +1210,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.60, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing, REF C CLEAR HI 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1221,7 +1226,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.55, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing, ECREF-1 COLORED 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1237,7 +1242,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.84, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing, REF B TINT MID 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1253,7 +1258,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.45, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing, CLEAR 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1269,7 +1274,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.84, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing, REF D CLEAR 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1285,7 +1290,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.82, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing, BLUE 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1301,7 +1306,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.84, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing, GREY 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1317,7 +1322,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.84, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing, LoE CLEAR 6MM, !- Name SpectralAverage, !- Optical Data Type @@ -1333,7 +1338,7 @@ Material:NoMass, 0.84, !- Front Side Infrared Hemispherical Emissivity 0.10, !- Back Side Infrared Hemispherical Emissivity 0.9; !- Conductivity {W/m-K} - + WindowMaterial:Glazing,LoE TINT 6MM,SpectralAverage, ,.006,.360,.093,.200,.500,.035,.054,.0,.84,.10,.9; ! ID 451 WindowMaterial:Glazing,REF B TINT HI 6MM,SpectralAverage, ,.006,.150,.090,.330,.180,.080,.280,.0,.84,.60,.9; ! ID 232 WindowMaterial:Glazing,REF C CLEAR MID 6MM,SpectralAverage, ,.006,.170,.200,.420,.190,.210,.380,.0,.84,.51,.9; ! ID 241 @@ -1350,7 +1355,7 @@ WindowMaterial:Glazing,GREEN 3MM,SpectralAverage, ,.003,.635,.06 WindowMaterial:Glazing,ECABS-2 COLORED 6MM,SpectralAverage, ,.006,.111,.179,.179,.128,.081,.081,.0,.84,.10,.9; ! ID 705 WindowMaterial:Glazing,COATED POLY-55,SpectralAverage, ,.00051,.320,.582,.593,.551,.336,.375,.0,.046,.720,.14; ! ID 603 WindowMaterial:Glazing,ECREF-2 COLORED 6MM,SpectralAverage, ,.006,.099,.219,.219,.155,.073,.073,.0,.84,.10,.9; ! ID 707 -WindowMaterial:Glazing,LoE SPEC SEL CLEAR 6MM Rev,SpectralAverage,,.006,.430,.420,.300,.770,.060,.070,.0,.03,.84,.9; ! +WindowMaterial:Glazing,LoE SPEC SEL CLEAR 6MM Rev,SpectralAverage,,.006,.430,.420,.300,.770,.060,.070,.0,.03,.84,.9; ! WindowMaterial:Glazing,BRONZE 6MM,SpectralAverage, ,.006,.482,.054,.054,.534,.057,.057,.0,.84,.84,.9; ! ID 6 WindowMaterial:Glazing,REF A TINT MID 6MM,SpectralAverage, ,.006,.060,.130,.420,.090,.140,.350,.0,.84,.47,.9; ! ID 211 @@ -1387,143 +1392,143 @@ WindowMaterial:Glazing, 0.9, !- Back Side Infrared Hemispherical Emissivity 0.010358; !- Conductivity {W/m-K} - + !- =========== ALL OBJECTS IN CLASS: MATERIAL:WINDOWGAS =========== - + WindowMaterial:Gas, AIR 6MM, !- Name Air, !- Gas Type 0.0063; !- Thickness {m} - + WindowMaterial:Gas, AIR 13MM, !- Name Air, !- Gas Type 0.0127; !- Thickness {m} - + WindowMaterial:Gas, ARGON 13MM, !- Name Argon, !- Gas Type 0.0127; !- Thickness {m} - + !- =========== ALL OBJECTS IN CLASS: CONSTRUCTION =========== ! Sgl Green 6mm, !- Name - + Construction, Window_U_1.22_SHGC_0.61, !- Name GREEN 6MM; !- Outside Layer - + ! Sgl Ref-B-H Clr 6mm, !- Name - + Construction, Window_U_1.22_SHGC_0.39, !- Name REF B CLEAR HI 6MM; !- Outside Layer - + ! Sgl Ref-C-H Clr 6mm, !- Name - + Construction, Window_U_1.22_SHGC_0.34, !- Name REF C CLEAR HI 6MM; !- Outside Layer - + ! Sgl Elec Ref Colored 6mm,!- Name - + Construction, Window_U_1.22_SHGC_0.25, !- Name ECREF-1 COLORED 6MM; !- Outside Layer - + ! Sgl Ref-B-M Tint 6mm, !- Name - + Construction, Window_U_0.72_SHGC_0.25, !- Name REF B TINT MID 6MM; !- Outside Layer - + ! Dbl Ref-D Clr 6mm/6mm Air, !- Name - + Construction, Window_U_0.62_SHGC_0.39, !- Name REF D CLEAR 6MM, !- Outside Layer AIR 6MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-D Clr 6mm/6mm Air, !- Name - + Construction, Window_U_0.57_SHGC_0.39, !- Name REF D CLEAR 6MM, !- Outside Layer AIR 6MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-C-H Clr 6mm/6mm Air, !- Name - + Construction, Window_U_0.65_SHGC_0.25, !- Name REF C CLEAR HI 6MM, !- Outside Layer AIR 6MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-C-H Clr 6mm/6mm Air, !- Name - + Construction, Window_U_0.62_SHGC_0.25, !- Name REF C CLEAR HI 6MM, !- Outside Layer AIR 6MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-C-H Clr 6mm/6mm Air, !- Name - + Construction, Window_U_0.57_SHGC_0.25, !- Name REF C CLEAR HI 6MM, !- Outside Layer AIR 6MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Blue 6mm/6mm Air, !- Name - + Construction, Window_U_0.62_SHGC_0.49, !- Name BLUE 6MM, !- Outside Layer AIR 6MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Blue 6mm/6mm Air, !- Name - + Construction, Window_U_0.57_SHGC_0.49, !- Name BLUE 6MM, !- Outside Layer AIR 6MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-D Clr 6mm/13mm Air, !- Name - + Construction, Window_U_0.52_SHGC_0.40, !- Name REF D CLEAR 6MM, !- Outside Layer AIR 13MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-D Clr 6mm/13mm Air, !- Name - + Construction, Window_U_0.48_SHGC_0.40, !- Name REF D CLEAR 6MM, !- Outside Layer AIR 13MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-D Clr 6mm/13mm Arg, !- Name - + Construction, Window_U_0.42_SHGC_0.45, !- Name REF D CLEAR 6MM, !- Outside Layer ARGON 13MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Grey 6mm/13mm Air, !- Name - + Construction, Window_U_0.46_SHGC_0.45, !- Name GREY 6MM, !- Outside Layer AIR 13MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl LoE (e2=.1) Tint 6mm/6mm Air, !- Name Construction, @@ -1531,7 +1536,7 @@ WindowMaterial:Glazing, LoE TINT 6MM, !- Outside Layer AIR 6MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-B-H Clr 6mm/13mm Air, !- Name Construction, @@ -1539,7 +1544,7 @@ Construction, REF B CLEAR HI 6MM, !- Outside Layer AIR 13MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Dbl Ref-B-H Clr 6mm/13mm Air, !- Name Construction, @@ -1617,7 +1622,7 @@ Construction, REF B CLEAR HI 6MM, !- Outside Layer AIR 13MM, !- Layer 2 CLEAR 6MM; !- Layer 3 - + ! Trp LoE Film (77) Clr 3mm/6mm Air, !- Name (0.31/0.46) Construction, @@ -1628,9 +1633,9 @@ Construction, AIR 6MM, !- Layer 4 CLEAR 3MM; !- Layer 5 -! Dbl Ref B-H Tint 6mm/13mm Arg, ! U=2.297 SC= .27 SHGC=.236 TSOL=.119 TVIS=.163 - -Construction, +! Dbl Ref B-H Tint 6mm/13mm Arg, ! U=2.297 SC= .27 SHGC=.236 TSOL=.119 TVIS=.163 + +Construction, Window_U_0.38_SHGC_0.26, !- Name REF B TINT HI 6MM, ARGON 13MM, @@ -1638,7 +1643,7 @@ Construction, ! Dbl LoE (e2=.1) Tint 6mm/13mm Arg, ! U=1.502 SC= .43 SHGC=.371 TSOL=.284 TVIS=.444 -Construction, +Construction, Window_U_0.25_SHGC_0.40, !- Name LoE TINT 6MM, ARGON 13MM, @@ -1646,7 +1651,7 @@ Construction, ! Dbl Ref-C-M Clr 6mm/13mm Arg, ! U=2.184 SC= .27 SHGC=.233 TSOL=.136 TVIS=.173 -Construction, +Construction, Window_U_0.35_SHGC_0.26, !- Name REF C CLEAR MID 6MM, ARGON 13MM, @@ -1880,11 +1885,11 @@ Construction, Construction, Window_U_0.39_SHGC_0.32, !- Name Theoretical Glass 347; !- Outside Layer - + !=================Additional Skylight Constructions for 189.1==================== ! Sgl LoE (e2=.2) Clr 6mm, !- Name - + Construction, Window_U_0.75_SHGC_0.72, !- Name PYR B CLEAR 6MM; !- Outside Layer @@ -2125,15 +2130,15 @@ Construction, !=================Additional Windows for IECC Analysis================================================ -!Sgl Elec Ref Colored 6mm +!Sgl Elec Ref Colored 6mm Construction, Window_U_1.16_SHGC_0.25, !- Name - ECREF-1 COLORED 6MM; !- glass name - -! Sgl Elec Ref Colored 6mm + ECREF-1 COLORED 6MM; !- glass name + +! Sgl Elec Ref Colored 6mm Construction, Window_U_1.08_SHGC_0.25, !- Name - ECREF-1 COLORED 6MM; !- glass name + ECREF-1 COLORED 6MM; !- glass name ! Dbl Elec Ref Bleached 6mm/13mm Air, !- Name @@ -2144,7 +2149,7 @@ Construction, ECREF-2 BLEACHED 6MM, !- Outside Layer AIR 13MM, !- Layer 2 LoE SPEC SEL CLEAR 6MM Rev; !- Layer 3 - + !=================Additional Skylights for IECC Analysis================================================ @@ -2158,7 +2163,7 @@ Construction, Construction, Window_U_1.60_SHGC_0.40, !- Name - REF B CLEAR HI 6MM; !- glass name + REF B CLEAR HI 6MM; !- glass name ! Sgl Ref-C-H Clr 6mm, Add frame width and frame conductivity ! Glazing Properties- Assembly U factor = 0.89, SHGC = 0.4. This includes the effect of air films. @@ -2167,13 +2172,13 @@ Construction, Construction, Window_U_1.05_SHGC_0.40, !- Name - REF B CLEAR HI 6MM; !- glass name + REF B CLEAR HI 6MM; !- glass name ! Sgl Ref-C-H Clr 6mm, Add frame width and frame conductivity ! Same construction (Assembly U factor = 0.89, SHGC = 0.4) has been used with frame width = 0. Construction, Window_U_0.90_SHGC_0.40, !- Name - REF B CLEAR HI 6MM; !- glass name + REF B CLEAR HI 6MM; !- glass name ! ================================================================================ ! ASHRAE 189.1 2009 Construction Library diff --git a/bpeng/simulation/midrise.py b/bpeng/simulation/midrise.py index c746303..6c87b65 100644 --- a/bpeng/simulation/midrise.py +++ b/bpeng/simulation/midrise.py @@ -163,6 +163,45 @@ class MidRiseApart(BaseSim): 24:00, !- Time 1 {hh:mm} 1; !- Value Until Time 1""" + # DHW hot water setpoints temp schedule + sch_dhw_hwtempsetpoint_new = """Schedule:Compact, + Hot Water Setpoint Temp Schedule, !- Name + Any Number, !- Schedule Type Limits Name + THROUGH: 12/31, !- Field 1 + FOR: AllDays, !- Field 2 + UNTIL: 24:00,60.0; !- Field 3""" + + # DHW apartment usage schedule + sch_dhw_aptusage_new = """Schedule:Compact, + APT_DHW_SCH, !- Name + Fraction, !- Schedule Type Limits Name + THROUGH: 12/31, !- Field 1 + FOR: AllDays, !- Field 2 + UNTIL: 1:00,0.08, !- Field 3 + UNTIL: 2:00,0.04, !- Field 5 + UNTIL: 3:00,0.01, !- Field 7 + UNTIL: 4:00,0.01, !- Field 9 + UNTIL: 5:00,0.04, !- Field 11 + UNTIL: 6:00,0.27, !- Field 13 + UNTIL: 7:00,0.94, !- Field 15 + UNTIL: 8:00,1.00, !- Field 17 + UNTIL: 9:00,0.96, !- Field 19 + UNTIL: 10:00,0.84, !- Field 21 + UNTIL: 11:00,0.76, !- Field 23 + UNTIL: 12:00,0.61, !- Field 25 + UNTIL: 13:00,0.53, !- Field 27 + UNTIL: 14:00,0.47, !- Field 29 + UNTIL: 15:00,0.41, !- Field 31 + UNTIL: 16:00,0.47, !- Field 33 + UNTIL: 17:00,0.55, !- Field 35 + UNTIL: 18:00,0.73, !- Field 37 + UNTIL: 19:00,0.86, !- Field 39 + UNTIL: 20:00,0.82, !- Field 41 + UNTIL: 21:00,0.75, !- Field 43 + UNTIL: 22:00,0.61, !- Field 45 + UNTIL: 23:00,0.53, !- Field 47 + UNTIL: 24:00,0.29; !- Field 49""" + # Occupancy values (ASHRAE 189.1-2009 - MidriseApartment - Apartment - CZ4-8 from Open Studio) people_apartment_new = """People, , !- Name @@ -263,6 +302,38 @@ class MidRiseApart(BaseSim): 0.0000, !- Velocity Term Coefficient 0.0000; !- Velocity Squared Term Coefficient""" + # Water heater object for domestic hot water + water_heater_new = """ WaterHeater:Mixed, + Apartment Water Heater, !- Name + 0.114, !- Tank Volume {m3} + Hot Water Setpoint Temp Schedule, !- Setpoint Temperature Schedule Name + , !- Deadband Temperature Difference {deltaC} + 82.2222, !- Maximum Temperature Limit {C} + Cycle, !- Heater Control Type + 11712, !- Heater Maximum Capacity {W} + 0, !- Heater Minimum Capacity {W} + , !- Heater Ignition Minimum Flow Rate {m3/s} + , !- Heater Ignition Delay {s} + NATURALGAS, !- Heater Fuel Type + 0.80, !- Heater Thermal Efficiency + , !- Part Load Factor Curve Name + , !- Off Cycle Parasitic Fuel Consumption Rate {W} + NATURALGAS, !- Off Cycle Parasitic Fuel Type + 0.80, !- Off Cycle Parasitic Heat Fraction to Tank + , !- On Cycle Parasitic Fuel Consumption Rate {W} + , !- On Cycle Parasitic Fuel Type + , !- On Cycle Parasitic Heat Fraction to Tank + Zone, !- Ambient Temperature Indicator + , !- Ambient Temperature Schedule Name + , !- Ambient Temperature Zone Name + , !- Ambient Temperature Outdoor Air Node Name + 2.012559766, !- Off Cycle Loss Coefficient to Ambient Temperature {W/K} + , !- Off Cycle Loss Fraction to Zone + 2.012559766, !- On Cycle Loss Coefficient to Ambient Temperature {W/K} + , !- On Cycle Loss Fraction to Zone + 3.65884430986626E-06, !- Peak Use Flow Rate {m3/s} + APT_DHW_SCH, !- Use Flow Rate Fraction Schedule Name""" + ########################################################## # Functions def __init__(self, building_shapefile, building_name=None, idf_start_file=None, building_shading_shapefile=None, @@ -275,6 +346,24 @@ class MidRiseApart(BaseSim): buildingid_colname=buildingid_colname, num_floors_colname=num_floors_colname, cnstrct_yr_colname=cnstrct_yr_colname) + def dhw_zone_add(self, cons_year, zone_name, zone_num_units, heater_thermal_efficiency): + """ + Add schedule and waterheater idf objects for each zone based on number of units + """ + if not self.idf('Schedule:Compact').filter('name', 'Hot Water Setpoint Temp Schedule'): + self.idf.add_object(self.sch_dhw_hwtempsetpoint_new) + if not self.idf('Schedule:Compact').filter('name', 'APT_DHW_SCH'): + self.idf.add_object(self.sch_dhw_aptusage_new) + + waterheater_obj = self.idf.add_object(self.water_heater_new) + waterheater_obj['Name'] = zone_name + ' ' + waterheater_obj['Name'] + waterheater_obj['Heater Thermal Efficiency'] = heater_thermal_efficiency + waterheater_obj['Tank Volume'] = 0.114 * zone_num_units + waterheater_obj['Peak Use Flow Rate'] = 3.65884430986626E-06 * zone_num_units + waterheater_obj['Ambient Temperature Zone Name'] = zone_name + + return waterheater_obj + def cons_components(self, cons_year): """ Based on age of the building and assuming MidRise Apartment building type, selecting the construction objects -- GitLab From f5f57a95b42adca7f7fa0954e825a5a24bd1f51c Mon Sep 17 00:00:00 2001 From: michbeg Date: Thu, 10 Aug 2017 18:39:40 -0400 Subject: [PATCH 2/8] Update MidRiseApart.dhw_zone_add method --- bpeng/simulation/midrise.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bpeng/simulation/midrise.py b/bpeng/simulation/midrise.py index 6c87b65..38297b0 100644 --- a/bpeng/simulation/midrise.py +++ b/bpeng/simulation/midrise.py @@ -354,13 +354,13 @@ class MidRiseApart(BaseSim): self.idf.add_object(self.sch_dhw_hwtempsetpoint_new) if not self.idf('Schedule:Compact').filter('name', 'APT_DHW_SCH'): self.idf.add_object(self.sch_dhw_aptusage_new) - + zone_obj = self.idf('Zone').filter('name', zone_name).one waterheater_obj = self.idf.add_object(self.water_heater_new) waterheater_obj['Name'] = zone_name + ' ' + waterheater_obj['Name'] waterheater_obj['Heater Thermal Efficiency'] = heater_thermal_efficiency waterheater_obj['Tank Volume'] = 0.114 * zone_num_units waterheater_obj['Peak Use Flow Rate'] = 3.65884430986626E-06 * zone_num_units - waterheater_obj['Ambient Temperature Zone Name'] = zone_name + waterheater_obj['Ambient Temperature Zone Name'] = zone_obj return waterheater_obj -- GitLab From 6e31339e6e16d16d0386f3ec85c4ba0d8b988e00 Mon Sep 17 00:00:00 2001 From: michbeg Date: Thu, 10 Aug 2017 18:46:09 -0400 Subject: [PATCH 3/8] Add zone_name assertion in dhw_zone_add method --- bpeng/simulation/midrise.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bpeng/simulation/midrise.py b/bpeng/simulation/midrise.py index 38297b0..9a7aa61 100644 --- a/bpeng/simulation/midrise.py +++ b/bpeng/simulation/midrise.py @@ -354,6 +354,7 @@ class MidRiseApart(BaseSim): self.idf.add_object(self.sch_dhw_hwtempsetpoint_new) if not self.idf('Schedule:Compact').filter('name', 'APT_DHW_SCH'): self.idf.add_object(self.sch_dhw_aptusage_new) + assert self.idf('Zone').filter('name', zone_name), 'Zone: {}, does not exist in idf'.format(zone_name) zone_obj = self.idf('Zone').filter('name', zone_name).one waterheater_obj = self.idf.add_object(self.water_heater_new) waterheater_obj['Name'] = zone_name + ' ' + waterheater_obj['Name'] -- GitLab From cff41dd5295b5f13f37fcd302c4b40c33f9010be Mon Sep 17 00:00:00 2001 From: michbeg Date: Mon, 28 Aug 2017 17:51:25 -0400 Subject: [PATCH 4/8] Use dhw_zone_add method in idf_creation method --- bpeng/simulation/base.py | 26 +++++++++++++++++++++++--- bpeng/simulation/midrise.py | 13 +++++++------ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/bpeng/simulation/base.py b/bpeng/simulation/base.py index 28fb38a..6c135ff 100644 --- a/bpeng/simulation/base.py +++ b/bpeng/simulation/base.py @@ -32,6 +32,7 @@ class NYCShpVal(Enum): BP_ID = 'building_id' NFLOOR = 'num_floors' CONSYR = 'cnstrct_yr' + N_UNITS = 'count_all_units' # pylint: disable=too-many-statements,too-many-lines,invalid-name,too-many-locals,too-many-arguments,too-many-branches @@ -97,7 +98,7 @@ class BaseSim: def __init__(self, building_shapefile, building_name=None, idf_start_file=None, building_shading_shapefile=None, build_height_colname=NYCShpVal.HEIGHT.value, geometry_colname=NYCShpVal.GEOM.value, buildingid_colname=NYCShpVal.BIN.value, num_floors_colname=NYCShpVal.NFLOOR.value, - cnstrct_yr_colname=NYCShpVal.CONSYR.value): + cnstrct_yr_colname=NYCShpVal.CONSYR.value, num_units_colname=NYCShpVal.N_UNITS.value): """ Args: @@ -132,6 +133,8 @@ class BaseSim: cnstrct_yr_colname (str) Column name in building_shapefile DataFrame corresponding to building construction year + num_units_colname (str) + Column name in building_shapefile DataFrame corresponding to number of units in building """ # Assert if columns taht will be used exist in building shapefile assert buildingid_colname in building_shapefile, "Missing column {} in building shapefile"\ @@ -144,9 +147,11 @@ class BaseSim: .format(build_height_colname) assert num_floors_colname in building_shapefile, "Missing column {} in building shapefile"\ .format(num_floors_colname) + assert num_units_colname in building_shapefile, "Missing column {} in building shapefile"\ + .format(num_units_colname) # Convert columns to float col_float = [buildingid_colname, cnstrct_yr_colname, build_height_colname, - num_floors_colname] + num_floors_colname, num_units_colname] building_shapefile[col_float] = building_shapefile[col_float].astype(float) # Assert data type of geometry geom_type1 = building_shapefile[geometry_colname].apply(type).value_counts().index[0] @@ -177,6 +182,8 @@ class BaseSim: assert num_floors_colname in building_shading_shapefile, "Missing column {} in building shapefile"\ .format(num_floors_colname) # Convert columns to float + col_float = [buildingid_colname, cnstrct_yr_colname, build_height_colname, + num_floors_colname] building_shading_shapefile[col_float] = building_shading_shapefile[col_float].astype(float) # Function fix_dup_id automatically solves duplicate BIN from NYC building footprints shapefile building_shading_shapefile = fix_dup_id(building_shading_shapefile, @@ -225,6 +232,7 @@ class BaseSim: self.bin_colname = buildingid_colname self.nfloor_colname = num_floors_colname self.consyr_colname = cnstrct_yr_colname + self.nunits_colname = num_units_colname def bsd_add(self, name, cons_name, zone_name, obc, sun_exp, w_exp, nb_v, coords, surface_type=None, obc_obj=None): """ @@ -548,7 +556,8 @@ class BaseSim: def idf_creation(self, add_shading_analysis=False, window_to_wall_ratio=0.16, infiltration_value='Automatic', add_people=False, people_value='Automatic', add_equipment=False, equipment_value='Automatic', - add_light=False, light_value='Automatic', solar_dist_method="FullExterior", output_table=False): + add_light=False, light_value='Automatic', solar_dist_method="FullExterior", output_table=False, + add_dhw=False): """ Create EnergyPlus input IDF file from building shapefile. Default output variables (see output_var_default): @@ -624,6 +633,7 @@ class BaseSim: buildingid_colname = self.bin_colname num_floors_colname = self.nfloor_colname cnstrct_yr_colname = self.consyr_colname + num_units_colname = self.nunits_colname output_variables = self.output_var_default # IDF creation @@ -901,6 +911,12 @@ class BaseSim: count += 1 previous = y + # Add dhw IDFObject + if add_dhw is True: + for zone_ in self.idf('Zone'): + zone_num_units = build_shp_ep.loc[bin_, num_units_colname] / build_shp_ep.loc[bin_, num_floors_colname] + self.dhw_zone_add(zone_obj=zone_, zone_num_units=zone_num_units, heater_thermal_efficiency=0.8) + # Shading:Building:Detailed if add_shading_analysis is True: logging.info('Adding surrounding buildings for shading analysis') @@ -1016,6 +1032,10 @@ class BaseSim: return self.idf + @abc.abstractmethod + def dhw_zone_add(self, zone_obj, zone_num_units, heater_thermal_efficiency=0.8): + """Add schedule and waterheater idf objects for each zone based on number of units.""" + @abc.abstractmethod def sch_infil_add(self, name): """Add infiltration schedule idf object for zone infiltration idf object.""" diff --git a/bpeng/simulation/midrise.py b/bpeng/simulation/midrise.py index 9a7aa61..d4e102b 100644 --- a/bpeng/simulation/midrise.py +++ b/bpeng/simulation/midrise.py @@ -1,4 +1,5 @@ import numpy as np +from oplus.idf import IDFObject from .base import BaseSim, NYCShpVal @@ -339,14 +340,14 @@ class MidRiseApart(BaseSim): def __init__(self, building_shapefile, building_name=None, idf_start_file=None, building_shading_shapefile=None, build_height_colname=NYCShpVal.HEIGHT.value, geometry_colname=NYCShpVal.GEOM.value, buildingid_colname=NYCShpVal.BIN.value, num_floors_colname=NYCShpVal.NFLOOR.value, - cnstrct_yr_colname=NYCShpVal.CONSYR.value): + cnstrct_yr_colname=NYCShpVal.CONSYR.value, num_units_colname=NYCShpVal.N_UNITS.value): super().__init__(building_shapefile=building_shapefile, building_name=building_name, idf_start_file=idf_start_file, building_shading_shapefile=building_shading_shapefile, build_height_colname=build_height_colname, geometry_colname=geometry_colname, buildingid_colname=buildingid_colname, num_floors_colname=num_floors_colname, - cnstrct_yr_colname=cnstrct_yr_colname) + cnstrct_yr_colname=cnstrct_yr_colname, num_units_colname=num_units_colname) - def dhw_zone_add(self, cons_year, zone_name, zone_num_units, heater_thermal_efficiency): + def dhw_zone_add(self, zone_obj, zone_num_units, heater_thermal_efficiency=0.8): """ Add schedule and waterheater idf objects for each zone based on number of units """ @@ -354,10 +355,10 @@ class MidRiseApart(BaseSim): self.idf.add_object(self.sch_dhw_hwtempsetpoint_new) if not self.idf('Schedule:Compact').filter('name', 'APT_DHW_SCH'): self.idf.add_object(self.sch_dhw_aptusage_new) - assert self.idf('Zone').filter('name', zone_name), 'Zone: {}, does not exist in idf'.format(zone_name) - zone_obj = self.idf('Zone').filter('name', zone_name).one + assert isinstance(zone_obj, IDFObject), 'Specified zone idf object is not of type oplus.idf.IDFObject' + assert self.idf('Zone').filter('name', zone_obj['Name']), 'Specified zone object does not exist in idf' waterheater_obj = self.idf.add_object(self.water_heater_new) - waterheater_obj['Name'] = zone_name + ' ' + waterheater_obj['Name'] + waterheater_obj['Name'] = zone_obj['Name'] + ' ' + waterheater_obj['Name'] waterheater_obj['Heater Thermal Efficiency'] = heater_thermal_efficiency waterheater_obj['Tank Volume'] = 0.114 * zone_num_units waterheater_obj['Peak Use Flow Rate'] = 3.65884430986626E-06 * zone_num_units -- GitLab From 82f6baadd5da8ce090a290754e5b43c485658398 Mon Sep 17 00:00:00 2001 From: michbeg Date: Thu, 15 Feb 2018 19:04:06 -0500 Subject: [PATCH 5/8] add output variables for light, electric equip and dhw --- bpeng/simulation/base.py | 4 ++++ bpeng/simulation/midrise.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/bpeng/simulation/base.py b/bpeng/simulation/base.py index 6c135ff..55b8cce 100644 --- a/bpeng/simulation/base.py +++ b/bpeng/simulation/base.py @@ -1027,6 +1027,10 @@ class BaseSim: "hourly; !- HVAC Average [W]") if "Surface Outside Face Sunlit Fraction" in output_variables: self.idf.add_object("Output:Variable,*,Surface Outside Face Sunlit Fraction,hourly; !- Zone Average []") + if "Zone Electric Equipment Electric Energy" in output_variables: + self.idf.add_object("Output:Variable,*,Zone Electric Equipment Electric Energy,hourly;") + if "Zone Lights Electric Energy" in output_variables: + self.idf.add_object("Output:Variable,*,Zone Lights Electric Energy,hourly;") logging.info("Time taken to create IDF: %.3g seconds", ((time.clock() - start1))) diff --git a/bpeng/simulation/midrise.py b/bpeng/simulation/midrise.py index d4e102b..48f471b 100644 --- a/bpeng/simulation/midrise.py +++ b/bpeng/simulation/midrise.py @@ -364,6 +364,9 @@ class MidRiseApart(BaseSim): waterheater_obj['Peak Use Flow Rate'] = 3.65884430986626E-06 * zone_num_units waterheater_obj['Ambient Temperature Zone Name'] = zone_obj + self.idf.add_object("Output:Variable,*,Water Heater Water Volume,DETAILED;") + self.idf.add_object("Output:Variable,*,Water Heater Heating Energy,DETAILED;") + return waterheater_obj def cons_components(self, cons_year): -- GitLab From 385a452360d020a34acea910eef81d1480284b99 Mon Sep 17 00:00:00 2001 From: michbeg Date: Fri, 16 Feb 2018 18:10:15 -0500 Subject: [PATCH 6/8] Update input assertion of 'num_units_colname' --- bpeng/simulation/base.py | 13 +++++++++---- bpeng/simulation/midrise.py | 22 ++++++++++++++++++++-- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/bpeng/simulation/base.py b/bpeng/simulation/base.py index 55b8cce..9a97207 100644 --- a/bpeng/simulation/base.py +++ b/bpeng/simulation/base.py @@ -147,11 +147,13 @@ class BaseSim: .format(build_height_colname) assert num_floors_colname in building_shapefile, "Missing column {} in building shapefile"\ .format(num_floors_colname) - assert num_units_colname in building_shapefile, "Missing column {} in building shapefile"\ - .format(num_units_colname) + if num_units_colname not in building_shapefile: + logging.warning("Missing number_of_units column in building shapefile. Required to add DHW object.") + col_float = [buildingid_colname, cnstrct_yr_colname, build_height_colname, num_floors_colname] + else: + col_float = [buildingid_colname, cnstrct_yr_colname, build_height_colname, + num_floors_colname, num_units_colname] # Convert columns to float - col_float = [buildingid_colname, cnstrct_yr_colname, build_height_colname, - num_floors_colname, num_units_colname] building_shapefile[col_float] = building_shapefile[col_float].astype(float) # Assert data type of geometry geom_type1 = building_shapefile[geometry_colname].apply(type).value_counts().index[0] @@ -913,6 +915,9 @@ class BaseSim: # Add dhw IDFObject if add_dhw is True: + assert num_units_colname in self.building_shading_shp, "Missing column {} in building shapefile. "\ + "Change 'add_dhw' input to False"\ + .format(num_units_colname) for zone_ in self.idf('Zone'): zone_num_units = build_shp_ep.loc[bin_, num_units_colname] / build_shp_ep.loc[bin_, num_floors_colname] self.dhw_zone_add(zone_obj=zone_, zone_num_units=zone_num_units, heater_thermal_efficiency=0.8) diff --git a/bpeng/simulation/midrise.py b/bpeng/simulation/midrise.py index 48f471b..1bea94f 100644 --- a/bpeng/simulation/midrise.py +++ b/bpeng/simulation/midrise.py @@ -347,9 +347,26 @@ class MidRiseApart(BaseSim): buildingid_colname=buildingid_colname, num_floors_colname=num_floors_colname, cnstrct_yr_colname=cnstrct_yr_colname, num_units_colname=num_units_colname) - def dhw_zone_add(self, zone_obj, zone_num_units, heater_thermal_efficiency=0.8): + def dhw_zone_add(self, zone_obj, zone_num_units, fuel_type='NATURALGAS', heater_thermal_efficiency=0.8): """ Add schedule and waterheater idf objects for each zone based on number of units + + Args: + + zone_obj (IDFObject) + IDF object corresponding to the zone for which to add DHW object + zone_num_units (int or float) + Number of units in the zone + fuel_type (str) + Fuel type used for DHW system, default: 'NATURALGAS' + options: Electricity, NaturalGas, PropaneGas, FuelOil#1, FuelOil#2, Coal, Diesel, Gasoline, + Steam, OtherFuel1, OtherFuel2 or DistrictHeating + heater_thermal_efficiency (float) + water heater thermal efficiency, default: 0.8 + + Returns: + + IDFObject: of DHW system """ if not self.idf('Schedule:Compact').filter('name', 'Hot Water Setpoint Temp Schedule'): self.idf.add_object(self.sch_dhw_hwtempsetpoint_new) @@ -363,7 +380,8 @@ class MidRiseApart(BaseSim): waterheater_obj['Tank Volume'] = 0.114 * zone_num_units waterheater_obj['Peak Use Flow Rate'] = 3.65884430986626E-06 * zone_num_units waterheater_obj['Ambient Temperature Zone Name'] = zone_obj - + waterheater_obj['Heater Fuel Type'] = fuel_type + # Add corresponding output varibale objects self.idf.add_object("Output:Variable,*,Water Heater Water Volume,DETAILED;") self.idf.add_object("Output:Variable,*,Water Heater Heating Energy,DETAILED;") -- GitLab From ea5374fa49a79ceb7e9d0613d911672a406db806 Mon Sep 17 00:00:00 2001 From: michbeg Date: Tue, 20 Feb 2018 11:51:34 -0500 Subject: [PATCH 7/8] Update idf_creation method for adding DHW objects --- bpeng/simulation/base.py | 19 +++++++++++++------ bpeng/simulation/midrise.py | 3 --- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/bpeng/simulation/base.py b/bpeng/simulation/base.py index 9a97207..c4367ea 100644 --- a/bpeng/simulation/base.py +++ b/bpeng/simulation/base.py @@ -915,12 +915,19 @@ class BaseSim: # Add dhw IDFObject if add_dhw is True: - assert num_units_colname in self.building_shading_shp, "Missing column {} in building shapefile. "\ - "Change 'add_dhw' input to False"\ - .format(num_units_colname) - for zone_ in self.idf('Zone'): - zone_num_units = build_shp_ep.loc[bin_, num_units_colname] / build_shp_ep.loc[bin_, num_floors_colname] - self.dhw_zone_add(zone_obj=zone_, zone_num_units=zone_num_units, heater_thermal_efficiency=0.8) + assert num_units_colname in build_shp_ep, "Missing column {} in building shapefile. "\ + "Change 'add_dhw' input to False"\ + .format(num_units_colname) + # Add corresponding output varibale objects + self.idf.add_object("Output:Variable,*,Water Heater Water Volume,hourly;") + self.idf.add_object("Output:Variable,*,Water Heater Heating Energy,hourly;") + + for bin_ in build_shp_ep.index: + for zone_ in self.idf('Zone'): + if str(bin_) in zone_['Name']: + zone_num_units = (build_shp_ep.loc[bin_, num_units_colname] / + build_shp_ep.loc[bin_, num_floors_colname]) + self.dhw_zone_add(zone_obj=zone_, zone_num_units=zone_num_units, heater_thermal_efficiency=0.8) # Shading:Building:Detailed if add_shading_analysis is True: diff --git a/bpeng/simulation/midrise.py b/bpeng/simulation/midrise.py index 1bea94f..5f5c22b 100644 --- a/bpeng/simulation/midrise.py +++ b/bpeng/simulation/midrise.py @@ -381,9 +381,6 @@ class MidRiseApart(BaseSim): waterheater_obj['Peak Use Flow Rate'] = 3.65884430986626E-06 * zone_num_units waterheater_obj['Ambient Temperature Zone Name'] = zone_obj waterheater_obj['Heater Fuel Type'] = fuel_type - # Add corresponding output varibale objects - self.idf.add_object("Output:Variable,*,Water Heater Water Volume,DETAILED;") - self.idf.add_object("Output:Variable,*,Water Heater Heating Energy,DETAILED;") return waterheater_obj -- GitLab From c32ecfd126eed3133c0d77de64272df3ba780bae Mon Sep 17 00:00:00 2001 From: michbeg Date: Thu, 22 Feb 2018 18:41:10 -0500 Subject: [PATCH 8/8] Add logging for DHW objects --- bpeng/simulation/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bpeng/simulation/base.py b/bpeng/simulation/base.py index c4367ea..a66c853 100644 --- a/bpeng/simulation/base.py +++ b/bpeng/simulation/base.py @@ -915,6 +915,7 @@ class BaseSim: # Add dhw IDFObject if add_dhw is True: + logging.info('Adding domestic hot water objects') assert num_units_colname in build_shp_ep, "Missing column {} in building shapefile. "\ "Change 'add_dhw' input to False"\ .format(num_units_colname) -- GitLab