개정판 80a83629
issue #000 Export_To_PAP.py 초기값 변경.
HYTOS/HYTOS/Export_To_PAP.py | ||
---|---|---|
412 | 412 |
continue |
413 | 413 |
symbolItem = item[0] |
414 | 414 |
inst_Item = Inst_Item(itemNo =symbolItem.tag_no, type = symbolItem.type, dataSource = "HYTOS") |
415 |
|
|
416 |
|
|
417 | 415 |
connectedItem_connectors = [x for x in symbolItem.connectors if x.connectedItem is not None] |
418 | 416 |
in_connectors = [conn.connectedItem for conn in connectedItem_connectors |
419 | 417 |
if conn.connectedItem and int(conn.connectedItem._conn_index) == 2] |
418 |
|
|
420 | 419 |
inlet_streamLine = None |
421 |
if in_connectors:
|
|
420 |
if len(in_connectors) > 0:
|
|
422 | 421 |
if type(in_connectors[0].parent) is QEngineeringStreamlineItem: |
423 | 422 |
inlet_streamLine = in_connectors[0].parent |
424 | 423 |
|
425 | 424 |
if symbolItem.type.upper() == "Valve".upper(): |
426 | 425 |
if inlet_streamLine: |
427 |
suctp = 0
|
|
428 |
discp = 0
|
|
429 |
diffp = 0
|
|
430 |
if inlet_streamLine.data: |
|
431 |
if symbolItem.attribute:
|
|
432 |
if 'Suct.P' in symbolItem.attribute.keys():
|
|
433 |
suctp = round(symbolItem.attribute['Suct.P'], 3)
|
|
434 |
if 'Disc.P' in symbolItem.attribute.keys():
|
|
435 |
discp = round(symbolItem.attribute['Disc.P'], 3)
|
|
436 |
if 'Diff.P' in symbolItem.attribute.keys():
|
|
437 |
diffp = round(symbolItem.attribute['Diff.P'], 3)
|
|
438 |
|
|
439 |
if datacase_data == Valve_Datacase.Maximum_Flowrate_Case:
|
|
426 |
suctp = ""
|
|
427 |
discp = ""
|
|
428 |
diffp = ""
|
|
429 |
|
|
430 |
if symbolItem.attribute: |
|
431 |
if 'Suct.P' in symbolItem.attribute.keys(): |
|
432 |
suctp = round(symbolItem.attribute['Suct.P'], 3) |
|
433 |
if 'Disc.P' in symbolItem.attribute.keys(): |
|
434 |
discp = round(symbolItem.attribute['Disc.P'], 3) |
|
435 |
if 'Diff.P' in symbolItem.attribute.keys(): |
|
436 |
diffp = round(symbolItem.attribute['Diff.P'], 3) |
|
437 |
|
|
438 |
if datacase_data.upper() == Valve_Datacase.Maximum_Flowrate_Case.upper():
|
|
440 | 439 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="OperatingPressrueMaxIn", value=suctp)) |
441 | 440 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="OperatingPressrueMaxOut", value=discp)) |
442 | 441 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="DifferentialPressMax", value=diffp)) |
443 |
elif datacase_data == Valve_Datacase.Normal_Flowrate_Case:
|
|
442 |
elif datacase_data.upper() == Valve_Datacase.Normal_Flowrate_Case.upper():
|
|
444 | 443 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="OperatingPressrueNorIn", value=suctp)) |
445 | 444 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="OperatingPressrueNorOut", value=discp)) |
446 | 445 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="DifferentialPressNor", value=diffp)) |
447 |
elif datacase_data == Valve_Datacase.Minimum_Flowrate_Case:
|
|
446 |
elif datacase_data.upper() == Valve_Datacase.Minimum_Flowrate_Case.upper():
|
|
448 | 447 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="OperatingPressrueMinIn", value=suctp)) |
449 | 448 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="OperatingPressrueMinOut", value=discp)) |
450 | 449 |
inst_Item.attributes.append(Inst_Attribute(table="Inst_CV", column="DifferentialPressMin", value=diffp)) |
... | ... | |
523 | 522 |
inst_Item.attributes.append(Inst_Attribute(table = "Inst_CV", column = "DensityMin2", value = liquid_density)) |
524 | 523 |
inst_Item.attributes.append(Inst_Attribute(table = "Inst_CV", column = "ViscosityMin2", value = liquid_viscosity)) |
525 | 524 |
elif symbolItem.type == "Compressor": |
526 |
inletPressure = 0
|
|
527 |
dischargePress = 0
|
|
528 |
diffPressure = 0
|
|
525 |
inletPressure = ""
|
|
526 |
dischargePress = ""
|
|
527 |
diffPressure = ""
|
|
529 | 528 |
if symbolItem.attribute: |
530 | 529 |
if 'Suct.P' in symbolItem.attribute.keys(): |
531 | 530 |
inletPressure = round(symbolItem.attribute['Suct.P'], 3) |
... | ... | |
546 | 545 |
molecular_weight = inlet_streamLine.data.molecular_weight |
547 | 546 |
specific_heat_ratio = inlet_streamLine.data.specific_heat_ratio |
548 | 547 |
compress_factor = inlet_streamLine.data.compress_factor |
548 |
|
|
549 | 549 |
inst_Item.attributes.append(Inst_Attribute(table = "eq_compressor", column = "WeightFlow", value = flowrate_mass)) |
550 | 550 |
inst_Item.attributes.append(Inst_Attribute(table = "eq_compressor", column = "InletCapacity", value = flowrate_volume)) |
551 | 551 |
inst_Item.attributes.append(Inst_Attribute(table = "eq_compressor", column = "Inlet_Density", value = density)) |
... | ... | |
555 | 555 |
inst_Item.attributes.append(Inst_Attribute(table = "eq_compressor", column = "InletCompressibility", value = compress_factor)) |
556 | 556 |
inst_Item.attributes.append(Inst_Attribute( table = "eq_compressor", column = "OperatingCase", value = datacase_data)) |
557 | 557 |
elif symbolItem.type == "Pump": |
558 |
suctionPressRated = 0
|
|
559 |
dischargePressRated = 0
|
|
560 |
differentialPressRated = 0
|
|
561 |
differentialHeadRated = 0
|
|
562 |
nPSHaRated = 0
|
|
563 |
vaporPressRated = 0
|
|
564 |
hydraulicPowerRated = 0
|
|
558 |
suctionPressRated = ""
|
|
559 |
dischargePressRated = ""
|
|
560 |
differentialPressRated = ""
|
|
561 |
differentialHeadRated = ""
|
|
562 |
nPSHaRated = ""
|
|
563 |
vaporPressRated = ""
|
|
564 |
hydraulicPowerRated = ""
|
|
565 | 565 |
if symbolItem.attribute: |
566 | 566 |
if 'Suct.P' in symbolItem.attribute.keys(): |
567 | 567 |
suctionPressRated = round(symbolItem.attribute['Suct.P'], 3) |
... | ... | |
577 | 577 |
vaporPressRated = symbolItem.attribute['Vap. P'] |
578 | 578 |
if 'HHP' in symbolItem.attribute.keys(): |
579 | 579 |
hydraulicPowerRated = symbolItem.attribute['HHP'] |
580 |
|
|
580 | 581 |
if datacase_data == Pump_Datacase.Rated_Flow_Case: |
581 | 582 |
inst_Item.attributes.append(Inst_Attribute(table = "eq_pump", column = "SuctionPressRated", value = suctionPressRated)) |
582 | 583 |
inst_Item.attributes.append(Inst_Attribute(table = "eq_pump", column = "DischargePressRated", value = dischargePressRated)) |
내보내기 Unified diff