Skip to content

Commit

Permalink
Adjust Cd values.
Browse files Browse the repository at this point in the history
  • Loading branch information
nealkruis committed Sep 18, 2024
1 parent dd0cef1 commit 39ed619
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
10 changes: 5 additions & 5 deletions resdx/models/rating_correlations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ def cop_47_h1_full(
if staging_type == StagingType.SINGLE_STAGE:
rating_range = [5.0, 6.5, 8.0, 9.5, 11.0]
ratio_range = [0.5, 0.5333333333333333, 0.6, 0.7333333333333333, 1.0]
input_data = [[2.009891731516297, 2.900448585535248, 4.010093456900876, 5.431988020200642, 7.3195111256671614], [2.0023706693000474, 2.8569653421816468, 3.896276182899059, 5.187447821782225, 6.834654585477289], [1.9865476467401004, 2.77741022573501, 3.6973872951933155, 4.780907663921734, 6.075835035918619], [1.9574755531233932, 2.6460178328890422, 3.391651490198926, 4.201784348292685, 5.085163757622192], [1.9565228521870996, 2.56651436730595, 3.187655458437148, 3.820254637174607, 4.464631903196997]]
input_data = [[1.9707525689167475, 2.8444383206836372, 3.9326226591917015, 5.326991657059977, 7.177930054093417], [1.9628443254473282, 2.800551694515633, 3.8193107805482707, 5.084928332811592, 6.699499297907473], [1.945849139352892, 2.720493249326752, 3.6215925755201135, 4.682863488723971, 5.9511778179594526], [1.9150348596070907, 2.5886355631293076, 3.3180810804373118, 4.110616451150018, 4.974796610575278], [1.9042669937369379, 2.4979555247233622, 3.1024902665758662, 3.71817118666892, 4.345309416663822]]
elif staging_type == StagingType.TWO_STAGE:
rating_range = [5.0, 6.5, 8.0, 9.5, 11.0]
ratio_range = [0.5, 0.5333333333333333, 0.6, 0.7333333333333333, 1.0]
input_data = [[1.8101801914391407, 2.614381419505263, 3.6139566602663744, 4.894301728231222, 6.593043340163464], [1.7944511497190678, 2.5621377118761224, 3.493636231889556, 4.650453482642329, 6.125590385256778], [1.7719517709337471, 2.477589708582459, 3.2978089972431004, 4.26355296347275, 5.417320573502955], [1.7357976233144121, 2.3461026554002475, 3.006858220293598, 3.724589726348646, 4.506998638658161], [1.677106395440993, 2.199794318542344, 2.7319437782283686, 3.2738140256949806, 3.825673870939968]]
input_data = [[1.7908856832596507, 2.586781714995416, 3.5758024515454507, 4.84262666405325, 6.523426061510016], [1.77541845104312, 2.5352521639685217, 3.4569741750052896, 4.601648668384456, 6.061299221207062], [1.752724985812227, 2.4510469309789586, 3.2624773122950987, 4.217871894025266, 5.3592735577279464], [1.7160437881453856, 2.3194022408453043, 2.972636318363227, 3.682196978127989, 4.455697799121371], [1.6539168354304852, 2.1693762782338726, 2.69416581967213, 3.228541093151714, 3.7727671568829297]]
elif staging_type == StagingType.VARIABLE_SPEED:
# Historic NEEP correlation: heating_cop_47 = 2.837 + 0.066 * hspf2
rating_range = [7.0, 9.25, 11.5, 13.75, 16.0]
ratio_range = [0.5, 0.54, 0.6200000000000001, 0.7800000000000001, 1.1]
input_data = [[2.6884602150439925, 4.029993244936325, 5.767873347847002, 8.16292183317246, 11.632383399132014], [2.6074471619367454, 3.814156716519085, 5.315842473438926, 7.230401857402178, 9.754234563628296], [2.4814333774705144, 3.4915900364657766, 4.641628859135214, 5.962609011099552, 7.495454737587738], [2.3544729971963236, 3.1548386475570434, 3.977876145614045, 4.82451994437713, 5.695753108466004], [2.1728491434028365, 2.862621579442618, 3.5482090382552514, 4.229623475586361, 4.906877024410816]]
input_data = [[2.70162733300162, 4.049585217357317, 5.795797333021919, 8.202423537269693, 11.688619622795512], [2.619863515254638, 3.8322414514425156, 5.341042508946027, 7.264665909305705, 9.80042855993867], [2.4927066682076604, 3.5074512367329875, 4.6627116304483, 5.989686540550063, 7.529483300523657], [2.3643583391073655, 3.1680836578940763, 3.994575344387272, 4.8447715247557595, 5.719659094859766], [2.1822381843720597, 2.8749906050941996, 3.5635394941419962, 4.247896748325269, 4.928074443938942]]

return float(RegularGridInterpolator((ratio_range, rating_range), input_data, "linear")(
(capacity_maintenance_17, hspf)
Expand All @@ -36,12 +36,12 @@ def cop_82_b_low(
elif staging_type == StagingType.TWO_STAGE:
rating_range = [6.0, 22.0]
ratio_range = [1.0, 2.4]
input_data = [[1.827755337461573, 6.701769570692436], [2.1644614994216913, 7.936358831212868]]
input_data = [[1.7772312730848057, 6.51651466797766], [2.1046299727964275, 7.716976566920232]]
elif staging_type == StagingType.VARIABLE_SPEED:
# Historic NEEP correlation: EIRr82min = bracket(1.305 - 0.324 * seer2 / eer2, 0.2, 1.0)
rating_range = [14.0, 24.5, 35.0]
ratio_range = [1.0, 1.7466666666666666, 2.12, 2.3066666666666666, 2.4]
input_data = [[3.953236649355642, 6.898181453165825, 9.826451081313277], [6.108307791177705, 10.174265925689468, 13.893148100206455], [14.213228094135404, 23.215209104752596, 30.56262342522265], [19.477958544662357, 31.7908677554598, 42.31607188535879], [22.996420435091288, 37.45777507896766, 49.78640309236842]]
input_data = [[4.0472407657688985, 7.061466285336162, 10.057968980927825], [6.174580645705325, 10.288519440812733, 14.052861468542359], [14.24024173044029, 23.261833752330144, 30.96218837002951], [19.50808827608118, 31.8424618079649, 42.38831468300697], [23.028778414477685, 37.51287887399246, 49.86316799389444]]

return float(RegularGridInterpolator((ratio_range, rating_range), input_data, "linear")(
(seer_eer_ratio, seer)
Expand Down
10 changes: 8 additions & 2 deletions resdx/models/unified_resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,16 @@ def set_net_capacities_and_fan(
self.set_lower_speed_net_capacities()

def set_c_d_cooling(self, input):
self.system.c_d_cooling = self.set_cooling_default(input, 0.15)
if self.system.staging_type == StagingType.VARIABLE_SPEED:
self.system.c_d_cooling = self.set_cooling_default(input, 0.25)
else:
self.system.c_d_cooling = self.set_cooling_default(input, 0.08)

def set_c_d_heating(self, input):
self.system.c_d_heating = self.set_heating_default(input, 0.15)
if self.system.staging_type == StagingType.VARIABLE_SPEED:
self.system.c_d_heating = self.set_heating_default(input, 0.25)
else:
self.system.c_d_heating = self.set_heating_default(input, 0.08)

def set_rated_net_cooling_cop(self, input):
if self.net_tabular_data is not None:
Expand Down
20 changes: 10 additions & 10 deletions test/test_resdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Single speed gross COP values used for regression testing
COP_C = 3.312
COP_H = 3.121
COP_H = 3.020


# Tests
Expand Down Expand Up @@ -88,8 +88,8 @@ def test_1_speed_2023_regression():

dx_unit_1_speed.print_cooling_info()
dx_unit_1_speed.print_heating_info()
assert dx_unit_1_speed.seer() == approx(12.999, 0.001) # SEER2
assert dx_unit_1_speed.hspf() == approx(7.172, 0.001) # HSPF2
assert dx_unit_1_speed.seer() == approx(13.000, 0.001) # SEER2
assert dx_unit_1_speed.hspf() == approx(7.108, 0.001) # HSPF2


def test_1_speed_rating_version():
Expand Down Expand Up @@ -142,10 +142,10 @@ def test_2_speed_regression():
)
assert dx_unit_2_speed.seer() == approx(seer_2, 0.01)
assert dx_unit_2_speed.rated_net_cooling_cop[0] == approx(3.980, 0.001)
assert dx_unit_2_speed.rated_net_cooling_cop[1] == approx(4.284, 0.001)
assert dx_unit_2_speed.rated_net_cooling_cop[1] == approx(4.166, 0.001)
assert dx_unit_2_speed.hspf() == approx(hspf_2, 0.01)
assert dx_unit_2_speed.rated_net_heating_cop[0] == approx(3.424, 0.001)
assert dx_unit_2_speed.rated_net_heating_cop[1] == approx(4.029, 0.001)
assert dx_unit_2_speed.rated_net_heating_cop[0] == approx(3.354, 0.001)
assert dx_unit_2_speed.rated_net_heating_cop[1] == approx(3.946, 0.001)


def test_neep_statistical_vchp_regression():
Expand Down Expand Up @@ -236,10 +236,10 @@ def test_neep_vchp_regression():
vchp_unit.print_heating_info()
vchp_unit.print_heating_info(region=2)

assert vchp_unit.seer() == approx(16.83, 0.01)
assert vchp_unit.eer() == approx(12.965, 0.01)
assert vchp_unit.hspf() == approx(11.088, 0.01)
assert vchp_unit.hspf(region=2) == approx(20.071, 0.01)
assert vchp_unit.seer() == approx(16.901, 0.01)
assert vchp_unit.eer() == approx(12.963, 0.01)
assert vchp_unit.hspf() == approx(11.11, 0.01)
assert vchp_unit.hspf(region=2) == approx(20.362, 0.01)


def test_plot():
Expand Down

0 comments on commit 39ed619

Please sign in to comment.