Menu

Splitter - Modify Split Ratio via Python

2021-06-24
2021-06-28
  • emre hurturk

    emre hurturk - 2021-06-24

    Hello everyone, I'm trying to change split ratio with python. How can I do it? I searched api help and other discussion pages but couldn't find.
    .....
    f_sheet = iface.LoadFlowsheet(f_sheet_path)
    splitter1 = f_sheet.GetFlowsheetSimulationObject('splitter1')
    splitter1.OperationMode = 0
    ....

     
  • emre hurturk

    emre hurturk - 2021-06-24

    I discovered one way to do redirecting all stream to desired direction. I'm reading mass/mole flow of the stream and giving this value to StreamFlowSpec. But I need to specify material and energy balance tolerance 1e-4 by Classic UI. How can I do with python codes?

     
  • emre hurturk

    emre hurturk - 2021-06-25

    I hope found the answer of question.

    iface = Automation2()
    f_sheet = iface.LoadFlowsheet(f_sheet_path)
    f_sheet.EnergyBalanceRelativeTolerance = 1e-8
    f_sheet.MassBalanceRelativeTolerance = 1e-8

     

    Last edit: emre hurturk 2021-06-25
  • Daniel Medeiros

    Daniel Medeiros - 2021-06-25

    emre, I think that the correct command would be

    iface = Automation2()
    f_sheet = iface.LoadFlowsheet(f_sheet_path)
    f_sheet.FlowsheetOptions.EnergyBalanceRelativeTolerance = 1e-8
    f_sheet.FlowsheetOptions.MassBalanceRelativeTolerance = 1e-8
    
     
  • emre hurturk

    emre hurturk - 2021-06-28

    Yes, you are right, my code did not work. Thank you for answer.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.