示例#1
0
 def check_full_vacuum(self, data):
     fName = 'full_vacuum'
     #        vd.xRequired(data,fName,fName)
     value = data[fName]
     vd.xString(value, fName)
     full_vacuum_options = ["yes", "no"]
     vd.xChoice(value, full_vacuum_options, fName)
示例#2
0
 def check_Ncell_basis(self, data):
     fName = 'Ncell_basis'
     vd.xRequired(data,fName,fName)
     value = data[fName]
     vd.xString(value, fName)
     Ncell_basis_options = ["manual","max_possible"]
     vd.xChoice(value, Ncell_basis_options, fName)
示例#3
0
 def check_specie(self, data):
     fName = 'specie'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     specie_options = ["NOx", "SOx", "CO", "Other"]
     vd.xChoice(value, specie_options, fName)
示例#4
0
 def check_emission_units(self, data):
     fName = 'emission_units'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     unit_options = ["ppmv", "mg/Nm3", "mg/Sm3"]
     vd.xChoice(value, unit_options, fName)
示例#5
0
 def check_D_basis(self, data):
     fName = 'D_basis'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     D_basis_options = ["inner", "outer"]
     vd.xChoice(value, D_basis_options, fName)
示例#6
0
 def check_Orientation(self, data):
     fName = 'Orientation'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     Orientation_options = ["horizontal", "vertical"]
     vd.xChoice(value, Orientation_options, fName)
示例#7
0
 def check_Shape(self, data):
     fName = 'Shape'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     Shape_options = ["cylindrical", "spherical"]
     vd.xChoice(value, Shape_options, fName)
示例#8
0
 def check_flue_as(self, data):
     fName = 'flue_as'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     fuel_as_options = ["mole_per_fuelmole", "mass_per_fuelmass"]
     vd.xChoice(value, fuel_as_options, fName)
示例#9
0
 def check_schedule(self, value):
     vd.xString(value)
     schedule_options = [
         '5', '10', '20', '30', '40', '60', '80', '100', '120', '140',
         '160', 'STD', 'XS', 'XXS', '5S', '10S', '40S', '80S'
     ]
     vd.xChoice(value, schedule_options)
示例#10
0
 def check_sampling_basis(self, data):
     fName = 'sampling_basis'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     sampling_basis_options = ["wet", "dry"]
     vd.xChoice(value, sampling_basis_options, fName)
示例#11
0
 def check_sizing_basis(self, data):
     fName = 'sizing_basis'
     vd.xRequired(data,fName,fName)
     value = data[fName]
     vd.xString(value, fName)
     sizing_basis_options = ["buffer_time", "switching_frequency"]
     vd.xChoice(value, sizing_basis_options, fName)
示例#12
0
 def check_calculation_option(self, data):
     fName = 'calculation_option'
     vd.xRequired(data,fName,fName)
     value = data[fName]
     vd.xString(value, fName)
     calculation_options = ["NPS","d","D"]
     vd.xChoice(value, calculation_options, fName)
示例#13
0
 def check_schedule(self, data):
     fName = 'Schedule'
     vd.xRequired(data,fName,fName)
     value = data[fName]
     vd.xString(value, fName)
     schedule_options= ['5', '10', '20', '30', '40', '60', '80', '100', '120', '140', '160', 'STD', 'XS', 'XXS', '5S', '10S', '40S', '80S']
     vd.xChoice(value, schedule_options, fName)
示例#14
0
 def check_oxygen_correction(self, data):
     fName = 'oxygen_correction'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     sampling_options = ["yes", "no"]
     vd.xChoice(value, sampling_options, fName)
示例#15
0
 def check_d_basis(self, data):
     fName = 'd_basis'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     calculation_options = ["calculated", "manual"]
     vd.xChoice(value, calculation_options, fName)
示例#16
0
 def check_cell_range(self, data):
     fName = 'cell_range'
     vd.xRequired(data,fName,fName)
     value = data[fName]
     vd.xString(value, fName)
     cell_range_options = ["L","M","H"]
     vd.xChoice(value, cell_range_options, fName)
示例#17
0
    def check_calculation_option(self, value):
        vd.xString(value)
        calculation_options = [
            "Tdb_RH_P", "Tdb_Twb_P", "Tdb_Tdp_P", "Tdb_W_P", "Tdb_h_P"
        ]

        vd.xChoice(value, calculation_options)
示例#18
0
 def check_composition_type(self, data):
     fName = 'composition_type'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     composition_type_options = ["mole_percent", "mass_percent"]
     vd.xChoice(value, composition_type_options, fName)
示例#19
0
 def check_insulation_type(self, value):
     vd.xString(value)
     item_options = [
         "PVC", "XLPE", "MIN_LT_500", "MIN_LT_750", "MIN_HT_500",
         "MIN_HT_750"
     ]
     vd.xChoice(value, item_options)
示例#20
0
 def check_calculation_option(self, value):
     vd.xString(value)
     calculation_options = [
                         "calcSPL",
                         "calcPWL",
                         "calcDistance"
                         ]
     vd.xChoice(value, calculation_options)
示例#21
0
    def check_material(self, value):
        vd.xString(value)
        material_options = [
            "Carbon Steel(non-corroded)", "Carbon Steel(corroded)",
            "Stainless Steel", "Titanium and Cu-Ni", "Glass Reinforced Pipe",
            "Polyethylene (PVC)"
        ]

        vd.xChoice(value, material_options)
示例#22
0
 def check_MOC(self, data):
     fName = 'MOC'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     MOC_options = [
         "SA285-GrC", "SA516-Gr55", "SA516-Gr60", "SA516-Gr70",
         "SA240-Tp304L", "SA240-Tp316L", "Other"
     ]
     vd.xChoice(value, MOC_options, fName)
示例#23
0
 def check_Tc_basis(self, data):
     if ('short_circuit_calculation' not in data):
         return
     if (data['short_circuit_calculation']['_val'] != 'yes'):
         return
     fName = 'Tc_basis'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     item_options = ["default", "custom"]
     vd.xChoice(value, item_options, fName)
示例#24
0
 def check_Pinlet_cooler_basis(self, data):
     if ('interstage_cooling' not in data):
         return
     if (data['interstage_cooling']['_val'] == 'No'):
         return
     fName = 'Pinlet_cooler_basis'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     Pinlet_cooler_basis_options = ["as_specified", "geometric_mean"]
     vd.xChoice(value, Pinlet_cooler_basis_options, fName)
示例#25
0
    def check_conductor_type(self, data):
        if ('insulation_type' not in data):
            return

        fName = 'conductor_type'
        vd.xRequired(data, fName, fName)
        value = data[fName]
        vd.xString(value, fName)
        insulation_type = data['insulation_type']['_val']
        item_options = get_available_conductors(insulation_type)
        vd.xChoice(value, item_options, fName)
示例#26
0
 def check_underground_spacing(self, data):
     if ('installation_method' not in data):
         return
     if (data['installation_method']['_val'] not in ["D1", "D2"]):
         return
     fName = 'underground_spacing'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     installation_method = data['installation_method']['_val']
     item_options = get_available_underground_spacing(installation_method)
     vd.xChoice(value, item_options, fName)
示例#27
0
 def check_Head1(self, data):
     if ('Shape' not in data):
         return
     if (data['Shape']['_val'] != 'cylindrical'):
         return
     fName = 'Head1'
     vd.xRequired(data, fName, fName)
     value = data[fName]
     vd.xString(value, fName)
     head_options = [
         "ellipsoidal", "torispherical", "hemispherical", "conical",
         "toriconical"
     ]
     vd.xChoice(value, head_options, fName)
示例#28
0
    def check_installation_method(self, data):
        if ('insulation_type' not in data):
            return
        if ('cable_type' not in data):
            return

        fName = 'installation_method'
        vd.xRequired(data, fName, fName)
        value = data[fName]
        vd.xString(value, fName)
        insulation_type = data['insulation_type']['_val']
        cable_type = data['cable_type']['_val']
        item_options = get_available_installationMethods(
            insulation_type, cable_type)
        vd.xChoice(value, item_options, fName)
示例#29
0
    def check_installation_type(self, data):
        if ('installation_method' not in data):
            return
        if (data['installation_method']['_val'] not in ["C", "E", "F", "G"]):
            return
        if ('cable_type' not in data):
            return

        fName = 'installation_type'
        vd.xRequired(data, fName, fName)
        value = data[fName]
        vd.xString(value, fName)
        installation_method = data['installation_method']['_val']
        cable_type = data['cable_type']['_val']
        item_options = get_available_installationTypes(installation_method,
                                                       cable_type)
        vd.xChoice(value, item_options, fName)
示例#30
0
 def check_convert(self, value):
     vd.xString(value)
     convert_options = ["cd2lux", "lux2cd"]
     vd.xChoice(value, convert_options)