Skip to content
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

Modifications for GHE #526

Merged
merged 13 commits into from
Mar 23, 2023
70 changes: 68 additions & 2 deletions geojson_modelica_translator/system_parameters/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,78 @@
"items": {
"$ref": "#/definitions/battery_bank_parameters"
}
},
"soil": {
"description": "Soil properties for Ground Heat Exchanger sizing",
"type": "object",
"properties": {
"conductivity": {
"description": "The conductivity of the soil, in units of W/m-K.",
"type": "number"
},
"rho_cp": {
"description": "The volumetric heat capacity of the soil, in units of J/m^3-K",
"type": "number"
},
"undisturbed_temp": {
"description": "The undisturbed average soil temperature, in units of degrees Celsius.",
"type": "number"
}
}
},
"pipe": {
"description": "Pipe properties for Ground Heat Exchanger sizing",
"type": "object",
"properties": {
"inner_radius": {
"description": "The radius of the inner pipe surface, in meters.",
"type": "number"
},
"outer_radius": {
"description": "The radius of the outer pipe surface, in meters.",
"type": "number"
},
"shank_spacing": {
"description": "The spacing between the U-tube legs, as referenced from outer surface of the pipes (i.e. not referenced from each pipes respective centerline), in meters.",
"type": "number"
},
"roughness": {
"description": "The surface roughness of the pipe, in meters.",
"type": "number"
},
"conductivity": {
"description": "The conductivity of the pipe material, in W/m-K.",
"type": "number"
},
"rho_cp": {
"description": "The volumetric heat capacity of the pipe material, in J/m^3-K",
"type": "number"
}
}
},
"borehole": {
"description": "Pipe properties for Ground Heat Exchanger sizing",
"type": "object",
"properties": {
"length": {
"description": "The length of the borehole, in meters.",
"type": "number"
},
"buried_depth": {
"description": "The depth below the ground surface to the top of the borehole, in meters.",
"type": "number"
},
"radius": {
"description": "The radius of the borehole, in meters",
"type": "number"
}
}
tanushree04 marked this conversation as resolved.
Show resolved Hide resolved
}
},
"additionalProperties": false,
"required": [
"weather"
]
],
"additionalProperties": false
},
"topology_def": {
"title": "defaults",
Expand Down
136 changes: 136 additions & 0 deletions tests/system_parameters/data/system_params_ghe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"weather": "../../data_shared/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos",
"buildings": [
{
"geojson_id": "abcd1234",
"ets_model": "Indirect Heating and Cooling",
"ets_indirect_parameters": {
"heat_flow_nominal": 8000,
"heat_exchanger_efficiency": 0.8,
"nominal_mass_flow_district": 0.5,
"nominal_mass_flow_building": 0.5,
"valve_pressure_drop": 6000,
"heat_exchanger_secondary_pressure_drop": 500,
"heat_exchanger_primary_pressure_drop": 500,
"cooling_supply_water_temperature_building": 7,
"heating_supply_water_temperature_building": 50,
"delta_temp_chw_building": 5,
"delta_temp_chw_district": 8,
"delta_temp_hw_building": 15,
"delta_temp_hw_district": 20,
"cooling_controller_y_max": 1,
"cooling_controller_y_min": 0,
"heating_controller_y_max": 1,
"heating_controller_y_min": 0
}
},
{
"geojson_id": "defgh2345",
"load_model": "spawn",
"load_model_parameters": {
"spawn": {
"idf_filename": "path to a file",
"has_liquid_heating": true,
"has_electric_heating": false,
"has_liquid_cooling": true,
"has_electric_cooling": false,
"temp_chw_supply": 7,
"temp_chw_return": 12,
"temp_hw_supply": 40,
"temp_hw_return": 35,
"temp_setpoint_cooling": 20,
"temp_setpoint_heating": 24,
"thermal_zone_names": [
"zone a",
"zone_b"
],
"zone_nom_htg_loads": [
3000,
3000
],
"zone_nom_clg_loads": [
-8750,
-8750
]
}
},
"ets_model": "Indirect Heating and Cooling",
"ets_indirect_parameters": {
"heat_flow_nominal": 8000,
"heat_exchanger_efficiency": 0.8,
"nominal_mass_flow_district": 0.5,
"nominal_mass_flow_building": 0.5,
"valve_pressure_drop": 6000,
"heat_exchanger_secondary_pressure_drop": 500,
"heat_exchanger_primary_pressure_drop": 500,
"cooling_supply_water_temperature_building": 7,
"heating_supply_water_temperature_building": 50,
"delta_temp_chw_building": 5,
"delta_temp_chw_district": 8,
"delta_temp_hw_building": 15,
"delta_temp_hw_district": 20,
"cooling_controller_y_max": 1,
"cooling_controller_y_min": 0,
"heating_controller_y_max": 1,
"heating_controller_y_min": 0
}
}
],
"district_system": {
"fourth_generation": {
"central_cooling_plant_parameters": {
"heat_flow_nominal": 7999,
"cooling_tower_fan_power_nominal": 4999,
"mass_chw_flow_nominal": 9.9,
"chiller_water_flow_minimum": 9.9,
"mass_cw_flow_nominal": 9.9,
"chw_pump_head": 300000,
"cw_pump_head": 200000,
"pressure_drop_chw_nominal": 5999,
"pressure_drop_cw_nominal": 5999,
"pressure_drop_setpoint": 49999,
"temp_setpoint_chw": 6,
"pressure_drop_chw_valve_nominal": 5999,
"pressure_drop_cw_pum_nominal": 5999,
"temp_air_wb_nominal": 24.9,
"temp_cw_in_nominal": 34.9,
"cooling_tower_water_temperature_difference_nominal": 6.56,
"delta_temp_approach": 3.25,
"ratio_water_air_nominal": 0.6
},
"central_heating_plant_parameters": {
"heat_flow_nominal": 8001,
"mass_hhw_flow_nominal": 11,
"boiler_water_flow_minimum": 11,
"pressure_drop_hhw_nominal": 55001,
"pressure_drop_setpoint": 50000,
"temp_setpoint_hhw": 54,
"pressure_drop_hhw_valve_nominal": 6001,
"chp_installed": false
}
}
},
"connectors": {
"pipe_diameter": 12,
"pipe_insulation_rvalue": 5,
"pipe_location": "Tunnel"
},
"soil": {
"conductivity": 2.0,
"rho_cp": 2343493,
"undisturbed_temp": 18.3
},
"pipe": {
"inner_radius": 0.0108,
"outer_radius": 0.0133,
"shank_spacing": 0.0323,
"roughness": 0.000001,
"conductivity": 0.4,
"rho_cp": 1542000
},
"borehole": {
"length": 96.0,
"buried_depth": 2.0,
"radius": 0.075
}
}
7 changes: 7 additions & 0 deletions tests/system_parameters/test_system_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def test_load_system_parameters_2(self):
sdp = SystemParameters(filename)
self.assertIsNotNone(sdp)

def test_load_system_parameters_ghe(self):
filename = self.data_dir / 'system_params_ghe.json'
sdp = SystemParameters(filename)
self.assertIsNotNone(sdp)
self.assertEqual([], sdp.validate())

def test_missing_file(self):
fn = "non-existent-path"
with self.assertRaises(Exception) as exc:
Expand Down Expand Up @@ -93,6 +99,7 @@ def test_errors(self):
self.assertIn("'temp_setpoint_heating' is a required property", sp.validate())
self.assertIn("5 is not one of [1, 2, 3, 4]", sp.validate())


def test_get_param(self):
data = {
"weather": "path/to/weatherfile.mos",
Expand Down