diff --git a/docs/section22/Rule22-42.md b/docs/section22/Rule22-42.md new file mode 100644 index 0000000000..e3e5a3c3cf --- /dev/null +++ b/docs/section22/Rule22-42.md @@ -0,0 +1,101 @@ + +# CHW & CW - Rule 22-42 + +**Rule ID:** 22-42 +**Rule Description:** The sets of performance curves specified in Table J-2 should be used to represent part-load performance of chillers in the baseline building design. +**Rule Assertion:** Baseline RMD = expected value +**Appendix G Section:** G3.2.2.1 Baseline + +**Mandatory Rule:** True +**Evaluation Context:** Each Chiller +**Table Lookup:** +J-6 +**Function Call:** + +## Applicability Check: +- look at each chiller - only water-cooled chillers are applicable (ie chillers with a condensing_loop): `for chiller in B_RMD.chillers:` + - if the chiller has a condensing_loop, and the chiller energy source is electricity, continue to rule logic: `if chiller.consensing_loop != NULL and chiller.energy_source_type == "ELECTRICITY": CONTINUE TO RULE LOGIC` + + ## Rule Logic: + - figure out the set of performance curves needed for the chiller - this should be V, X, Y, Z, AA or AB. Initialize a variable curve_set and set it to "NONE": `curve_set = "NONE"` + - get the chiller rated capacity: `rated_capacity = chiller.rated_capacity` + - convert the chiller rated capacity from watts to tons: `chiller_capacity_tons = rated_capacity * 0.000284345` + - check if the compressor type is CENTRIFUGAL: `if chiller.compressor_type == "CENTRIFUGAL":` + - if the capacity is less than 150 tons, the category is Z: `if chiller_capacity_tons < 150: curve_set = "Z"` + - otherwise, if the capacity is between 150 and 300 tons, the category is AA: `elif (chiller_capacity_tons >= 150) and (chiller_capacity_tons < 300): curve_set = "AA"` + - else the capacity is greater than or equal to 300 tons, the category is AB: `else: curve_set = "AB"` + - otherwise, check if the compressor type is POSITIVE_DISPLACEMENT or SCROLL: `if chiller.compressor_type in ["POSITIVE_DISPLACEMENT","SCROLL","SCREW"]:` + - if the capacity is less than 150 tons, the category is V: `if chiller_capacity_tons < 150: curve_set = "V"` + - else if the capacity is greater than or equal to 300 tons, the category is AA: `elif chiller_capacity_tons >= 300: curve_set = "Y"` + - otherwise, the capacity is between 150 and 300, so the curves set is AB: `else: curve_set = "X"` + - continue if the curve set is not "NONE" - the curve set could be none if the chiller.compressor_type is not one of the recognized types for Appendix G: `if curve_set <> "NONE":` + - calculate the chiller rated power by dividing the chiller rated capacity by the chiller full load efficiency (cop): `rated_power = chiller.rated_capacity / chiller.full_load_efficiency` + - create a list of the expected capacity validation points - this is in 25% intervals, starting with 0.25 to 1: `expected_validation_plr = [0.25,0.5,0.75,1]` + - create a list of the expected temperatures for the chilled water temperature for the validation calculations - expected_chwt_temps - units are (F). The values are selected to capture the minimum, maximum, rating condition and some points in between: `expected_chwt_temps = [39,45,50,55]` + - create a list of the expected entering condenser temperatures for the condenser water temperature for the validation calculations - expected_ecwt_temps - units are (F). The values are selected to capture the minimum, maximum, rating condition and some points in between: `expected_ecwt_temps = [60,104,85,72.5,97.5]` + + - get the coefficients for the EIR-f-T curve (IP units) using a table lookup for table J-6. This assumes that the lookup function will return a list with the coefficients in order (C1,C2,...): `eir_f_t_coefficients = table_J_6_lookup(curve_set,"EIR-f-T")` + - get the coefficients for the CAP-f-T curve (IP units) using a table lookup for table J-6. This assumes that the lookup function will return a list with the coefficients in order (C1,C2,...): `cap_f_t_coefficients = table_J_6_lookup(curve_set,"Cap-f-T")` + - get the coefficients for the PLR curve (IP units) using a table lookup for table J-6. This assumes that the lookup function will return a list with the coefficients in order (C1,C2,...): `plr_coefficients = table_J_6_lookup(curve_set,"EIR-f-PLR")` + + - convert the chiller.capacity_validation_points to a dictionary with the keys being a list of two values - [chilled_water_supply_temperature, condenser_temperature], and values being the capacity_validation_point itself. Sorting the validation points will allow the calculations that follow to be much simpler. Start by creating a dict capacity_validation_pts_dict: `capacity_validation_pts_dict = {}` + - look at each value in chiller.capacity_validation_points: `for capacity_validation_point in chiller.capacity_validation_points:` + - create the key: `dict_key = f"{capacity_validation_point.chilled_water_supply_temperature}, {capacity_validation_point.condenser_temperature}"` + - add the point to capacity_validation_pts_dict: `capacity_validation_pts_dict[dict_key] = capacity_validation_point.result` + + - do the same conversion with the chiller.power_validation_points and storing the results in power_validation_pts_dict. However in this case, the values are a list of points because we expect different loads at each point: `power_validation_pts_dict = {}` + - look at each value in chiller.power_validation_points: `for power_validation_point in chiller.power_validation_points:` + - create the key: `dict_key = f"{power_validation_point.chilled_water_supply_temperature}, {power_validation_point.condenser_temperature}"` + - set the default to a blank list: `power_validation_pts_dict.setdefault([dict_key], [])` + - append the power validation point to the list at this given: `power_validation_pts_dict[dict_key].append(power_validation_point)` + + - create a dictionary of the expected capacities for use in the power validation check: `given_capacities = {}` + - the following lines or logic do the capacity validation check: + - create a list of non-matching capacity validation points: `non_matching_capacity_validation_points = []` + - create a list of missing capacity validation points: `missing_capacity_validation_points = []` + - loop through the expected_chwt_temps: `for chwt in expected_chwt_temps:` + - loop through each expected_ecwt_temps: `for ecwt in expected_ecwt_temps:` + - create the key: `dict_key = f"{chwt}, {ecwt}"` + - look for the capacity validation point in capacity_validation_pts_dict: `if capacity_validation_pts_dict[dict_key]:` + - calculate the expected capacity by multiplying the result of the formula by the rated_capacity: `expected_capacity = (cap_f_t_coefficients[0] + cap_f_t_coefficients[1] * chwt + cap_f_t_coefficients[2] * chwt^2 + cap_f_t_coefficients[3] * ecwt + cap_f_t_coefficients[4] * ecwt^2 + cap_f_t_coefficients[5] * chwt * ecwt) * rated_capacity` + - get the given capacity: `given_capacity = capacity_validation_pts_dict[dict_key]` + - add the given capacity to the given_capacities dictionary: `given_capacities[dict_key] = given_capacity` + - Compare the expected capacity to the given capacity. This should not be an exact match, but with a margin of error (see notes at the bottom for suggested margins of errors). We don't need to do anything if the capacities match, but if they don't match we need to add the conditions to the non_matching_capacity_validation_points list: `if expected_capacity != given_capacity: non_matching_capacity_validation_points.append({"CHWT": chwt, "ECWT": ecwt})` + - otherwise this value doesn't exist, append these conditions to the missing_capacity_validation_points list: `else: missing_capacity_validation_points.append({"CHWT": chwt, "ECWT": ecwt})` + + - the following lines or logic do the power validation check: + - create a list of non-matching power validation points: `non_matching_power_validation_points = []` + - create a list of missing power validation points: `missing_power_validation_points = []` + - loop through the expected_chwt_temps: `for chwt in expected_chwt_temps:` + - loop through each expected_ect_temps: `for ecwt in expected_ecwt_temps:` + - create the key: `dict_key = f"{chwt}, {ecwt}"` + - look for the power validation points in power_validation_pts_dict: `if power_validation_pts_dict[dict_key]:` + - we are expecting to see multiple validation points aligning with the expected_validation_plr. Create a list of part load ratios that are given. Later we'll compare this with the expected list to make sure that all points are given: `given_plrs = []` + - look at each power validation point in the list: `for power_validation_point in power_validation_pts_dict[dict_key]:` + - get the load: `load = power_validation_point.load` + - get the given power: `given_power = power_validation_point.result` + - calculate the PLR by dividing the load by the given capacity at these operating conditions: `plr = load / given_capacities[dict_key]` + - check whether the plr is one of the plrs that we need to check - note to dev team, please accept a match that is with 0.01 of the expected: `if plr in expected_validation_plr:` + - add the plr to the list of plrs provided: `given_plrs.append(plr)` + - calculate eir_plr using the coefficients given: `eir_plr = plr_coefficients[0] + plr_coefficients[1] * plr + plr_coefficients[2] * plr^2` + - calculate the eir_ft using the coefficients given: `eir_ft = eir_f_t_coefficients[0] + eir_f_t_coefficients[1] * chwt + eir_f_t_coefficients[2] * chwt^2 + eir_f_t_coefficients[3] * ecwt + eir_f_t_coefficients[4] * ecwt^2 + eir_f_t_coefficients[5] * chwt * ecwt` + - calculate the expected power using the formula: + - Chiller operating power = Rated Capacity × CAP-f-T × EIR-f-T × EIR-f-PLR × Chiller Input Power at Rated Conditions/Chiller Capacity at Rated Conditions + - in this case, the given capacity under these operating conditions is the rated capacity * cap_ft, so the modified formula is as follows: + - `expected_power = given_capacity[dict_key] * eir_ft * eir_plr * rated_power/rated_capacity` + - check whether the expected power and the given power are equal. This should not be an exact match, but with a margin of error (see notes at the bottom for suggested margins of errors). If the expected power and given power do not match, add the conditions to the non_matching_power_validation_points list: `if expected_power != given_power: non_matching_power_validation_points.append({"CHWT": chwt, "ECWT": ecwt, "PLR": plr})` + - otherwise, this particular plr is not given, append these conditions to the missing_power_validation_points list: `missing_power_validation_points.append({"CHWT": chwt, "ECWT": ecwt, "PLR": plr})` + - otherwise, this point isn't given, append these conditions to the missing_power_validation_points list: `missing_power_validation_points.append({"CHWT": chwt, "ECWT": ecwt, "PLR": "ALL"})` + + **Rule Assertion:** + - Case 1: all lists of missing or non-matching validation points have a length of zero: PASS: `if len(non_matching_capacity_validation_points) == len(missing_capacity_validation_points) == len(non_matching_power_validation_points) == len(missing_power_validation_points) == 0: PASS` + - Case 2: all other cases fail: `else: FAIL` + + +**Notes:** +1. on precision - my understanding is that the general rule for the RCT is that if a value is given in the standard and has four decimal places, the precision is to the nearest .0001. Minimum efficiency for chillers has values ranging between 0.5495 IPLV.IP and 0.7903 FL, which means that given the precision for chillers is about ~ 0.01% (1-). Suggest that for the capacity calculations, this precision is used, but for the power calculation, the square root of 0.01% (0.1%) is used, as this calculation is the result of two separate calculations multiplied together + + +**[Back](../_toc.md)** + +