Skip to content

Commit

Permalink
update DX system;test get_ref_values() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Wan committed Dec 6, 2023
1 parent bbb9b98 commit 2bcd622
Show file tree
Hide file tree
Showing 4 changed files with 329 additions and 23 deletions.
1 change: 1 addition & 0 deletions copper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from copper.chiller import *
from copper.schema import *
from copper.unitary_dx import *
from copper.constants import LOGGING_FORMAT
import sys

Expand Down
156 changes: 155 additions & 1 deletion copper/data/unitary_dx_curves.json
Original file line number Diff line number Diff line change
@@ -1 +1,155 @@
{"place holder": "holder"}
{
"0": {
"eqp_type": "UnitaryDX",
"source": "0",
"model": "X",
"ref_cap": null,
"ref_cap_unit": "ton",
"full_eff": 5.5,
"full_eff_unit": "cop",
"compressor_type": "centrifugal",
"condenser_type": "air",
"compressor_speed": "constant",
"sim_engine": "energyplus",
"min_plr": 0.1,
"min_unloading": 0.2,
"max_plr": 1.0,
"set_of_curves": {
"cap-f-t": {
"out_var": "cap-f-t",
"type": "bi_quad",
"ref_evap_fluid_flow": null,
"ref_cond_fluid_flow": null,
"ref_AED": null,
"ref_AEW": null,
"ref_ect": null,
"ref_lct": null,
"units": "si",
"x_min": 5.0,
"y_min": 24.0,
"x_max": 10.0,
"y_max": 35.0,
"out_min": 0.0,
"out_max": null,
"coeff1": 0.933884,
"coeff2": -0.058212,
"coeff3": 0.00450036,
"coeff4": 0.00243,
"coeff5": 0.000486,
"coeff6": -0.001215,
"coeff7": 0.0,
"coeff8": 0.0,
"coeff9": 0.0,
"coeff10": 0.0
},
"cap-f-f": {
"out_var": "cap-f-f",
"type": "quad",
"ref_evap_fluid_flow": null,
"ref_cond_fluid_flow": null,
"ref_AED": null,
"ref_AEW": null,
"ref_ect": null,
"ref_lct": null,
"units": "si",
"x_min": 0.0,
"y_min": 0.0,
"x_max": 1.0,
"y_max": 1.0,
"out_min": 0.0,
"out_max": null,
"coeff1": 0.088065,
"coeff2": 1.137742,
"coeff3": -0.225806,
"coeff4": 0.0,
"coeff5": 0.0,
"coeff6": 0.0,
"coeff7": 0.0,
"coeff8": 0.0,
"coeff9": 0.0,
"coeff10": 0.0
},
"eir-f-t": {
"out_var": "eir-f-t",
"type": "bi_quad",
"ref_evap_fluid_flow": null,
"ref_cond_fluid_flow": null,
"ref_AED": null,
"ref_AEW": null,
"ref_ect": null,
"ref_lct": null,
"units": "si",
"x_min": 5.0,
"y_min": 24.0,
"x_max": 10.0,
"y_max": 35.0,
"out_min": 0.0,
"out_max": null,
"coeff1": 0.933884,
"coeff2": -0.058212,
"coeff3": 0.00450036,
"coeff4": 0.00243,
"coeff5": 0.000486,
"coeff6": -0.001215,
"coeff7": 0.0,
"coeff8": 0.0,
"coeff9": 0.0,
"coeff10": 0.0
},
"eir-f-f": {
"out_var": "eir-f-f",
"type": "quad",
"ref_evap_fluid_flow": null,
"ref_cond_fluid_flow": null,
"ref_AED": null,
"ref_AEW": null,
"ref_ect": null,
"ref_lct": null,
"units": "si",
"x_min": 0.0,
"y_min": 0.0,
"x_max": 1.0,
"y_max": 1.0,
"out_min": 0.0,
"out_max": null,
"coeff1": 0.088065,
"coeff2": 1.137742,
"coeff3": -0.225806,
"coeff4": 0.0,
"coeff5": 0.0,
"coeff6": 0.0,
"coeff7": 0.0,
"coeff8": 0.0,
"coeff9": 0.0,
"coeff10": 0.0
},
"plf-f-plr": {
"out_var": "plf-f-plr",
"type": "quad",
"ref_evap_fluid_flow": null,
"ref_cond_fluid_flow": null,
"ref_AED": null,
"ref_AEW": null,
"ref_ect": null,
"ref_lct": null,
"units": "si",
"x_min": 0.0,
"y_min": 0.0,
"x_max": 1.0,
"y_max": 1.0,
"out_min": 0.0,
"out_max": null,
"coeff1": 0.088065,
"coeff2": 1.137742,
"coeff3": -0.225806,
"coeff4": 0.0,
"coeff5": 0.0,
"coeff6": 0.0,
"coeff7": 0.0,
"coeff8": 0.0,
"coeff9": 0.0,
"coeff10": 0.0
}
}
}
}
7 changes: 4 additions & 3 deletions copper/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
from copper.units import *
from copper.curves import *
import copper.chiller
import copper.unitary_dx

location = os.path.dirname(os.path.realpath(__file__))
chiller_lib = os.path.join(location, "data", "chiller_curves.json")

unitarydx_lib = os.path.join(location, "data", "unitary_dx_curves.json")

class Library:
def __init__(self, path=chiller_lib, rating_std="", export=False):
Expand Down Expand Up @@ -43,13 +44,13 @@ def __init__(self, path=chiller_lib, rating_std="", export=False):
and not "alt" in p
):
obj_args[p] = vals[p]

# Temporarily set the part load efficiency to the
# full load efficiency, units are assumed to be
# the same
obj_args["part_eff_unit"] = vals["full_eff_unit"]
obj_args["part_eff"] = vals["full_eff"]

# Create instance of the equipment
obj = eval("copper." + vals["eqp_type"].capitalize())(**obj_args)

Expand Down
Loading

0 comments on commit 2bcd622

Please sign in to comment.