개정판 a745f653
issue #000 Export_To_PAP.py 업로드 데이터 생성 진행중
(Pump, Compressor, Valve)
Change-Id: I30452790062b01e8724c9454094c13dddb12bdb5
HYTOS/HYTOS/AppDocData.py | ||
---|---|---|
47 | 47 |
self.dataSource = dataSource |
48 | 48 |
self.attributes = [] |
49 | 49 |
def printf(self): |
50 |
print(f"""itemNo = {self.itemNo}, type ={self.type}, dataSource = {self.dataSource}""") |
|
50 | 51 |
for attr in self.attributes: |
51 | 52 |
print(f"""{attr.table}.{attr.column} : {attr.value} """) |
53 |
print(f"""***********************************************************************""") |
|
52 | 54 |
|
53 | 55 |
class Inst_Attribute: |
54 | 56 |
def __init__(self, name, column, value): |
55 | 57 |
self.table = name |
56 | 58 |
self.column = column |
59 |
if value is None: |
|
60 |
value = '' |
|
57 | 61 |
self.value = value |
58 | 62 |
|
59 | 63 |
class PAPUploadInformation: |
HYTOS/HYTOS/Export_To_PAP.py | ||
---|---|---|
403 | 403 |
|
404 | 404 |
if item: |
405 | 405 |
symbolItem = item[0] |
406 |
ItemNo = symbolItem.tag_no
|
|
407 |
DataSource = "HYTOS" |
|
406 |
inst_Item = Inst_Item(itemNo =symbolItem.tag_no, type = symbolItem.type, dataSource = "HYTOS")
|
|
407 |
|
|
408 | 408 |
if symbolItem.type not in ["Valve", "Compressor", "Pump"]: |
409 | 409 |
continue |
410 | 410 |
|
411 |
inst_item = Inst_Item(ItemNo, symbolItem.type, DataSource)
|
|
411 |
streamLine = None
|
|
412 | 412 |
connectedItem_connectors = [x for x in symbolItem.connectors if x.connectedItem is not None] |
413 | 413 |
in_connectors = [conn.connectedItem for conn in connectedItem_connectors |
414 | 414 |
if conn.connectedItem and int(conn.connectedItem._conn_index) == 2] |
415 |
if in_connectors: |
|
416 |
if type(in_connectors[0].parent) is QEngineeringStreamlineItem: |
|
417 |
streamLine = in_connectors[0].parent |
|
418 |
|
|
415 | 419 |
if symbolItem.type == "Valve": |
416 |
if in_connectors: |
|
417 |
if type(in_connectors[0].parent) is QEngineeringStreamlineItem: |
|
418 |
streamLine = in_connectors[0].parent |
|
419 |
if streamLine.data: |
|
420 |
streamLine_hmb_data = streamLine.data |
|
421 |
suctp = 0 |
|
422 |
discp = 0 |
|
423 |
diffp = 0 |
|
424 |
if symbolItem.attribute: |
|
425 |
suctp = round(symbolItem.attribute['Suct.P'], 3) |
|
426 |
discp = round(symbolItem.attribute['Disc.P'], 3) |
|
427 |
diffp = round(symbolItem.attribute['Diff.P'], 3) |
|
428 |
if streamLine_hmb_data.phase_type.upper() != 'Mixed'.upper(): |
|
429 |
flowrate_mass = streamLine_hmb_data.flowrate_mass |
|
430 |
density = streamLine_hmb_data.density |
|
431 |
|
|
432 |
viscosity = streamLine_hmb_data.viscosity |
|
433 |
temperature = streamLine_hmb_data.temperature |
|
434 |
molecular_weight = streamLine_hmb_data.molecular_weight |
|
435 |
specific_heat_ratio = streamLine_hmb_data.specific_heat_ratio |
|
436 |
compress_factor = streamLine_hmb_data.compress_factor |
|
437 |
|
|
438 |
if datacase_data == Valve_Datacase.Maximum_Flowrate_Case: |
|
439 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","OperatingPressrueMaxIn", suctp)) |
|
440 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","OperatingPressrueMaxOut", discp)) |
|
441 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","DifferentialPressMax",diffp)) |
|
442 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","FlowrateMax1", flowrate_mass)) |
|
443 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","DensityMax1", density)) |
|
444 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMax1", viscosity)) |
|
445 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingTemperatureMax", temperature)) |
|
446 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "MolecularWeightNor", molecular_weight)) |
|
447 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "SpecificHeatRatio", specific_heat_ratio)) |
|
448 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "Compressibility", compress_factor)) |
|
449 |
elif datacase_data == Valve_Datacase.Normal_Flowrate_Case: |
|
450 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","OperatingPressrueNorIn", suctp)) |
|
451 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","OperatingPressrueNorOut",discp)) |
|
452 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","DifferentialPressNor", diffp)) |
|
453 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","FlowrateNor1", flowrate_mass)) |
|
454 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","DensityNor1", density)) |
|
455 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityNor1", viscosity)) |
|
456 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingTemperatureNor", temperature)) |
|
457 |
elif datacase_data == Valve_Datacase.Minimum_Flowrate_Case: |
|
458 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","OperatingPressrueMinIn", suctp)) |
|
459 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","OperatingPressrueMinOut",discp)) |
|
460 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","DifferentialPressMin", diffp)) |
|
461 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","FlowrateMin1", flowrate_mass)) |
|
462 |
inst_item.attributes.append(Inst_Attribute("Inst_CV","DensityMin1", density)) |
|
463 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMin1", viscosity)) |
|
464 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingTemperatureMin", temperature)) |
|
465 |
else: |
|
466 |
flowrate_volume = streamLine_hmb_data.flowrate_volume |
|
467 |
density = streamLine_hmb_data.density |
|
468 |
viscosity = streamLine_hmb_data.viscosity |
|
469 |
temperature = streamLine_hmb_data.temperature |
|
470 |
molecular_weight = streamLine_hmb_data.molecular_weight |
|
471 |
specific_heat_ratio = streamLine_hmb_data.specific_heat_ratio |
|
472 |
compress_factor = streamLine_hmb_data.compress_factor |
|
473 |
|
|
474 |
##vapor |
|
475 |
vapor_flowrate_mass = streamLine_hmb_data.vapor_flowrate_mass |
|
476 |
vapor_density = streamLine_hmb_data.vapor_density |
|
477 |
vapor_viscosity = streamLine_hmb_data.vapor_viscosity |
|
478 |
vapor_temperature = streamLine_hmb_data.vapor_temperature |
|
479 |
vapor_molecular_weight = streamLine_hmb_data.vapor_molecular_weight |
|
480 |
vapor_compress_factor = streamLine_hmb_data.vapor_compress_factor |
|
481 |
|
|
482 |
##liquid |
|
483 |
liquid_flowrate_mass = streamLine_hmb_data.liquid_flowrate_mass |
|
484 |
liquid_density = streamLine_hmb_data.liquid_density |
|
485 |
liquid_viscosity = streamLine_hmb_data.liquid_viscosity |
|
486 |
|
|
487 |
if datacase_data == Valve_Datacase.Maximum_Flowrate_Case: |
|
488 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueMaxIn", suctp)) |
|
489 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueMaxOut", discp)) |
|
490 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DifferentialPressMax", diffp)) |
|
491 |
|
|
492 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateMax1", vapor_flowrate_mass)) |
|
493 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DensityMax1", vapor_density)) |
|
494 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMax1", vapor_viscosity)) |
|
495 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingTemperatureMax", vapor_temperature)) |
|
496 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "MolecularWeightNor", vapor_molecular_weight)) |
|
497 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "Compressibility", vapor_compress_factor)) |
|
498 |
|
|
499 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateMax2", liquid_flowrate_mass)) |
|
500 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DensityMax2", liquid_density)) |
|
501 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMax2", liquid_viscosity)) |
|
502 |
elif datacase_data == Valve_Datacase.Normal_Flowrate_Case: |
|
503 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueNorIn", suctp)) |
|
504 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueNorOut", discp)) |
|
505 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DifferentialPressNor", diffp)) |
|
506 |
|
|
507 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateNor1", vapor_flowrate_mass)) |
|
508 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DensityNor1", vapor_density)) |
|
509 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityNor1", vapor_viscosity)) |
|
510 |
|
|
511 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateNor2", liquid_flowrate_mass)) |
|
512 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DensityNor2", liquid_density)) |
|
513 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityNor2", liquid_viscosity)) |
|
514 |
elif datacase_data == Valve_Datacase.Minimum_Flowrate_Case: |
|
515 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueMinIn", suctp)) |
|
516 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueMinOut", discp)) |
|
517 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DifferentialPressMin", diffp)) |
|
518 |
|
|
519 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateMin1", vapor_flowrate_mass)) |
|
520 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DensityMin1", vapor_density)) |
|
521 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMin1", vapor_viscosity)) |
|
522 |
|
|
523 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateMin2", liquid_flowrate_mass)) |
|
524 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "DensityMin2", liquid_density)) |
|
525 |
inst_item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMin2", liquid_viscosity)) |
|
526 |
inst_Items.append(inst_item) |
|
420 |
if streamLine: |
|
421 |
suctp = 0 |
|
422 |
discp = 0 |
|
423 |
diffp = 0 |
|
424 |
if streamLine.data: |
|
425 |
if symbolItem.attribute: |
|
426 |
suctp = round(symbolItem.attribute['Suct.P'], 3) |
|
427 |
discp = round(symbolItem.attribute['Disc.P'], 3) |
|
428 |
diffp = round(symbolItem.attribute['Diff.P'], 3) |
|
429 |
if datacase_data == Valve_Datacase.Maximum_Flowrate_Case: |
|
430 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueMaxIn", suctp)) |
|
431 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueMaxOut", discp)) |
|
432 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DifferentialPressMax", diffp)) |
|
433 |
elif datacase_data == Valve_Datacase.Normal_Flowrate_Case: |
|
434 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueNorIn", suctp)) |
|
435 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueNorOut", discp)) |
|
436 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DifferentialPressNor", diffp)) |
|
437 |
elif datacase_data == Valve_Datacase.Minimum_Flowrate_Case: |
|
438 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueMinIn", suctp)) |
|
439 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingPressrueMinOut", discp)) |
|
440 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DifferentialPressMin", diffp)) |
|
441 |
|
|
442 |
if streamLine.data.phase_type.upper() != 'Mixed'.upper(): |
|
443 |
flowrate_mass = streamLine.data.flowrate_mass |
|
444 |
density = streamLine.data.density |
|
445 |
viscosity = streamLine.data.viscosity |
|
446 |
temperature = streamLine.data.temperature |
|
447 |
molecular_weight = streamLine.data.molecular_weight |
|
448 |
specific_heat_ratio = streamLine.data.specific_heat_ratio |
|
449 |
compress_factor = streamLine.data.compress_factor |
|
450 |
|
|
451 |
if datacase_data == Valve_Datacase.Maximum_Flowrate_Case: |
|
452 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV","FlowrateMax1", flowrate_mass)) |
|
453 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV","DensityMax1", density)) |
|
454 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMax1", viscosity)) |
|
455 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingTemperatureMax", temperature)) |
|
456 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "MolecularWeightNor", molecular_weight)) |
|
457 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "SpecificHeatRatio", specific_heat_ratio)) |
|
458 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "Compressibility", compress_factor)) |
|
459 |
elif datacase_data == Valve_Datacase.Normal_Flowrate_Case: |
|
460 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV","FlowrateNor1", flowrate_mass)) |
|
461 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV","DensityNor1", density)) |
|
462 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityNor1", viscosity)) |
|
463 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingTemperatureNor", temperature)) |
|
464 |
elif datacase_data == Valve_Datacase.Minimum_Flowrate_Case: |
|
465 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV","FlowrateMin1", flowrate_mass)) |
|
466 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV","DensityMin1", density)) |
|
467 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMin1", viscosity)) |
|
468 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingTemperatureMin", temperature)) |
|
469 |
else: |
|
470 |
flowrate_volume = streamLine.data.flowrate_volume |
|
471 |
density = streamLine.data.density |
|
472 |
viscosity = streamLine.data.viscosity |
|
473 |
temperature = streamLine.data.temperature |
|
474 |
molecular_weight = streamLine.data.molecular_weight |
|
475 |
specific_heat_ratio = streamLine.data.specific_heat_ratio |
|
476 |
compress_factor = streamLine.data.compress_factor |
|
477 |
|
|
478 |
##vapor |
|
479 |
vapor_flowrate_mass = streamLine.data.vapor_flowrate_mass |
|
480 |
vapor_density = streamLine.data.vapor_density |
|
481 |
vapor_viscosity = streamLine.data.vapor_viscosity |
|
482 |
vapor_temperature = streamLine.data.vapor_temperature |
|
483 |
vapor_molecular_weight = streamLine.data.vapor_molecular_weight |
|
484 |
vapor_compress_factor = streamLine.data.vapor_compress_factor |
|
485 |
|
|
486 |
##liquid |
|
487 |
liquid_flowrate_mass = streamLine.data.liquid_flowrate_mass |
|
488 |
liquid_density = streamLine.data.liquid_density |
|
489 |
liquid_viscosity = streamLine.data.liquid_viscosity |
|
490 |
|
|
491 |
if datacase_data == Valve_Datacase.Maximum_Flowrate_Case: |
|
492 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateMax1", vapor_flowrate_mass)) |
|
493 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DensityMax1", vapor_density)) |
|
494 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMax1", vapor_viscosity)) |
|
495 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "OperatingTemperatureMax", vapor_temperature)) |
|
496 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "MolecularWeightNor", vapor_molecular_weight)) |
|
497 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "Compressibility", vapor_compress_factor)) |
|
498 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateMax2", liquid_flowrate_mass)) |
|
499 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DensityMax2", liquid_density)) |
|
500 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMax2", liquid_viscosity)) |
|
501 |
elif datacase_data == Valve_Datacase.Normal_Flowrate_Case: |
|
502 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateNor1", vapor_flowrate_mass)) |
|
503 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DensityNor1", vapor_density)) |
|
504 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityNor1", vapor_viscosity)) |
|
505 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateNor2", liquid_flowrate_mass)) |
|
506 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DensityNor2", liquid_density)) |
|
507 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityNor2", liquid_viscosity)) |
|
508 |
elif datacase_data == Valve_Datacase.Minimum_Flowrate_Case: |
|
509 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateMin1", vapor_flowrate_mass)) |
|
510 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DensityMin1", vapor_density)) |
|
511 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMin1", vapor_viscosity)) |
|
512 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "FlowrateMin2", liquid_flowrate_mass)) |
|
513 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "DensityMin2", liquid_density)) |
|
514 |
inst_Item.attributes.append(Inst_Attribute("Inst_CV", "ViscosityMin2", liquid_viscosity)) |
|
527 | 515 |
elif symbolItem.type == "Compressor": |
528 | 516 |
inletPressure = 0 |
529 | 517 |
dischargePress = 0 |
530 | 518 |
diffPressure = 0 |
531 | 519 |
if symbolItem.attribute: |
532 |
attr = symbolItem.attribute |
|
533 |
if len(attr) > 0: |
|
534 |
inletPressure = round(attr['Suct.P'], 3) |
|
535 |
dischargePress = round(attr['Disc.P'], 3) |
|
536 |
diffPressure = round(attr['Diff.P'], 3) |
|
537 |
|
|
538 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "InletPressure", inletPressure)) |
|
539 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "DischargePress", dischargePress)) |
|
540 |
inst_item.attributes.append(Inst_Attribute("eq_rotating", "DiffPressure", diffPressure)) |
|
541 |
|
|
542 |
if in_connectors: |
|
543 |
if type(in_connectors[0].parent) is QEngineeringStreamlineItem: |
|
544 |
streamLine = in_connectors[0].parent |
|
545 |
if streamLine.data: |
|
546 |
flowrate_mass = streamLine_hmb_data.flowrate_mass |
|
547 |
flowrate_volume = streamLine_hmb_data.flowrate_volume |
|
548 |
density = streamLine_hmb_data.density |
|
549 |
viscosity = streamLine_hmb_data.viscosity |
|
550 |
temperature = streamLine_hmb_data.temperature |
|
551 |
molecular_weight = streamLine_hmb_data.molecular_weight |
|
552 |
specific_heat_ratio = streamLine_hmb_data.specific_heat_ratio |
|
553 |
compress_factor = streamLine_hmb_data.compress_factor |
|
554 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "WeightFlow", flowrate_mass)) |
|
555 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "InletCapacity", flowrate_volume)) |
|
556 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "Inlet_Density", density)) |
|
557 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "InletTemp", temperature)) |
|
558 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "MolecularWeight", molecular_weight)) |
|
559 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "InletCpCv", specific_heat_ratio)) |
|
560 |
inst_item.attributes.append(Inst_Attribute("eq_compressor", "InletCompressibility", compress_factor)) |
|
520 |
inletPressure = round(symbolItem.attribute['Suct.P'], 3) |
|
521 |
dischargePress = round(symbolItem.attribute['Disc.P'], 3) |
|
522 |
diffPressure = round(symbolItem.attribute['Diff.P'], 3) |
|
523 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "InletPressure", inletPressure)) |
|
524 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "DischargePress", dischargePress)) |
|
525 |
inst_Item.attributes.append(Inst_Attribute("eq_rotating", "DiffPressure", diffPressure)) |
|
526 |
if streamLine: |
|
527 |
if streamLine.data: |
|
528 |
flowrate_mass = streamLine.data.flowrate_mass |
|
529 |
flowrate_volume = streamLine.data.flowrate_volume |
|
530 |
density = streamLine.data.density |
|
531 |
viscosity = streamLine.data.viscosity |
|
532 |
temperature = streamLine.data.temperature |
|
533 |
molecular_weight = streamLine.data.molecular_weight |
|
534 |
specific_heat_ratio = streamLine.data.specific_heat_ratio |
|
535 |
compress_factor = streamLine.data.compress_factor |
|
536 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "WeightFlow", flowrate_mass)) |
|
537 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "InletCapacity", flowrate_volume)) |
|
538 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "Inlet_Density", density)) |
|
539 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "InletTemp", temperature)) |
|
540 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "MolecularWeight", molecular_weight)) |
|
541 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "InletCpCv", specific_heat_ratio)) |
|
542 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "InletCompressibility", compress_factor)) |
|
543 |
|
|
544 |
inst_Item.attributes.append(Inst_Attribute("eq_compressor", "OperatingCase", datacase_data)) |
|
545 |
|
|
561 | 546 |
elif symbolItem.type == "Pump": |
562 | 547 |
suctionPressRated = 0 |
563 | 548 |
dischargePressRated = 0 |
... | ... | |
566 | 551 |
nPSHaRated = 0 |
567 | 552 |
vaporPressRated = 0 |
568 | 553 |
if symbolItem.attribute: |
569 |
attr = symbolItem.attribute |
|
570 |
if len(attr) > 0: |
|
571 |
suctionPressRated = round(attr['Suct.P'], 3) |
|
572 |
dischargePressRated = round(attr['Disc.P'], 3) |
|
573 |
differentialPressRated = round(attr['Diff.P'], 3) |
|
574 |
differentialHeadRated = round(attr['Head'], 3) |
|
575 |
nPSHaRated = round(attr['NPSHa'], 3) |
|
576 |
vaporPressRated = attr['Vap. P'] |
|
577 |
|
|
578 |
inst_item.attributes.append( |
|
579 |
Inst_Attribute("eq_compressor", "InletPressure", inletPressure)) |
|
580 |
inst_item.attributes.append( |
|
581 |
Inst_Attribute("eq_compressor", "DischargePress", dischargePress)) |
|
582 |
inst_item.attributes.append(Inst_Attribute("eq_rotating", "DiffPressure", diffPressure)) |
|
583 |
|
|
584 |
if in_connectors: |
|
585 |
if type(in_connectors[0].parent) is QEngineeringStreamlineItem: |
|
586 |
streamLine = in_connectors[0].parent |
|
587 |
if streamLine.data: |
|
588 |
flowrate_volume = streamLine_hmb_data.flowrate_volume |
|
589 |
density = streamLine_hmb_data.density |
|
590 |
viscosity = streamLine_hmb_data.viscosity |
|
591 |
temperature = streamLine_hmb_data.temperature |
|
592 |
|
|
593 |
inst_item.printf() |
|
554 |
suctionPressRated = round(symbolItem.attribute['Suct.P'], 3) |
|
555 |
dischargePressRated = round(symbolItem.attribute['Disc.P'], 3) |
|
556 |
differentialPressRated = round(symbolItem.attribute['Diff.P'], 3) |
|
557 |
differentialHeadRated = round(symbolItem.attribute['Head'], 3) |
|
558 |
nPSHaRated = round(symbolItem.attribute['NPSHa'], 3) |
|
559 |
vaporPressRated = symbolItem.attribute['Vap. P'] |
|
560 |
if datacase_data == Pump_Datacase.Rated_Flow_Case: |
|
561 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "SuctionPressRated", suctionPressRated)) |
|
562 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "DischargePressRated", dischargePressRated)) |
|
563 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "DifferentialPressRated", differentialPressRated)) |
|
564 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "DifferentialHeadRated", differentialHeadRated)) |
|
565 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "NPSHaRated", nPSHaRated)) |
|
566 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "VaporPressRated", vaporPressRated)) |
|
567 |
elif datacase_data == Pump_Datacase.N_A: |
|
568 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "SuctionPressMax", suctionPressRated)) |
|
569 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "DischargePressMax", dischargePressRated)) |
|
570 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "DifferentialPressMax", differentialPressRated)) |
|
571 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "DifferentialHeadMax", differentialHeadRated)) |
|
572 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "NPSHaMax", nPSHaRated)) |
|
573 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "VaporPressMax", vaporPressRated)) |
|
574 |
|
|
575 |
if streamLine: |
|
576 |
if streamLine.data: |
|
577 |
flowrate_volume = streamLine.data.flowrate_volume |
|
578 |
density = streamLine.data.density |
|
579 |
viscosity = streamLine.data.viscosity |
|
580 |
temperature = streamLine.data.temperature |
|
581 |
if datacase_data == Pump_Datacase.Rated_Flow_Case: |
|
582 |
inst_Item.attributes.append(Inst_Attribute("eq_rotating", "DesignCapacity", flowrate_volume)) |
|
583 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "RelativeDensityRated", density)) |
|
584 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "ViscosityRated", viscosity)) |
|
585 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "PumpingTempRated", temperature)) |
|
586 |
elif datacase_data == Pump_Datacase.N_A: |
|
587 |
inst_Item.attributes.append(Inst_Attribute("eq_rotating", "FlowMax", flowrate_volume)) |
|
588 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "RelativeDensityMax", density)) |
|
589 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "ViscosityMax", viscosity)) |
|
590 |
inst_Item.attributes.append(Inst_Attribute("eq_pump", "PumpingTempMax", temperature)) |
|
591 |
inst_Item.printf() |
|
592 |
inst_Items.append(inst_Item) |
|
594 | 593 |
else: |
595 | 594 |
continue |
596 | 595 |
|
내보내기 Unified diff