-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Rule22-42.md #1520
base: feature/ashrae9012022
Are you sure you want to change the base?
Create Rule22-42.md #1520
Changes from 7 commits
83afcdd
aee3878
1de24bf
c709250
20ddb2d
5dd22dc
4cfa6b9
6ecd056
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @weilixu I imagine that the actual implementation would use table lookups here. Is it clear enough from this RDS without using table lookups? |
||
- 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"` | ||
claperle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- 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_cwt_temps - units are (F). The values are selected to capture the minimum, maximum, rating condition and some points in between: `expected_cwt_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` | ||
|
||
claperle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- 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.result)` | ||
|
||
- 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_cwt_temps: `for cwt in expected_cwt_temps:` | ||
- loop through each expected_ecwt_temps: `for ecwt in expected_ecwt_temps:` | ||
- create the key: `dict_key = f"{cwt}, {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] * cwt + cap_f_t_coefficients[2] * cwt^2 + cap_f_t_coefficients[3] * ecwt + cap_f_t_coefficients[4] * ecwt^2 + cap_f_t_coefficients[5] * cwt * 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({"CWT": cwt, "ECWT": ecwt})` | ||
- otherwise this value doesn't exist, append these conditions to the missing_capacity_validation_points list: `else: missing_capacity_validation_points.append({"CWT": cwt, "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_cwt_temps: `for cwt in expected_cwt_temps:` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on above on line 34 I think this is supposed to be for chwt in expected_chwt_temps" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. everything has been updated to be ecwt and cwt There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The typical abbreviation for chilled water is CHW so I recommend that any variable that pertains to chilled water use CHW and any variable that represents condensing water be CW. Looks like they both use CW regardless of whether they are chilled or condenser water. This is a suggestion - feel free to ignore but I found it was a little confusing with CW for both. Maybe use the nomenclature in 90.1 with CHWT and ECT. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, I see what you're looking for now. Using CHWT and ECT now |
||
- loop through each expected_ect_temps: `for ecwt in expected_ecwt_temps:` | ||
- create the key: `dict_key = f"{cwt}, {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_result in power_validation_pts_dict[dict_key]:` | ||
- get the load: `load = power_validation_point.load` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I may just be tired but I am not following how this load is getting retrieved from this. I don't think you are looping through power_validation_point objects at this point. Looks like you are looping through a list of power validation point results. I am thinking the loads also need to be included in the dictionary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. load is a property of ChillerPowerValidationPoint There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay but I do not see how you are getting to this with the current logic. How are you able to reference the power_validation_point, you are not looping through them anywehre and there can be multiple associated with the chiller. power_validation_point is an object so I am not following how you are able to reference it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you're right - I made changes also on line 50, so that power_validation_pts_dict[dict_key] references power_validation_points, not a list of power_validation_point results. Then we can get both the result and load on lines 75 and 76 |
||
- 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] * cwt + eir_f_t_coefficients[2] * cwt^2 + eir_f_t_coefficients[3] * ecwt + eir_f_t_coefficients[4] * ecwt^2 + eir_f_t_coefficients[5] * cwt * 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 | ||
claperle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- 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({"CWT": cwt, "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({"CWT": cwt, "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({"CWT": cwt, "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)** | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we include an applicability check for the baseline HVAC system type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. It overcomplicates things here, and if the user has issues with the HVAC system type, they'll be notified elsewhere. If we do a check here, it just means that if a user is using the RCT to validate a model then they have to do an extra iteration.