Example #1
0
def test_simple_sys_dict_methods():
    """Test the to/from dict methods."""
    clear = EnergyWindowMaterialSimpleGlazSys('Clear Window', 5.5, 0.8)
    material_dict = clear.to_dict()
    new_material = EnergyWindowMaterialSimpleGlazSys.from_dict(material_dict)
    assert material_dict == new_material.to_dict()
def material_window_glazing_system(directory):
    simple_sys = EnergyWindowMaterialSimpleGlazSys(
        'Fixed Window 2.00 0.40 0.31', u_factor=1.98, shgc=0.4)
    dest_file = os.path.join(directory, 'material_window_glazing_system.json')
    with open(dest_file, 'w') as fp:
        json.dump(simple_sys.to_dict(), fp, indent=4)