Skip to content

Commit

Permalink
Update unit tests expected results files
Browse files Browse the repository at this point in the history
  • Loading branch information
khaddad committed Oct 28, 2022
1 parent 5fab619 commit eea3c93
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 221 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ def add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating_multi_
return true
else
zones.each do |zone|
air_loop = add_system_3_and_8_airloop_multi_speed(heating_coil_type, model, system_data, zone)
add_sys3_and_8_zone_equip(air_loop,
baseboard_type,
hw_loop,
model,
zone)
air_loop = add_system_3_and_8_airloop_multi_speed(heating_coil_type, model, system_data, zone)
end
return true
end
Expand Down
5 changes: 5 additions & 0 deletions lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ def apply_envelope(model:,
end

# apply the Kiva foundation model to floors and walls with ground boundary condition
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
def apply_kiva_foundation(model)
# define a Kiva model for the whole bldg that's used for the first floor in contact with ground in each zone
bldg_kiva_model = OpenStudio::Model::FoundationKiva.new(model)
Expand Down Expand Up @@ -691,6 +692,7 @@ def apply_kiva_foundation(model)
# defined by the two vertices on surface 1 and those on surface 2 overlap, then the two
# surfaces are in contact. If a side from surface 2 is in contact with a side from surface 1,
# the length of the side from surface 2 is limited to the length of the side from surface 1.
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
def surfaces_are_in_contact?(surf1,surf2)
surfaces_in_contact = false
vert1 = surf1.vertices[0]
Expand Down Expand Up @@ -731,6 +733,7 @@ def surfaces_are_in_contact?(surf1,surf2)
# a standard one. The material used instead is from the EnergyPlus dataset file 'ASHRAE_2005_HOF_Materials.idf'
# with the name: 'Insulation: Expanded polystyrene - extruded (smooth skin surface) (HCFC-142b exp.)'.
# The thickness of the new material is based on the thermal resistance of the massless material it replaces.
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
def replace_massless_material_with_std_material(model,surf)
std_const_name = "#{surf.construction.get.name.to_s}_std"
std_const = model.getLayeredConstructions.select {|const| const.name.to_s == std_const_name}
Expand Down Expand Up @@ -770,6 +773,7 @@ def replace_massless_material_with_std_material(model,surf)
# Find the exposed perimeter of a floor surface. For each side of the floor loop through
# the walls and find the walls that share sides with the floor. Then sum the lengths of
# the sides of the walls that come in contact with sides of the floor.
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
def get_surface_exp_per(floor,walls)
floor_exp_per = 0.0
vert1 = floor.vertices[0]
Expand Down Expand Up @@ -813,6 +817,7 @@ def get_surface_exp_per(floor,walls)

# check that three vertices are on the same line. Also check that the vectors
# from vert1 and vert2 and from vert1 and vert3 are in the same direction.
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
def three_vertices_same_line_and_dir?(vert1,vert2,vert3)
tol = 1.0e-5
vec12x,vec12y,vec12z = -vert1.x+vert2.x,-vert1.y+vert2.y,-vert1.z+vert2.z # x,y,z of vector 12
Expand Down
Loading

0 comments on commit eea3c93

Please sign in to comment.