예제 #1
0
def material_opaque_wall_gap(directory):
    wall_gap = EnergyMaterialNoMass('Generic Wall Air Gap',
                                    0.15,
                                    roughness='Smooth')
    dest_file = os.path.join(directory, 'material_opaque_wall_gap.json')
    with open(dest_file, 'w') as fp:
        json.dump(wall_gap.to_dict(), fp, indent=4)
예제 #2
0
def test_material_nomass_dict_methods():
    """Test the to/from dict methods."""
    material = EnergyMaterialNoMass('Insulation R-2', 2)
    material_dict = material.to_dict()
    new_material = EnergyMaterialNoMass.from_dict(material_dict)
    assert material_dict == new_material.to_dict()