当前位置: 首页>>代码示例>>Python>>正文


Python IDF.save方法代码示例

本文整理汇总了Python中pyidf.idf.IDF.save方法的典型用法代码示例。如果您正苦于以下问题:Python IDF.save方法的具体用法?Python IDF.save怎么用?Python IDF.save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyidf.idf.IDF的用法示例。


在下文中一共展示了IDF.save方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_create_surfacepropertyheattransferalgorithmconstruction

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_surfacepropertyheattransferalgorithmconstruction(self):

        pyidf.validation_level = ValidationLevel.error

        obj = SurfacePropertyHeatTransferAlgorithmConstruction()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_algorithm = "ConductionTransferFunction"
        obj.algorithm = var_algorithm
        # object-list
        var_construction_name = "object-list|Construction Name"
        obj.construction_name = var_construction_name

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.surfacepropertyheattransferalgorithmconstructions[0].name, var_name)
        self.assertEqual(idf2.surfacepropertyheattransferalgorithmconstructions[0].algorithm, var_algorithm)
        self.assertEqual(idf2.surfacepropertyheattransferalgorithmconstructions[0].construction_name, var_construction_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:29,代码来源:test_surfacepropertyheattransferalgorithmconstruction.py

示例2: test_create_exteriorwaterequipment

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_exteriorwaterequipment(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ExteriorWaterEquipment()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_fuel_use_type = "Water"
        obj.fuel_use_type = var_fuel_use_type
        # object-list
        var_schedule_name = "object-list|Schedule Name"
        obj.schedule_name = var_schedule_name
        # real
        var_design_level = 0.0
        obj.design_level = var_design_level
        # alpha
        var_enduse_subcategory = "End-Use Subcategory"
        obj.enduse_subcategory = var_enduse_subcategory

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.exteriorwaterequipments[0].name, var_name)
        self.assertEqual(idf2.exteriorwaterequipments[0].fuel_use_type, var_fuel_use_type)
        self.assertEqual(idf2.exteriorwaterequipments[0].schedule_name, var_schedule_name)
        self.assertAlmostEqual(idf2.exteriorwaterequipments[0].design_level, var_design_level)
        self.assertEqual(idf2.exteriorwaterequipments[0].enduse_subcategory, var_enduse_subcategory)
开发者ID:rbuffat,项目名称:pyidf,代码行数:37,代码来源:test_exteriorwaterequipment.py

示例3: test_create_scheduletypelimits

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_scheduletypelimits(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ScheduleTypeLimits()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # real
        var_lower_limit_value = 2.2
        obj.lower_limit_value = var_lower_limit_value
        # real
        var_upper_limit_value = 3.3
        obj.upper_limit_value = var_upper_limit_value
        # alpha
        var_numeric_type = "Continuous"
        obj.numeric_type = var_numeric_type
        # alpha
        var_unit_type = "Dimensionless"
        obj.unit_type = var_unit_type

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.scheduletypelimitss[0].name, var_name)
        self.assertAlmostEqual(idf2.scheduletypelimitss[0].lower_limit_value, var_lower_limit_value)
        self.assertAlmostEqual(idf2.scheduletypelimitss[0].upper_limit_value, var_upper_limit_value)
        self.assertEqual(idf2.scheduletypelimitss[0].numeric_type, var_numeric_type)
        self.assertEqual(idf2.scheduletypelimitss[0].unit_type, var_unit_type)
开发者ID:rbuffat,项目名称:pyidf,代码行数:37,代码来源:test_scheduletypelimits.py

示例4: test_create_setpointmanagersinglezoneonestageheating

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_setpointmanagersinglezoneonestageheating(self):

        pyidf.validation_level = ValidationLevel.error

        obj = SetpointManagerSingleZoneOneStageHeating()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # real
        var_heating_stage_on_supply_air_setpoint_temperature = 2.2
        obj.heating_stage_on_supply_air_setpoint_temperature = var_heating_stage_on_supply_air_setpoint_temperature
        # real
        var_heating_stage_off_supply_air_setpoint_temperature = 3.3
        obj.heating_stage_off_supply_air_setpoint_temperature = var_heating_stage_off_supply_air_setpoint_temperature
        # object-list
        var_control_zone_name = "object-list|Control Zone Name"
        obj.control_zone_name = var_control_zone_name
        # node
        var_setpoint_node_or_nodelist_name = "node|Setpoint Node or NodeList Name"
        obj.setpoint_node_or_nodelist_name = var_setpoint_node_or_nodelist_name

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.setpointmanagersinglezoneonestageheatings[0].name, var_name)
        self.assertAlmostEqual(idf2.setpointmanagersinglezoneonestageheatings[0].heating_stage_on_supply_air_setpoint_temperature, var_heating_stage_on_supply_air_setpoint_temperature)
        self.assertAlmostEqual(idf2.setpointmanagersinglezoneonestageheatings[0].heating_stage_off_supply_air_setpoint_temperature, var_heating_stage_off_supply_air_setpoint_temperature)
        self.assertEqual(idf2.setpointmanagersinglezoneonestageheatings[0].control_zone_name, var_control_zone_name)
        self.assertEqual(idf2.setpointmanagersinglezoneonestageheatings[0].setpoint_node_or_nodelist_name, var_setpoint_node_or_nodelist_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:37,代码来源:test_setpointmanagersinglezoneonestageheating.py

示例5: test_create_shadingpropertyreflectance

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_shadingpropertyreflectance(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ShadingPropertyReflectance()
        # object-list
        var_shading_surface_name = "object-list|Shading Surface Name"
        obj.shading_surface_name = var_shading_surface_name
        # real
        var_diffuse_solar_reflectance_of_unglazed_part_of_shading_surface = 0.5
        obj.diffuse_solar_reflectance_of_unglazed_part_of_shading_surface = var_diffuse_solar_reflectance_of_unglazed_part_of_shading_surface
        # real
        var_diffuse_visible_reflectance_of_unglazed_part_of_shading_surface = 0.5
        obj.diffuse_visible_reflectance_of_unglazed_part_of_shading_surface = var_diffuse_visible_reflectance_of_unglazed_part_of_shading_surface
        # real
        var_fraction_of_shading_surface_that_is_glazed = 0.5
        obj.fraction_of_shading_surface_that_is_glazed = var_fraction_of_shading_surface_that_is_glazed
        # alpha
        var_glazing_construction_name = "Glazing Construction Name"
        obj.glazing_construction_name = var_glazing_construction_name

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.shadingpropertyreflectances[0].shading_surface_name, var_shading_surface_name)
        self.assertAlmostEqual(idf2.shadingpropertyreflectances[0].diffuse_solar_reflectance_of_unglazed_part_of_shading_surface, var_diffuse_solar_reflectance_of_unglazed_part_of_shading_surface)
        self.assertAlmostEqual(idf2.shadingpropertyreflectances[0].diffuse_visible_reflectance_of_unglazed_part_of_shading_surface, var_diffuse_visible_reflectance_of_unglazed_part_of_shading_surface)
        self.assertAlmostEqual(idf2.shadingpropertyreflectances[0].fraction_of_shading_surface_that_is_glazed, var_fraction_of_shading_surface_that_is_glazed)
        self.assertEqual(idf2.shadingpropertyreflectances[0].glazing_construction_name, var_glazing_construction_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:37,代码来源:test_shadingpropertyreflectance.py

示例6: test_create_zonecontaminantsourceandsinkgenericcutoffmodel

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_zonecontaminantsourceandsinkgenericcutoffmodel(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ZoneContaminantSourceAndSinkGenericCutoffModel()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # object-list
        var_zone_name = "object-list|Zone Name"
        obj.zone_name = var_zone_name
        # real
        var_design_generation_rate_coefficient = 0.0
        obj.design_generation_rate_coefficient = var_design_generation_rate_coefficient
        # object-list
        var_schedule_name = "object-list|Schedule Name"
        obj.schedule_name = var_schedule_name
        # real
        var_cutoff_generic_contaminant_at_which_emission_ceases = 0.0001
        obj.cutoff_generic_contaminant_at_which_emission_ceases = var_cutoff_generic_contaminant_at_which_emission_ceases

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].name, var_name)
        self.assertEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].zone_name, var_zone_name)
        self.assertAlmostEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].design_generation_rate_coefficient, var_design_generation_rate_coefficient)
        self.assertEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].schedule_name, var_schedule_name)
        self.assertAlmostEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].cutoff_generic_contaminant_at_which_emission_ceases, var_cutoff_generic_contaminant_at_which_emission_ceases)
开发者ID:rbuffat,项目名称:pyidf,代码行数:37,代码来源:test_zonecontaminantsourceandsinkgenericcutoffmodel.py

示例7: test_create_weatherpropertyskytemperature

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_weatherpropertyskytemperature(self):

        pyidf.validation_level = ValidationLevel.error

        obj = WeatherPropertySkyTemperature()
        # object-list
        var_name = "object-list|Name"
        obj.name = var_name
        # alpha
        var_calculation_type = "ScheduleValue"
        obj.calculation_type = var_calculation_type
        # object-list
        var_schedule_name = "object-list|Schedule Name"
        obj.schedule_name = var_schedule_name

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.weatherpropertyskytemperatures[0].name, var_name)
        self.assertEqual(idf2.weatherpropertyskytemperatures[0].calculation_type, var_calculation_type)
        self.assertEqual(idf2.weatherpropertyskytemperatures[0].schedule_name, var_schedule_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:29,代码来源:test_weatherpropertyskytemperature.py

示例8: test_create_airflownetworkintrazonelinkage

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_airflownetworkintrazonelinkage(self):

        pyidf.validation_level = ValidationLevel.error

        obj = AirflowNetworkIntraZoneLinkage()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_node_1_name = "Node 1 Name"
        obj.node_1_name = var_node_1_name
        # alpha
        var_node_2_name = "Node 2 Name"
        obj.node_2_name = var_node_2_name
        # object-list
        var_component_name = "object-list|Component Name"
        obj.component_name = var_component_name
        # object-list
        var_airflownetworkmultizonesurface_name = "object-list|AirflowNetwork:MultiZone:Surface Name"
        obj.airflownetworkmultizonesurface_name = var_airflownetworkmultizonesurface_name

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].name, var_name)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].node_1_name, var_node_1_name)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].node_2_name, var_node_2_name)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].component_name, var_component_name)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].airflownetworkmultizonesurface_name, var_airflownetworkmultizonesurface_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:37,代码来源:test_airflownetworkintrazonelinkage.py

示例9: test_create_heatbalancesettingsconductionfinitedifference

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_heatbalancesettingsconductionfinitedifference(self):

        pyidf.validation_level = ValidationLevel.error

        obj = HeatBalanceSettingsConductionFiniteDifference()
        # alpha
        var_difference_scheme = "CrankNicholsonSecondOrder"
        obj.difference_scheme = var_difference_scheme
        # real
        var_space_discretization_constant = 2.2
        obj.space_discretization_constant = var_space_discretization_constant
        # real
        var_relaxation_factor = 0.505
        obj.relaxation_factor = var_relaxation_factor
        # real
        var_inside_face_surface_temperature_convergence_criteria = 0.00500005
        obj.inside_face_surface_temperature_convergence_criteria = var_inside_face_surface_temperature_convergence_criteria

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.heatbalancesettingsconductionfinitedifferences[0].difference_scheme, var_difference_scheme)
        self.assertAlmostEqual(idf2.heatbalancesettingsconductionfinitedifferences[0].space_discretization_constant, var_space_discretization_constant)
        self.assertAlmostEqual(idf2.heatbalancesettingsconductionfinitedifferences[0].relaxation_factor, var_relaxation_factor)
        self.assertAlmostEqual(idf2.heatbalancesettingsconductionfinitedifferences[0].inside_face_surface_temperature_convergence_criteria, var_inside_face_surface_temperature_convergence_criteria)
开发者ID:rbuffat,项目名称:pyidf,代码行数:33,代码来源:test_heatbalancesettingsconductionfinitedifference.py

示例10: test_create_surfacecontrolmovableinsulation

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_surfacecontrolmovableinsulation(self):

        pyidf.validation_level = ValidationLevel.error

        obj = SurfaceControlMovableInsulation()
        # alpha
        var_insulation_type = "Outside"
        obj.insulation_type = var_insulation_type
        # object-list
        var_surface_name = "object-list|Surface Name"
        obj.surface_name = var_surface_name
        # object-list
        var_material_name = "object-list|Material Name"
        obj.material_name = var_material_name
        # object-list
        var_schedule_name = "object-list|Schedule Name"
        obj.schedule_name = var_schedule_name

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.surfacecontrolmovableinsulations[0].insulation_type, var_insulation_type)
        self.assertEqual(idf2.surfacecontrolmovableinsulations[0].surface_name, var_surface_name)
        self.assertEqual(idf2.surfacecontrolmovableinsulations[0].material_name, var_material_name)
        self.assertEqual(idf2.surfacecontrolmovableinsulations[0].schedule_name, var_schedule_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:33,代码来源:test_surfacecontrolmovableinsulation.py

示例11: test_create_outputtablemonthly

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_outputtablemonthly(self):

        pyidf.validation_level = ValidationLevel.error

        obj = OutputTableMonthly()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # integer
        var_digits_after_decimal = 5
        obj.digits_after_decimal = var_digits_after_decimal
        paras = []
        var_variable_or_meter_1_name = "external-list|Variable or Meter 1 Name"
        paras.append(var_variable_or_meter_1_name)
        var_aggregation_type_for_variable_or_meter_1 = "SumOrAverage"
        paras.append(var_aggregation_type_for_variable_or_meter_1)
        obj.add_extensible(*paras)
        

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.outputtablemonthlys[0].name, var_name)
        self.assertEqual(idf2.outputtablemonthlys[0].digits_after_decimal, var_digits_after_decimal)
        index = obj.extensible_field_index("Variable or Meter 1 Name")
        self.assertEqual(idf2.outputtablemonthlys[0].extensibles[0][index], var_variable_or_meter_1_name)
        index = obj.extensible_field_index("Aggregation Type for Variable or Meter 1")
        self.assertEqual(idf2.outputtablemonthlys[0].extensibles[0][index], var_aggregation_type_for_variable_or_meter_1)
开发者ID:rbuffat,项目名称:pyidf,代码行数:36,代码来源:test_outputtablemonthly.py

示例12: test_create_roomairsettingsonenodedisplacementventilation

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_roomairsettingsonenodedisplacementventilation(self):

        pyidf.validation_level = ValidationLevel.error

        obj = RoomAirSettingsOneNodeDisplacementVentilation()
        # object-list
        var_zone_name = "object-list|Zone Name"
        obj.zone_name = var_zone_name
        # real
        var_fraction_of_convective_internal_loads_added_to_floor_air = 0.5
        obj.fraction_of_convective_internal_loads_added_to_floor_air = var_fraction_of_convective_internal_loads_added_to_floor_air
        # real
        var_fraction_of_infiltration_internal_loads_added_to_floor_air = 0.5
        obj.fraction_of_infiltration_internal_loads_added_to_floor_air = var_fraction_of_infiltration_internal_loads_added_to_floor_air

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.roomairsettingsonenodedisplacementventilations[0].zone_name, var_zone_name)
        self.assertAlmostEqual(idf2.roomairsettingsonenodedisplacementventilations[0].fraction_of_convective_internal_loads_added_to_floor_air, var_fraction_of_convective_internal_loads_added_to_floor_air)
        self.assertAlmostEqual(idf2.roomairsettingsonenodedisplacementventilations[0].fraction_of_infiltration_internal_loads_added_to_floor_air, var_fraction_of_infiltration_internal_loads_added_to_floor_air)
开发者ID:rbuffat,项目名称:pyidf,代码行数:29,代码来源:test_roomairsettingsonenodedisplacementventilation.py

示例13: test_create_fluidpropertiesglycolconcentration

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_fluidpropertiesglycolconcentration(self):

        pyidf.validation_level = ValidationLevel.error

        obj = FluidPropertiesGlycolConcentration()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_glycol_type = "EthyleneGlycol"
        obj.glycol_type = var_glycol_type
        # object-list
        var_user_defined_glycol_name = "object-list|User Defined Glycol Name"
        obj.user_defined_glycol_name = var_user_defined_glycol_name
        # real
        var_glycol_concentration = 0.5
        obj.glycol_concentration = var_glycol_concentration

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.fluidpropertiesglycolconcentrations[0].name, var_name)
        self.assertEqual(idf2.fluidpropertiesglycolconcentrations[0].glycol_type, var_glycol_type)
        self.assertEqual(idf2.fluidpropertiesglycolconcentrations[0].user_defined_glycol_name, var_user_defined_glycol_name)
        self.assertAlmostEqual(idf2.fluidpropertiesglycolconcentrations[0].glycol_concentration, var_glycol_concentration)
开发者ID:rbuffat,项目名称:pyidf,代码行数:33,代码来源:test_fluidpropertiesglycolconcentration.py

示例14: test_create_groundheattransferslabinsulation

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_groundheattransferslabinsulation(self):

        pyidf.validation_level = ValidationLevel.error

        obj = GroundHeatTransferSlabInsulation()
        # real
        var_rins_r_value_of_under_slab_insulation = 1.1
        obj.rins_r_value_of_under_slab_insulation = var_rins_r_value_of_under_slab_insulation
        # real
        var_dins_width_of_strip_of_under_slab_insulation = 2.2
        obj.dins_width_of_strip_of_under_slab_insulation = var_dins_width_of_strip_of_under_slab_insulation
        # real
        var_rvins_r_value_of_vertical_insulation = 3.3
        obj.rvins_r_value_of_vertical_insulation = var_rvins_r_value_of_vertical_insulation
        # real
        var_zvins_depth_of_vertical_insulation = 4.4
        obj.zvins_depth_of_vertical_insulation = var_zvins_depth_of_vertical_insulation
        # integer
        var_ivins_flag_is_there_vertical_insulation = 0
        obj.ivins_flag_is_there_vertical_insulation = var_ivins_flag_is_there_vertical_insulation

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertAlmostEqual(idf2.groundheattransferslabinsulations[0].rins_r_value_of_under_slab_insulation, var_rins_r_value_of_under_slab_insulation)
        self.assertAlmostEqual(idf2.groundheattransferslabinsulations[0].dins_width_of_strip_of_under_slab_insulation, var_dins_width_of_strip_of_under_slab_insulation)
        self.assertAlmostEqual(idf2.groundheattransferslabinsulations[0].rvins_r_value_of_vertical_insulation, var_rvins_r_value_of_vertical_insulation)
        self.assertAlmostEqual(idf2.groundheattransferslabinsulations[0].zvins_depth_of_vertical_insulation, var_zvins_depth_of_vertical_insulation)
        self.assertEqual(idf2.groundheattransferslabinsulations[0].ivins_flag_is_there_vertical_insulation, var_ivins_flag_is_there_vertical_insulation)
开发者ID:rbuffat,项目名称:pyidf,代码行数:37,代码来源:test_groundheattransferslabinsulation.py

示例15: test_create_airflownetworkmultizoneexternalnode

# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import save [as 别名]
    def test_create_airflownetworkmultizoneexternalnode(self):

        pyidf.validation_level = ValidationLevel.error

        obj = AirflowNetworkMultiZoneExternalNode()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # real
        var_external_node_height = 2.2
        obj.external_node_height = var_external_node_height
        # object-list
        var_wind_pressure_coefficient_values_object_name = "object-list|Wind Pressure Coefficient Values Object Name"
        obj.wind_pressure_coefficient_values_object_name = var_wind_pressure_coefficient_values_object_name

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.airflownetworkmultizoneexternalnodes[0].name, var_name)
        self.assertAlmostEqual(idf2.airflownetworkmultizoneexternalnodes[0].external_node_height, var_external_node_height)
        self.assertEqual(idf2.airflownetworkmultizoneexternalnodes[0].wind_pressure_coefficient_values_object_name, var_wind_pressure_coefficient_values_object_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:29,代码来源:test_airflownetworkmultizoneexternalnode.py


注:本文中的pyidf.idf.IDF.save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。