Menu

Error in Equilibrium Code

The One
2020-09-07
2020-09-09
  • The One

    The One - 2020-09-07

    Hey Daniel,
    I am getting an error in the following IronPython code to find the equilibrium temperature for given pressure and vapor fraction.
    Code:
    feed=[0]
    feed[0]=ims1
    tmp = feed[0].PropertyPackage.CalculateEquilibrium2(FlashCalculationType.PressureVaporFraction, P2, 0, 200)
    T2 = tmp.CalculatedTemperature
    Kindly help me out with this.
    Thank you

     
  • Daniel Medeiros

    Daniel Medeiros - 2020-09-07

    try this before calling the equilibrium routine:

    feed[0].PropertyPackage.CurrentMaterialStream = feed[0]
    
     
  • The One

    The One - 2020-09-08

    The error popping up is that, "name 'FlashCalculationType' is not defined". I guess it is specified using another syntax. Could you confirm this?
    Thank you

     
  • The One

    The One - 2020-09-09

    The updated code used by me was:
    feed=[0]
    feed[0]=ims1
    feed[0].PropertyPackage.CurrentMaterialStream = feed[0]
    tmp=feed[0].PropertyPackage.CalculateEquilibrium2(FlashCalculationType.PressureVaporFraction, P2, 0, 200)
    T2 = tmp.CalculatedTemperature

     
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.