Menu

Override separator parameters from python script

2019-09-16
2019-11-25
  • Ja Eddouibi

    Ja Eddouibi - 2019-09-16

    Hello again,
    Thank you for your reply.
    I want to override temperature and pressure during the simulation of a flash separator but from python script. I read a lot of comments in this forum but i didn't found how to do this. I hope that you have somme suggestions for me.
    Thank you

     
  • Anonymous

    Anonymous - 2019-11-25

    Hi Ja,
    you can easily find and paste the commands you need for this task with the Insert Snippet button in the Script Manager. Anyway, this should be what you were looking for:

    # Define Object Property: OverrideT
    
    obj = Flowsheet.GetFlowsheetSimulationObject('SEP-004')
    obj.OverrideT = True # Override Sep. Temperature
    
    # Define Object Property: OverrideP
    
    obj.OverrideP = True # Override Sep. Pressure
    
    # Define Object Property: FlashTemperature
    
    obj.FlashTemperature = 373.15 # Seperation Temperature in K
    
    # Define Object Property: FlashPressure
    
    obj.FlashPressure = 202650 # Seperation Pressure in Pa
    
     
    👍
    1

    Last edit: Anonymous 2019-11-25
  • Daniel Medeiros

    Daniel Medeiros - 2019-11-25

    Just adding to Stefan's answer, if you override T and/or P, you'll need to connect an energy stream to the separator so DWSIM will calculate the energy balance of the separator and put the energy flow residue on it.

     
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.