Added opaque surfaces
This commit is contained in:
parent
1d4649e252
commit
b5389221c6
@ -16,22 +16,18 @@ hdd_canadian_climate_zones = {'4': 2999,
|
||||
'7B': 6999,
|
||||
'8': 10000
|
||||
}
|
||||
|
||||
heavy_light = {'1000_1979': 0,
|
||||
'1980_2010': 1,
|
||||
'2011_2016': 1,
|
||||
'2017_2019': 1,
|
||||
'2020_3000': 1}
|
||||
surface_types = {
|
||||
"Floor": [
|
||||
{
|
||||
"Urea Formaldehyde Foam": 0.1,
|
||||
"virtual_no_mass": 0,
|
||||
"Cast Concrete": 0.1,
|
||||
"Floor/Roof Screed": 0.07,
|
||||
"Timber Flooring": 0.03
|
||||
},
|
||||
{
|
||||
"Urea Formaldehyde Foam": 0.1,
|
||||
"virtual_no_mass": 0,
|
||||
"Cast Concrete": 0.1,
|
||||
"Floor/Roof Screed": 0.07,
|
||||
"Timber Flooring": 0.03
|
||||
@ -40,37 +36,45 @@ surface_types = {
|
||||
"RoofCeiling": [
|
||||
{
|
||||
"Asphalt 1": 0.01,
|
||||
"virtual_no_mass": 0,
|
||||
"MW Glass Wool (rolls)": 0.1,
|
||||
"3_RVAL_3": 0,
|
||||
"Plasterboard": 0.013
|
||||
},
|
||||
{
|
||||
"Asphalt 1": 0.01,
|
||||
"virtual_no_mass": 0,
|
||||
"MW Glass Wool (rolls)": 0.1,
|
||||
"3_RVAL_3": 0,
|
||||
"Plasterboard": 0.013
|
||||
}
|
||||
],
|
||||
"Wall": [
|
||||
{
|
||||
"Brickwork Outer": 0.1,
|
||||
"virtual_no_mass": 0,
|
||||
"XPS Extruded Polystyrene - CO2 Blowing": 0.0794,
|
||||
"Concrete Block (Medium)": 0.1,
|
||||
"Gypsum Plastering": 0.013
|
||||
},
|
||||
{
|
||||
"Lightweight Metallic Cladding": 0.006,
|
||||
"virtual_no_mass": 0,
|
||||
"XPS Extruded Polystyrene - CO2 Blowing": 0.0877,
|
||||
"Gypsum Plasterboard": 0.013
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
heavy_light = {'1000_1979': 0,
|
||||
'1980_2010': 1,
|
||||
'2011_2016': 1,
|
||||
'2017_2019': 1,
|
||||
'2020_3000': 1}
|
||||
|
||||
materials = {
|
||||
"materials": [
|
||||
{
|
||||
"Urea Formaldehyde Foam": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.04,
|
||||
"density": 10,
|
||||
"specific_heat": 1400,
|
||||
@ -81,6 +85,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Cast Concrete": {
|
||||
"no_mass": False,
|
||||
"conductivity": 1.13,
|
||||
"density": 2000,
|
||||
"specific_heat": 1000,
|
||||
@ -91,6 +96,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Floor/Roof Screed": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.41,
|
||||
"density": 1200,
|
||||
"specific_heat": 840,
|
||||
@ -101,6 +107,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Timber Flooring": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.14,
|
||||
"density": 650,
|
||||
"specific_heat": 1200,
|
||||
@ -111,6 +118,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Asphalt 1": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.7,
|
||||
"density": 2100,
|
||||
"specific_heat": 1000,
|
||||
@ -121,6 +129,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"MW Glass Wool (rolls)": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.04,
|
||||
"density": 12,
|
||||
"specific_heat": 840,
|
||||
@ -131,6 +140,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Plasterboard": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.25,
|
||||
"density": 2800,
|
||||
"specific_heat": 896,
|
||||
@ -141,6 +151,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Brickwork Outer": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.84,
|
||||
"density": 1700,
|
||||
"specific_heat": 800,
|
||||
@ -151,6 +162,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"XPS Extruded Polystyrene- CO2 Blowing": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.034,
|
||||
"density": 35,
|
||||
"specific_heat": 1400,
|
||||
@ -161,6 +173,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Concrete Block (Medium)": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.51,
|
||||
"density": 1400,
|
||||
"specific_heat": 1000,
|
||||
@ -171,6 +184,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Gypsum Plastering": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.4,
|
||||
"density": 1000,
|
||||
"specific_heat": 1000,
|
||||
@ -181,6 +195,7 @@ materials = {
|
||||
},
|
||||
{
|
||||
"Lightweight Metallic Cladding": {
|
||||
"no_mass": False,
|
||||
"conductivity": 0.29,
|
||||
"density": 1250,
|
||||
"specific_heat": 1000,
|
||||
|
@ -13,12 +13,33 @@ def process_formula(formula, hdd):
|
||||
else:
|
||||
return float(equation)
|
||||
|
||||
def create_virtual_no_mass_material(u_value, name, materials, construction):
|
||||
r_value = 0
|
||||
for key in construction:
|
||||
if key != 'virtual_no_mass':
|
||||
material_thickness = construction[key]
|
||||
for material in materials:
|
||||
if key in material.keys():
|
||||
print(material[key]['conductivity'])
|
||||
material_conductivity = material[key]['conductivity']
|
||||
r_value += (material_thickness/material_conductivity)
|
||||
r_value = 1/u_value - r_value
|
||||
new_virtual_no_mass_material = {
|
||||
name: {
|
||||
"no_mass": True,
|
||||
"thermal_resistance": r_value
|
||||
}
|
||||
}
|
||||
materials.append(new_virtual_no_mass_material)
|
||||
|
||||
|
||||
with open(c.nrcan_urls, 'r') as f:
|
||||
urls = xmltodict.parse(f.read(), force_list=['standard'])
|
||||
|
||||
base_url_construction = urls['nrcan']['@base_url_construction']
|
||||
dictionary = {"opaque_surfaces": []}
|
||||
no_mass_index = 0
|
||||
materials = c.materials['materials']
|
||||
for standard in urls['nrcan']['standards_per_period']['standard']:
|
||||
constructions_location = standard['constructions_location']
|
||||
url = f'{base_url_construction}/{constructions_location}'
|
||||
@ -27,9 +48,16 @@ for standard in urls['nrcan']['standards_per_period']['standard']:
|
||||
for table in _json['tables']['surface_thermal_transmittance']['table']:
|
||||
if table['surface'] in c.opaque_surfaces:
|
||||
u_value = process_formula(table['formula'], c.hdd_canadian_climate_zones[climate_zone])
|
||||
|
||||
|
||||
|
||||
layers = {}
|
||||
construction = c.surface_types[table['surface']][c.heavy_light[standard["@period_of_construction"]]]
|
||||
for key in construction:
|
||||
if key != 'virtual_no_mass':
|
||||
layers[key] = construction[key]
|
||||
else:
|
||||
material_name = f'virtual_no_mass_{no_mass_index}'
|
||||
layers[material_name] = 0
|
||||
no_mass_index += 1
|
||||
create_virtual_no_mass_material(u_value,material_name, materials, construction)
|
||||
opaque_surface = {
|
||||
"opaque_surface": {
|
||||
"name": f'{standard["@period_of_construction"]}_{climate_zone}',
|
||||
@ -37,13 +65,12 @@ for standard in urls['nrcan']['standards_per_period']['standard']:
|
||||
"climate_zone": f'{climate_zone}',
|
||||
"type": f"{table['boundary_condition']}{table['surface']}",
|
||||
"u_value": u_value,
|
||||
"layers": []
|
||||
"layers": layers
|
||||
}
|
||||
}
|
||||
|
||||
dictionary['opaque_surfaces'].append(
|
||||
opaque_surface
|
||||
)
|
||||
output_dictionary = {"opaque_surfaces": dictionary['opaque_surfaces'], "materials": c.materials['materials']}
|
||||
output_dictionary = {"opaque_surfaces": dictionary['opaque_surfaces'], "materials": materials}
|
||||
with open(f'{c.output_path}/opaque_surfaces.json', 'w') as f:
|
||||
json.dump(output_dictionary, f, indent=2)
|
||||
|
Loading…
Reference in New Issue
Block a user