Skip to content

Commit

Permalink
Merge pull request #75 from NREL/sync
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
shorowit authored Apr 7, 2019
2 parents 5458f21 + d87f97a commit 971ef2a
Show file tree
Hide file tree
Showing 286 changed files with 1,634 additions and 57 deletions.
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1058,12 +1058,16 @@ def get_hpxml_file_rim_joists_values(hpxml_file, rim_joists_values)
:exterior_adjacent_to => "outside",
:interior_adjacent_to => "living space",
:area => 180,
:solar_absorptance => 0.75,
:emittance => 0.9,
:insulation_id => "RimJoistIns",
:insulation_assembly_r_value => 23.0 },
{ :id => "RimJoist2",
:exterior_adjacent_to => "outside",
:interior_adjacent_to => "living space",
:area => 180,
:solar_absorptance => 0.75,
:emittance => 0.9,
:insulation_id => "RimJoist2Ins",
:insulation_assembly_r_value => 10.69 }]
elsif ['valid-foundation-pier-beam.xml',
Expand Down
53 changes: 45 additions & 8 deletions hpxml_schemas/BaseElements.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,9 @@
<xs:documentation>[deg]</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="SolarAbsorptance"
type="SolarAbsorptance"/>
<xs:element minOccurs="0" name="Emittance" type="Emittance"/>
<xs:element minOccurs="0" name="Insulation"
type="InsulationInfo"/>
<xs:element minOccurs="0" name="FloorJoists"
Expand Down Expand Up @@ -1433,8 +1436,38 @@
<xs:element minOccurs="0" name="Jacket">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0"
name="InsulationMaterial"
type="InsulationMaterial"/>
<xs:element name="JacketRValue" type="RValue"
minOccurs="0"/>
<xs:element minOccurs="0" name="Thickness"
type="LengthMeasurement">
<xs:annotation>
<xs:documentation>[in]</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" ref="extension"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="TankWall">
<xs:annotation>
<xs:documentation>Refers to the insulation in the tank wall itself. This information is sometimes vailable on the water heater's name plate or the units specification sheet, or can be estimated by removing the water heater's access plate.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0"
name="InsulationMaterial"
type="InsulationMaterial"/>
<xs:element name="TankWallRValue" type="RValue"
minOccurs="0"/>
<xs:element minOccurs="0" name="Thickness"
type="LengthMeasurement">
<xs:annotation>
<xs:documentation>[in]</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" ref="extension"/>
</xs:sequence>
</xs:complexType>
Expand Down Expand Up @@ -1572,6 +1605,12 @@
</xs:choice>
<xs:element minOccurs="1" name="WaterFixtureType"
type="WaterFixtureType"/>
<xs:element minOccurs="0" name="Quantity"
type="IntegerGreaterThanZero">
<xs:annotation>
<xs:documentation>Number of similar water fixtures.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="FlowRate" type="xs:double">
<xs:annotation>
<xs:documentation>[gallons per minute] flow rate of water</xs:documentation>
Expand All @@ -1587,6 +1626,12 @@
<xs:documentation>Does this faucet have an aerator?</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="MinutesPerDay"
type="MinutesPerDay">
<xs:annotation>
<xs:documentation>[minutes] Number of minutes per day a water fixture operates.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0"
name="TemperatureInitiatedShowerFlowRestrictionValve"
type="xs:boolean">
Expand Down Expand Up @@ -2963,14 +3008,6 @@ NOTE: This is for ALL measures that may create entry points for vermin. For exam
<xs:element name="Furnace">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="FurnaceType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="forced air"/>
<xs:enumeration value="gravity"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="SealedCombustion" type="xs:boolean"/>
<xs:element name="CondensingSystem" type="xs:boolean" minOccurs="0"/>
<xs:element minOccurs="0" name="AtmosphericBurner" type="xs:boolean"/>
Expand Down
7 changes: 7 additions & 0 deletions hpxml_schemas/HPXMLDataTypes.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,7 @@
<xs:enumeration value="top freezer"/>
<xs:enumeration value="bottom freezer"/>
<xs:enumeration value="single door"/>
<xs:enumeration value="single door with freezer"/>
<xs:enumeration value="full-size one door"/>
<xs:enumeration value="full-size two doors"/>
<xs:enumeration value="half or quarter size"/>
Expand Down Expand Up @@ -2162,4 +2163,10 @@
</xs:annotation>
<xs:restriction base="xs:double"/>
</xs:simpleType>
<xs:simpleType name="MinutesPerDay">
<xs:restriction base="xs:double">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="1440"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
28 changes: 14 additions & 14 deletions measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1318,8 +1318,8 @@ def self.add_rim_joists(runner, model, building, spaces)
film_r = 2.0 * Material.AirFilmVertical.rvalue
mat_ext_finish = nil
end
solar_abs = 0.75
emitt = 0.9
solar_abs = rim_joist_values[:solar_absorptance]
emitt = rim_joist_values[:emittance]

assembly_r = rim_joist_values[:insulation_assembly_r_value]

Expand Down Expand Up @@ -2111,8 +2111,8 @@ def self.add_cooling_system(runner, model, building, unit, loop_hvacs, zone_hvac
# FIXME: Generalize
seer = cooling_system_values[:cooling_efficiency_seer]
num_speeds = get_ac_num_speeds(seer)
crankcase_kw = 0.0
crankcase_temp = 55.0
crankcase_kw = 0.05 # From RESNET Publication No. 002-2017
crankcase_temp = 50.0 # From RESNET Publication No. 002-2017

if num_speeds == "1-Speed"

Expand Down Expand Up @@ -2314,8 +2314,8 @@ def self.add_heat_pump(runner, model, building, unit, weather, loop_hvacs, zone_
num_speeds = get_ashp_num_speeds_by_hspf(hspf)
end

crankcase_kw = 0.02
crankcase_temp = 55.0
crankcase_kw = 0.05 # From RESNET Publication No. 002-2017
crankcase_temp = 50.0 # From RESNET Publication No. 002-2017

if num_speeds == "1-Speed"

Expand Down Expand Up @@ -2824,7 +2824,7 @@ def self.add_airflow(runner, model, building, unit, loop_hvacs)
foundation_values = HPXML.get_foundation_values(foundation: vented_crawl)
frame_floor_values = HPXML.get_frame_floor_values(floor: vented_crawl.elements["FrameFloor"])
area = frame_floor_values[:area]
vented_crawl_sla = foundation_values[:crawlspace_specific_leakage_area]
vented_crawl_sla = foundation_values[:specific_leakage_area]
if vented_crawl_sla.nil?
vented_crawl_sla = Airflow.get_default_vented_crawl_sla()
end
Expand All @@ -2845,8 +2845,8 @@ def self.add_airflow(runner, model, building, unit, loop_hvacs)
attic_values = HPXML.get_attic_values(attic: vented_attic)
attic_floor_values = HPXML.get_attic_floor_values(floor: vented_attic.elements["Floors/Floor"])
area = attic_floor_values[:area]
vented_attic_sla = attic_values[:attic_specific_leakage_area]
vented_attic_const_ach = attic_values[:attic_constant_ach_natural]
vented_attic_sla = attic_values[:specific_leakage_area]
vented_attic_const_ach = attic_values[:constant_ach_natural]
if not vented_attic_sla.nil?
vented_attic_sla_area += (vented_attic_sla * area)
else
Expand All @@ -2855,15 +2855,15 @@ def self.add_airflow(runner, model, building, unit, loop_hvacs)
end
vented_attic_area += area
end
if vented_attic_area == 0
attic_sla = 0
attic_const_ach = nil
if not vented_attic_const_ach.nil?
attic_sla = nil
attic_const_ach = vented_attic_const_ach
elsif vented_attic_sla_area > 0
attic_sla = vented_attic_sla_area / vented_attic_area
attic_const_ach = nil
else
attic_sla = nil
attic_const_ach = vented_attic_const_ach
attic_sla = 0
attic_const_ach = nil
end

living_ach50 = infil_ach50
Expand Down
4 changes: 3 additions & 1 deletion resources/EPvalidator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def self.run_validator(hpxml_doc)
## [AtticType=VentedAttic]
"/HPXML/Building/BuildingDetails/Enclosure/Attics/Attic[AtticType/Attic[Vented='true']]" => {
"Floors/Floor" => one_or_more, # See [AtticFloor]
"[SpecificLeakageArea | extension/AtticConstantACHnatural]" => zero_or_one, # Uses ERI Reference Home if not provided
"AtticType/Attic[SpecificLeakageArea | extension/ConstantACHnatural]" => zero_or_one, # Uses ERI Reference Home if not provided
},

## [AtticRoof]
Expand Down Expand Up @@ -248,6 +248,8 @@ def self.run_validator(hpxml_doc)
"[InteriorAdjacentTo='living space' or InteriorAdjacentTo='basement - unconditioned' or InteriorAdjacentTo='crawlspace - vented' or InteriorAdjacentTo='crawlspace - unvented' or InteriorAdjacentTo='attic - vented' or InteriorAdjacentTo='attic - unvented' or InteriorAdjacentTo='attic - conditioned' or InteriorAdjacentTo='garage']" => one,
"Area" => one,
"Azimuth" => zero_or_one,
"SolarAbsorptance" => one,
"Emittance" => one,
"Insulation/SystemIdentifier" => one, # Required by HPXML schema
"Insulation/AssemblyEffectiveRValue" => one,
},
Expand Down
23 changes: 2 additions & 21 deletions resources/airflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2245,20 +2245,16 @@ def self.get_location_frac_leakage(location_frac, stories)

def self.get_infiltration_ACH_from_SLA(sla, numStories, weather)
# Returns the infiltration annual average ACH given a SLA.
w = calc_infiltration_w_factor(weather)

# Equation from ASHRAE 119-1998 (using numStories for simplification)
norm_lkage = 1000.0 * sla * numStories**0.3

# Equation from ASHRAE 136-1993
return norm_lkage * w
return norm_lkage * weather.data.WSF
end

def self.get_infiltration_SLA_from_ACH(ach, numStories, weather)
# Returns the infiltration SLA given an annual average ACH.
w = calc_infiltration_w_factor(weather)

return ach / (w * 1000 * numStories**0.3)
return ach / (weather.data.WSF * 1000 * numStories**0.3)
end

def self.get_infiltration_SLA_from_ACH50(ach50, n_i, conditionedFloorArea, conditionedVolume, pressure_difference_Pa = 50)
Expand Down Expand Up @@ -2333,21 +2329,6 @@ def self.get_mech_vent_whole_house_cfm(frac622, num_beds, ffa, std)

return frac622 * ((num_beds + 1.0) * 7.5 + 0.01 * ffa)
end

def self.calc_infiltration_w_factor(weather)
# Returns a w factor for infiltration calculations; see ticket #852 for derivation.
hdd65f = weather.data.HDD65F
ws = weather.data.AnnualAvgWindspeed
a = 0.36250748
b = 0.365317169
c = 0.028902855
d = 0.050181043
e = 0.009596674
f = -0.041567541
# in ACH
w = (a + b * hdd65f / 10000.0 + c * (hdd65f / 10000.0)**2.0 + d * ws + e * ws**2 + f * hdd65f / 10000.0 * ws)
return w
end
end

class Ducts
Expand Down
Loading

0 comments on commit 971ef2a

Please sign in to comment.